Ubuntu 22.04 decreased performance and freezing over time

Hi everyone,

First time post here, looking for some input on a problem I have been having with my Ubuntu 22.04 install. Getting to my main issue - I am suffering from performance issues that increase in severity the longer the system is on, a time-frame until i suffer from significant system freezes is less than a week. It begins with the zfs unlock screen being relatively laggy, even right after a fresh reboot (inputting the key to decrypt rpool is painfully laggy) and slowly increases in severity. Eventually the normal login screen to Ubuntu becomes relatively unresponsive. Then i start to have issues with the desktop environment not responding well (try to open a program and it either refuses to open or hangs for 20-30 seconds). Eventually this forces me into a restart, which starts the cycle all over again. I have a relatively new system I built that is mostly on default settings:

CPU - AMD Threadripper 7960x
MB - Asrock TRX50 WS
RAM - V-Color 64GB DDR5 OC R-DIMM 7600MHz (this is currently not OC’d and is running at base clock due to stability issues)
GPU - Radeon RX 7900 XTX
Storage - Crucial 1x CT2000P5PSSD8 and 1x CT2000T700SSD5
Displays - 3x 1440p HP E27u G4 monitors, 1x Samsung monitor (vertical monitor)
PSU - Corsair 1200W

i am using kernel 6.5.0-35-generic. i originally was using 6.5.0-39-generic but i had major issues with getting all my monitors to display properly. Rolling back to 35 fixed this. output of cat /proc/cpuinfo gives me a microcode version of my 7960x: 0xa108108.

Please let me know what additional information I can provide that can assist in helping me troubleshoot this or any ideas at all in the direction I should look…

1 Like

Does the system behave when you dont use any sort of graphical system?

If you can recreate the problematic behavior in text-mode, then we really have an interesting issue.

If the system runs fine without X11 running, then im dismissing this as a typical AMD graphics thing and losing interest in the problem.

Do you observe anything anomalous in htop when the system “freezes”?

Thanks for the reply,

I have not checked htop. I will compare/contrast what i am seeing there when the system becomes more unresponsive. I just rebooted the system 2 days ago so it has not gotten completely unusable on this uptime cycle as of yet.

Also an additional note: When I try to use a VM on the system (VirtualBox in this case), every VM i try to use has really stunted performance from the get go. Lots of unresponsive behavior, even though it is just a Ubuntu VM I am running, and only 1 at that. I have given it plenty of base ram and threads to operate as well. I have tried different graphics controllers in virtualbox as well and have made sure virtualization is enabled in BIOS. I think it could be another symptom of what is happening to the system but I can’t be sure.

For recreating the problem in text-only mode, next time the system starts to become unresponsive I will open the text-only virtual console and see how it performs. When that happens, what tasks are suggested to do to add load to the system in text-only mode? Or should I just use htop to see how the system looks in text-mode?

1 Like

Here is a SS of what htop output currently looks like

1 Like

I now have some headway on what is causing the freeze up. gnome-shell is maxing out CPU% in htop when this issue begins to really get bad. And it can max out that usage in as little effort as clicking on something in my top bar, such as the steam icon to get its dropdown menu or clicking the dropdown menu for power/sound/network/settings etc. Just by doing this the CPU usage spikes anywhere between 50-100%. There is definitely something happening in gnome-shell that is eating up my resources on the system for extremely simple tasks. This also makes sense as to why the login screen can also be so unresponsive, since gnome-shell is handling this as well. Does gnome-shell also handle the terminal that is the zfs decrypt screen as well? If so it also would make sense as to why entering that key is also rather unresponsive.

Any initial suggestions for debugging gnome-shell and trying to find root cause? Looking at journalctl for /usr/bin/gnome-shell this is some of the output i am seeing that might point in the right direction:

The entire log is filled with this clutter. Possibly an extension issue or bug?

1 Like

I only have 3 extensions installed (via checking LookingGlass) - Ubuntu AppIndicators, Ubuntu Dock, and Vitals.

1 Like

can you recreate the issue without gnome running?

Try disabling the extensions. I’ve had weird bugs appear and similar behavior due to an extension related to monitoring CPU usage.

1 Like

An update since I have not posted in about a week on this:

I have uninstalled Vitals extension and issue seems to be somewhat persisting with intermittent performance drops. I have not had a full unrecoverable freeze yet and it has been about a week. however I am getting a very similar message when the system does hang briefly time to time when interacting in gnome and the desktop environment:

Seems like the memory space it is pointing to has changed but it is still a very similar log. looking at htop it is still similar behavior as before. I am suspicious that Vitals was only aggravating this issue and not its root cause…

I am going to continue to troubleshoot when I have time. The next idea it seems like is trying to recreate the issue without gnome running? So that means switching to KDE Plasma or a similar alternative?

UPDATE: LITERALLY as i was typing this I right clicked on the desktop environment to open the settings menu and the system locked up. Would not respond to keyboard inputs or mouse clicks. Could see cursor moving around though. After about 2 minutes of trying to switch to text only mode it recovered briefly, only to lock again after a few seconds…

UPDATE 2: Here is the tail end of the log before the reboot (journalctl /usr/bin/gnome-shell):

How do we feel about trying to update from 22.04 to the most recent ubuntu LTS? See if the fix is nested in with some fixes that occurred between the versions?

1 Like

In my experience, @Reapingyou, Ubuntu 24.04 has many bugs that cause issues when used as the OS in virtual machines. I would assume upgrading to Ubuntu 24.04 wouldn’t improve @Reapingyou’s experience. I use Kubuntu 24.04 as my host OS, and it behaves much better than Ubuntu 24.04. In my opinion, Ubuntu made some decisions for Ubuntu 24.04 that have set the stage for its decline

1 Like

looks like gnome-shell is the issue. try uninstalling it?

If I uninstall gnome-shell, wouldn’t that break the install?

1 Like

i dont see why it would. Its just an x11 de like any other afaik. Having it installed seems to be breaking the install currently.

Ok, I will try uninstalling gnome and installing KDE plasma and see how it goes. I’ll update this if i have any issues over the next week or so once I get KDE installed

1 Like

Is your system passing full 3-4 rounds of memtest86?

Especially with a history of memory instability, I’d start there, whole hell of software issues can be caused by this bs.

Also, try out XanMod kernel.

1 Like

This has now been done. 4/4 clean passes with Memtest86+ UEFI version 11.

Also at this time I have switched over to using KDE plasma and uninstalled ubuntu-gnome-desktop gnome-shell. I will keep an eye on any issues pertaining to the original issues and see if they persist or if any other issues arise that might be relevant to this switch.

1 Like

I’m having similar problem after the machine is running for a few days. Gnome shell is probably the cause, and killall -3 gnome-shell restart it often fix the problem.

1 Like

I had similar problem on Fedora and Mint after an update to 6.5 kernel. If you can, try a different kernel. I had to roll back because of random freezes and blacklisted the 6.5. In my case that solved the problem.

Wanted to give an update to this thread now that it has been a few weeks since I switched from GNOME to KDE plasma. This switch has resolved the performance degradation and freezing. There are other issues that have occurred since this switch but none are relevant to this particular thread and original topic.

At this point I do not think I need to try other fixes for the GNOME issue. Maybe in the future i can attempt another switch back with more updates to the kernel or GNOME and see how it is.