Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Horizontal glitches while scrolling on AMD Radeaon Graphics #3527

Open
mHahnle opened this issue Aug 5, 2024 · 19 comments
Open

Horizontal glitches while scrolling on AMD Radeaon Graphics #3527

mHahnle opened this issue Aug 5, 2024 · 19 comments

Comments

@mHahnle
Copy link

mHahnle commented Aug 5, 2024

Setup:
Ubuntu Server 22.04.04 + Ubuntu Frame + Wpe Webkit Mir Kiosk

Symptoms:
When scrolling, horizontal glitches with random vertical positions flicker on the screen

Tested Hardware:

  • AMD Ryzen 5 5600G (internal Radeon GPU) with different mainboards (also different CPUs of the same kind):
  • Intel Core i3-8100T (internal Intel UHD Graphics 630)
  • Intel Core i5-7600T (internal Intel UHD Graphics 630)
  • VMWare Workstation VM (on Host with AMD Ryzen 9 7950x3d and NVidia RTX 4070 Super)

Tested Software/OS:

  • Ubuntu Server 22.04.04
  • Ubuntu Desktop 22.04.04
  • Ubuntu Frame (latest version in snap on channel 22)
  • WPE Webkit Mir Kiosk (latest version in snap)

Result:
No problems at all on both Intel platforms and with the VM. Allways glitches on the Ryzen 5 (different CPUs and two differens mainboard manufacturers tested)

