6

Since I recently installed Ubuntu 20.04 on my laptop, a few days after a reboot the graphics starts to freeze for about 1.5 seconds every 5 seconds. It goes away immediately after a reboot, but I have not yet noticed a pattern for what causes it to return a few days later.

I would be grateful if someone could point me at ways to get closer to diagnosing the problem, even if they don't have a solution.

It seems to be purely graphics-related (and not CPU, network or swap-related), because it even affects a lone system monitor process as can be seen in this screencast of the system monitor plots sticking every 5 seconds, where you can also see how idle the CPU and network are and how much free memory and swap there is (the CPU hike is the recording process for the 30s duration of the screencast).

It even affects a gnome-terminal session scrolling output from sudo find /, as shown in this screencast (it normally scrolls smoothly).

However, it does not affect the mouse pointer, which continues to respond normally while the rest of the graphics is stuck. And audio continues uninterrupted.

It makes interactive video or video playback (whether from disk or from network) unusable, as this screencast shows. Note that the graphics jumps rather than fast-forwards once it unsticks.

Next time it occurs, I will report any clues found from dmesg.

System details: Lenovo Yoga Pro 3 laptop, Mesa Intel® HD Graphics 5300 (Intel BDW GT2 chipset) Ubuntu 20.04 over Linux 5.4.0-40-generic amd64 architecture. Recent fresh install.

$ sudo lshw -c display
*-display                 
   description: VGA compatible controller
   product: HD Graphics 5300
   vendor: Intel Corporation
   physical id: 2
   bus info: pci@0000:00:02.0
   version: 09
   width: 64 bits
   clock: 33MHz
   capabilities: msi pm vga_controller bus_master cap_list rom
   configuration: driver=i915 latency=0
   resources: irq:64 memory:c0000000-c0ffffff memory:b0000000-bfffffff ioport:3000(size=64) memory:c0000-dffff

Top processes in CPU usage with no user-processes running except gnome-system-monitor:

~40%    gnome-shell
~20%    Xorg
~ 4%    gnome-system-monitor
<0.3%   <each other process>

Without system monitor (just top in a lone gnome-terminal):

~12%    gnome-shell
~ 5%    Xorg
<0.3%   <each other process>

I've found several other similar reports. For instance this one is with Ubuntu 18.04 and Intel HD graphics (gives few details and no solution) or this with 16.04 (but dual gpu) or this with 20.04 (but nVidia and not solved by reboot) or this with Radeon (but mouse froze - and solved at BIOS level by setting graphics to Discrete, which I don't have).

Numerous posts from 2015 era such as this are resolved by adding an acpi_rev_override=1 argument to splash in /etc/default/grub. However, unlike my case, the mouse pointer freezes and they all relate to nVidia.

  • I had a similar problem with Xubuntu 20.04.3 LTS and Xubuntu 22.04.1 LTS using an NVidia graphics card. The video output froze except the mouse pointer for 1-2 seconds every 5-10 seconds. Sound kept working without issues. I could resolve this for now by simply closing some browser tabs (Firefox 105.0 64 Bit). I'm a browser messy and usually have more than 50 open tabs (distributed over several windows). In my case, the issue disappeared once I closed superfluous browser tabs that used hardware acceleration. – cuffel Sep 21 '22 at 10:12

2 Answers2

1

TL;DR:

Problem may be caused by the top bar. I solved the issue by installing gnome-tweaks.

$ sudo apt install gnome-tweaks


I was experiencing your problem until a few minutes ago. My experience was visually identical to your recorded screencasts - my computer regularly became unresponsive except for the mouse cursor.

I managed to entirely solve the problem by installing gnome-tweaks. I didn't even have to open the application.

I was unsure at first why this solved the problem, so I investigated further. Turns out that I can recreate the freezing problem by opening the gnome-tweaks app, navigating to "Top Bar", and then enabling Seconds under Clock. The issue is similar to experiences in this thread, where the top bar may freeze the OS when it updates.

I have a feeling my solution may not fix your issue, unfortunately. Your screencasts show a top bar clock without seconds already. However, I do notice that your top bar does include Skype in all of your recorded screencasts. The next time that you experience the problem, I would exit Skype to see if it's the cause of the issue.

Hopefully this helps.

  • until the problem reappears I won't be able to test your ideas. I already had gnome-tweaks installed. Nonetheless, I'll try closing Skype, but there's no real logic to suspect it. Thanks for the pointer to the thread about gnome-shell CPU usage. Altho all those bugs seem to be fixed, some of them gave me ideas on how to diagnose this. – Bob Briscoe Jul 21 '20 at 12:56
0

Install gnome-tweaks, then from its burger menu select "Reset to defaults"; you can now monitor performance again, if back to "normal" start re-enabling the extensions of your choice one at a time.

In my case I reinstalled all the extensions back and performance is normal.

With the only notable exception of megasync which is known to suck all resources every 10 sec:

lrkwz
  • 304
  • Thanks, but I'm afraid I won't be able to tell if this solves my problem, because the problem just stopped happening a week or so after I posted my question. If it returns, I'll give it a try, of course. Cheers. – Bob Briscoe Nov 27 '20 at 13:47