我正在使用一台笔记本电脑,其内部屏幕坏了,已断开连接。这台笔记本电脑现在用作台式机,一台显示器通过 HDMI 连接,另一台显示器通过 VGA 连接显示端口连接器。
中央处理器:英特尔(R) 酷睿(TM) i7-4700HQ 中央处理器 @ 2.40GHz 图形处理器:GK107M [GeForce GT 750M]
之前一切运行良好,操作系统:Ubuntu 18.04 Nvidia-driver:nvidia-driver-390
今天当我通过 HDMI 启动显示器时,它不再工作。然后我尝试:
sudo nvidia-xconfig
重启后,系统在登录屏幕后冻结。
通过 ctrl-alt-f2 我可以删除 nvidia 驱动程序并安装较新的 nvidia-driver-415
此后,启动再次正常并且两个屏幕均正常工作。
但是,显示端口/VGA 屏幕的分辨率仅为 640x480,当我尝试打开设置时,它又自动关闭了。当我通过 ie 声音打开设置时,它确实可以工作,但是当我单击设备选项卡时,它就关闭了。
cat /etc/X11/xorg.conf
显示它仍然使用驱动程序 390,所以我备份了它并再次运行 sudo nvidia-xconfig 并重新启动。此后,它显示了正确的版本,但错误没有变化。我还尝试重新安装 gnome-control-center,但这也没有效果。
这是我今天早上的 history.log 的输出:
Start-Date: 2019-09-04 11:24:41
Commandline: /usr/bin/unattended-upgrade
Upgrade: libnss-myhostname:amd64 (237-3ubuntu10.25, 237-3ubuntu10.28)
End-Date: 2019-09-04 11:24:42
Start-Date: 2019-09-04 11:24:45
Commandline: /usr/bin/unattended-upgrade
Upgrade: linux-libc-dev:amd64 (4.15.0-58.64, 4.15.0-60.67)
End-Date: 2019-09-04 11:24:47
Start-Date: 2019-09-04 11:24:50
Commandline: /usr/bin/unattended-upgrade
Upgrade: systemd-sysv:amd64 (237-3ubuntu10.25, 237-3ubuntu10.28)
End-Date: 2019-09-04 11:24:53
Start-Date: 2019-09-04 11:24:56
Commandline: /usr/bin/unattended-upgrade
Upgrade: udev:amd64 (237-3ubuntu10.25, 237-3ubuntu10.28), libudev1:amd64 (237-3ubuntu10.25, 237-3ubuntu10.28)
End-Date: 2019-09-04 11:25:12
Start-Date: 2019-09-04 11:25:16
Commandline: /usr/bin/unattended-upgrade
Upgrade: libsystemd0:amd64 (237-3ubuntu10.25, 237-3ubuntu10.28), libpam-systemd:amd64 (237-3ubuntu10.25, 237-3ubuntu10.28), systemd:amd64 (237-3ubuntu10.25, 237-3ubuntu10.28), libnss-systemd:amd64 (237-3ubuntu10.25, 237-3ubuntu10.28)
End-Date: 2019-09-04 11:25:22
Start-Date: 2019-09-04 11:25:24
Commandline: /usr/bin/unattended-upgrade
Install: linux-headers-5.0.0-27:amd64 (5.0.0-27.28~18.04.1, automatic), linux-modules-5.0.0-27-generic:amd64 (5.0.0-27.28~18.04.1, automatic), linux-image-5.0.0-27-generic:amd64 (5.0.0-27.28~18.04.1, automatic), linux-modules-extra-5.0.0-27-generic:amd64 (5.0.0-27.28~18.04.1, automatic), linux-headers-5.0.0-27-generic:amd64 (5.0.0-27.28~18.04.1, automatic)
Upgrade: linux-headers-generic-hwe-18.04:amd64 (5.0.0.25.82, 5.0.0.27.84), linux-image-generic-hwe-18.04:amd64 (5.0.0.25.82, 5.0.0.27.84), linux-generic-hwe-18.04:amd64 (5.0.0.25.82, 5.0.0.27.84)
End-Date: 2019-09-04 11:27:02
Start-Date: 2019-09-05 11:28:39
Commandline: /usr/bin/unattended-upgrade
Remove: linux-headers-5.0.0-23:amd64 (5.0.0-23.24~18.04.1), linux-headers-5.0.0-23-generic:amd64 (5.0.0-23.24~18.04.1)
End-Date: 2019-09-05 11:28:41
Start-Date: 2019-09-05 11:28:43
Commandline: /usr/bin/unattended-upgrade
Remove: linux-image-5.0.0-23-generic:amd64 (5.0.0-23.24~18.04.1), linux-modules-extra-5.0.0-23-generic:amd64 (5.0.0-23.24~18.04.1)
End-Date: 2019-09-05 11:28:47
Start-Date: 2019-09-05 11:28:53
Commandline: /usr/bin/unattended-upgrade
Upgrade: firefox:amd64 (68.0.2+build1-0ubuntu0.18.04.1, 69.0+build2-0ubuntu0.18.04.1)
End-Date: 2019-09-05 11:29:00
Start-Date: 2019-09-05 11:29:04
Commandline: /usr/bin/unattended-upgrade
Upgrade: firefox-locale-en:amd64 (68.0.2+build1-0ubuntu0.18.04.1, 69.0+build2-0ubuntu0.18.04.1)
End-Date: 2019-09-05 11:29:04
Start-Date: 2019-09-05 11:36:26
Commandline: aptdaemon role='role-commit-packages' sender=':1.128'
Upgrade: fdisk:amd64 (2.31.1-0.4ubuntu3.3, 2.31.1-0.4ubuntu3.4), libisccfg160:amd64 (1:9.11.3+dfsg-1ubuntu1.8, 1:9.11.3+dfsg-1ubuntu1.9), uuid-runtime:amd64 (2.31.1-0.4ubuntu3.3, 2.31.1-0.4ubuntu3.4), libfdisk1:amd64 (2.31.1-0.4ubuntu3.3, 2.31.1-0.4ubuntu3.4), libmount1:amd64 (2.31.1-0.4ubuntu3.3, 2.31.1-0.4ubuntu3.4), snapd:amd64 (2.39.2+18.04, 2.40+18.04), libirs160:amd64 (1:9.11.3+dfsg-1ubuntu1.8, 1:9.11.3+dfsg-1ubuntu1.9), bind9-host:amd64 (1:9.11.3+dfsg-1ubuntu1.8, 1:9.11.3+dfsg-1ubuntu1.9), libarchive13:amd64 (3.2.2-3.1ubuntu0.3, 3.2.2-3.1ubuntu0.4), dnsutils:amd64 (1:9.11.3+dfsg-1ubuntu1.8, 1:9.11.3+dfsg-1ubuntu1.9), util-linux:amd64 (2.31.1-0.4ubuntu3.3, 2.31.1-0.4ubuntu3.4), libisc169:amd64 (1:9.11.3+dfsg-1ubuntu1.8, 1:9.11.3+dfsg-1ubuntu1.9), xkb-data:amd64 (2.23.1-1ubuntu1, 2.23.1-1ubuntu1.18.04.1), mount:amd64 (2.31.1-0.4ubuntu3.3, 2.31.1-0.4ubuntu3.4), libblkid1:amd64 (2.31.1-0.4ubuntu3.3, 2.31.1-0.4ubuntu3.4), libisc-export169:amd64 (1:9.11.3+dfsg-1ubuntu1.8, 1:9.11.3+dfsg-1ubuntu1.9), gir1.2-snapd-1:amd64 (1.47-0ubuntu0.18.04.0, 1.49-0ubuntu0.18.04.0), libuuid1:amd64 (2.31.1-0.4ubuntu3.3, 2.31.1-0.4ubuntu3.4), liblwres160:amd64 (1:9.11.3+dfsg-1ubuntu1.8, 1:9.11.3+dfsg-1ubuntu1.9), libsmartcols1:amd64 (2.31.1-0.4ubuntu3.3, 2.31.1-0.4ubuntu3.4), rfkill:amd64 (2.31.1-0.4ubuntu3.3, 2.31.1-0.4ubuntu3.4), libdns-export1100:amd64 (1:9.11.3+dfsg-1ubuntu1.8, 1:9.11.3+dfsg-1ubuntu1.9), bsdutils:amd64 (1:2.31.1-0.4ubuntu3.3, 1:2.31.1-0.4ubuntu3.4), libisccc160:amd64 (1:9.11.3+dfsg-1ubuntu1.8, 1:9.11.3+dfsg-1ubuntu1.9), libsnapd-glib1:amd64 (1.47-0ubuntu0.18.04.0, 1.49-0ubuntu0.18.04.0), libbind9-160:amd64 (1:9.11.3+dfsg-1ubuntu1.8, 1:9.11.3+dfsg-1ubuntu1.9), libdns1100:amd64 (1:9.11.3+dfsg-1ubuntu1.8, 1:9.11.3+dfsg-1ubuntu1.9), docker-ce:amd64 (5:19.03.1~3-0~ubuntu-bionic, 5:19.03.2~3-0~ubuntu-bionic), docker-ce-cli:amd64 (5:19.03.1~3-0~ubuntu-bionic, 5:19.03.2~3-0~ubuntu-bionic)
Remove: linux-modules-5.0.0-23-generic:amd64 (5.0.0-23.24~18.04.1)
End-Date: 2019-09-05 11:37:00
这是 xrandr 的输出:
Screen 0: minimum 320 x 200, current 2560 x 1080, maximum 8192 x 8192
DP-1 connected primary 640x480+0+0 (normal left inverted right x axis y axis) 598mm x 336mm
640x480 59.94*
720x400 70.08
HDMI-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 connected 1920x1080+640+0 (normal left inverted right x axis y axis) 598mm x 336mm
1920x1080 60.00*+ 50.00 59.94
1920x1080i 60.00 50.00 59.94
1680x1050 59.88
1280x1024 75.02 60.02
1440x900 74.98 59.90
1280x720 60.00 50.00 59.94
1024x768 75.03 60.00
800x600 75.00 60.32
720x576 50.00
720x576i 50.00
720x480 60.00 59.94
720x480i 60.00 59.94
640x480 75.00 72.81 66.67 60.00 59.94
720x400 70.08
运行 gnome-control-center 时输出为:
(gnome-control-center:5176): display-cc-panel-WARNING **: 16:09:48.333: Couldn't find a mode to activate monitor at DP-1
(gnome-control-center:5176): GLib-CRITICAL **: 16:09:48.341: g_variant_builder_end: assertion '!GVSB(builder)->uniform_item_types || GVSB(builder)->prev_item_type != NULL || g_variant_type_is_definite (GVSB(builder)->type)' failed
(gnome-control-center:5176): GLib-CRITICAL **: 16:09:48.341: g_variant_get_type: assertion 'value != NULL' failed
(gnome-control-center:5176): GLib-CRITICAL **: 16:09:48.341: g_variant_type_is_subtype_of: assertion 'g_variant_type_check (type)' failed
(gnome-control-center:5176): GLib-CRITICAL **: 16:09:48.341: g_variant_get_type_string: assertion 'value != NULL' failed
(gnome-control-center:5176): GLib-ERROR **: 16:09:48.341: g_variant_new: expected GVariant of type '*' but received value has type '(null)'
Trace/breakpoint trap (core dumped)
如果我运行 sudo gnome-control-center,它确实会打开设备面板,但面板是空的。我尝试搜索这些错误,但没有任何结果。
xorg.conf 的输出是:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 415.27
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
Section "Files"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 28.0 - 33.0
VertRefresh 43.0 - 72.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
并且 lscpi | grep -i vga/nvidia 显示:
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
and
01:00.0 3D controller: NVIDIA Corporation GK107M [GeForce GT 750M] (rev a1)
和 ps aux | grep xsettings
gdm 1445 0.0 0.3 638912 30028 tty1 Sl+ 15:41 0:00 /usr/lib/gnome-settings-daemon/gsd-xsettings
user111 2445 0.0 0.2 494732 21924 tty2 Sl+ 15:41 0:00 /usr/lib/gnome-settings-daemon/gsd-xsettings
user111 5675 0.0 0.0 21536 1008 pts/0 S+ 16:18 0:00 grep --color=auto xsettings
关于如何修复此问题您有什么想法吗?
编辑:
我找到了另一根 HDMI 线,并决定连接它而不是 VGA 线(显示端口连接器有 VGA/HDMI/DVI)。使用 HDMI 一切正常。
这是 xrandr 的输出:
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 8192 x 8192
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 598mm x 336mm
1920x1080 60.00*+ 50.00 59.94
1920x1080i 60.00 50.00 59.94
1680x1050 59.88
1280x1024 75.02 60.02
'' '' '' ''
HDMI-2 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 598mm x 336mm
1920x1080 60.00*+ 50.00 59.94
1920x1080i 60.00 50.00 59.94
1680x1050 59.88
1280x1024 75.02 60.02
'' '' '' ''
因此,尽管此解决方法对我来说有效。但仍然有些地方出了问题。
在寻找答案时,我看到更多有同样问题的人提出的问题,所以让我们看看是否能找到一个好的解决方案。
因此,结合 xrandr 和 gnome-control-center 我们得到:
DP -> VGA:DP-1 连接主 640x480+0+0(正常左反转右 x 轴 y 轴)598mm x 336mm
DP -> HMDI : HDMI-1 连接 1920x1080+0+0(正常左反转右 x 轴 y 轴)598mm x 336mm
因此,看起来当通过 VGA 连接时,系统不会从 DP 切换到 VGA(我猜应该是这样,也是因为 gnome-control-center 输出:找不到在 DP-1 激活显示器的模式)。
或者实际的显示端口连接硬件损坏了(虽然我无法检查这一点,但它似乎不太可能在夜间损坏)。
因此,如果问题是 DP 无法切换到 VGA,那么哪个驱动程序应该对此负责?