[TRACKING] Lots of stuttering and lagging on AMD + Ubuntu 22.04

This is a known problem, they’re working on a new kernel to fix the freezes. Pretty sure it was mentioned in one of the forum posts / guides I read over the past week :laughing:

1 Like

Need additional details:

  • Just making sure you on the correct kernel, as merely installing is not enough. uname -r

  • Is this happening with anything attached (external displays, etc).

  • Connected to power or on battery?

@Matt_Hartley

  • I’m running the OEM kernel.
  • No monitors or other accessories installed.
  • I have noticed that things get worse when the laptop is charging.

image

1 Like


Just wanna chime in and say I’m experiencing the same thing. My laptop is not plugged in, nor has any external monitors plugged in. I have two usb-c cards in the back ports, 1 usb-a on the front left and the 1tb storage card on the front right. I’m experincing lagging and stuttering in wayland desktop. xorg seems to work alright but sometimes locks up completely when I try to log in to it.

1 Like

Yeah same thing. I thought a new oem kernel coming is supposed to fix it?

2 times I wake from suspend and the screen goes black and I have to hard reboot by holding the power button.

Lots of freezes at random times.

Then I’ll get a whole day with no freezes and perfect sleep wakes.

1 Like

All affected,

I am going have setup a test machine matching your configuration (distro, kernel and BIOS). For us to dig deeper here, I’d like to have the following to duplicate.

  • This will assume for all in thread, the correct LTS and kernel are verified by the user. Some have clarified this already.

  • What is open/running when the event happens - how might I replicate this? Expand on “Lots of freezes at random times.”

  • Powered or battery powered (some of you have already addressed this).

  • Updated packages, today, as there is a lot of activity here.

  • And this output:

sudo apt install lshw dmidecode -y && sudo dmidecode | grep -A3 'Vendor:\|Product:' && sudo lshw -C cpu | grep -A3 'product:\|vendor:' && echo "Kernel version: $(uname -r)"

The idea here is we need to be 100% on the same page as new BIOS roll out in the near future (like UEFI shell) and that the right kernel is used 6.1.0-1023-oem.

And lastly…a reminder as we iron this out.

Linux

Unfortunately, the last firmware release provided by AMD to fix critical issues also introduced a regression on Linux. Specifically, certain kernel versions have amdgpu drivers that result in the system hanging. AMD has created the firmware fix for this and is currently completing validation on it. We’ll put this through an accelerated test and release process to get it out to you as quickly as possible. We anticipate this being available in mid October (roughly), and we’ll share it via LVFS.

Note that 7040 Series is still a very new platform and AMD’s open source teams will continue to actively develop and improve Linux kernel driver support beyond this specific firmware fix. We’ll keep updating our guides to point you to recommended configurations, and we’ve created a Community wiki post (here) with an overview of the latest status.

1 Like

@juchong

On BIOS 03.02 for testing now. Thus far, on 6.1.0-1023-oem, no freezing yet.

Update, still no issues experienced. Firefox being used, terminal as well.
Fractional scaling 125%.

@Matt_Hartley

I believe you’re assuming that the issue is graphics-related. I do not believe this is the case. Try setting scaling to 100% and then increase the thermal load of the laptop (but don’t overdo it). Try opening a bunch of browser tabs or running a few programs in the background. The goal is to cause the laptop to thermal throttle while staying below the fan threshold. This behavior also explains the correlation between charging and stuttering since additional heat will wind up getting dumped into the system due to charging.

Just trying to replicate it, graphics or otherwise. Thus far, in Firefox, no success and my journalctl and dmesg have not shown anything concerning. I actually suspect it’s BIOS related, but again, duplicating gives me something to pass along to engineering and for me to test against BIOS we’re testing against.

I will put it at 100% and run multiple browser tabs in Firefox and Chrome to replicate. I will also toss in s-tui with stress and do some pounding on that as well. Going to also see about doing this while the laptop is charging. Firefox is behind the other windows, Chrome is in the screenshot.

End game - replication - that’s all I am looking to do with this as I suspect the BIOS release is the issue here. If I cannot replicate it, then something being run is triggering this and not being shared so I can replicate it.

With 03.02 BIOS, there is some related things to be worked through and tested corrected in a future release happening soon.

Edit: Tossing everything I can at it. Chrome, Firefox, multiple tabs, YT playing, Basemark stressing in Chrome, s-tui (with stress active), and I am actively using it for file browsing and opening software. I am connected to power, in charging state.

