16

Since the last couple days, I'm suffering a killer bug on my Ubuntu 18.04 that never had before.

I'm working on my desktop session, and suddenly, randomly, the screen turns black and then the login screen appears. I have to login again, and a blank session starts (that means, all my previously opened apps, programs, windows - are gone, like if I did a fresh boot).

This does not happen always, but too often, enough to feel like it's a Russian Roulette. In fact, on the last time this bug happened, I could not even get to the login screen again - just the typical "/dev/sda1 clean xxxxx blocks..." message appearing on the top and nothing else, HDD without activity and nothing happened so I had to reboot pressing CTRL+ALT+SUPR twice.

Specs of my system are:

  • CPU: AMD FX8320

  • GPU: Nvidia GTX970 (using privative drivers provided by Ubuntu)

  • Ubuntu: 18.04, vanilla/original flavour

  • 2 screens (one with HDMI, one with VGA) - This bug happens since I changed my old secondary screen, connected using DVI-D, with my new secondary screen, connected using VGA.

Apart from all that, I have nothing weird installed that I'm aware of, but I edited the monitors.xml file on gdm3 to show the login screen on my HDMI monitor instead of the VGA one, by running sudo cp ~/.config/monitors.xml /var/lib/gdm3/.config.

However, I've been having this problem before I did this modification, but maybe it avoids getting me back to the login screen, so I restored the original file just in case.

Output from ls -al /var/crash:

total 89936
drwxrwsrwt  2 root  whoopsie     4096 mar 19 10:47 .
drwxr-xr-x 14 root  root         4096 jul 25  2018 ..
-rw-r-----  1 david whoopsie 92078339 mar 18 17:43 _opt_teamviewer_tv_bin_TeamViewer.1000.crash

Output from sudo lshw -C video:

  *-display
       descripción: VGA compatible controller
       producto: GM204 [GeForce GTX 970]
       fabricante: NVIDIA Corporation
       id físico: 0
       información del bus: pci@0000:01:00.0
       versión: a1
       anchura: 64 bits
       reloj: 33MHz
       capacidades: pm msi pciexpress vga_controller bus_master cap_list rom
       configuración: driver=nvidia latency=0
       recursos: irq:48 memoria:fd000000-fdffffff memoria:c0000000-cfffffff memoria:d0000000-d1ffffff ioport:e000(size=128) memoria:c0000-dffff

Output from ls -al ~/.local/share/gnome-shell/extensions:

total 32
drwxrwxr-x 8 david david 4096 feb  5 16:06 .
drwx------ 3 david david 4096 mar 25 11:49 ..
drwxrwxr-x 3 david david 4096 oct 29 18:02 alternate-tab@gnome-shell-extensions.gcampax.github.com
drwxrwxr-x 4 david david 4096 sep 23  2018 clipboard-indicator@tudmotu.com
drwxrwxr-x 6 david david 4096 nov  7 21:26 gnomeGlobalAppMenu@lestcape
drwxrwxr-x 4 david david 4096 feb  5 16:06 openweather-extension@jenslody.de
drwxrwxr-x 2 david david 4096 oct 30 21:19 topIcons@adel.gadllah@gmail.com
drwxrwxr-x 6 david david 4096 nov  7 21:29 unite@hardpixel.eu

Nvidia drivers installed: 390.116 (latest version provided by vanilla Ubuntu 18.04 repositories)

dlin
  • 3,830
David Lor
  • 171
  • 2
    Edit your question and show me the output of ls -al /var/crash and sudo lshw -C video. Report back to @heynnema – heynnema Mar 21 '19 at 14:17
  • @heynnema Done, thanks.

    I also remembered that I edited the /var/lib/gdm3/.config/monitors.xml (replacing it with ~/.config/monitors.xml) to make the login screen show on my main monitor. But I've been having this problem before this modification, however restored the original file just in case.

    – David Lor Mar 22 '19 at 22:10
  • Thanks for the update. It didn't really show me any crash related log like I thought there might be. What version Nvidia driver do you have installed? Now show me ls -al ~/.local/share/gnome-shell/extensions. – heynnema Mar 22 '19 at 23:09
  • 2
    You probably need to install Nvidia 418.56 drivers to solve your problem. – heynnema Mar 22 '19 at 23:14
  • @heynnema Pasted the output from ls -al ~/.local/share/gnome-shell/extensions on the main message.

    The Nvidia drivers installed are the propietary drivers, version 390.116, the latest one available/provided on the vanilla Ubuntu 18.04 repositories. What would be the best approach to upgrade them avoiding a "system break"?

    However, weird thing: since I posted this thread/question, the problem did not show up again. And did nothing. In fact, restoring the default /var/lib/gdm3/.config/monitors.xml file was done on a session where the bug did not come up.

    – David Lor Mar 25 '19 at 11:00
  • If the problem returns, try the newer Nvidia drivers. They were just released on the 20th. – heynnema Mar 25 '19 at 13:08
  • I forgot to mention, your GNOME extensions could also be a problem... topIcons gave me a lot of trouble when I tried it. You can temporarily disable some/all extensions and see if the problem goes away. – heynnema Mar 25 '19 at 13:29
  • Like heynnema said It's because you have some extensions that crash your system in some context. Remove all extensions and then add one by one your extensions to detect the specific extension that cause it. For example: you are using the gnomeGlobalAppMenu@lestcape and this extension is discontinued. I recommended you to not use that extension at all. Also is know that the version in gnome shell extensions web site cause crashes. – lestcape Mar 25 '19 at 16:05
  • @heynnema Roger that, if it fails again I will try disabling/removing all the plugins. However I only have currently 3 addons ON: Unite, Openweather and Clipboard indicator. Is it somewhere to check logs or something about the addons crashing? – David Lor Mar 26 '19 at 15:39
  • @DavidLor yes. grep -i gnome-shell /var/log/syslog*. Don't rule out the Nvidia driver. You have 390, but 418.56 was just released, and you may wish to try that. – heynnema Mar 26 '19 at 16:11
  • I have consistently had had this problem with 16.04, 18.04 and 20.04. After a lot of research, I believe its due to nvidia. Did you solve? how? – Jus12 Dec 18 '20 at 17:48
  • @Jus12 Never solved it, but hardly ever happens right now. Last time it happened to me was twice times someday, couple of weeks ago. – David Lor Dec 20 '20 at 11:22

2 Answers2

1

I had the same issue while using ubuntu 20.04. It was a problem with my GPU driver. I was using Nouveau, but when I changed to Nvidia (proprietary, tested) the problem was solved!

Follow this link to know how to do it: https://www.cyberciti.biz/faq/ubuntu-linux-install-nvidia-driver-latest-proprietary-driver/

  • Hello. Well this may solve the problem what about later when the link is gone? Any info in the link that would fix the problem needs to be in the body of the answer. You can still have the link but have the info so the link is not needed. – David Mar 18 '22 at 14:57
-1

Umm... you may not believe this, but try changing your mouse size. I had the same problem, and I made my mouse pointer small, and that fixed it! (I think a big mouse pointer was too much pressure) Hope this helps!

  • I'm curious where you found this solution. If you increase your mouse size to what it was, does it return? – rtaft Jun 11 '20 at 16:31
  • In my case I'm using the default size. However I'm not having too frequently this problem anymore (maybe once each 1 or 2 months) – David Lor Jun 12 '20 at 16:24