如何减少按下锁定按钮后锁定之前的延迟?

Mar*_*vac 5 lock-screen 17.04

在我新安装的 Ubuntu 17.04 上,按下右上角的Win+或“锁定”按钮后大约 5-10 秒就会出现锁定屏幕。L在这 5-10 秒内什么也没有发生。就好像我没有按下按钮一样。

\n

如何减少这种滞后?我希望它立即锁定。

\n

“锁定屏幕后”设置为“屏幕关闭”:

\n

亮度和锁定设置的屏幕截图

\n

更新 10.05.2017

\n

journalctl -f显示这些消息:

\n
\xd0\xbc\xd0\xb0\xd0\xb9 10 13:16:26 marko-ubuntu compiz[6140]: WARN  2017-05-10 13:16:26 unity.glib.dbus.proxy GLibDBusProxy.cpp:487 Calling method "EmitEvent" on object path: "/com/ubuntu/Upstart" failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name com.canonical.Unity.Test.Upstart was not provided by any .service files\n\xd0\xbc\xd0\xb0\xd0\xb9 10 13:16:26 marko-ubuntu systemd[5720]: Starting Backing Service for the Unity Panel in Lockscreen mode...\n\xd0\xbc\xd0\xb0\xd0\xb9 10 13:16:26 marko-ubuntu systemd[5720]: Started Backing Service for the Unity Panel in Lockscreen mode.\n\xd0\xbc\xd0\xb0\xd0\xb9 10 13:16:26 marko-ubuntu systemd[5720]: Reached target A target that, when running, represents the screen being locked.\n\xd0\xbc\xd0\xb0\xd0\xb9 10 13:16:40 marko-ubuntu compiz[6140]: gkr-pam: unlocked login keyring\n\xd0\xbc\xd0\xb0\xd0\xb9 10 13:16:40 marko-ubuntu repowerd[1051]: LogindSystemPowerControl: change_manager_properties(), BlockInhibited=shutdown:sleep:handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch\n\xd0\xbc\xd0\xb0\xd0\xb9 10 13:16:40 marko-ubuntu unity-panel-ser[6150]: menus_destroyed: assertion \'IS_WINDOW_MENU(wm)\' failed\n\xd0\xbc\xd0\xb0\xd0\xb9 10 13:16:40 marko-ubuntu unity-panel-ser[6150]: menus_destroyed: assertion \'IS_WINDOW_MENU(wm)\' failed\n\xd0\xbc\xd0\xb0\xd0\xb9 10 13:16:40 marko-ubuntu systemd[5720]: Stopped target A target that, when running, represents the screen being locked.\n\xd0\xbc\xd0\xb0\xd0\xb9 10 13:16:40 marko-ubuntu systemd[5720]: Stopping Backing Service for the Unity Panel in Lockscreen mode...\n\xd0\xbc\xd0\xb0\xd0\xb9 10 13:16:40 marko-ubuntu compiz[6140]: WARN  2017-05-10 13:16:40 unity.glib.dbus.proxy GLibDBusProxy.cpp:487 Calling method "EmitEvent" on object path: "/com/ubuntu/Upstart" failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name com.canonical.Unity.Test.Upstart was not provided by any .service files\n\xd0\xbc\xd0\xb0\xd0\xb9 10 13:16:41 marko-ubuntu unity-panel-ser[9016]: Source ID 4294967295 was not found when attempting to remove it\n\xd0\xbc\xd0\xb0\xd0\xb9 10 13:16:41 marko-ubuntu systemd[5720]: Stopped Backing Service for the Unity Panel in Lockscreen mode.\n
Run Code Online (Sandbox Code Playgroud)\n

我在第 20 秒按下了“锁定”按钮。屏幕在第 26 秒转变为锁定模式。因此存在 6 秒的延迟。第 40 秒我重新登录。

\n

更新 18.05.2017

\n

仅在两台显示器上才会发生这种情况。一台显示器不会发生这种情况。

\n

Rav*_*ina 2

我进行了很多搜索以找到可能与此延迟有关但运气不佳的任何内容(配置)。似乎有一个已知的错误[旧]。无论如何,我们仍然可以使用其他工具来实现我们想要的目标,除非该错误正在影响您,您可以使用上面的链接指令来摆脱它。

首先使用这些命令来锁定屏幕,看看哪一个更适合您以及您更喜欢使用哪一个。

$ dm-tool lock
$ gnome-screensaver-command -a  # starts screen saver
Run Code Online (Sandbox Code Playgroud)

现在打开system settings转到keyboard部分和shortcuts选项卡。

现在您可以选择某些内容custom shortcuts并将其分配给类似;的命令。因为默认情况下我们不能使用+ 。CtrlAltldm-tool lockSuperl

但是,如果您坚持使用Super+l来运行您喜欢的命令,请将其设置为您的键绑定并按照操作使其工作。

在此输入图像描述

要禁用 unity 的Super+l键绑定,请运行:

dconf write /org/compiz/profiles/unity/plugins/unityshell/lock-screen "''"
Run Code Online (Sandbox Code Playgroud)

要恢复默认行为:

dconf reset /org/compiz/profiles/unity/plugins/unityshell/lock-screen
Run Code Online (Sandbox Code Playgroud)

或安装compiz setting manager

$ sudo apt install compizconfig-settings-manager
Run Code Online (Sandbox Code Playgroud)

然后运行它:

$ ccsm
Run Code Online (Sandbox Code Playgroud)

转到ubuntu unity plugin部分。在第二行,Key to lock the screen单击按钮<Super>l,取消Enabled选中复选框,然后单击ok

在此输入图像描述