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

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

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

我该如何减少这种延迟?我希望它立即锁定。

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

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

2017 年 5 月 10 日更新

journalctl -f显示这些消息:

май 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
май 10 13:16:26 marko-ubuntu systemd[5720]: Starting Backing Service for the Unity Panel in Lockscreen mode...
май 10 13:16:26 marko-ubuntu systemd[5720]: Started Backing Service for the Unity Panel in Lockscreen mode.
май 10 13:16:26 marko-ubuntu systemd[5720]: Reached target A target that, when running, represents the screen being locked.
май 10 13:16:40 marko-ubuntu compiz[6140]: gkr-pam: unlocked login keyring
май 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
май 10 13:16:40 marko-ubuntu unity-panel-ser[6150]: menus_destroyed: assertion 'IS_WINDOW_MENU(wm)' failed
май 10 13:16:40 marko-ubuntu unity-panel-ser[6150]: menus_destroyed: assertion 'IS_WINDOW_MENU(wm)' failed
май 10 13:16:40 marko-ubuntu systemd[5720]: Stopped target A target that, when running, represents the screen being locked.
май 10 13:16:40 marko-ubuntu systemd[5720]: Stopping Backing Service for the Unity Panel in Lockscreen mode...
май 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
май 10 13:16:41 marko-ubuntu unity-panel-ser[9016]: Source ID 4294967295 was not found when attempting to remove it
май 10 13:16:41 marko-ubuntu systemd[5720]: Stopped Backing Service for the Unity Panel in Lockscreen mode.

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

2017 年 5 月 18 日更新

只有在使用两个显示器时才会发生这种情况。使用一个显示器时不会发生这种情况。

答案1

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

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

$ dm-tool lock
$ gnome-screensaver-command -a  # starts screen saver

现在打开并system settings转到keyboard部分和shortcuts标签。

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

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

在此处输入图片描述

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

dconf write /org/compiz/profiles/unity/plugins/unityshell/lock-screen "''"

要恢复默认行为:

dconf reset /org/compiz/profiles/unity/plugins/unityshell/lock-screen

或安装compiz setting manager

$ sudo apt install compizconfig-settings-manager

然后运行它:

$ ccsm

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

在此处输入图片描述

相关内容