我使用内核版本为 5.12.13 的 Void Linux 和 LXQt,并希望使用 XScreenSaver 6.01 来锁定屏幕。
然而,在屏幕上写密码是相当困难的,xscreensaver-auth
因为每次我使用 Shift 键以大写形式书写时,XScreenSaver 都会滞后。让我向您提供更多信息:当显示屏幕保护程序时,我按一个键以获取密码提示。第一次出现大约 5 秒的滞后。 (它不知道这个是否与其他密码相关。)我可以毫无问题地输入小写密码,但是一旦我按下 Shift(或大写锁定键),我的电脑(显示器和鼠标) )在允许我输入大写键之前滞后大约 5 秒。当我释放 Shift 键(或禁用大写锁定键)时,也会发生相同的现象。
某个进程中可能存在错误,但我无法识别该错误。它似乎与我的键盘布局(法文键盘布局)无关,因为它与美式键盘布局相同。在 XScreenSaver 之外,Shift 和大写锁定键工作正常。我的显卡没有任何问题,它可以很好地显示屏幕保护程序。
xscreensaver
以下是我使用该选项启动时所写入内容的摘录--verbose
:
xscreensaver-auth: 19:50:34: initial effective uid/gid was root/user (0/1000)
xscreensaver-auth: 19:50:34: changed uid/gid to user/user (1000/1000)
xscreensaver-auth: 19:50:34: running as user "user"
xscreensaver-auth: 19:50:34: PAM: pam_start ("xscreensaver", "user", ...) ==> 0 (Succès)
xscreensaver-auth: 19:50:34: pam_set_item (p, PAM_TTY, ":0") ==> 0 (Succès)
xscreensaver-auth: 19:50:34: pam_authenticate (...) ...
xscreensaver-auth: 19:50:34: pam_conversation (ECHO_OFF="Mot de passe : ") ...
xscreensaver-auth: 19:50:34: theme: default
xscreensaver-auth: 19:50:38: kbd layout: French
xscreensaver-auth: 19:50:38: mouse is at 719,577 on monitor 0 1600x900+0+0 "eDP1"
xscreensaver-auth: 19:50:38: re-creating window: size changed
xscreensaver-auth: 19:50:39: XI RawKeyPress
xscreensaver-auth: 19:50:39: XKB event 2
xscreensaver-auth: 19:50:43: kbd layout: French
xscreensaver-auth: 19:50:44: XI RawKeyPress
xscreensaver-auth: 19:50:44: XI RawKeyRelease
xscreensaver-auth: 19:50:44: XI RawKeyPress
xscreensaver-auth: 19:50:44: XI RawKeyRelease
xscreensaver-auth: 19:50:44: XI RawKeyPress
xscreensaver-auth: 19:50:44: XI RawKeyRelease
xscreensaver-auth: 19:50:45: XI RawKeyPress
xscreensaver-auth: 19:50:45: XI RawKeyRelease
xscreensaver-auth: 19:50:45: XI RawKeyPress
xscreensaver-auth: 19:50:45: XI RawKeyRelease
xscreensaver-auth: 19:50:45: XI RawKeyRelease
xscreensaver-auth: 19:50:45: XKB event 2
xscreensaver-auth: 19:50:49: kbd layout: French
在 19:50:39,我按下 Shift 键,在 19:50:45,我松开它。
系统日志记录的帮助是启用的这页面,但svlogtail
在滞后期间不显示任何内容。
/var/log/Xorg.0.log
--- 启动屏幕保护程序后显示:
[ 18271.902] (EE) event5 - Logitech M215: client bug: event processing lagging behind by 4021ms, your system is too slow
[ 18271.902] (EE) client bug: timer event5 debounce: scheduled expiry is in the past (-3996ms), your system is too slow
[ 18271.902] (EE) client bug: timer event5 debounce short: scheduled expiry is in the past (-4009ms), your system is too slow
[ 18280.862] (II) event0 - AT Translated Set 2 keyboard: SYN_DROPPED event - some input events have been lost.
[ 18302.431] (II) event0 - AT Translated Set 2 keyboard: SYN_DROPPED event - some input events have been lost.
Logitech M215
是我的鼠标。
有任何想法吗?
答案1
xscreensaver
我在 Debian Bookworm版本 6.02+dfsg1-2上观察到类似的问题。这不是 5 秒的延迟,而是毫秒范围内的延迟,但足以xscreensaver
反复丢弃我的大写密码字母,这让我很恼火。 5.45 并没有发生这种情况。
其他谈论的地方: https://github.com/Zygo/xscreensaver/issues/11
这可能是由xinput.c
,引起的xinput_event_to_xlib_1
,其中有解释种族的评论:
The closest thing to actual documentation on XInput2 seems to be a series
of blog posts by Peter Hutterer. There's basically nothing about it on
www.x.org. In http://who-t.blogspot.com/2009/07/xi2-recipes-part-4.html
he says:
"XIDeviceEvent [...] contains the state of the modifier keys [...]
The base modifiers are the ones currently pressed, latched the ones
pressed until a key is pressed that's configured to unlatch it (e.g.
some shift-capslock interactions have this behaviour) and finally
locked modifiers are the ones permanently active until unlocked
(default capslock behaviour in the US layout). The effective modifiers
are a bitwise OR of the three above - which is essentially equivalent
to the modifiers state supplied in the core protocol events."
However, I'm seeing random noise in the various XIDeviceEvent.mods fields.
Nonsensical values like base = 0x6045FB3D. So, let's poll the actual
modifiers from XQueryPointer. This can race: maybe the modifier state
changed between when the server generated the keyboard event, and when
we receive it and poll. However, if an actual human is typing and
releasing their modifier keys on such a tight timeframe... that's
probably already not going well.
I'm also seeing random noise in the event_xy and root_xy fields in
motion events. So just always use XQueryPointer.
我的键盘带有“点击层”,这解释了“时间紧迫”
编辑:经过一些调试并与 Jamie Zawinski(xscreensaver 作者)交换了几封电子邮件后,我通过duplicate_xinput_event_p
修补xinput.c
.它可能会以类似或不同的方式在上游得到修复。同时,我将在链接的 github 上发布补丁(在这里发布似乎太大了)。