48

Since I upgraded to Ubuntu 19.10 my system freezes/lags regularly. The mouse, keyboard and screen are completely stuck, after a few seconds it "unfreezes" again. Sometimes it repeats the input I did. For example if I type "F" in a text field it shows "FFFFFFFF" afterwards.

I seems like a lag is triggered every time the system has to read and write a larger amount of data (e.g. start new program, load new firefox tab).

I completely reinstalled Ubuntu 19.10 again on my machine but it is still the same. It runs on a Dell XPS 13.

The same problem is described but not answered in this posts:

Ubuntu 19.10 cursor freezes randomly

Mouse and Keyboard Freeze

Because it was asked in the other posts here are may gnome extensions: enter image description here

EDIT: Thanks for the comment!

  1. I do not use a PS/2 mouse or keyboard.
  2. The model: Dell XPS 13 9360 (2016 version). On the label it says: Reg Mode: P54G Reg Type No: P54G002

EDIT2: Turning off all extension does unfortunately not solve the problem.

Edit 3: Here is what it looks like in the system monitor when I reload a website. The Network manager

Edit 4: Thank you for your comments! Before I reinstalled Ubuntu 19.10 my swap had 8 GB.

enter image description here

Edit: 6 Increasing the swap to 8GB (I have 8GB of RAM) and setting the swappines to 10 seems to have done something. I will have a further look into it.

Edit: 7 My Bios version is 2.10.0. I'll check of updates.

The Disk utility does not show the SMART data for my ssd.

Philipp
  • 777

9 Answers9

22

This is a regression that happened from Kernel from Kernel 5.0 to 5.3. This may be a problem in the recent changes that the 5.3 kernel introduced with the deprecated deadline, cfq and noop, which according to the Ubuntu wiki "prior to Ubuntu 19.04 with Linux 5.0 or Ubuntu 18.04.3 with Linux 4.15, the multiqueue I/O scheduling was not enabled by default and just the deadline, cfq and noop I /O schedulers were available by default". It has also been reported that some bugs have been introduced for those who have an intel and use the i965 driver.

To get around the problem i changed the swappiness kernel parameter to 10, and use bfq for IOSchedulers, by default Ubuntu uses mq-deadline.

4

I had a similar issue. I get temporary relief from turning swap off with sudo swapoff -a. It may be related to the usage of swap in the new kernel.

It seems this is a confirmed bug and is being investigated here https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1833281


I managed to significantly reduce this problem in Ubuntu 19.10 by upgrading my kernel to 5.5.9. What I did:

  • I went to https://kernel.ubuntu.com/~kernel-ppa/mainline/ and found the latest release of 5.5 after sorting by Last Modified.

  • Under Build for amd64 succeeded, I downloaded four files: linux-headers-...-all.deb, linux-headers-...generic, linux-image-...generic, and linux-modules-...generic.

  • Then I put them in a directory, went to terminal, cd'd to that directory, and ran sudo dpkg -i *.deb

That's all it took. It automatically installed the latest 5.5 kernel and created a grub entry that became the default. After a restart, no more lags or freezing mouse, at least they became more rare. Swap works normally again.

darksky
  • 1,022
  • 1
  • 9
  • 18
3

After update to ubuntu 19.10 I also get lags and freeze. Not sure this helps you, but my problem was in graphics drivers. I update drivers from https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers and it works again.

First time i also think this was ssd problem because lags frequently occur when start new application or switch firefox tab.

daa
  • 31
  • 1
2

I had the same issue (also with a Dell XPS13). Updating the graphics drivers with the ones from https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers like @daa did resolved the issue for me too.

2

I migrated to ubuntu 19.10 and got : - mouse lags and freeze, frequently around 12 seconds ! - 100% cpu usage on one core - click on web browser's tab = freeze

I have an Assus SonicMaster computer, Core i5, Nvdia Gforce 940M.

Solution: I went for : Softwares & Updates > Additional drivers It shows : X.org activated.

enter image description here

Then changed to activate proprietary drivers.

enter image description here

So far so good. No more lags.

Hugolpz
  • 221
1

Kubuntu 19.10 also has this problem. Periodic freezes of the system for 1-2 seconds. This is observed during i/o operations. When swap is disabled, freezes is significantly reduced.

1

Same issue on a Dell XPS 13 9343 (see this post).

One way to make things better was to reduce swap size to 4 GB (for 8 GB of RAM) and set vm.swappiness to 80.

mhr
  • 93
1

I had similar issue after upgrading to 19.10 on my Dell XPS 13 9350

Since @stickway helpfully identified this is a kernel bug I purchased this tool to manage kernels in Ubuntu and upgraded to 5.4.1 https://teejeetech.in/ukuu/

I am not affiliated in any way with this tool or it's author, however it seems to work well for me so I wanted to share in case it may be of help to anyone else.

MASSIVE WARNING: Obviously newer kernels are not yet officially supported, if you want to be safer you should downgrade to a previous kernel instead.

Josh
  • 11
  • 1
0

Problem still persist with recent kernel 5.3.0-40.

I downgraded to 5.2.21 from https://kernel.ubuntu.com/~kernel-ppa/mainline/ and lagging and microfreezes are gone, system is running fine and generally is more responsive. Did not try upgraded kernel though.

Microfreezes are caused by swapping and general during disk write operation. Fiddling with swappiness and swaps size helps just a little, it is not a solution.