![升级显卡后显示器不再工作](https://linux22.com/image/103015/%E5%8D%87%E7%BA%A7%E6%98%BE%E5%8D%A1%E5%90%8E%E6%98%BE%E7%A4%BA%E5%99%A8%E4%B8%8D%E5%86%8D%E5%B7%A5%E4%BD%9C.png)
我最近将显卡从 GTX 760 升级到 GTX 1070。当我启动 Linux 时,lightdm 出现错误。我认为这是标准的,我只需要安装新的驱动程序,所以我按CTRL- ALT-F2并运行# apt-get upgrade nvidia*
。这个命令被卡住了好几次,我需要和 ^C 一起刺激它。不用说,这并没有解决问题。
我尝试了一些其他解决方案,包括注释掉 Xorg.conf 文件中的“Nvidia”块:
# -xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 340.46 (buildd@brahms) Tue Oct 7 08:00:32 UTC 2014
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
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" #I commented out from here
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection #to here
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
我希望这会让 Xorg 停止尝试使用 Nvidia 驱动程序,而是使用内核中已有的驱动程序。相反,当我运行时service lightdm start
,我的显示器变黑并显示消息“不支持”。
我似乎无法摆脱这个:我尝试停止 lightdm 服务,重新启动计算机,运行Xorg :1 -configure
,重新安装 nvidia 驱动程序,然后重新安装我的 DE。
我目前通过 SSH 连接到我的计算机,因此我无法执行任何需要更改网络设置的操作。
以下是一些可能有用或可能没用的其他日志:
# lspci
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5)
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5)
00:1c.5 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #6 (rev d5)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation Z87 Express LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1b81 (rev a1)
01:00.1 Audio device: NVIDIA Corporation Device 10f0 (rev a1)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
04:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)
# service lightdm status
● lightdm.service - Light Display Manager
Loaded: loaded (/lib/systemd/system/lightdm.service; enabled)
Active: failed (Result: start-limit) since Thu 2017-01-12 20:48:12 EST; 24min ago
Docs: man:lightdm(1)
Main PID: 11896 (code=exited, status=1/FAILURE)
Jan 12 20:48:12 homebox systemd[1]: lightdm.service: main process exited, code=exited, status=1/FAILURE
Jan 12 20:48:12 homebox systemd[1]: Unit lightdm.service entered failed state.
Jan 12 20:48:12 homebox systemd[1]: lightdm.service holdoff time over, scheduling restart.
Jan 12 20:48:12 homebox systemd[1]: Stopping Light Display Manager...
Jan 12 20:48:12 homebox systemd[1]: Starting Light Display Manager...
Jan 12 20:48:12 homebox systemd[1]: lightdm.service start request repeated too quickly, refusing to start.
Jan 12 20:48:12 homebox systemd[1]: Failed to start Light Display Manager.
Jan 12 20:48:12 homebox systemd[1]: Unit lightdm.service entered failed state.
# Xorg
X.Org X Server 1.16.4
Release Date: 2014-12-20
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.16.0-4-amd64 x86_64 Debian
Current Operating System: Linux homebox 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-3.16.0-4-amd64 root=UUID=572d5efa-5f06-4960-a090-810a2baf440b ro initrd=/install/initrd.gz quiet
Build Date: 11 February 2015 12:32:02AM
xorg-server 2:1.16.4-1 (http://www.debian.org/support)
Current version of pixman: 0.32.6
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Jan 12 21:13:15 2017
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) no screens found(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
# cat /var/log/Xorg.0.log
[ 2268.438]
X.Org X Server 1.16.4
Release Date: 2014-12-20
[ 2268.438] X Protocol Version 11, Revision 0
[ 2268.438] Build Operating System: Linux 3.16.0-4-amd64 x86_64 Debian
[ 2268.438] Current Operating System: Linux homebox 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64
[ 2268.438] Kernel command line: BOOT_IMAGE=/vmlinuz-3.16.0-4-amd64 root=UUID=572d5efa-5f06-4960-a090-810a2baf440b ro initrd=/install/initrd.gz quiet
[ 2268.438] Build Date: 11 February 2015 12:32:02AM
[ 2268.438] xorg-server 2:1.16.4-1 (http://www.debian.org/support)
[ 2268.438] Current version of pixman: 0.32.6
[ 2268.438] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 2268.438] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 2268.438] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Jan 12 21:13:15 2017
[ 2268.439] (==) Using config file: "/etc/X11/xorg.conf"
[ 2268.439] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 2268.439] (==) ServerLayout "Layout0"
[ 2268.439] (**) |-->Screen "Screen0" (0)
[ 2268.439] (**) | |-->Monitor "Monitor0"
[ 2268.439] (**) | |-->Device "Device0"
[ 2268.439] (**) |-->Input Device "Keyboard0"
[ 2268.439] (**) |-->Input Device "Mouse0"
[ 2268.440] (==) Automatically adding devices
[ 2268.440] (==) Automatically enabling devices
[ 2268.440] (==) Automatically adding GPU devices
[ 2268.440] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 2268.440] Entry deleted from font path.
[ 2268.440] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/100dpi/:unscaled,
/usr/share/fonts/X11/75dpi/:unscaled,
/usr/share/fonts/X11/Type1,
/usr/share/fonts/X11/100dpi,
/usr/share/fonts/X11/75dpi,
built-ins
[ 2268.440] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 2268.440] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[ 2268.440] (WW) Disabling Keyboard0
[ 2268.440] (WW) Disabling Mouse0
[ 2268.440] (II) Loader magic: 0x7f00cc8b7d80
[ 2268.440] (II) Module ABI versions:
[ 2268.440] X.Org ANSI C Emulation: 0.4
[ 2268.440] X.Org Video Driver: 18.0
[ 2268.440] X.Org XInput driver : 21.0
[ 2268.440] X.Org Server Extension : 8.0
[ 2268.441] (--) PCI:*(0:1:0:0) 10de:1b81:3842:6171 rev 161, Mem @ 0xf6000000/16777216, 0xe0000000/268435456, 0xf0000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/524288
[ 2268.441] (II) LoadModule: "glx"
[ 2268.441] (II) Loading /usr/lib/xorg/modules/linux/libglx.so
[ 2268.454] (II) Module glx: vendor="NVIDIA Corporation"
[ 2268.454] compiled for 4.0.2, module version = 1.0.0
[ 2268.454] Module class: X.Org Server Extension
[ 2268.454] (II) NVIDIA GLX Module 340.96 Sun Nov 8 22:06:18 PST 2015
[ 2268.454] (II) LoadModule: "nvidia"
[ 2268.454] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[ 2268.455] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 2268.455] compiled for 4.0.2, module version = 1.0.0
[ 2268.455] Module class: X.Org Video Driver
[ 2268.455] (II) NVIDIA dlloader X Driver 340.96 Sun Nov 8 21:46:28 PST 2015
[ 2268.455] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 2268.455] (--) using VT number 3
[ 2268.465] (II) Loading sub module "fb"
[ 2268.465] (II) LoadModule: "fb"
[ 2268.465] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 2268.465] (II) Module fb: vendor="X.Org Foundation"
[ 2268.465] compiled for 1.16.4, module version = 1.0.0
[ 2268.465] ABI class: X.Org ANSI C Emulation, version 0.4
[ 2268.465] (WW) Unresolved symbol: fbGetGCPrivateKey
[ 2268.465] (II) Loading sub module "wfb"
[ 2268.465] (II) LoadModule: "wfb"
[ 2268.465] (II) Loading /usr/lib/xorg/modules/libwfb.so
[ 2268.465] (II) Module wfb: vendor="X.Org Foundation"
[ 2268.465] compiled for 1.16.4, module version = 1.0.0
[ 2268.465] ABI class: X.Org ANSI C Emulation, version 0.4
[ 2268.465] (II) Loading sub module "ramdac"
[ 2268.465] (II) LoadModule: "ramdac"
[ 2268.465] (II) Module "ramdac" already built-in
[ 2268.468] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the
[ 2268.468] (EE) NVIDIA: system's kernel log for additional error messages and
[ 2268.468] (EE) NVIDIA: consult the NVIDIA README for details.
[ 2268.468] (EE) No devices detected.
[ 2268.468] (EE)
Fatal server error:
[ 2268.468] (EE) no screens found(EE)
[ 2268.468] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 2268.468] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 2268.468] (EE)
答案1
事实证明,问题是我安装了错误的驱动程序,因为我被困在 debian 的稳定存储库中。
通过添加向后移植,我能够获得正确的版本。
然后重新启动即可正确启动 Xserver。
如果其他人遇到此问题,则命令:
cp /etc/apt/sources.list /etc/apt/sources.list.bak
echo "deb http://httpredir.debian.org/debian jessie-backports main contrib non-free" >> /etc/apt/sources.list
apt-get update
apt-get install -t jessie-backports nvidia-driver
shutdown -r 00