it seems to be a "once again" issue, but I really wasn't able to find anything useful for my case in the web.
Background:
I have a Lenovo Thinkpad T480, on which I installed Ubuntu 18.04 right after unpacking. The preinstalled Windows didn't even finish the installation/setup then. I bought it actually because it has switchable graphics (NVIDIA dedicated graphics and Intel integrated graphics), which allows me to run the 3D CAD (in a VMware VM with Windows) also when on the go.
I first didn't configure any power saving stuff at all, which led to a short battery runtime of maybe 1.5h or something. So about a month back, I installed tlp and also gave bumblebee a try, to make use of the Optimus feature (dynamic switching between integrated and dedicated graphics). This didn't work at all, the CAD could not use the 3D acceleration and resuming after suspend tended to crash the system or cause weird effects. One such weird effect was a USB port malfunction, so that the plugged-in mouse did not work anymore (no power). Integrated devices such as keyboard and touchpad still worked though. A reboot "fixed" the problem, so it probably is not hardware-related. I removed bumblebee shortly afterwards.
I usually completely reboot/turn off the notebook once in a few days, otherwise I just put it to sleep.
Problem:
A few days back, I shut down the notebook as usual. After booting it up next time to the login screen, the problem first appeared: I could enter my password, hit Enter and all that happens is the screen turning black, the mouse pointer is displayed near the lower right corner of the screen and after a second or so, I'm back at the login screen. No error message. At least once it also happened that the USB port problem described above showed up again.
It was always possible to login to a terminal (Ctrl+Alt+F2) without any trouble.
What I've tried:
Especially due to the mentioned USB problem, I suspected the graphics driver to have something to do with it. So I uninstalled all NVIDIA-related packages, but the problem remained the same. Reinstalling did not change anything either. I also tried to install and uninstall (with a few reboots) tlp and bumblebee, but none of them seem to change anything at all.
Booting into a previous kernel version did not help.
I went to a terminal and installed Xubuntu-desktop. Now, when I boot the computer, select a Xubuntu or Xfce session, then I can login to the graphical desktop and everything runs as well. Including 3D acceleration and NVIDIA-prime. This is true no matter if I use gdm3 or lightdm as display manager.
If I select any of the other sessions (GNOME classic, Ubuntu, Ubuntu on Wayland, etc.), the behavior is the same as before: Black screen, mouse pointer, sometimes a short flash of the desktop background image, then back at the login screen. Interestingly, if I now switch back to a Xubuntu session, the login fails there as well, with the same symptoms. Only after a reboot does such a login work again. Just on my last try, this led to apport coming up with a crash of light-locker:
light-locker crashed with signal 5 in g_type_create_instance()
Logs:
I really don't know where to look for errors. I've checked a few places:
- /var/log/Xorg.*.log: No errors (EE), nothing suspicous.
- ~/.xsession-errors: Last update is from a week back. A lot of errors are reported relating to tracker not being able to insert some metadata, as well as from the theme parser. At the end of the file, there are many such messages:
Gtk-CRITICAL **: 12:49:52.203: gtk_widget_destroy: assertion ' GTK_IS_WIDGET (widget)' failed
And:
Gdk-Message: 12:51:24.605: nm-applet: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.
Gdk-Message: 12:51:24.605: update-notifier: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.
Gdk-Message: 12:51:24.608: blueman-applet: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.
Gdk-Message: 12:51:24.630: polkit-gnome-authentication-agent-1: Fatal IO error 0 (Success) on X server :0.0.
/var/log/lightdm/lightdm.log.1.gz: Lots of DEBUG messages, otherwise nothing more serious than
WARNING: Seat type 'xlocal' is deprecated, use 'type=local' instead
/var/log/lightdm/seat0-greeter.log.1.gz: Lots of
(lightdm-gtk-greeter:1447): Gtk-WARNING **: 16:51:55.144: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node menubar owner GreeterMenuBar)
messages. Some more suspicous ones:Gdk-Message: 11:06:44.240: lightdm-gtk-greeter: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
,Gdk-Message: 12:57:34.520: lightdm-gtk-greeter: Fatal IO error 4 (Interrupted system call) on X server :0.
journalctl: Maybe a hint related to the light-locker crash:
light-locker[2482]: Environment variable XDG_SESSION_PATH not set. Is LightDM running?
A message from X:(EE) open /dev/fb0: Permission denied
A kernel message, which I sometimes also see flashing on the screen when it switches some mode:kernel: acpi INT3400:00: Unsupported event [0x88]
System:
$ uname -a
Linux phiptp480 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux`
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
Questions:
- What could be the cause for this behavior?
- Where should I look for hints about this case?
- How can I fix the system, except for a full reinstall?
Thanks! Best regards,
Philipp
Oh dear, looks like a long story is finally resolved. Short answer: The GNOME extension "Workspace-Grid" caused gnome-shell to crash. After its removal, everything works as expected.
For reference, here's how I figured it out:
From the login screen switched to a terminal (Ctrl+Alt+F2)
Noted down the current system time with
date
Switched to the login screen immediately (Ctrl+Alt+F1) and entered my password; this triggered the misbehaviour, taking me back to the login screen.
Switched back to the terminal and opened the system journal in reverse order (
sudo journalctl -r
)Scrolled down until the noted timestamp of the login attempt.
Worked my way back up through the log looking for something suspicious, where a stack trace of "org.gnome.Shell.desktop" caught my attention. The stack trace led to ~/.local/share/gnome-shell/extensions/workspace-grid@.../extension.js:947.
Removed the extension folder
~/.local/share/gnome-shell/extensions/workspace-grid@...
Switched to the login screen, logged in, and voilà, everything works as it should.
I was facing a similar problem. This worked for me.
sudo ubuntu-drivers install