Unfortunately, the last firmware release provided by AMD to fix critical issues also introduced a regression on Linux. Specifically, certain kernel versions have amdgpu drivers that result in the system hanging. AMD has created the firmware fix for this and is currently completing validation on it. We’ll put this through an accelerated test and release process to get it out to you as quickly as possible. We anticipate this being available in mid October (roughly), and we’ll share it via LVFS.

Ideally, we need to specifically identify why this is happening for you, not me, on 03.02 and on later BIOS I am testing as well. As it sits now, it’s a tiny bit warm, lags occasionally…but I have been tossing a LOT at this. Will move my USB-C expansion card around, while testing.

Again, please having my requests being met will help tremendously - literally this, even if it feels unneeded, do so anyway please for those who have not done this thus far (I have @juchong’s kernel details thus far):

sudo apt install lshw dmidecode -y && sudo dmidecode | grep -A3 'Vendor:\|Product:' && sudo lshw -C cpu | grep -A3 'product:\|vendor:' && echo "Kernel version: $(uname -r)"

and

  • This will assume for all in thread, the correct LTS and kernel are verified by the user. Some have clarified this already.
  • What is open/running when the event happens - how might I replicate this? Expand on “Lots of freezes at random times.”
  • Powered or battery powered (some of you have already addressed this).
  • Updated packages, today, as there is a lot of activity here.

and checking dmesg and see if you can catch any errors.

In my testing, it took doing all of this just to get the system to lag at all.

@Matt_Hartley, thanks for taking a look at this! Strangely, I experienced the issue immediately after booting into the new kernel. No user applications were actively running except for the stuff happening in the background as the PC finished booting. I’ve also noticed that the issue " disappears" randomly after suspending and waking the laptop. Sometimes, the laptop will work perfectly, and other times, it will stutter quite a bit.

EDIT: My expansion config as per:
image

  1. USB C
  2. DVI
  3. USB C
  4. USB A

1 Like

Awesome, thank you.

I am almost positive this is BIOS related as me just getting to OEM C is painful. But once there, all was well. Going to move the USB-C around, reattach the charger, etc. You’re doing everything correctly, so this is not on you, appreciate it.

Anything interesting showing up in journalctl -b

Not suggesting their is a solution as I suspect it’s 03.02, but I’d love to have something to latch onto so I can vet this in the upcoming BIOS release (on my other machine).

Appreciate you working through this. It does get better, but it’s a process. :slight_smile:

Okay, this is crazy helpful :raised_hands: - awesome, appreciate it, setting this up now. And just cards, nothing attached? For the sake of replication.

Correct, other than when the charger is connected while charging. Oh! And I’ve always used port 1 to charge.

1 Like

Completely agree. This smells like an old issue I’ve seen on ancient 3rd-gen i3 and i5 CPUs where the CPU would get stuck in an “energy saving” configuration that limited boost. This would also explain the suspend-resume behavior.

1 Like

Quick question, DVI? You mean DP (Display Port) or HDMI expansion card?

In the meantime, testing with:

  1. USB C
  2. DP
  3. USB C
  4. USB A

Edit: 10 tabs, Firefox, and Chrome. YouTube videos actively displayed and opening software. Still not able to replicate the issue. Might be time to start pulling out the expansion cards, running from battery. Stripping down the laptop to the bare bones to see where the failure is happening.

  • Remove any and all expansion cards.
  • Install and run something to stress things.

sudo apt update && sudo apt upgrade -y && sudo apt install sudo apt install s-tui stress -y && s-tui

Then tab over to stress to run a stress test. This will safely pound on the system. Test the touchpad, is there lag? If not, open one program a time, test the touchpad again, freezing yet?

Now this may freeze right off with just the upgrade. If this is the case, everything removed, we’ll bounce this into a ticket as we need to get a look at the logs. When you open the ticket, please copy a link to this thread into the ticket so we know that this is the same issue and person.

Display Port :slight_smile:

I’ll give this a try this evening (after work).

1 Like

So I’ve been in Fedora 39 for the past couple days without incident, but just jumped back to my Ubuntu partition to test/respond to this. On first boot back into Ubuntu it felt just like the Fedora install did. I rebooted again though and now it’s back to the lagfest. In my case I’m perfectly happy on Fedora but I know that might not be the case for everyone.

