O Debian 9 DM não carrega após dist-upgrade

O Debian 9 DM não carrega após dist-upgrade

Eu tinha o Debian 8 e hoje decidi atualizar para o Debian 9. Fiz isso executando:

sed 's/jessie/stretch/g' /etc/apt/sources.list
sudo apt-get update && sudo apt-get upgrade
sudo apt-get dist-upgrade

Notei algumas coisas estranhas acontecendo depois disso. Primeiro, o bootloader GRUB está de certa forma quebrado. Se eu reiniciar o sistema, as teclas de seta simplesmente não funcionarão (no entanto, se eu usar as teclas de seta, a contagem regressiva será interrompida), mas as teclas de seta funcionarão se eu desligar o sistema e ligá-lo novamente.

Além disso, o sistema falha ao inicializar no login da GUI agora e, em vez disso, inicializa no tty. Aqui está o que aparece durante a inicialização, antes de carregar o tty:

Tentei executar o startx manualmente, mas não funcionou e deu um erro 1, informando:

Failed to load module fglrx (Module does not exist 0)

eu corri

sudo apt-get install fglrx

mas disse que não há candidato à instalação. Como posso consertar isso?

EDIT: Algumas saídas adicionais de alguns comandos que executei. systemctl status lightdm.servicedeu:

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)

Aqui está o resultado de 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

Como mencionei nos comentários, a atualização também mudou meu kernel de 3.16 para 4.9, e achei interessante mostrar sudo startxessas versões de kernel e sistema operacional.

Minha placa gráfica é:

$ 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]) 

Responder1

Se eu estiver certo, isso pode funcionar:

Crie este arquivo:

xorg.conf.new2

Copie e cole com seu editor, por exemplo nanoo seguinte:

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

Salve o arquivo em qualquer lugar, por exemplo, como:

/root/xorg.conf.new2

E execute:

X -config /root/xorg.conf.new2

Então:

sudo cp /root/xorg.conf.new2 /etc/X11/xorg.conf

E reinicie com:

sudo reboot

Responder2

Eu tive o mesmo problema.

Atualizado acidentalmente de 3.16 para 4.9. Após a atualização ao inicializar para a nova versão, ele mostrou:

[FAILED] falha ao iniciar o gerenciador de exibição de luz

Mas a versão anterior funcionou perfeitamente.

Eu tenho uma placa gráfica NVIDIA GeForce GTX 750 Ti. Portanto, suspeito fortemente que o problema esteja relacionado a uma placa gráfica dedicada.

Com essa suspeita simplesmente baixei o driver NVIDIA mais recente da página oficial, instalei e tudo funcionou bem. Você poderia fazer o mesmo com os drivers AMD. Para instalar os drivers, tive que instalar novos cabeçalhos:

apt-get install linux-headers-$(uname -r)

informação relacionada