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
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:I found the recommended driver using this command:
Then I installed the recommended driver using these commands:
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/journal
and rebootThen next time my computer froze, I rebooted and ran
sudo journalctl --list-boots
to find the ID of my previous boot that crashed.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]
`