3

My Ubuntu 18.04 desktop hangs on me ~1x per day. This happens when I am in the middle of web browsing or using a desktop application, not when booting. When it does, the mouse pointer will still move freely, but clicking or keystrokes have no effect on my system until I do a hard reboot.

How can I stop this from happening?

Here is some system info:

selah@selah-Precision-Tower-5810:~$ uname -a
Linux selah-Precision-Tower-5810 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

selah@selah-Precision-Tower-5810:~$ lspci | grep VGA
03:00.0 VGA compatible controller: NVIDIA Corporation GM107GL [Quadro K2200] (rev a2)

selah@selah-Precision-Tower-5810:~$ sudo lshw -c video
  *-display                 
       description: VGA compatible controller
       product: GM107GL [Quadro K2200]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:03:00.0
       version: a2
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nouveau latency=0
       resources: irq:31 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f7000000-f707ffff

Note, I had a similar issue with my 16.04 install: Ubuntu desktop hangs occasionally during regular use

Selah
  • 2,905

1 Answers1

2

I was dealing with this bug: https://bugs.freedesktop.org/show_bug.cgi?id=93629

To fix I installed an Nvidea driver in place of the Noveau driver that ships with Ubuntu by default.

I checked my current driver using this command and looking at the configuration: line:

selah@selah-Precision-Tower-5810:~$ sudo lshw -c video
  *-display                 
       description: VGA compatible controller
       product: GM107GL [Quadro K2200]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:03:00.0
       version: a2
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=noveau latency=0
       resources: irq:32 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f7000000-f707ffff

I found the recommended driver using this command:

selah@selah-Precision-Tower-5810:~$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0 ==
modalias : pci:v000010DEd000013BAsv000010DEsd00001097bc03sc00i00
vendor   : NVIDIA Corporation
model    : GM107GL [Quadro K2200]
driver   : nvidia-driver-390 - distro non-free recommended
driver   : nvidia-340 - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

Then I installed the recommended driver using these commands:

sudo apt-get install nvidia-driver-390
sudo reboot

Finally, I checked that they output of this command sudo lshw -c video contained the following line among its output. configuration: driver=nvidia latency=0


How I verified I was dealing with that bug:

Enabled persistent logging sudo mkdir /var/log/journaland reboot

Then next time my computer froze, I rebooted and ran sudo journalctl --list-boots to find the ID of my previous boot that crashed.

selah@selah-Precision-Tower-5810:~$ sudo journalctl --list-boots
-5 3021d713946d42b1b27234bc25641386 Fri 2018-05-11 15:34:14 EDT—Fri 2018-05-11 16:56:17 EDT
-4 0c2cf6756ca64856bd6650e24f33e26f Fri 2018-05-11 16:57:00 EDT—Tue 2018-05-15 11:04:40 EDT
-3 897d56f3c8bd4f89aa53817531388d08 Tue 2018-05-15 11:06:03 EDT—Tue 2018-05-15 11:31:54 EDT
-2 fd4181e77dfb46ae9222c0fe98e7ec40 Tue 2018-05-15 11:33:54 EDT—Tue 2018-05-15 11:43:20 EDT
-1 553c94fad1bc499897ba5c17e794ba89 Tue 2018-05-15 11:44:03 EDT—Mon 2018-06-18 10:49:32 EDT
 0 0f79a064b05444b0840e55edb05d10a7 Mon 2018-06-18 10:50:24 EDT—Mon 2018-06-18 11:06:18 EDT

My ID is the second to last long hash string labelled -1. Using this string I run sudo journalctl -b 553c94fad1bc499897ba5c17e794ba89

I looked for (and found) error messages such as the following SCHED_ERROR 0a [CTXSW_TIMEOUT]

`

Selah
  • 2,905