How to fix Ubuntu 18.04 LTS random freezes

Georgi Spasov
2 min readAug 17, 2019

--

Is there a human on the planet that does not have warm feelings for Ubuntu? It’s a great distro that provides reliability and stability. The LTS version of 16.04 was a total hit, it did not have much flaws, and was surprisingly resilient to bugs.

If we leave the 4.4.0-116 kernel local privilege escalation aside, we can make a conclusion that 16.04 was one of the best Debian distros for a couple of years.

18.04 LTS presented a few updates and minor tweaks that would’ve influenced the UX. With it, however, people with an older hardware had some hard time— old Nvidia users had to disable Nouveau drivers, and blacklist them, then download the latest Nvidia drivers and hopefully get the graphical interface running through them.

This did not bother the average user much, since Linux is all about the “do it yourself” thing. But another bug was giving people a headache.

The problem

Ubuntu 18.04 freezes from time to time. A lot of people mentioned this problem on Stack Exchange and the Ubuntu forums, but not many of them managed to solve this ridiculous problem.

I’ve had it as well — Ubuntu 18.04 completely froze while I was coding, then some time later the same happened when I watched a movie — it was a problem that was not related with the GPU and had random occurrence. I did not manage to solve the problem initially, so all I did was shutting down my computer forcefully (which was not a good thing at all).

So I did my investigation — I looked through log files.

It took me some time to find out that the content of /var/log was immense, and finding my problem was as finding a needle in a hay stack.

The solution

Needless to say, after an excruciating hour of staring into the cat terminal output, I got frustrated, and decided to search for kernel problems. Then I found that the old 4.x.x I was running had some flaws, and decided to switch to 5.0.0.x-generic.

Latest generic kernel for 18.04 can be installed using:

sudo apt install — install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04

After restarting, I verified that the 5.0.0.x generic was installed:

uname -a

It’s been some weeks now and my PC’s working non-stop. I’ve had no glitches, the UI did not freeze, and the distro is running as smoothly as it can.

--

--

Georgi Spasov

Full stack developer, security professional, problem solver. I enjoy working with people and doing what others find impossible. Also, undercover Santa Claus.