我曾经使用过 Debian 8,今天我决定升级到 Debian 9。我通过运行以下命令来升级:
sed 's/jessie/stretch/g' /etc/apt/sources.list
sudo apt-get update && sudo apt-get upgrade
sudo apt-get dist-upgrade
我注意到此后发生了一些奇怪的事情。首先,GRUB 引导加载程序在某种程度上已损坏。如果我重新启动系统,箭头键根本不起作用(但是,如果我使用箭头键,倒计时就会停止),但如果我关闭系统并再次打开它,箭头键就会起作用。
此外,系统现在无法引导至 GUI 登录,而是引导至 tty。以下是启动期间加载 tty 之前显示的内容:
我尝试手动运行 startx,但这不起作用并给出错误 1,指出,
Failed to load module fglrx (Module does not exist 0)
我跑了
sudo apt-get install fglrx
但它说没有安装候选者。我怎样才能解决这个问题?
编辑:我运行的一些命令的一些额外输出。systemctl status lightdm.service
给了:
lightdm.service - Light Display Manager
Loaded: loaded (/lib/systemd/system/lightdm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2017-07-06 19:17:26 IST; 2min 18s ago
Docs: man:lightdm(1)
Process: 864 ExecStart=/usr/sbin/lightdm (code=exited, status=1/FAILURE)
Process: 860 ExecStartPre=/bin/sh -c [ "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/lightdm" ] (code=exited, status=0/SUCCESS)
Main PID: 864 (code=exited, status=1/FAILURE)
这是输出sudo startx
:
X.Org X Server 1.19.2
Release Date: 2017-03-02
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.16.0-4-amd64 x86_64 Debian
Current Operating System: Linux rahul-pc 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26) x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.9.0-3-amd64 root=UUID=4fb31b35-931b-4790-8dff-f0b97dd35154 ro quiet
Build Date: 03 March 2017 03:14:41PM
xorg-server 2:1.19.2-1 (https://www.debian.org/support)
Current version of pixman: 0.34.0
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 Jul 6 19:13:40 2017
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) 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.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
正如我在评论中提到的,升级还将我的内核从 3.16 更改为 4.9,我发现显示sudo startx
这些内核和操作系统版本很有趣。
我的显卡是:
$ lspci -vnn | grep VGA – Vlastimil 16 hours ago
00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Mullins [Radeon R4/R5 Graphics] [1002:9851] (rev 45) (prog-if 00 [VGA controller])
答案1
如果我是对的,这可能会起作用:
创建这个文件:
xorg.conf.new2
使用编辑器复制粘贴,例如nano
以下内容:
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/X11/cyrillic"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "built-ins"
EndSection
Section "Module"
Load "glx"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Device"
Identifier "Card0"
Driver "amdgpu"
BusID "PCI:0:1:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
将文件保存在任意位置,例如:
/root/xorg.conf.new2
并执行:
X -config /root/xorg.conf.new2
然后:
sudo cp /root/xorg.conf.new2 /etc/X11/xorg.conf
并重新启动:
sudo reboot
答案2
我有同样的问题。
不小心从3.16升级到4.9。升级后启动到新版本时显示:
[FAILED] 无法启动灯光显示管理器
但以前的版本运行得很好。
我有一块 NVIDIA GeForce GTX 750 Ti 显卡。所以我高度怀疑问题与专用显卡有关。
带着这样的怀疑,我只是从官方页面下载了最新的 NVIDIA 驱动程序,安装后一切正常。您可以对 AMD 驱动程序执行相同的操作。为了安装驱动程序,我必须安装新的标头:
apt-get install linux-headers-$(uname -r)