I used to have Debian 8, and today I decided to upgrade to Debian 9. I did so by running:

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

I noticed quite a few weird stuff going on after this. First, the GRUB bootloader is in a way, broken. If I reboot the system, the arrow keys simply don't work (however, if I use the arrow keys, the countdown stops), but the arrow keys do work if I shut down the system and turn it on again.

Also, the system fails to boot to the GUI login now, and instead boots to the tty. Here's what shows up during boot, before loading the tty:

I tried running startx manually, but that didn't work and gave an error 1, stating,

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

I ran

sudo apt-get install fglrx

but it said there's no installation candidate. How can I fix this?

EDIT: Some additional output from some commands I ran. systemctl status lightdm.service gave:

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)

Here's the output of 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"
Fatal server error:
(EE) no screens found(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) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

Like I mentioned in the comments, the upgrade also changed my kernel from 3.16 to 4.9, and I just found it interesting that sudo startx shows these kernel and OS versions.

My graphics card is:

$ 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]) 
  • fglrx is graphics driver, which should be included in Linux kernel. Can you tell us version of your kernel and what graphic card do you have?
    – BlueManCZ
    Jul 6, 2017 at 13:30
  • When I had Debian 8, I had the 3.16 kernel, and now after upgrading to Stretch, I have the 4.9 kernel. Mine is an AMD Radeon R5 graphics card.
    – Rahul
    Jul 6, 2017 at 13:34
  • 1
    Well, do you have firmware-amd-graphics installed?
    – BlueManCZ
    Jul 6, 2017 at 13:36
  • 1
    There is an alternative for fglrx. You can try xserver-xorg-video-radeon.
    – BlueManCZ
    Jul 6, 2017 at 13:41
  • @BlueManCZ I ran sudo apt-get install firmware-amd-graphics. It's still the same, but now the font is smaller.
    – Rahul
    Jul 6, 2017 at 13:59

2 Answers 2


If I am right this may do the trick:

Create this file:


Copy paste with your editor, e.g. nano the following:

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"

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"

Section "Module"
    Load  "glx"

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "kbd"

Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
    Option      "Protocol" "auto"
    Option      "Device" "/dev/input/mice"
    Option      "ZAxisMapping" "4 5 6 7"

Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"

Section "Device"
    Identifier  "Card0"
    Driver      "amdgpu"
    BusID       "PCI:0:1:0"

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    SubSection "Display"
        Viewport   0 0
        Depth     1
    SubSection "Display"
        Viewport   0 0
        Depth     4
    SubSection "Display"
        Viewport   0 0
        Depth     8
    SubSection "Display"
        Viewport   0 0
        Depth     15
    SubSection "Display"
        Viewport   0 0
        Depth     16
    SubSection "Display"
        Viewport   0 0
        Depth     24

Save the file wherever, e.g. as:


And execute:

X -config /root/xorg.conf.new2


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

And restart with:

sudo reboot
  • It didn't work :( After running and then rebooting, it got stuck while printing, and didn't show a tty, but I could go to tty2 and then come back to tty1, which was messed up for some reason. Here's the output before it got stuck. imgur link
    – Rahul
    Jul 6, 2017 at 17:25
  • @Rahul I don't know what to do further. It should have worked. Sorry it did not. At least we tried. Jul 6, 2017 at 17:30
  • Well, thanks anyway. If nothing works, I guess re-installing will be the only way. Getting my files won't be an issue, thankfully.
    – Rahul
    Jul 6, 2017 at 17:52

I had the exact same problem.

Accidentally upgraded from 3.16 to 4.9. After the upgrade when booting to the new version it showed:

[FAILED] failed to start light display manager

But previous version ran just fine.

I have a NVIDIA GeForce GTX 750 Ti, graphic card. So I highly suspect the problem is related to a dedicated graphic card.

With that suspicion I simply downloaded the newest NVIDIA driver from the official page, installed them and everything worked fine. You could do the same with AMD drivers. To get the drivers to install I had to install new headers:

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .