Ubuntu 18.04 不会停止黑屏

Ubuntu 18.04 不会停止黑屏

这是 17.10 中的一个问题,并且延续到了 18.04,现在它让我抓狂不已。

我的屏幕闲置一分钟后就会变黑。我甚至无法阅读文章。

在 Gnome 设置中,Privacy > Lock screen已关闭,我已设置Power > Blank Screen为,NeverAutomatic Suspend设置为Off

我还需要禁用什么?我会决定何时锁定屏幕。我只想关闭所有功能。

更新

我还检查并排除了其他事项:

我已经安装了 Dconf Editor 并检查了那里的设置,但我找不到任何可以改变行为的东西。我尝试禁用idle-dim下面的设置/org/gnome/settings-daemon/plugins/power,并尝试禁用整个电源插件,这两种改变都没有对行为产生影响。

我还仔细检查了nvidia-settings应用程序,没有发现任何与电源或屏幕消隐相关的内容。我的 xorg 服务器使用开箱即用的自动检测进行启动,并且我的系统上没有任何 xorg.conf 设置。对我来说,这只是 18.04 的默认行为。

找到了这个问题并检查xset q输出,添加它。您会注意到我的timeoutcycle设置位于0那里,这是解决方案,但我的已经设置为 0,我的屏幕仍然空白。无论如何,这个问题是针对 Unity 的,而我的问题针对 Gnome3

routhinator@chris-desktop:~$ xset q
Keyboard Control:
  auto repeat:  on    key click percent:  0    LED mask:  00000002
  XKB indicators:
    00: Caps Lock:   off    01: Num Lock:    on     02: Scroll Lock: off
    03: Compose:     off    04: Kana:        off    05: Sleep:       off
    06: Suspend:     off    07: Mute:        off    08: Misc:        off
    09: Mail:        off    10: Charging:    off    11: Shift Lock:  off
    12: Group 2:     off    13: Mouse Keys:  off
  auto repeat delay:  500    repeat rate:  33
  auto repeating keys:  00ffffffdffffbbf
                        fadfffefffedffff
                        9fffffffffffffff
                        fff7ffffffffffff
  bell percent:  50    bell pitch:  400    bell duration:  100
Pointer Control:
  acceleration:  2/1    threshold:  4
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  0    cycle:  0
Colors:
  default colormap:  0x20    BlackPixel:  0x0    WhitePixel:  0xffffff
Font Path:
  /usr/share/fonts/X11/misc,/usr/share/fonts/X11/Type1,built-ins
DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 0
  DPMS is Enabled
  Monitor is On

更新 2

按照@WinEunuuchs2Unix 我已经检查、更改并重新检查了这个问题而且问题仍然存在。

另一方面,这些需要手动更改的设置似乎是一个长期存在的错误,Ubuntu 早就应该修复了,因为这些正是我以为我在电源设置中关闭的设置。

routhinator@chris-desktop:~$ gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout
1800
routhinator@chris-desktop:~$ gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout
3600
routhinator@chris-desktop:~$ gsettings get org.gnome.desktop.screensaver idle-activation-enabled
true
routhinator@chris-desktop:~$ gsettings get org.gnome.settings-daemon.plugins.power idle-dim
true

routhinator@chris-desktop:~$ gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0
routhinator@chris-desktop:~$ gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
routhinator@chris-desktop:~$ gsettings set org.gnome.desktop.screensaver idle-activation-enabled false
routhinator@chris-desktop:~$ gsettings set org.gnome.settings-daemon.plugins.power idle-dim false

routhinator@chris-desktop:~$ gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout
0
routhinator@chris-desktop:~$ gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout
0
routhinator@chris-desktop:~$ gsettings get org.gnome.desktop.screensaver idle-activation-enabled
false
routhinator@chris-desktop:~$ gsettings get org.gnome.settings-daemon.plugins.power idle-dim
false

更新 3

根据要求的 lspci 输出:

