使用 XUbuntu 18.10(全新安装)锁定系统时,显示器会立即暂停;按任何键或鼠标按钮都无法唤醒它。CTRL + ALT + F7
最后按 唤醒显示器,并显示以下消息:
This session is locked You'll be redirected to the unlock dialog automatically in a few seconds
然后出现锁定屏幕,一切都按预期进行。
另一个解决方案是输入密码(当显示器仍然空白时),然后按 ENTER,这样就可以唤醒显示器并解锁会话(当然,如果密码输入正确的话)。
我有这些设置(显示电源管理 on
或off
和/或自动锁定会话激活与否没有区别):
预期行为显示电源管理 on
和自动锁定会话激活的是:
- 当首次锁定系统时,显示器应该仍然处于打开状态
- 应显示锁定窗口
- 10 分钟后显示器应该变黑
- 15 分钟后,显示器将进入睡眠状态
- 60 分钟后,显示器应关闭
- 当按下任何键或鼠标时,显示器应打开并显示锁定窗口
我应该怎么做才能获得所需的行为?我也不想通过使用 xscreensaver 来避免这个问题
更新
无论我选择什么,行为都是相同的显示电源管理和/或自动锁定会话。
和电源管理器未登记会话和启动(屏幕锁仍然检查)行为是一样的。我猜这是一个屏幕锁(灯柜) 问题。
这是/var/log/syslog
锁定时创建的:
Apr 12 20:24:26 adrhc systemd[1]: Started /run/user/111 mount wrapper.
Apr 12 20:24:26 adrhc systemd[1]: Created slice User Slice of UID 111.
Apr 12 20:24:26 adrhc systemd[1]: Starting User Manager for UID 111...
Apr 12 20:24:26 adrhc systemd[1]: Started Session c9 of user lightdm.
Apr 12 20:24:26 adrhc systemd[21272]: Reached target Paths.
Apr 12 20:24:26 adrhc systemd[21272]: Listening on GnuPG network certificate management daemon.
Apr 12 20:24:26 adrhc systemd[21272]: Starting D-Bus User Message Bus Socket.
Apr 12 20:24:26 adrhc systemd[21272]: Listening on GnuPG cryptographic agent and passphrase cache.
Apr 12 20:24:26 adrhc systemd[21272]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Apr 12 20:24:26 adrhc systemd[21272]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
Apr 12 20:24:26 adrhc systemd[21272]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Apr 12 20:24:26 adrhc systemd[21272]: Listening on Sound System.
Apr 12 20:24:26 adrhc systemd[21272]: Reached target Timers.
Apr 12 20:24:26 adrhc systemd[21272]: Listening on D-Bus User Message Bus Socket.
Apr 12 20:24:26 adrhc systemd[21272]: Reached target Sockets.
Apr 12 20:24:26 adrhc systemd[21272]: Reached target Basic System.
Apr 12 20:24:26 adrhc systemd[21272]: Reached target Default.
Apr 12 20:24:26 adrhc systemd[21272]: Startup finished in 33ms.
Apr 12 20:24:26 adrhc systemd[1]: Started User Manager for UID 111.
Apr 12 20:24:26 adrhc systemd[21272]: Started D-Bus User Message Bus.
Apr 12 20:24:26 adrhc dbus-daemon[21342]: [session uid=111 pid=21342] AppArmor D-Bus mediation is enabled
Apr 12 20:24:26 adrhc dbus-daemon[21342]: [session uid=111 pid=21342] Activating via systemd: service name='org.a11y.Bus' unit='at-spi-dbus-bus.service' requested by ':1.1' (uid=111 pid=21337 comm="/usr/sbin/lightdm-gtk-greeter " label="unconfined")
Apr 12 20:24:26 adrhc systemd[21272]: Starting Accessibility services bus...
Apr 12 20:24:26 adrhc dbus-daemon[21342]: [session uid=111 pid=21342] Successfully activated service 'org.a11y.Bus'
Apr 12 20:24:26 adrhc systemd[21272]: Started Accessibility services bus.
Apr 12 20:24:26 adrhc at-spi-bus-launcher[21343]: dbus-daemon[21348]: Activating service name='org.a11y.atspi.Registry' requested by ':1.0' (uid=111 pid=21337 comm="/usr/sbin/lightdm-gtk-greeter " label="unconfined")
Apr 12 20:24:26 adrhc dbus-daemon[21342]: [session uid=111 pid=21342] Activating via systemd: service name='org.gtk.vfs.Daemon' unit='gvfs-daemon.service' requested by ':1.3' (uid=111 pid=21337 comm="/usr/sbin/lightdm-gtk-greeter " label="unconfined")
Apr 12 20:24:26 adrhc at-spi-bus-launcher[21343]: dbus-daemon[21348]: Successfully activated service 'org.a11y.atspi.Registry'
Apr 12 20:24:26 adrhc at-spi-bus-launcher[21343]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
Apr 12 20:24:26 adrhc systemd[21272]: Starting Virtual filesystem service...
Apr 12 20:24:26 adrhc dbus-daemon[21342]: [session uid=111 pid=21342] Successfully activated service 'org.gtk.vfs.Daemon'
Apr 12 20:24:26 adrhc systemd[21272]: Started Virtual filesystem service.
Apr 12 20:24:57 adrhc systemd[1]: session-c9.scope: Killing process 21244 (lightdm) with signal SIGTERM.
Apr 12 20:24:57 adrhc systemd[1]: session-c9.scope: Killing process 21327 (gnome-keyring-d) with signal SIGTERM.
Apr 12 20:24:57 adrhc systemd[1]: session-c9.scope: Killing process 21336 (lightdm-greeter) with signal SIGTERM.
Apr 12 20:24:57 adrhc systemd[1]: session-c9.scope: Killing process 21337 (lightdm-gtk-gre) with signal SIGTERM.
Apr 12 20:24:57 adrhc systemd[1]: Stopping Session c9 of user lightdm.
Apr 12 20:24:57 adrhc systemd[1]: Stopped Session c9 of user lightdm.
Apr 12 20:24:57 adrhc systemd[1]: [email protected]: Unit not needed anymore. Stopping.
Apr 12 20:24:57 adrhc systemd[1]: Stopping User Manager for UID 111...
Apr 12 20:24:57 adrhc systemd[21272]: Stopped target Default.
Apr 12 20:24:57 adrhc gvfsd[21352]: A connection to the bus can't be made
Apr 12 20:24:57 adrhc systemd[21272]: Stopping Accessibility services bus...
Apr 12 20:24:57 adrhc systemd[21272]: Stopping D-Bus User Message Bus...
Apr 12 20:24:57 adrhc systemd[21272]: Stopping Virtual filesystem service...
Apr 12 20:24:57 adrhc systemd[21272]: Stopped D-Bus User Message Bus.
Apr 12 20:24:57 adrhc systemd[21272]: Stopped Accessibility services bus.
Apr 12 20:24:57 adrhc systemd[21272]: Stopped Virtual filesystem service.
Apr 12 20:24:57 adrhc systemd[21272]: Stopped target Basic System.
Apr 12 20:24:57 adrhc systemd[21272]: Stopped target Paths.
Apr 12 20:24:57 adrhc systemd[21272]: Stopped target Timers.
Apr 12 20:24:57 adrhc systemd[21272]: Stopped target Sockets.
Apr 12 20:24:57 adrhc systemd[21272]: Closed GnuPG cryptographic agent and passphrase cache (access for web browsers).
Apr 12 20:24:57 adrhc systemd[21272]: Closed GnuPG cryptographic agent and passphrase cache.
Apr 12 20:24:57 adrhc systemd[21272]: Closed Sound System.
Apr 12 20:24:57 adrhc systemd[21272]: Closed GnuPG network certificate management daemon.
Apr 12 20:24:57 adrhc systemd[21272]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
Apr 12 20:24:57 adrhc systemd[21272]: Closed GnuPG cryptographic agent (ssh-agent emulation).
Apr 12 20:24:57 adrhc systemd[21272]: Closed D-Bus User Message Bus Socket.
Apr 12 20:24:57 adrhc systemd[21272]: Reached target Shutdown.
Apr 12 20:24:57 adrhc systemd[21272]: Starting Exit the Session...
Apr 12 20:24:57 adrhc systemd[1]: [email protected]: Unit not needed anymore. Stopping.
Apr 12 20:24:57 adrhc systemd[1]: Stopped User Manager for UID 111.
Apr 12 20:24:57 adrhc systemd[1]: [email protected]: Unit not needed anymore. Stopping.
Apr 12 20:24:57 adrhc systemd[1]: Stopping /run/user/111 mount wrapper...
Apr 12 20:24:57 adrhc systemd[1]: Removed slice User Slice of UID 111.
Apr 12 20:24:57 adrhc systemd[1]: Stopped /run/user/111 mount wrapper.
答案1
我还没有真正解决您的问题,但有一个临时解决方案。
我在这里找到了一种无需重启机器/LightDM 即可恢复的方法。
在您的 tty1 ++Ctrl中,以 root 身份输入,其中是您通过运行获得的会话 ID 。AltF1loginctl unlock-session [id]
[id]
loginctl list-sessions
如果第一个 ID 不起作用,请尝试使用用户帐户的其他会话 ID。
也尝试一下这个。
sudo service lightdm restart
答案2
还有一些人报告了类似的问题。请看: https://github.com/the-cavalry/light-locker/issues/138
一个(临时)解决方案是:
更改脚本:/usr/bin/xflock4
将“light-locker-command -l”行替换为“dm-tool switch-to-greeter”
总共:
for lock_cmd in \
"xfce4-screensaver-command -l" \
"xscreensaver-command -lock" \
"light-locker-command -l" \
"gnome-screensaver-command --lock"
do
$lock_cmd >/dev/null 2>&1 && exit
done
这将变成:
for lock_cmd in \
"xfce4-screensaver-command -l" \
"xscreensaver-command -lock" \
"dm-tool switch-to-greeter" \
"gnome-screensaver-command --lock"
do
$lock_cmd >/dev/null 2>&1 && exit
done