问题描述
该笔记将记录:在 GNOME 3 中,与锁屏有关的内容,以及常见问题的解决方法。
解决方案
禁用锁屏
Disabling the GNOME automatic screen locking :: Fedora Docs
ubuntu – How to disable entirely the GNOME lock screen? – Stack Overflow
在虚拟机中,我们运行 Ubuntu 20.04 TLS 发行版,但是我们并不希望锁屏。
Settings ⇒ Privacy ⇒ Screen Lock ⇒ Automatic Screen Lock ⇒ Off,把能够关闭的全部关闭。
如果过希望彻底禁用锁屏:
# gsettings set org.gnome.desktop.lockdown disable-lock-screen true
当锁屏后,保持屏幕常量(不黑屏)
Unblank screen saver by sun_wang
插件功能:在锁屏后,保持屏幕常亮,而不黑屏。
插件地址:https://extensions.gnome.org/extension/1414/unblank/
关闭黑屏(Blanking Screen)
suspend – Screen keeps turning off on Ubuntu 17.04 after 30 seconds of inactivity – Ask Ubuntu
Display Power Management Signaling – ArchWiki
在 Ubuntu 21.04 中,虽然我们在 Power 中关闭 Blank Screen 设置,但是 30s 之后还是会自动黑屏。
我们尝试过这些方法,但是都未生效:
1)gnome – Screen turning off when idle even with power settings disabled – Ask Ubuntu
2)Set screen blanking time
3)Ubuntu 18.04 will not stop blanking screen – Ask Ubuntu
根据提示(How to stop screen going black after 10 min)该问题需要通过 xset 关闭 DPMS 设置:
xset -dpms
如果希望开机自动生效(持久化配置),需要增加:
# /etc/X11/xorg.conf.d/10-monitor.conf Section "Extensions" Option "DPMS" "Disable" EndSection
为了减小对系统的修改,我们通过如下方式进行持久化配置:
echo "xset -dpms" >> ~/.xprofile # 在 Ubuntu 21.04 中 echo "xset -dpms" >> ~/.xinitrc # 在 Ubuntu 21.04 中,未生效