Tried solutions:

  • Using mir-kiosk-chromium instead of wpe-webit-mir-kiosk => same problem
  • Installing the latest stable MESA driver (from ppa:kisak/kisak-mesa) => same problem
  • Installing the latest stable Radeon driver (from https://repo.radeon.com/amdgpu/6.0.2/ubuntu jammy main) => same problem
@AlanGriffiths
Copy link
Contributor

Thanks for the report. I've seen something similar on Miriway with an AMD GPU and DisplayLink outputs. (Not with just the AMD output though.)

As this is unlikely to be Frame code, and more likely to be Mir's gbm platform (or the drivers) I'm transferring to Mir

@AlanGriffiths AlanGriffiths transferred this issue from canonical/ubuntu-frame Aug 5, 2024
@Saviq
Copy link
Collaborator

Saviq commented Aug 6, 2024

@mHahnle could you please try on another compositor? E.g. just run wpe-webkit-mir-kiosk.cog on GNOME?


Installing the latest stable MESA driver (from ppa:kisak/kisak-mesa) => same problem

FWIW this won't affect snaps, those use a version of https://mir-server.io/docs/the-graphics-core22-snap-interface.

@AlanGriffiths
Copy link
Contributor

could you please try on another compositor

Based on my experience (with #3528) I suspect this is Mir specific, but would be good to confirm

@mHahnle
Copy link
Author

mHahnle commented Aug 7, 2024

@mHahnle could you please try on another compositor? E.g. just run wpe-webkit-mir-kiosk.cog on GNOME?

I installed frame-it and started it with:
frame-it snap run wpe-webkit-mir-kiosk.cog

Is that what you meant?

Result: no glitches

@Saviq
Copy link
Collaborator

Saviq commented Aug 7, 2024

Is that what you meant?

No, just no Mir/Frame in the picture at all. Just run wpe-webkit-mir-kiosk.cog in a terminal directly on GNOME.

@mHahnle
Copy link
Author

mHahnle commented Aug 7, 2024

No, just no Mir/Frame in the picture at all. Just run wpe-webkit-mir-kiosk.cog in a terminal directly on GNOME.

This doesn't give me any visual output. The terminal just shows: "Setting up watches. Watches established."

@AlanGriffiths
Copy link
Contributor

This doesn't give me any visual output. The terminal just shows: "Setting up watches. Watches established."

Are you able to run GNOME as a Wayland server?

@mHahnle
Copy link
Author

mHahnle commented Aug 7, 2024

Are you able to run GNOME as a Wayland server?

That's the output of inxi -Gaz:

Graphics:
Device-1: AMD Cezanne vendor: Gigabyte driver: amdgpu v: 6.3.6 pcie: gen: 3
speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s ports:
active: HDMI-A-1 empty: HDMI-A-2 bus-ID: 07:00.0 chip-ID: 1002:1638
class-ID: 0300
Display: wayland server: X.org v: 1.21.1.4 with: Xwayland v: 22.1.1
compositor: gnome-shell v: 42.9 driver: X: loaded: amdgpu,ati
unloaded: fbdev,modesetting,radeon,vesa gpu: amdgpu display-ID: 0
Monitor-1: HDMI-A-1 model: Idek Iiyama PLT2454M serial:
built: 2024 res: 1920x1080 dpi: 93 gamma: 1.2 size: 527x296mm (20.7x11.7")
diag: 604mm (23.8") ratio: 16:9 modes: max: 1920x1080 min: 720x400
OpenGL: renderer: AMD Radeon Graphics (radeonsi renoir LLVM 15.0.7 DRM
3.56 6.5.0-45-generic)
v: 4.6 Mesa 24.1.5 - kisak-mesa PPA direct render: Yes

@AlanGriffiths
Copy link
Contributor

That's the output of inxi -Gaz:

I mean that "Setting up watches. Watches established." indicates waiting for a Wayland compositor.

If you start GNOME in Wayland mode, then you should be able to run wpe-webkit-mir-kiosk.cog on it

@mHahnle
Copy link
Author

mHahnle commented Aug 7, 2024

That's why I posted the inxi output. Is it correct? It says X.org as the server, but the composer seems to be gnome?

And using this setup, the wpe-webkit-mir-kiosk.cog outputs the watches-messages.

@Saviq
Copy link
Collaborator

Saviq commented Aug 7, 2024

That's why I posted the inxi output. Is it correct? It says X.org as the server, but the composer seems to be gnome?

GNOME can work both on X and Wayland, you need to choose the right session when logging in. WPE is only set up to work on Wayland.

@mHahnle
Copy link
Author

mHahnle commented Aug 7, 2024

Yes, I have the login options "Ubuntu" (I guess thats Wayland) and "Ubuntu on Xorg" (I guess thats X). The shown inxi output is from the "Ubuntu" option. The watches messages occure on both.

@mattkae
Copy link
Contributor

mattkae commented Aug 16, 2024

Out of curiosity, if you set the env variable mesa_glthread=false, does that fix it? I was running into something similar earlier on Ubuntu 22.04

@mHahnle
Copy link
Author

mHahnle commented Aug 21, 2024

Out of curiosity, if you set the env variable mesa_glthread=false, does that fix it? I was running into something similar earlier on Ubuntu 22.04

IT WORKS!!! Thank you!

Should I close the issue, or is it something that should be integrated by default?

@AlanGriffiths
Copy link
Contributor

Should I close the issue, or is it something that should be integrated by default?

No, the issue remains and this is only a workaround for the underlying problem. But it does provide a clue to help diagnose the underlying problem

@mattkae
Copy link
Contributor

mattkae commented Aug 21, 2024

Should I close the issue, or is it something that should be integrated by default?

No, the issue remains and this is only a workaround for the underlying problem. But it does provide a clue to help diagnose the underlying problem

Is the underlying problem the fact that this is fixed in mesa in 24.04? Or is the underlying problem in Mir?

@AlanGriffiths
Copy link
Contributor

Is the underlying problem the fact that this is fixed in mesa in 24.04? Or is the underlying problem in Mir?

If there's a fix in more recent Mesa, then I assume switching to the 24/stable of Frame and/or wpe-webkit-mir-kiosk would also work? I think we could close the issue if that were confirmed

@mHahnle
Copy link
Author

mHahnle commented Aug 22, 2024

Is the underlying problem the fact that this is fixed in mesa in 24.04? Or is the underlying problem in Mir?

If there's a fix in more recent Mesa, then I assume switching to the 24/stable of Frame and/or wpe-webkit-mir-kiosk would also work? I think we could close the issue if that were confirmed

I did a short test it with Ubuntu Server 24.04 and the 24 channel of Ubuntu Frame and the problem seems gone. (Ubuntu 24 isn't an option for me because of incompatibilities with some used dependecies. But I can live with the workaround, or does disabeling the gltthread has any disadvantages?)

@AlanGriffiths
Copy link
Contributor

I did a short test it with Ubuntu Server 24.04 and the 24 channel of Ubuntu Frame and the problem seems gone. (Ubuntu 24 isn't an option for me because of incompatibilities with some used dependecies. But I can live with the workaround, or does disabeling the gltthread has any disadvantages?)

If the relevant Mesa change is in the userspace drivers (which seems likely), then there should be no need for Ubuntu Server 24.04. So you could switch Frame to 24.

In theory disabling glthread will have some impact on latency, whether that matters for you in practice we can't advise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants