开机时不插入显示器会黑屏的问题

Bionic Beaver
回复
yuhuashi
帖子: 37
注册时间: 2010-07-18 10:19
系统: Linux
送出感谢: 3 次
接收感谢: 0
联系:

开机时不插入显示器会黑屏的问题

#1

帖子 yuhuashi » 2019-03-10 20:21

开机时若没有插入显示器(VGA),再插入显示器后会一直黑屏(但daemon全都启动了),显示器无信号,因此怀疑是 Gnome 或者 gdm 的问题。

我是双主机共用一台显示器,用了一个二进一出的分线盒,两台主机每天同时定时开机,因此会有一台主机的显示器处于未插入状态,就会黑屏。

请问大佬怎么解决这种情况?
90后,程序猿。爱生活,更爱 Coding。
技术博客:http://www.cnblogs.com/0xCAFEBABE
头像
astolia
论坛版主
帖子: 4170
注册时间: 2008-09-18 13:11
送出感谢: 1 次
接收感谢: 694 次

Re: 开机时不插入显示器会黑屏的问题

#2

帖子 astolia » 2019-03-11 10:39

全黑?没有一点东西?用Ctrl-Alt-F1/F2..这些切换tty有效果没?
另外你说的daemon全启动了,包不包括需要依赖图形界面的daemon?
yuhuashi
帖子: 37
注册时间: 2010-07-18 10:19
系统: Linux
送出感谢: 3 次
接收感谢: 0
联系:

Re: 开机时不插入显示器会黑屏的问题

#3

帖子 yuhuashi » 2019-04-07 15:03

astolia 写了:
2019-03-11 10:39
全黑?没有一点东西?用Ctrl-Alt-F1/F2..这些切换tty有效果没?
另外你说的daemon全启动了,包不包括需要依赖图形界面的daemon?
是的,全黑,显示器处于无信号状态。

Ctrl+Alt+F1/F2 这些全都没有反应,但 Num Lock 键是有反应的,说明键盘连接没有问题。

不清楚图形界面都有哪些 daemon,gnome、gdm3 的进程也都启动了,下面是 ps -ef 的结果:

代码: 全选

UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 08:30 ?        00:00:09 /sbin/init splash
root         2     0  0 08:30 ?        00:00:00 [kthreadd]
root         3     2  0 08:30 ?        00:00:00 [rcu_gp]
root         4     2  0 08:30 ?        00:00:00 [rcu_par_gp]
root         6     2  0 08:30 ?        00:00:00 [kworker/0:0H-kb]
root         8     2  0 08:30 ?        00:00:00 [mm_percpu_wq]
root         9     2  0 08:30 ?        00:00:00 [ksoftirqd/0]
root        10     2  0 08:30 ?        00:00:04 [rcu_sched]
root        11     2  0 08:30 ?        00:00:00 [rcu_bh]
root        12     2  0 08:30 ?        00:00:00 [migration/0]
root        13     2  0 08:30 ?        00:00:00 [watchdog/0]
root        14     2  0 08:30 ?        00:00:00 [cpuhp/0]
root        15     2  0 08:30 ?        00:00:00 [cpuhp/1]
root        16     2  0 08:30 ?        00:00:00 [watchdog/1]
root        17     2  0 08:30 ?        00:00:00 [migration/1]
root        18     2  0 08:30 ?        00:00:00 [ksoftirqd/1]
root        20     2  0 08:30 ?        00:00:00 [kworker/1:0H-kb]
root        21     2  0 08:30 ?        00:00:00 [cpuhp/2]
root        22     2  0 08:30 ?        00:00:00 [watchdog/2]
root        23     2  0 08:30 ?        00:00:00 [migration/2]
root        24     2  0 08:30 ?        00:00:00 [ksoftirqd/2]
root        26     2  0 08:30 ?        00:00:00 [kworker/2:0H-kb]
root        27     2  0 08:30 ?        00:00:00 [cpuhp/3]
root        28     2  0 08:30 ?        00:00:00 [watchdog/3]
root        29     2  0 08:30 ?        00:00:00 [migration/3]
root        30     2  0 08:30 ?        00:00:00 [ksoftirqd/3]
root        32     2  0 08:30 ?        00:00:00 [kworker/3:0H-kb]
root        33     2  0 08:30 ?        00:00:00 [kdevtmpfs]
root        34     2  0 08:30 ?        00:00:00 [netns]
root        35     2  0 08:30 ?        00:00:00 [rcu_tasks_kthre]
root        36     2  0 08:30 ?        00:00:00 [kauditd]
root        38     2  0 08:30 ?        00:00:27 [kworker/0:2-eve]
root        40     2  0 08:30 ?        00:00:00 [khungtaskd]
root        41     2  0 08:30 ?        00:00:00 [oom_reaper]
root        42     2  0 08:30 ?        00:00:00 [writeback]
root        43     2  0 08:30 ?        00:00:00 [kcompactd0]
root        44     2  0 08:30 ?        00:00:00 [ksmd]
root        45     2  0 08:30 ?        00:00:00 [khugepaged]
root        46     2  0 08:30 ?        00:00:00 [crypto]
root        47     2  0 08:30 ?        00:00:00 [kintegrityd]
root        48     2  0 08:30 ?        00:00:00 [kblockd]
root        50     2  0 08:30 ?        00:00:00 [ata_sff]
root        51     2  0 08:30 ?        00:00:00 [md]
root        52     2  0 08:30 ?        00:00:00 [edac-poller]
root        53     2  0 08:30 ?        00:00:00 [devfreq_wq]
root        54     2  0 08:30 ?        00:00:00 [watchdogd]
root        56     2  0 08:30 ?        00:00:27 [kworker/3:1-eve]
root        57     2  0 08:30 ?        00:00:00 [irq/24-AMD-Vi]
root        59     2  0 08:30 ?        00:00:00 [kswapd0]
root        60     2  0 08:30 ?        00:00:00 [kworker/u9:0]
root        61     2  0 08:30 ?        00:00:00 [ecryptfs-kthrea]
root       106     2  0 08:30 ?        00:00:00 [kthrotld]
root       107     2  0 08:30 ?        00:00:00 [acpi_thermal_pm]
root       111     2  0 08:30 ?        00:00:00 [ipv6_addrconf]
root       120     2  0 08:30 ?        00:00:00 [kstrp]
root       140     2  0 08:30 ?        00:00:00 [charger_manager]
root       191     2  0 08:30 ?        00:00:00 [scsi_eh_0]
root       192     2  0 08:30 ?        00:00:00 [scsi_tmf_0]
root       193     2  0 08:30 ?        00:00:00 [scsi_eh_1]
root       194     2  0 08:30 ?        00:00:00 [scsi_tmf_1]
root       195     2  0 08:30 ?        00:00:00 [scsi_eh_2]
root       196     2  0 08:30 ?        00:00:00 [scsi_tmf_2]
root       197     2  0 08:30 ?        00:00:00 [scsi_eh_3]
root       198     2  0 08:30 ?        00:00:00 [scsi_tmf_3]
root       199     2  0 08:30 ?        00:00:00 [scsi_eh_4]
root       200     2  0 08:30 ?        00:00:00 [scsi_tmf_4]
root       201     2  0 08:30 ?        00:00:00 [scsi_eh_5]
root       202     2  0 08:30 ?        00:00:00 [scsi_tmf_5]
root       203     2  0 08:30 ?        00:00:00 [scsi_eh_6]
root       204     2  0 08:30 ?        00:00:00 [scsi_tmf_6]
root       205     2  0 08:30 ?        00:00:00 [scsi_eh_7]
root       206     2  0 08:30 ?        00:00:00 [scsi_tmf_7]
root       211     2  0 08:30 ?        00:00:00 [ttm_swap]
root       212     2  0 08:30 ?        00:00:00 [nvidia-modeset]
root       214     2  0 08:30 ?        00:00:00 [kworker/1:1H-kb]
root       242     2  0 08:30 ?        00:00:00 [jbd2/sda2-8]
root       243     2  0 08:30 ?        00:00:00 [ext4-rsv-conver]
root       245     2  0 08:30 ?        00:00:00 [kworker/0:1H-kb]
root       272     2  0 08:30 ?        00:00:00 [kworker/3:1H-kb]
root       273     2  0 08:30 ?        00:00:00 [kworker/2:1H-kb]
root       279     1  0 08:30 ?        00:00:00 /lib/systemd/systemd-journald
root       310     1  0 08:30 ?        00:00:01 /lib/systemd/systemd-udevd
root       327     2  0 08:30 ?        00:00:00 [loop0]
root       328     2  0 08:30 ?        00:00:00 [loop1]
root       329     2  0 08:30 ?        00:00:00 [loop2]
root       330     2  0 08:30 ?        00:00:00 [loop3]
root       331     2  0 08:30 ?        00:00:00 [loop4]
root       332     2  0 08:30 ?        00:00:00 [loop5]
root       333     2  0 08:30 ?        00:00:00 [loop6]
root       334     2  0 08:30 ?        00:00:00 [loop7]
root       335     2  0 08:30 ?        00:00:00 [loop8]
root       336     2  0 08:30 ?        00:00:00 [loop9]
root       337     2  0 08:30 ?        00:00:00 [loop10]
root       338     2  0 08:30 ?        00:00:00 [loop11]
root       339     2  0 08:30 ?        00:00:00 [loop12]
root       340     2  0 08:30 ?        00:00:00 [loop13]
root       341     2  0 08:30 ?        00:00:00 [loop14]
root       342     2  0 08:30 ?        00:00:00 [loop15]
root       365     1  0 08:30 ?        00:03:31 @sbin/plymouthd --mode=boot --pid-file=/run/plymouth/pid --attach-to-session
root       367     2  0 08:30 ?        00:00:00 [UVM global queu]
root       368     2  0 08:30 ?        00:00:00 [UVM Tools Event]
root       571     2  0 08:30 ?        00:00:00 [jbd2/sda3-8]
root       572     2  0 08:30 ?        00:00:00 [ext4-rsv-conver]
systemd+   592     1  0 08:30 ?        00:00:00 /lib/systemd/systemd-resolved
systemd+   593     1  0 08:30 ?        00:00:00 /lib/systemd/systemd-timesyncd
root       684     1  0 08:30 ?        00:00:00 /usr/sbin/ModemManager
root       685     1  0 08:30 ?        00:00:02 /usr/lib/udisks2/udisksd
root       687     1  0 08:30 ?        00:00:00 /lib/systemd/systemd-logind
message+   689     1  0 08:30 ?        00:00:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root       697     1  0 08:30 ?        00:00:00 /usr/lib/accountsservice/accounts-daemon
root       698     1  0 08:30 ?        00:00:00 /usr/sbin/NetworkManager --no-daemon
avahi      699     1  0 08:30 ?        00:00:00 avahi-daemon: running [user-pc.local]
root       700     1  0 08:30 ?        00:00:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
syslog     704     1  0 08:30 ?        00:00:00 /usr/sbin/rsyslogd -n
root       705     1  0 08:30 ?        00:00:02 /usr/lib/snapd/snapd
avahi      707   699  0 08:30 ?        00:00:00 avahi-daemon: chroot helper
root       721     1  0 08:30 ?        00:00:01 /usr/sbin/irqbalance --foreground
root       726     1  0 08:30 ?        00:00:00 /usr/sbin/acpid
root       728     1  0 08:30 ?        00:00:00 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
root       732     1  0 08:30 ?        00:00:00 /usr/sbin/cron -f
root       742     1  0 08:30 ?        00:00:00 /usr/sbin/cups-browsed
root       771     1  0 08:30 ?        00:00:01 /usr/lib/policykit-1/polkitd --no-debug
root       834     1  0 08:30 ?        00:00:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
root       844     1  0 08:30 ?        00:00:00 /bin/plymouth --wait
root       847     1  0 08:30 ?        00:00:00 /usr/sbin/sshd -D
root       852     1  0 08:31 ?        00:00:00 /usr/sbin/gdm3
root       858   852  0 08:31 ?        00:00:00 gdm-session-worker [pam/gdm-launch-environment]
gdm        873     1  0 08:31 ?        00:00:00 /lib/systemd/systemd --user
root       875     2  0 08:31 ?        00:00:03 [irq/57-nvidia]
root       876     2  0 08:31 ?        00:00:00 [nvidia]
nvidia-+   881     1  0 08:31 ?        00:00:00 /usr/bin/nvidia-persistenced --user nvidia-persistenced --no-persistence-mode --verbose
gdm        882   873  0 08:31 ?        00:00:00 (sd-pam)
root       885     2  0 08:31 ?        00:00:00 [UVM GPU1 BH]
gdm        926   858  0 08:31 tty1     00:00:00 /usr/lib/gdm3/gdm-wayland-session gnome-session --autostart /usr/share/gdm/greeter/autostart
gdm        928   873  0 08:31 ?        00:00:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
gdm        930   926  0 08:31 tty1     00:00:00 /usr/lib/gnome-session/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart
root       931   698  0 08:31 ?        00:00:00 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /run/dhclient-enp3s0.pid -lf /var/lib/NetworkManager/dhclient-9873f359-a64e-34f1-aee1-31fffa1b77af-enp3s0.lease -cf /var/lib/NetworkManager/dhclient-enp3s0.conf enp3s0
whoopsie   963     1  0 08:31 ?        00:00:00 /usr/bin/whoopsie -f
kernoops   967     1  0 08:31 ?        00:00:00 /usr/sbin/kerneloops --test
kernoops   971     1  0 08:31 ?        00:00:00 /usr/sbin/kerneloops
gdm       1052   930  0 08:31 tty1     00:00:08 /usr/bin/gnome-shell
root      1187     1  0 08:31 ?        00:00:00 /usr/lib/upower/upowerd
gdm       1365  1052  0 08:31 tty1     00:00:00 /usr/bin/Xwayland :1024 -rootless -terminate -accessx -core -listen 4 -listen 5 -displayfd 6
gdm       1446   873  0 08:31 ?        00:00:00 /usr/lib/at-spi2-core/at-spi-bus-launcher
gdm       1451  1446  0 08:31 ?        00:00:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
gdm       1453   873  0 08:31 ?        00:00:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
gdm       1458   873  0 08:31 ?        00:00:00 /usr/bin/pulseaudio --daemonize=no
rtkit     1463     1  0 08:31 ?        00:00:00 /usr/lib/rtkit/rtkit-daemon
root      1494     1  0 08:31 ?        00:00:00 /usr/lib/packagekit/packagekitd
gdm       1504  1052  0 08:31 tty1     00:00:00 ibus-daemon --xim --panel disable
gdm       1529  1504  0 08:31 tty1     00:00:00 /usr/lib/ibus/ibus-dconf
gdm       1534     1  0 08:31 tty1     00:00:00 /usr/lib/ibus/ibus-x11 --kill-daemon
gdm       1541   873  0 08:31 ?        00:00:00 /usr/lib/ibus/ibus-portal
root      1606     1  0 08:32 ?        00:00:00 /usr/lib/x86_64-linux-gnu/boltd
gdm       1608   930  0 08:32 tty1     00:00:00 /usr/lib/gnome-settings-daemon/gsd-xsettings
gdm       1613   930  0 08:32 tty1     00:00:00 /usr/lib/gnome-settings-daemon/gsd-a11y-settings
gdm       1615   930  0 08:32 tty1     00:00:00 /usr/lib/gnome-settings-daemon/gsd-clipboard
gdm       1618  1504  0 08:32 tty1     00:00:00 /usr/lib/ibus/ibus-engine-simple
gdm       1622   930  0 08:32 tty1     00:00:02 /usr/lib/gnome-settings-daemon/gsd-color
gdm       1623   930  0 08:32 tty1     00:00:00 /usr/lib/gnome-settings-daemon/gsd-datetime
gdm       1652   930  0 08:32 tty1     00:00:00 /usr/lib/gnome-settings-daemon/gsd-housekeeping
gdm       1657   930  0 08:32 tty1     00:00:00 /usr/lib/gnome-settings-daemon/gsd-keyboard
gdm       1661   930  0 08:32 tty1     00:00:00 /usr/lib/gnome-settings-daemon/gsd-media-keys
gdm       1662   930  0 08:32 tty1     00:00:00 /usr/lib/gnome-settings-daemon/gsd-mouse
gdm       1663   930  0 08:32 tty1     00:00:00 /usr/lib/gnome-settings-daemon/gsd-power
gdm       1666   930  0 08:32 tty1     00:00:00 /usr/lib/gnome-settings-daemon/gsd-print-notifications
gdm       1667   930  0 08:32 tty1     00:00:00 /usr/lib/gnome-settings-daemon/gsd-rfkill
gdm       1672   930  0 08:32 tty1     00:00:00 /usr/lib/gnome-settings-daemon/gsd-screensaver-proxy
gdm       1673   930  0 08:32 tty1     00:00:00 /usr/lib/gnome-settings-daemon/gsd-sharing
gdm       1676   930  0 08:32 tty1     00:00:00 /usr/lib/gnome-settings-daemon/gsd-smartcard
gdm       1682   930  0 08:32 tty1     00:00:00 /usr/lib/gnome-settings-daemon/gsd-sound
gdm       1685   930  0 08:32 tty1     00:00:00 /usr/lib/gnome-settings-daemon/gsd-wacom
colord    1723     1  0 08:32 ?        00:00:00 /usr/lib/colord/colord
root      1910     1  0 08:35 ?        00:00:00 /usr/sbin/cupsd -l
lp        1912  1910  0 08:35 ?        00:00:00 /usr/lib/cups/notifier/dbus dbus://
root      1913     2  0 08:35 ?        00:00:25 [kworker/1:1-eve]
root      2933     2  0 10:08 ?        00:00:13 [kworker/2:0-eve]
root      3193     2  0 14:01 ?        00:00:00 [kworker/0:0-eve]
root      3348     2  0 14:21 ?        00:00:00 [kworker/3:2-eve]
root      3484     2  0 14:32 ?        00:00:00 [kworker/u8:1-ev]
root      3486     2  0 14:32 ?        00:00:01 [kworker/1:2-eve]
root      3506     2  0 14:53 ?        00:00:00 [kworker/0:1-eve]
root      3515     2  0 14:53 ?        00:00:00 [kworker/u8:0-ev]
root      3588     2  0 14:56 ?        00:00:00 [kworker/0:3-eve]
root      3614     2  0 14:56 ?        00:00:00 [kworker/3:0-eve]
root      3615     2  0 14:56 ?        00:00:00 [kworker/3:3-eve]
root      3648   847  0 14:58 ?        00:00:00 sshd: user [priv]
user      3650     1  0 14:58 ?        00:00:00 /lib/systemd/systemd --user
user      3651  3650  0 14:58 ?        00:00:00 (sd-pam)
user      3724  3648  0 14:58 ?        00:00:00 sshd: [email protected]/0
user      3725  3724  0 14:58 pts/0    00:00:00 -bash
user      3741  3725  0 14:59 pts/0    00:00:00 ps -ef
90后,程序猿。爱生活,更爱 Coding。
技术博客:http://www.cnblogs.com/0xCAFEBABE
NicholasRee
帖子: 16
注册时间: 2018-08-25 22:20
系统: Ubuntu12.04
送出感谢: 1 次
接收感谢: 0

