解锁后为何遮光器使屏幕保持黑色?


11

一个用新创建的用户的Xubuntu 16.04完全修补的计算机,在使用光锁锁定屏幕后(无论是手动激活还是通过超时激活),都不会让我解锁。输入正确的密码后,屏幕保持黑色(但已通电)

杀死tty1中的light-locker将会显示桌面(从而防止进一步锁定)。

尝试的步骤:

  • 启用/禁用锁灯设置和电源设置中的锁定(不变)
  • 使用xscreensaver代替了light-locker(有效)
  • 测试问题是否与悬挂或关闭盖子有关(不是)
    • 但是,在暂停后,黑屏会显示该This session is locked: You will be redirected to the unlock dialog automatically in a few seconds消息-不会进行任何重定向
  • 清除+重新安装lightdm,light-locker和xubuntu-default-settings
  • 使用loginctl unlock-session无效
  • systemctl status lightdm 仅显示(无害,预期的)有关kwallet pam模块丢失的消息
  • 检查了dpkg日志,以了解“有效”和“不再有效”之间的升级(无可疑),并启动了先前的内核(问题仍然存在)
  • 比较了会话启动的光锁和手动启动的光锁之间的行为(无差异)
  • 将用户添加到组nopasswdlogin组(锁定后立即出现黑屏,不仅在输入密码之后)

在解决此问题时,可以采取哪些其他步骤来证明有用呢?

调试日志:

$ export LC_ALL=C; light-locker --debug & ( sleep 5; echo "## Locking now"; light-locker-command --lock; sleep 10; echo "### 10 seconds have passed - entering password now"; sleep 10; echo "### 10 more seconds have passwd - Killing"; killall light-locker; sleep 5; echo "### Killed now" )  
[1] 23463
[gs_debug_init] gs-debug.c:106 (00:08:32):   Debugging enabled
[main] light-locker.c:142 (00:08:32):    initializing light-locker 1.7.0
[main] light-locker.c:144 (00:08:32):    lock after screensaver 10
[main] light-locker.c:145 (00:08:32):    late locking 0
[main] light-locker.c:146 (00:08:32):    lock on suspend 1
[main] light-locker.c:147 (00:08:32):    lock on lid 0
[main] light-locker.c:148 (00:08:32):    idle hint 1
[query_session_id] gs-listener-dbus.c:2088 (00:08:32):   org.freedesktop.login1.NoSessionForPID raised:
 PID 23463 does not belong to any known session


