Ubuntu Bionic Beaver freezes randomly

Solution 1:

Diagnosis:

  • By looking into the Xorg logs, there appears some issues ( crashes ) related in particular to libinput:
(**) AT Translated Set 2 keyboard: Applying InputClass "libinput keyboard catchall"   
(II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'
(**) SynPS/2 Synaptics TouchPad: Applying InputClass "libinput touchpad catchall" 
(II) Using input driver 'libinput' for 'SynPS/2 Synaptics TouchPad' 
(**) TPPS/2 IBM TrackPoint: Applying InputClass "libinput pointer catchall" 
(II) Using input driver 'libinput' for 'TPPS/2 IBM TrackPoint' 
(**) ThinkPad Extra Buttons: Applying InputClass "libinput keyboard catchall" 
(II) Using input driver 'libinput' for 'ThinkPad Extra Buttons'
  • By looking into the output of apt policy xserver-xorg-input-*, it turns out that both xserver-xorg-input-all and xserver-xorg-input-libinput are not installed where they should be:
xserver-xorg-input-all:
  Installed: (none)
  Candidate: 1:7.7+19ubuntu7.1
  Version table:
     1:7.7+19ubuntu7.1 500
        500 http://mx.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
     1:7.7+19ubuntu7 500
        500 http://mx.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

xserver-xorg-input-libinput:
  Installed: (none)
  Candidate: 0.27.1-1
  Version table:
     0.27.1-1 500
        500 http://mx.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
  • By looking into the output of tail -n 400 /var/log/dpkg.log | grep "status installed". Some VGA related packages / drivers appear to might have been affected during the last update.

  • By looking into the output of lspci | grep ' VGA ' and sudo lshw -C display it shows you have an NVIDIA Corporation GT218M graphics card with the nouveau driver in use.


Solution:

  1. Install xserver-xorg-input-all like so:
sudo apt install xserver-xorg-input-all
  1. Install xserver-xorg-input-libinput like so:
sudo apt install xserver-xorg-input-libinput
  1. Purge the NVIDIA video drivers like so:
sudo apt purge nvidia-*
  1. Install the correct video drivers using the ubuntu-drivers tool like so:
sudo ubuntu-drivers autoinstall
  1. Reboot your machine and cross your fingers : ).

Best of luck