Debian 9 DM 在 dist-upgrade 後無法載入

Debian 9 DM 在 dist-upgrade 後無法載入

我曾經使用過 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)

相關內容