[init_session_id] gs-listener-dbus.c:2180 (00:08:32):    Got session-id: (null)
[query_sd_session_id] gs-listener-dbus.c:2164 (00:08:32):    Couldn't determine our own sd session id: No such process
[init_session_id] gs-listener-dbus.c:2185 (00:08:32):    Got sd-session-id: (null)
[init_seat_path] gs-listener-dbus.c:2262 (00:08:32):     Got seat: /org/freedesktop/DisplayManager/Seat0
[gs_listener_delay_suspend] gs-listener-dbus.c:449 (00:08:32):   Delay suspend
[gs_listener_x11_acquire] gs-listener-x11.c:172 (00:08:32):  ScreenSaver Registered
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:32):    obj_path=/org/freedesktop/DBus interface=org.freedesktop.DBus method=NameAcquired destination=:1.316
## Locking now
[gs_grab_grab_root] gs-grab-x11.c:647 (00:08:37):    Grabbing the root window
[gs_grab_get_keyboard] gs-grab-x11.c:153 (00:08:37):     Grabbing keyboard widget=E3
[gs_grab_get_mouse] gs-grab-x11.c:213 (00:08:37):    Grabbing mouse widget=E3
[gs_manager_create_windows_for_screen] gs-manager.c:548 (00:08:37):  Creating 1 windows for screen 0
[gs_manager_create_window_for_monitor] gs-manager.c:324 (00:08:37):  Creating window for monitor 0 [0,0] (1600x900)
[update_geometry] gs-window-x11.c:197 (00:08:37):    got geometry for monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:210 (00:08:37):    using geometry for monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:197 (00:08:37):    got geometry for monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:210 (00:08:37):    using geometry for monitor 0: x=0 y=0 w=1600 h=900
[gs_window_move_resize_window] gs-window-x11.c:243 (00:08:37):   Move and/or resize window on monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:197 (00:08:37):    got geometry for monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:210 (00:08:37):    using geometry for monitor 0: x=0 y=0 w=1600 h=900
[gs_window_move_resize_window] gs-window-x11.c:243 (00:08:37):   Move and/or resize window on monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:197 (00:08:37):    got geometry for monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:210 (00:08:37):    using geometry for monitor 0: x=0 y=0 w=1600 h=900
[gs_window_move_resize_window] gs-window-x11.c:243 (00:08:37):   Move and/or resize window on monitor 0: x=0 y=0 w=1600 h=900
[gs_manager_timed_switch] gs-manager.c:445 (00:08:37):   Start switch to greeter timer
[gs_window_xevent] gs-window-x11.c:369 (00:08:37):   not raising our windows
[window_map_event_cb] gs-manager.c:233 (00:08:37):   Handling window map_event event
[gs_listener_resume_suspend] gs-listener-dbus.c:513 (00:08:37):  Resume suspend: fd=14
[manager_maybe_grab_window] gs-manager.c:204 (00:08:37):     Moving grab to 0x5595f8d5a290
[gs_grab_move_keyboard] gs-grab-x11.c:450 (00:08:37):    Moving keyboard grab from E3 to 3A0000C
[gs_grab_move_keyboard] gs-grab-x11.c:457 (00:08:37):    *** doing X server grab
[gs_grab_release_keyboard] gs-grab-x11.c:279 (00:08:37):     Ungrabbing keyboard
[gs_grab_get_keyboard] gs-grab-x11.c:153 (00:08:37):     Grabbing keyboard widget=3A0000C
[gs_grab_move_keyboard] gs-grab-x11.c:479 (00:08:37):    *** releasing X server grab
[gs_grab_move_mouse] gs-grab-x11.c:395 (00:08:37):   Moving pointer grab from E3 to 3A0000C
[gs_grab_move_mouse] gs-grab-x11.c:402 (00:08:37):   *** doing X server grab
[gs_grab_release_mouse] gs-grab-x11.c:320 (00:08:37):    Ungrabbing pointer
[gs_grab_get_mouse] gs-grab-x11.c:213 (00:08:37):    Grabbing mouse widget=3A0000C
[gs_grab_move_mouse] gs-grab-x11.c:425 (00:08:37):   *** releasing X server grab
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:37):    obj_path=/org/freedesktop/login1 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
[update_geometry] gs-window-x11.c:197 (00:08:37):    got geometry for monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:210 (00:08:37):    using geometry for monitor 0: x=0 y=0 w=1600 h=900
[gs_window_move_resize_window] gs-window-x11.c:243 (00:08:37):   Move and/or resize window on monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:197 (00:08:37):    got geometry for monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:210 (00:08:37):    using geometry for monitor 0: x=0 y=0 w=1600 h=900
[gs_window_move_resize_window] gs-window-x11.c:243 (00:08:37):   Move and/or resize window on monitor 0: x=0 y=0 w=1600 h=900
[gs_listener_send_lock_session] gs-listener-dbus.c:180 (00:08:38):   Send lock session
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:38):    obj_path=(null) interface=(null) method=(null) destination=:1.316
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:39):    obj_path=/org/freedesktop/login1/session/c5 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:39):    obj_path=/org/freedesktop/login1/session/c12 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:39):    obj_path=/org/freedesktop/login1/seat/seat0 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
process 23463: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file ../../dbus/dbus-message.c line 1340.
This is normally a bug in some application using the D-Bus library.
[query_session_active] gs-listener-dbus.c:1124 (00:08:39):   Couldn't allocate the dbus message
[listener_dbus_handle_system_message] gs-listener-dbus.c:1361 (00:08:39):    systemd notified ActiveSession 0
[listener_session_switched_cb] gs-monitor.c:298 (00:08:39):  Session switched: 0
[gs_manager_stop_switch] gs-manager.c:456 (00:08:39):    Stop switch to greeter timer
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:39):    obj_path=/org/freedesktop/login1/seat/seat0 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:39):    obj_path=/org/freedesktop/login1/session/c12 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:39):    obj_path=/org/freedesktop/login1/user/_108 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:39):    obj_path=/org/freedesktop/login1/seat/seat0 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
process 23463: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file ../../dbus/dbus-message.c line 1340.
This is normally a bug in some application using the D-Bus library.
[query_session_active] gs-listener-dbus.c:1124 (00:08:39):   Couldn't allocate the dbus message
[listener_dbus_handle_system_message] gs-listener-dbus.c:1361 (00:08:39):    systemd notified ActiveSession 0
[listener_session_switched_cb] gs-monitor.c:298 (00:08:39):  Session switched: 0
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:39):    obj_path=/org/freedesktop/login1/session/c5 interface=org.freedesktop.login1.Session method=Lock destination=(null)
### 10 seconds have passed - entering password now
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:51):    obj_path=/org/freedesktop/login1/session/c5 interface=org.freedesktop.login1.Session method=Unlock destination=(null)
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:51):    obj_path=/org/freedesktop/login1/session/c13 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:51):    obj_path=/org/freedesktop/login1/session/c5 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:51):    obj_path=/org/freedesktop/login1/seat/seat0 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
process 23463: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file ../../dbus/dbus-message.c line 1340.
This is normally a bug in some application using the D-Bus library.
[query_session_active] gs-listener-dbus.c:1124 (00:08:51):   Couldn't allocate the dbus message
[listener_dbus_handle_system_message] gs-listener-dbus.c:1361 (00:08:51):    systemd notified ActiveSession 0
[listener_session_switched_cb] gs-monitor.c:298 (00:08:51):  Session switched: 0
[xroot_filter] gs-listener-x11.c:124 (00:08:52):     ScreenSaver stopped
### 10 more seconds have passwd - Killing
### Killed now

