0

I have checked similarly names posts and no solutions have worked, but also no one has had the same situation, so I don't think this is a duplicate.

I have a dual boot Surface Pro 2017 (5) that was working just fine and dandily - some updates had been installed, nothing major, and I didn't restart before.

I booted into Windows yesterday for some Win-specific work and since then Ubuntu no longer gives me the gui - I cannot reach the graphical login screen. I can log in via CLI and have tried all the repairs out there for "Ubuntu boots to black screen" etc. (nomodeset, dpkg, and have gone into recovery mode to perform repairs and disk checks. Oddly when performing an update it always tells me there is a 74.ko package that needs to be installed and then says it installs it, but when I check it again, there it is needing to be installed once more.

I have also checked the disk and it is not full, which I know can cause login GUI issues. To be sure I even deleted several large .isos in my Downloads folder.

I have checked display manager to be gdm3 and try to sudo startx but get the error "unable to connect to X server: Connection refused".

I have also tried older kernels and removed some of the newer ones that I knew to give me issues in the past.

Are there any folks out there with super powers who can help me out? I suppose I could reinstall Ubuntu while preserving the home folder, but I have a lot of customized settings I don't want to lose as well.

Thanks!

1 Answers1

0

Repairing a failing graphical mode often requires to repair from a console (ctrl alt f1 ... ctrl alt f10). You should be able to come back to the graphical mode using ctrl alt f7.

Preliminary steps

  1. Please report the model your video card(s):
lspci | egrep "3D|VGA"
  1. Please report the errors stored in /var/log/Xorg.0.log:
grep EE /var/log/Xorg.0.log
  1. Inspect your connection manager logs. Sometimes you may have weird issue (e.g. because the video card driver is too long to load). For example, if you use sddm:
cat /var/log/sddm.log

Black screen before the connection manager appears:

  1. If you can't switch to the console (the computer is completely frozen, you cannot reboot using ctrl alt suppr), your kernel is probably crashed. If you have a Nvidia card, please consider the following item.

  2. If you are in trouble with a Nvidia card, consider using the nouveau driver. Indeed, unless you play 3D games or want to run GPU-based machine learning, you don't need the nvidia module to be installed. Then restart your window manager, e.g., sddm.

sudo apt purge $(dpkg -l | grep nvidia | cut -d" " -f3)
sudo apt install xserver-xorg-video-nouveau
sudo service sddm restart

If you don't know what is your connection manager, run:

ls /etc/init.d/*dm
  1. Check if the appropriate xserver-xorg-video- packages are installed (and check if one of them support your video card using apt show).
dpkg -l | grep xserver-xorg-video

In case of doubt, you could install xserver-xorg-video-all.

sudo apt update
sudo apt install xserver-xorg-video-all
  1. If your computer was previously relying on a proprietary driver (e.g., nvidia) and if the problem occured after a kernel upgrade (package linux-image-...), it's likely that this driver needs to be reinstalled. You should install the appropriate -dkms package if any. If the driver looks installed and if the secure boot is enabled in your BIOS, ensure that the driver is correctly signed. You can check it by (re)loading the driver and query the kernel logs.

Black screen once logged:

  1. Ensure there is available space in your /home partition. This is because the X server requires some space to create temporary files in your home directory.

  2. Try another desktop environment (e.g. cinnamon). Maybe the one you try to start is broken for some reason. Then, restart your window manager and try this new environment.

sudo apt update
sudo apt install cinnamon
sudo service sddm restart
  1. Check if the problem is specific to your user profile (say coufeyrac). To this end, create a new user (say jdoe) and try to log in using this new profile.
sudo adduser jdoe

If jdoe can start a graphical session, then coufeyrac user profile is likely buggy. If so, you should consider renaming/removing the hidden directories stored in ~coufeyrac and then try again:

sudo mv ~coufeyrac/.config ~coufeyrac/.config.bak
sudo mv ~coufeyrac/.local ~coufeyrac/.local.bak