routhinator@chris-desktop:~$ lspci
00:00.0 Host bridge: Intel Corporation 5520/5500/X58 I/O Hub to ESI Port (rev 13)
00:01.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 1 (rev 13)
00:02.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 2 (rev 13)
00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 3 (rev 13)
00:07.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 7 (rev 13)
00:14.0 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub System Management Registers (rev 13)
00:14.1 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub GPIO and Scratch Pad Registers (rev 13)
00:14.2 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub Control Status and RAS Registers (rev 13)
00:14.3 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub Throttle Registers (rev 13)
00:19.0 Ethernet controller: Intel Corporation 82567V-2 Gigabit Network Connection
00:1a.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #4
00:1a.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #5
00:1a.2 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #6
00:1a.7 USB controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #2
00:1b.0 Audio device: Intel Corporation 82801JI (ICH10 Family) HD Audio Controller
00:1c.0 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Root Port 1
00:1c.4 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Root Port 5
00:1d.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #1
00:1d.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #2
00:1d.2 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #3
00:1d.7 USB controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #1
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 90)
00:1f.0 ISA bridge: Intel Corporation 82801JIR (ICH10R) LPC Interface Controller
00:1f.2 IDE interface: Intel Corporation 82801JI (ICH10 Family) 4 port SATA IDE Controller #1
00:1f.3 SMBus: Intel Corporation 82801JI (ICH10 Family) SMBus Controller
00:1f.5 IDE interface: Intel Corporation 82801JI (ICH10 Family) 2 port SATA IDE Controller #2
01:00.0 IDE interface: Marvell Technology Group Ltd. Device 91a3 (rev 11)
02:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 03)
03:00.0 VGA compatible controller: NVIDIA Corporation GK106 [GeForce GTX 660] (rev a1)
03:00.1 Audio device: NVIDIA Corporation GK106 HDMI Audio Controller (rev a1)
04:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)
04:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller (rev a1)
05:00.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6315 Series Firewire Controller (rev 01)
ff:00.0 Host bridge: Intel Corporation Xeon 5500/Core i7 QuickPath Architecture Generic Non-Core Registers (rev 05)
ff:00.1 Host bridge: Intel Corporation Xeon 5500/Core i7 QuickPath Architecture System Address Decoder (rev 05)
ff:02.0 Host bridge: Intel Corporation Xeon 5500/Core i7 QPI Link 0 (rev 05)
ff:02.1 Host bridge: Intel Corporation Xeon 5500/Core i7 QPI Physical 0 (rev 05)
ff:03.0 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller (rev 05)
ff:03.1 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Target Address Decoder (rev 05)
ff:03.4 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Test Registers (rev 05)
ff:04.0 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 0 Control Registers (rev 05)
ff:04.1 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 0 Address Registers (rev 05)
ff:04.2 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 0 Rank Registers (rev 05)
ff:04.3 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 0 Thermal Control Registers (rev 05)
ff:05.0 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 1 Control Registers (rev 05)
ff:05.1 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 1 Address Registers (rev 05)
ff:05.2 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 1 Rank Registers (rev 05)
ff:05.3 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 1 Thermal Control Registers (rev 05)
ff:06.0 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 2 Control Registers (rev 05)
ff:06.1 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 2 Address Registers (rev 05)
ff:06.2 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 2 Rank Registers (rev 05)
ff:06.3 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 2 Thermal Control Registers (rev 05)

答案1

我在一台安装了 Ubuntu 18.04 Desktop 但实际上用作服务器的机器上也遇到了这种情况。因此屏幕变黑了,无法恢复。最后,我发现这实际上是由睡眠设置引起的。

由于该机器使用 LXDE,根本没有安装 Gnome,因此我发现的所有提及 gsettings 等的建议都无法使用。最终我被引导到睡眠设置,与正在使用的登录/窗口管理器无关。

因此,除了之前文章中列出的 gsettings 解决方案之外,还可以通过禁用睡眠服务来测试此解决方案,看看是否能解决问题:

sudo systemctl mask sleep.target

要撤消更改:

sudo systemctl unmask sleep.target

为了防止任何不必要的行为,我还禁用了 suspend.target、hibernate.target 和 hybrid-sleep.target。

答案2

我也遇到了类似的问题,直到我安装了可通过软件应用程序使用的名为“caffeine”的 gnome 扩展。

答案3

这个问答似乎描述了你的情况:即使电源设置已禁用,屏幕在空闲时也会关闭

总结一下答案,首先发现您的选择:

gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout
gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout
gsettings get org.gnome.desktop.screensaver idle-activation-enabled
gsettings get org.gnome.settings-daemon.plugins.power idle-dim

然后用以下方式设置它们:

gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
gsettings set org.gnome.desktop.screensaver idle-activation-enabled false
gsettings set org.gnome.settings-daemon.plugins.power idle-dim false

相关内容