Running kernel 6.1.0-1023-oem but I see there’s now an update to 6.1.0-1024-oem (about to update to current and retry)
It happens just by opening Firefox or trying to do anything on the machine.
Seeing it both powered or battery powered.

Output of requested

lshw is already the newest version (02.19.git.2021.06.19.996aaad9c7-2build1).
lshw set to manually installed.
dmidecode is already the newest version (3.3-3ubuntu0.1).
dmidecode set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
	Vendor: INSYDE Corp.
	Version: 03.02
	Release Date: 09/27/2023
	Address: 0xE0000
       product: AMD Ryzen 7 7840U w/ Radeon  780M Graphics
       vendor: Advanced Micro Devices [AMD]
       physical id: 4
       bus info: cpu@0
       version: 25.116.1
Kernel version: 6.1.0-1023-oem

Configuration of expansion cards:

  1. USB-C
  2. USB-A
  3. USB-C
  4. HDMI

@Matt_Hartley I think the trick here is to increase the system temperature without pushing the CPU load. I managed to get the stuttering to occur consistently by encouraging the laptop to get warm (still, within reason).

Try this:

  • Drain the laptop battery to ~30%
  • Charge it while the display is closed and the laptop sits on a soft surface. My laptop was charging on a couch.
  • After about half an hour, wake up the laptop and leave it on the couch.

Don’t try doing anything that would push the CPU load to extremes. Encourage the laptop to stay warm while using it and observe it. I’ve been unable to reproduce the stuttering while the laptop sits on a desk, but it will appear after about half an hour of use sitting in my lap.

Some more information as Im still getting system lock ups with Ubuntu wayland. I have easy effects open, a terminal session, and firefox as active windows. Im a browser tab hoarder as I use an extension called simple tab groups to organize trips and other things going on so I’ll usually have 5-8 active tabs with currently 80 tabs total including the active ones (so 75 background tabs not actively loaded in memory). On battery power with no external displays, or other things attached like a mouse or keyboard to the usb ports.

System behaviour swings from being responsive to total lockup while posting this comment. No keyboard or mouse input is processed while the system hangs. It will eventually catch up and process inputs but will take anywhere from 5 seconds to a minute before it becomes responsive again.

I can confirm that this behaviour doesn’t happen when using ubuntu on Xorg. This seems to only happen for me when using the wayland Ubuntu environment.

Affected by this issue as well.

  • Batch 2, 7840u
  • Ubuntu 22.04.3 LTS (installed on Intel 12th gen but went through Framework AMD OEM kernel installation steps before hardware upgrade to AMD and first booting with AMD)
  • All software packages at latest version as of today
  • GNOME session (not “Ubuntu” session)
  • Session uses Wayland
  • Fractional scaling set to 125%
  • Running on battery, ~70% SOC
  • Happens without any external devices or cables attached
  • Back expansion ports are USB-C, the other are USB-A and HDMI, all taken from the AMD box
  • Freezing also happens with all four expansion ports empty
  • After logging in with no applications open, as soon as I launch Firefox, frequent significant freezing starts occurring at random intervals (anywhere from one to many seconds after the previous freeze has disappeared), with everything on screen frozen for anywhere from a few hundred milliseconds to many seconds
  • When I close Firefox again, freezing almost disappears but is still noticeable with slight mouse cursor jumping when moving the cursor fast
  • It appears that the more graphically intense an application is, the more likely it is to trigger freezes, i.e. Firefox causes more freezing than e.g. a terminal window or a Nautilus window
  • The more windows are open, the more extensive freezing seems to become

System info:

	Vendor: INSYDE Corp.
	Version: 03.02
	Release Date: 09/27/2023
	Address: 0xE0000
       product: AMD Ryzen 7 7840U w/ Radeon  780M Graphics
       vendor: Advanced Micro Devices [AMD]
       physical id: 4
       bus info: cpu@0
       version: 25.116.1
Kernel version: 6.1.0-1024-oem

Edit: Did some more testing with Firefox. It appears that the freezes predominantly appear to happen when something new needs to be rendered. For example, when I open this very forum page, the screen freezes for around 20 seconds. After the freeze is gone, I can scroll perfectly smooth up and down. However, when I scroll far enough that the forum loads additional messages, there is another multi-second freeze. Once that has receded, I can scroll fine again.

I would therefore assume the freezes have to do with how Wayland requests graphics memory to be allocated for textures.

@Matt_Hartley Ping (making sure you see this)