![不活动时显示屏不会关闭](https://linux22.com/image/923314/%E4%B8%8D%E6%B4%BB%E5%8A%A8%E6%97%B6%E6%98%BE%E7%A4%BA%E5%B1%8F%E4%B8%8D%E4%BC%9A%E5%85%B3%E9%97%AD.png)
我在台式机上使用Ubuntu Studio 18.04.4 TLS
,当系统处于非活动状态时,显示器不会关闭。事实上,如果我触发“屏幕关闭事件”,sh -c "sleep 1 && xset dpms force off"
则会发生以下情况:
- 什么都没有。如果我在 Xfce-power-manager 中等待设置的时间,结果也是一样
- 一旦我移动鼠标或按下键盘键,屏幕就会变黑 2 秒钟,然后恢复正常。
我尝试在调试中运行 xfce-power-manager,但日志中似乎没有出现任何特殊内容:
$ xfce4-power-manager --debug --no-daemon
** (xfce4-power-manager:2770): WARNING **: 18:58:39.574: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.freedesktop.PowerManagement': no such name
** (xfce4-power-manager:2770): WARNING **: 18:58:39.574: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.xfce.PowerManager': no such name
TRACE[xfpm-main.c:205] xfpm_start(): Starting the power manager
TRACE[xfpm-xfconf.c:642] xfpm_xfconf_init(): lock screen FALSE
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for critical-power-level
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for show-brightness-popup
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for handle-brightness-keys
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for show-tray-icon
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for critical-power-action
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for hibernate-button-action
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for sleep-button-action
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for lid-action-on-ac
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for lid-action-on-battery
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for brightness-level-on-ac
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for brightness-level-on-battery
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for brightness-slider-min-level
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for dpms-sleep-mode
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for inactivity-on-ac
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for inactivity-on-battery
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for inactivity-sleep-mode-on-ac
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for inactivity-sleep-mode-on-battery
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for brightness-on-ac
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for brightness-on-battery
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for network-manager-sleep
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for logind-handle-power-key
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for logind-handle-suspend-key
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for logind-handle-hibernate-key
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for heartbeat-command
(xfce4-power-manager:2770): GLib-GObject-WARNING **: 18:58:39.583: ../../../../gobject/gsignal.c:2523: signal 'Changed' is invalid for instance '0x556d00ba3270' of type 'GDBusProxy'
TRACE[xfpm-polkit.c:287] xfpm_polkit_init_data(): Using unix session polkit subject
TRACE[xfpm-polkit.c:345] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2770>, 'start-time': <uint64 208504>}), 'org.freedesktop.login1.power-off', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:366] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.power-off is authorized=TRUE
TRACE[xfpm-polkit.c:345] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2770>, 'start-time': <uint64 208504>}), 'org.freedesktop.login1.reboot', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:366] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.reboot is authorized=TRUE
TRACE[xfpm-polkit.c:345] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2770>, 'start-time': <uint64 208504>}), 'org.freedesktop.login1.suspend', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:366] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.suspend is authorized=TRUE
TRACE[xfpm-polkit.c:345] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2770>, 'start-time': <uint64 208504>}), 'org.freedesktop.login1.hibernate', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:366] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.hibernate is authorized=FALSE
TRACE[xfpm-power.c:213] xfpm_power_check_polkit_auth(): using logind suspend backend
TRACE[xfpm-polkit.c:345] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2770>, 'start-time': <uint64 208504>}), 'org.freedesktop.login1.suspend', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:366] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.suspend is authorized=TRUE
TRACE[xfpm-polkit.c:345] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 2770>, 'start-time': <uint64 208504>}), 'org.freedesktop.login1.hibernate', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:366] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.hibernate is authorized=FALSE
TRACE[xfpm-power.c:1446] xfpm_update_blank_time(): Timeout: 10
TRACE[xfpm-power.c:1446] xfpm_update_blank_time(): Timeout: 10
TRACE[xfpm-power.c:1446] xfpm_update_blank_time(): Timeout: 10
TRACE[xfpm-power.c:1446] xfpm_update_blank_time(): Timeout: 7
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 124 : ((XfpmButtonKey) BUTTON_POWER_OFF)
(xfce4-power-manager:2770): xfce4-power-manager-WARNING **: 18:58:39.595: could not map keysym 1008ffa8 to keycode
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 213 : ((XfpmButtonKey) BUTTON_HIBERNATE)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 150 : ((XfpmButtonKey) BUTTON_SLEEP)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 233 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 232 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 244 : ((XfpmButtonKey) BUTTON_BATTERY)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 238 : ((XfpmButtonKey) BUTTON_KBD_BRIGHTNESS_UP)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 237 : ((XfpmButtonKey) BUTTON_KBD_BRIGHTNESS_DOWN)
TRACE[xfpm-manager.c:645] xfpm_manager_inhibit_sleep_systemd(): Inhibiting systemd sleep: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
(xfce4-power-manager:2770): GLib-CRITICAL **: 18:58:39.598: g_error_free: assertion 'error != NULL' failed
(xfce4-power-manager:2770): xfce4-power-manager-WARNING **: 18:58:39.601: Failed to get keyboard max brightness level : GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: L'interface « org.freedesktop.UPower.KbdBacklight » n'existe pas pour l'objet à l'emplacement /org/freedesktop/UPower/KbdBacklight
(xfce4-power-manager:2770): xfce4-power-manager-WARNING **: 18:58:39.601: Failed to get keyboard max brightness level : GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: L'interface « org.freedesktop.UPower.KbdBacklight » n'existe pas pour l'objet à l'emplacement /org/freedesktop/UPower/KbdBacklight
TRACE[xfpm-polkit.c:244] xfpm_polkit_free_data(): Destroying Polkit data
我目前发现的情况:
- 如果我杀死
xfce_power_manager
相同的行为,xset dpms force off
或者其变体强制暂停或强制待机 - 杰克是否在跑步并不重要。
- 它是原装的 Ubuntu Studio,没有安装其他屏幕保护程序
以下是一些配置输出:
$ xfconf-query -c xfce4-power-manager -lv
/xfce4-power-manager/blank-on-ac 7
/xfce4-power-manager/blank-on-battery 10
/xfce4-power-manager/dpms-enabled true
/xfce4-power-manager/dpms-on-ac-off 9
/xfce4-power-manager/dpms-on-ac-sleep 8
/xfce4-power-manager/dpms-on-battery-off 30
/xfce4-power-manager/dpms-on-battery-sleep 15
/xfce4-power-manager/general-notification false
/xfce4-power-manager/lock-screen-suspend-hibernate false
/xfce4-power-manager/logind-handle-lid-switch false
/xfce4-power-manager/power-button-action 3
/xfce4-power-manager/presentation-mode false
/xfce4-power-manager/show-panel-label 0
xset q
Keyboard Control:
auto repeat: on key click percent: 0 LED mask: 00000002
XKB indicators:
00: Caps Lock: off 01: Num Lock: on 02: Scroll Lock: off
03: Compose: off 04: Kana: off 05: Sleep: off
06: Suspend: off 07: Mute: off 08: Misc: off
09: Mail: off 10: Charging: off 11: Shift Lock: off
12: Group 2: off 13: Mouse Keys: off
auto repeat delay: 500 repeat rate: 20
auto repeating keys: 00ffffffdffffbbf
fadfffefffedffff
9fffffffffffffff
fff7ffffffffffff
bell percent: 50 bell pitch: 400 bell duration: 100
Pointer Control:
acceleration: 2/1 threshold: 4
Screen Saver:
prefer blanking: yes allow exposures: yes
timeout: 420 cycle: 0
Colors:
default colormap: 0x20 BlackPixel: 0x0 WhitePixel: 0xffffff
Font Path:
/usr/share/fonts/X11/misc,/usr/share/fonts/X11/Type1,built-ins
DPMS (Energy Star):
Standby: 480 Suspend: 0 Off: 540
DPMS is Enabled
Monitor is On
我有一个双显示器配置,通过 DisplayPort 链接到 Nvidia GTX 1660,驱动程序版本为 430.50
如果需要的话我会添加更多信息。
答案1
我的 jackd 配置崩溃后,我重新安装了 Ubuntu Studio 20.04,它可以正常工作,显示屏按预期关闭。如果其他人遇到同样的问题,我很抱歉,我无法提供简单的解决方案。