将其与已知良好的系统比较可得出:

$ comm -3 <(grep -iv grab good | sed 's/[0-9:]\+/[NN]/g;s/[ \t]\+/ /g' | sort) <(grep -iv grab bad | sed 's/[0-9:]\+/[NN]/g;s/[ \t]\+/ /g' | sort) | head -n2
[init_session_id] gs-listener-dbus.c[NN] ([NN])[NN] Got session-id[NN] (null)
[init_session_id] gs-listener-dbus.c[NN] ([NN])[NN] Got session-id[NN] /org/freedesktop/login[NN]/session/c[NN]

确实,关于会话设置似乎有些尴尬:

$ loginctl session-status
Could not get properties: No such process

1
哈哈!您会发现唯一的解决方案是我的解决方案,那就是使用xscreensaver并删除光锁
Fabby 17-10-10

2
您是否有任何尝试light-locker使用手册页中提到的调试选项启动的机会?manpages.ubuntu.com/manpages/xenial/man1/light-locker.1.html
Geek Elder Geek

1
@anx您的赏金将在5个小时内消失...要我重复我的原始答案吗?这不是您想要的,但是当时我遇到了同样的问题,浪费了很多时间,只是去了xscreensaver(玩得开心)
Fabby

好吧,您已经获得了15笔赏金!您的答案比我的要好,您的问题也要比我的要好!
Fabby

Answers:


6

TL; DR:如果systemd无法读取/ proc,则锁光机使屏幕保持黑色

  • light-locker取决于dbus提供IPC
  • dbus取决于systemd-logind提供session信息。
  • systemd-logind取决于/proc提供process信息。

意味着这不能很好地配合使用:

$ file /sbin/init
/sbin/init: symbolic link to /lib/systemd/systemd
$ mount | grep proc
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime,hidepid=2,gid=1337)

而且都不能期望:

hidepid与systemd并不真正兼容。抱歉。[..]无论如何,请关闭,因为这不是systemd引起的。- 伦纳特·珀特林

部分解决方案1

部分解决方案,因为它带有信息公开功能。

允许非特权程序(例如systemd,在删除特权后)访问中的其他用户进程信息/proc

$ sudo mount -o remount,hidepid=0 /proc
 # and fix /etc/fstab accordingly

部分解决方案2

部分解决方案,因为systemd可能会在其他地方中断,而不仅仅是登录。

将systemd-logind添加到适当的组,最方便的方法是添加服务Drop-In。

$ addgroup showpid
$ adduser myuser showpid
$ sudo mount -o remount,hidepid=2,gid=showpid /proc
 # and fix /etc/fstab accordingly
$ echo -e '[Service]\nSupplementaryGroups=showpid' | sudo tee /etc/systemd/system/systemd-logind.service.d/10-showpid.conf
$ sudo systemctl daemon-reload
$ sudo systemctl restart systemd-logind

任何一种解决方案之后,该Got session-id: (null)消息应看起来更像,Got session-id: /org/freedesktop/login1/c7并且light-locker将能够通过进行正确的通信dbus


我应该怎么做才能更快地解决这个问题?

  • 如果发生了什么变化,并且您无法快速找出发生了什么变化,只需获取备份和diff -ruiN整个系统即可。
  • 第一次出现问题时,要更准确地记录下来,因此按时间对日志文件/ IDS报告进行排序将迅速揭示相关原因。
  • 提交更多错误报告。在以后会引起头痛和/或系统锁定的情况下,应用程序无提示地失败是不可接受的。

那么,您是否为此提交了一些错误报告?
jarno
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.