Re: 开机时不插入显示器会黑屏的问题

#4

帖子 NicholasRee » 2019-10-20 17:56

遇到类似问题,但我用的是ubuntu14.04, Linux3.18.20的内核
1.如果显示器不提前接入主机,系统启动后接入,一直无法唤醒,移动鼠标敲击键盘都无法唤醒,但是键盘数字键盘锁定键有响应的
2.这个情况进一步说明我理解为VGA热插拔问题是这样的:
目前我这边IPC开机进入ubuntu GUI的话,VGA热插拔显示器会自动回复的,/var/log/Xorg.0.log是有自适应分辨率信息的,但是如果我ctrl+alt+F1切换成字符终端,然后再进行VGA热插拔,显示器会进入Entering Power Save Mode且无法唤醒,只有ctrl+al+f7进入图形界面 他又唤醒 了/var/log/Xorg.0.log 信息中有Suspending AIGLX clients for VT switch和Resume AIGLX clients for VT switch.
所以是否和AIGLX有关?又是否和Intel集成显卡 i915有关?这里一直不理解且困扰很久了
fxxk_nvidia
帖子: 2
注册时间: 2019-11-26 15:58
系统: ubuntu 18.04
送出感谢: 0
接收感谢: 0

Re: 开机时不插入显示器会黑屏的问题

#5

帖子 fxxk_nvidia » 2019-12-02 19:55

yuhuashi 写了:
2019-03-10 20:21
开机时若没有插入显示器(VGA),再插入显示器后会一直黑屏(但daemon全都启动了),显示器无信号,因此怀疑是 Gnome 或者 gdm 的问题。

我是双主机共用一台显示器,用了一个二进一出的分线盒,两台主机每天同时定时开机,因此会有一台主机的显示器处于未插入状态,就会黑屏。

请问大佬怎么解决这种情况?
我的18.04也有这个问题,就是睡眠之后无法唤醒,查了一些资料也没有找到比较好的解决办法。
回复

回到 “Ubuntu 18.04 LTS (Bionic Beaver)”