Ubuntu 22.04/23.10 Shuttering graphics

Hello,

Since around ~2 weeks ago I noticed that graphics started to lag/shutter. Shuttering is not consistent. It appears and disappers. It can affect only 1 application or multiple ones at a time. Sometimes even gnome-shell shutters, but the applications don’t, etc… I’m mostly suffering from it in gnome-terminal and noticed that before it happens a key stroke is dropped and never registered.

Initially I noticed the shuttering with remote tmux session over ssh. While changing tmux panes or editing with vim I noticed that my key press to be visualized was taking up to 2 seconds. Initially I blamed my network connection, but I noticed the shuttering happening even locally in gnome-terminal(performance was better compared to remote) and I tested that my remote tmux session was working as expected from virtual terminal(Ctrl + Alt + FX). Later on I noticed that my browser was shuttering from time to time and my kids complained that they have to restart my computer to play steam games because everything was lagging.

I was using Ubuntu 22.04.3 and yesterday I installed anew Ubuntu 23.10. My current system spec are:

  • CPU: Intel® Core™ i7-9700K × 8
  • GPU: NVIDIA GeForce RTX™ 2060 SUPER
  • OS: Ubuntu 23.10 (64bit) (installed as legacy)
  • Gnome Version: 45.2
  • Windowing System: X11
  • NVIDIA: nvidia-driver-550-server-open
  • Monitors: 2 (DP & HDMI)

My UEFI is modified in the following way:

  • Support UEFI and legacy boot
  • Use only dedicated graphical card

I tried the following things:

  • setting nvidia settings Preferred Mode to Prefer Maximum Performance
  • installing older nvidia drivers with ubuntu-drivers
  • Using Wayland instead of Xorg. The shuttering disappeared for apps using Wayland, but still appeared when using Xwayland. Unfortunatelly there were a lot of other issues, that forced me to drop Wayland(graphical glitches, not able to share desktop, etc…)
  • Upgrading the system and even reinstalling the OS with latest release.
  • Switching to Switchable Graphics.
    • Performance Mode - The system was veeery lagy and unusable
    • On-Demand Mode - Everything that runs on intel card is running smoothly, but I’m having issues running applications on dedicated one. For example youtube was refusing to play some videos.
  • Using only single monitor

I’m attaching 2 bug report as well. One after the system was booted up and later after I was experiencing lagging in gnome-shell and gnome-terminal (local and remote tmux sessions).
nvidia-bug-report.log.gz (457.2 KB)
nvidia-bug-report.log.old.gz (453.4 KB)

Edit: As generix noted I’ve had connected the displays to the integrated gpu, so I’m again attaching 2 logs connected to the external gpu (after boot and when shuttering starts in gnome-terminal):
nvidia-bug-report.log.old.gz (427.0 KB)
nvidia-bug-report.log.gz (479.9 KB)

Why did you connect all monitors to the intel igpu?

Sorry, it was a mistake, because I was in Nvidia Optimus mode so that I could work and when preparing the system I forgot to move the monitors to the nvidia gpu. I’ve edited my original post and added additional bug reports.

Thanks for noticing!

Not really anything noteworthy in the logs, only a slightly high interrupt count from the nvidia gpu. Anything visible in top?

Nothing interesting in top. Not one process is passing 10% cpu core utilization. Mostly things are around 1% to 3%. I’ve seen only Xorg raise up to 9%, but it stays mostly around 3%.
Could it be connected to faulty hardware? I’ve had system issues from faulty usb hub previously. I’d try disconnecting peripherals and disks to see if there would be an improvement.
Now I remember that when I assembled the PC I had spontaneous crashes and in my system logs I saw that the video card was disconnected. It turned out that the end socket of my power cable on which the gpu was connected had issues, but I’ve changed it.

generix do you have any other idea?

You might check if an ealier driver doesn’t have this issue, try reseating the gpu in its pcie slot. Though it’s not clear it’s a graphics issue at all but there’s also nothing in the logs ponting in any direction.

I’ve tried the following without any success:

  • Resetting the GPU
  • Disconnecting USB devices
  • Using nvidia-535 - very bad experience
  • Using nvidia-550 - has shuttering (in the terminal), but it’s workable (kind of)

The following things worked:

  • Using nouveau driver - no shuttering
  • using nvidia-470 - no issues at all. This is what I’m currently using.
    • The only issue I currently have is with webkit. For example gnome-control-center → online accounts doesn’t work. Looks like I’m hitting this bug. Workaround it like so: MESA_LOADER_DRIVER_OVERRIDE=iris gnome-control-center online-accounts

So it appears that the issue is with the drivers. 470 works the best followed by 550 and versions in between are totally unusable. What’s interesting is that I used to use 535 and then switch to 550 without any issues and the problem just started at some point. Maybe I’ve upgraded the OS (I don’t do it frequently).

generix how should I proceed with this issue now?

No real clue, actually. I’d try to enable resizable bar by disabling csm and enabling “Above 4G decoding” in bios.

I’ve upgraded the BIOS and enabled Above 4G decoding for resizable bar, but there were no changes. I’ve not disabled the CSM as the OS is currently installed in legacy mode. When I initially hit the problem with Ubuntu 22.04 it was installed with UEFI, but if I remember correctly UEFI and CSM were both allowed. On the weekend I might try to reinstall the OS with UEFI only (instead of converting the installation to UEFI).

Above 4G decoding and CSM are mutual exclusives, no having no change (or not being able to boot) is expected when both are enabled.

I’ve installed Ubuntu 24.04 and enabled resiable bar and the issue was gone. I managed to find more information and the issue appeared to be with mutter, but not the nvidia drivers. Here are the bug reports:

There are are a few workaround around the internet like downgrading mutter and putting the packages on hold or add a ppa, but I prefer no such things, so I’d stick with Ubuntu 24.04 which has the mutter fix.

generix thank you for your help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.