You are not logged in.

#1 2024-11-11 20:09:23

Isildur
Member
Registered: 2009-05-26
Posts: 100

[Solved] Screen flickering on Thinkpad T14 Gen5 AMD OLED

I recently got a new Thinkpad T14 Gen5 AMD with OLED display. It has an AMD Ryzen 7 PRO 8840U with Radeon 780M Graphics.
The screen is flickering sometimes for a splitsecond, which consists of some horizontal artifacts. It usually affects only a few centimeters (vertically) of the screen and consists of only one "flicker". Besides that the screen is working normally.
When I lower the refresh rate to 60Hz the flickering seems to be less frequent but not completely gone. I also tried adding the kernel parameter amdgpu.modeset=1 which also didn't completely solve the issue (seemed to have positive effect yesterday, today I have the flickering again). I tested both X11 and Wayland. So far I have not found a way to reliably reproduce the issue other than to use to the laptop for a longer period of time and check if the issue persists.
In my research I found one issue related to flickering with AMD GPUs but to my understanding a fix should already be in the current kernel versions?!

Below the output of some commands to provide some information about my system

$inxi -GSC                                                                                                                                                                     

System:
  Host: T14 Kernel: 6.11.6-arch1-1 arch: x86_64 bits: 64
  Desktop: GNOME v: 47.1 Distro: Arch Linux
CPU:
  Info: 8-core model: AMD Ryzen 7 PRO 8840U w/ Radeon 780M Graphics bits: 64
    type: MT MCP cache: L2: 8 MiB
  Speed (MHz): avg: 400 min/max: 400/5132 cores: 1: 400 2: 400 3: 400 4: 400
    5: 400 6: 400 7: 400 8: 400 9: 400 10: 400 11: 400 12: 400 13: 400 14: 400
    15: 400 16: 400
Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Phoenix3 driver: amdgpu v: kernel
  Device-2: Chicony Integrated Camera driver: uvcvideo type: USB
  Display: wayland server: X.Org v: 24.1.4 with: Xwayland v: 24.1.4
    compositor: gnome-shell driver: X: loaded: modesetting unloaded: vesa
    dri: radeonsi gpu: amdgpu resolution: 3840x2400~120Hz
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
lspci -k | grep -EA3 'VGA|3D|Display'                                                                                                                                      

pcilib: Error reading /sys/bus/pci/devices/0000:00:08.3/label: Operation not permitted
c4:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix3 (rev d0)
	Subsystem: Lenovo Device 50ee
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu
dmesg | grep -i 'drm\|amdgpu\|radeon' | tail -n 50                                                                                                                             

[    2.990315] amdgpu 0000:c4:00.0: amdgpu: ring gfx_0.0.0 uses VM inv eng 0 on hub 0
[    2.990316] amdgpu 0000:c4:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
[    2.990318] amdgpu 0000:c4:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
[    2.990319] amdgpu 0000:c4:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 6 on hub 0
[    2.990320] amdgpu 0000:c4:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 7 on hub 0
[    2.990321] amdgpu 0000:c4:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 8 on hub 0
[    2.990322] amdgpu 0000:c4:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 9 on hub 0
[    2.990323] amdgpu 0000:c4:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 10 on hub 0
[    2.990324] amdgpu 0000:c4:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 11 on hub 0
[    2.990325] amdgpu 0000:c4:00.0: amdgpu: ring sdma0 uses VM inv eng 12 on hub 0
[    2.990326] amdgpu 0000:c4:00.0: amdgpu: ring vcn_unified_0 uses VM inv eng 0 on hub 8
[    2.990327] amdgpu 0000:c4:00.0: amdgpu: ring jpeg_dec uses VM inv eng 1 on hub 8
[    2.990328] amdgpu 0000:c4:00.0: amdgpu: ring mes_kiq_3.1.0 uses VM inv eng 13 on hub 0
[    2.993389] [drm] ring gfx_32768.1.1 was added
[    2.994194] [drm] ring compute_32768.2.2 was added
[    2.994979] [drm] ring sdma_32768.3.3 was added
[    2.995050] [drm] ring gfx_32768.1.1 ib test pass
[    2.995130] [drm] ring compute_32768.2.2 ib test pass
[    2.995216] [drm] ring sdma_32768.3.3 ib test pass
[    2.998781] amdgpu 0000:c4:00.0: amdgpu: Runtime PM not available
[    3.001203] [drm] Initialized amdgpu 3.59.0 for 0000:c4:00.0 on minor 1
[    3.010180] fbcon: amdgpudrmfb (fb0) is primary device
[    3.010189] amdgpu 0000:c4:00.0: [drm] fb0: amdgpudrmfb frame buffer device
[    3.371648] [drm] pre_validate_dsc:1578 MST_DSC dsc precompute is not needed
[    5.377469] systemd[1]: Starting Load Kernel Module drm...
[    5.387461] systemd[1]: modprobe@drm.service: Deactivated successfully.
[    5.387613] systemd[1]: Finished Load Kernel Module drm.
[    5.797427] snd_hda_intel 0000:c4:00.1: bound 0000:c4:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])
[10651.905208] [drm] PCIE GART of 512M enabled (table at 0x000000803FD00000).
[10651.905294] amdgpu 0000:c4:00.0: amdgpu: SMU is resuming...
[10651.908397] amdgpu 0000:c4:00.0: amdgpu: SMU is resumed successfully!
[10651.975448] amdgpu 0000:c4:00.0: amdgpu: ring gfx_0.0.0 uses VM inv eng 0 on hub 0
[10651.975455] amdgpu 0000:c4:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
[10651.975457] amdgpu 0000:c4:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
[10651.975458] amdgpu 0000:c4:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 6 on hub 0
[10651.975459] amdgpu 0000:c4:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 7 on hub 0
[10651.975460] amdgpu 0000:c4:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 8 on hub 0
[10651.975461] amdgpu 0000:c4:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 9 on hub 0
[10651.975462] amdgpu 0000:c4:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 10 on hub 0
[10651.975464] amdgpu 0000:c4:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 11 on hub 0
[10651.975465] amdgpu 0000:c4:00.0: amdgpu: ring sdma0 uses VM inv eng 12 on hub 0
[10651.975466] amdgpu 0000:c4:00.0: amdgpu: ring vcn_unified_0 uses VM inv eng 0 on hub 8
[10651.975467] amdgpu 0000:c4:00.0: amdgpu: ring jpeg_dec uses VM inv eng 1 on hub 8
[10651.975468] amdgpu 0000:c4:00.0: amdgpu: ring mes_kiq_3.1.0 uses VM inv eng 13 on hub 0
[10651.985247] [drm] ring gfx_32773.1.1 was added
[10651.986073] [drm] ring compute_32773.2.2 was added
[10651.986871] [drm] ring sdma_32773.3.3 was added
[10651.986899] [drm] ring gfx_32773.1.1 ib test pass
[10651.986934] [drm] ring compute_32773.2.2 ib test pass
[10651.987085] [drm] ring sdma_32773.3.3 ib test pass
glxinfo | grep "OpenGL version"                                                                                                                                                  

OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.2.6-arch1.1
dmesg | grep -i 'failed\|error'                                                                                                                                            

[    0.980656] RAS: Correctable Errors collector initialized.
[    5.394596] vboxdrv: module verification failed: signature and/or required key missing - tainting kernel
[    5.576895] amd-pmf AMDI0102:00: Failed to register SPS support, this is most likely an SBIOS bug: -17
[    5.742347] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    5.742356] cfg80211: failed to load regulatory.db
[    7.225221] ath11k_pci 0000:02:00.0: Failed to set the requested Country regulatory setting
[    7.225238] ath11k_pci 0000:02:00.0: failed to process regulatory info -22
[    7.225477] ath11k_pci 0000:02:00.0: Failed to set the requested Country regulatory setting
[    7.225480] ath11k_pci 0000:02:00.0: failed to process regulatory info -22
[10653.405376] ath11k_pci 0000:02:00.0: Failed to set the requested Country regulatory setting
[10653.405397] ath11k_pci 0000:02:00.0: failed to process regulatory info -22
[10653.405409] ath11k_pci 0000:02:00.0: Failed to set the requested Country regulatory setting
[10653.405412] ath11k_pci 0000:02:00.0: failed to process regulatory info -22

Last edited by Isildur (2024-11-17 19:34:02)

Offline

#2 2024-11-11 22:48:41

Awebb
Member
Registered: 2010-05-06
Posts: 6,616

Re: [Solved] Screen flickering on Thinkpad T14 Gen5 AMD OLED

Those flickers happen across T14 and P14s gens, even under Windows.

Offline

#3 2024-11-11 23:06:28

seth
Member
Registered: 2012-09-03
Posts: 59,120

Re: [Solved] Screen flickering on Thinkpad T14 Gen5 AMD OLED

I also tried adding the kernel parameter amdgpu.modeset=1

This does absolutely nothing, the value is the default, if you set it to 0, your GUI will fail.

If it's not a HW/panel/OLED issue, this sounds power management related
"amdgpu.dcdebugmask=0x10" will disable the panel self refresh (and likely increase the battery drain) and you can also try "amdgpu.aspm=0 amdgpu.bapm=0 amdgpu.runpm=0" on the same caveat.

Before that, see whether you can trigger it by preventing any kind of screen update for a longer period of time (incl. blinking cursors, moving your mouse etc)

Offline

#4 2024-11-12 15:27:46

Isildur
Member
Registered: 2009-05-26
Posts: 100

Re: [Solved] Screen flickering on Thinkpad T14 Gen5 AMD OLED

Thank you for the support. Actually the flickering seems to happen rather when there are screen updates, like when watching Youtube or scrolling through a Reddit page. When I just keep everything still I didn't manage to trigger the flickering so far.
I also tried booting with all the options mentioned but saw no change in behavior.

cat /proc/cmdline                                                                                                                                                                
BOOT_IMAGE=/boot/vmlinuz-linux root=/dev/mapper/main-root rw loglevel=3 quiet amdgpu.aspm=0 amdgpu.bapm=0 amdgpu.runpm=0

ps: I managed to capture the issue on video (the short mostly red artifacts) https://imgur.com/a/Noo9Dum

Last edited by Isildur (2024-11-12 15:41:32)

Offline

#5 2024-11-12 15:42:33

seth
Member
Registered: 2012-09-03
Posts: 59,120

Re: [Solved] Screen flickering on Thinkpad T14 Gen5 AMD OLED

You didn't disable PSR?

I tested both X11 and Wayland.

But gnome, ie. composited?
If it's not the panel, might be an old buffer leaking in from re-use (GL_buffer_age)
=> Do you get this on an (uncomposited) X11/openbox (no picom) session?

Edit: nope, that's in the client and the (bright) text is fine.
Is it always only dark areas?

Last edited by seth (2024-11-12 15:44:20)

Offline

#6 2024-11-13 20:16:56

Isildur
Member
Registered: 2009-05-26
Posts: 100

Re: [Solved] Screen flickering on Thinkpad T14 Gen5 AMD OLED

seth wrote:

You didn't disable PSR?

I read about it pretty early on into my research but actually forgot about it. I now set amdgpu.dcdebugmask=0x10 which, according to my research should disable PSR. Since then I was unable to reproduce the issue. I'm not sure about the implication apart from a little higher power consumption. Especially if it affects OLED displays in a negative way.

I tested both X11 and Wayland.

But gnome, ie. composited?
If it's not the panel, might be an old buffer leaking in from re-use (GL_buffer_age)
=> Do you get this on an (uncomposited) X11/openbox (no picom) session?

Yes I'm using Gnome. I was unable to reproduce the issue in an Openbox session (without amdgpu.dcdebugmask=0x10 ofc). I also didn't see it in a KDE session I tested on a live USB stick for other reasons. Since I have no certain way of reproducing the error I'm not sure yet about it, since I didn't test that long.

Edit: nope, that's in the client and the (bright) text is fine.
Is it always only dark areas?

I thought so as well but then I was also able to reproduce it on bright pages.


Assuming it really doesn't appear on Openbox sessions or on Gnome (Mutter) without PSR would that make sense? Do the compositors interact with the screen refresh?

Offline

#7 2024-11-13 20:53:50

seth
Member
Registered: 2012-09-03
Posts: 59,120

Re: [Solved] Screen flickering on Thinkpad T14 Gen5 AMD OLED

I now set amdgpu.dcdebugmask=0x10 which, according to my research

… and https://bbs.archlinux.org/viewtopic.php … 0#p2207980 tongue

Especially if it affects OLED displays in a negative way.

I don't think so. This should™ only make the GPU pump updated framebuffers into the panel instead of the panel refreshing the present framebuffer itself.
It doesn't prevent or reduce panel refreshes, but PSR only takes the job away from the GPU so it can power down.

Do the compositors interact with the screen refresh?

They refresh the  screen but those are opposite theories.
The PSR might simply be bogus and post a degraded buffer.
The compositor might have shown parts of the previous frame, but after seeing the video that's actually unlikely the cause here (the text is perfect, only the background is corrupted - it would not look this way)

Offline

#8 2024-11-15 16:12:49

ppvan
Member
Registered: 2024-11-15
Posts: 5

Re: [Solved] Screen flickering on Thinkpad T14 Gen5 AMD OLED

Not sure what I can bring to the table here, but I got the exact issue like OP on a ThinkBook 14 G5+ ARP, AMD Ryzen 7 7735H (16), AMD Radeon 680M.
I can confirm it does happen on both gnome(x11 and wayland) and sway. I think it maybe related to a kernel or driver update, since I just move from fedora 40 back to arch and the issue happen on both of them.

Offline

#9 2024-11-15 16:15:27

seth
Member
Registered: 2012-09-03
Posts: 59,120

Re: [Solved] Screen flickering on Thinkpad T14 Gen5 AMD OLED

Does "amdgpu.dcdebugmask=0x10" help you as well, https://wiki.archlinux.org/title/Kernel_parameters

Offline

#10 2024-11-15 16:29:37

ppvan
Member
Registered: 2024-11-15
Posts: 5

Re: [Solved] Screen flickering on Thinkpad T14 Gen5 AMD OLED

I just boot with linux-lts (6.6.61-1-lts) and the issue seem gone. Will continue testing more to make sure. I do find a related issue: https://gitlab.freedesktop.org/drm/amd/-/issues/3503a

Offline

#11 2024-11-15 16:41:40

ppvan
Member
Registered: 2024-11-15
Posts: 5

Re: [Solved] Screen flickering on Thinkpad T14 Gen5 AMD OLED

seth wrote:

Does "amdgpu.dcdebugmask=0x10" help you as well, https://wiki.archlinux.org/title/Kernel_parameters

Yes it does! I just boot to linux kernel again (6.11.7-arch1-1) with parameters you provide and it works now (before it's like flickering every 5 mins). As I'm not sure if that completely fix the issue but will update in several days. Currently we have 2 workarounds:

1. Use linux-lts kernel (may be < 6.10 will do, but confirm works in linux 6.6.61).
2. Boot with kernel params: amdgpu.dcdebugmask=0x10

I will update the result if the issue happen again.

Offline

#12 2024-11-17 19:33:44

Isildur
Member
Registered: 2009-05-26
Posts: 100

Re: [Solved] Screen flickering on Thinkpad T14 Gen5 AMD OLED

I can confirm that since I added  "amdgpu.dcdebugmask=0x10" I have not experienced the issue anymore. I switched to KDE in the meantime and interestingly the flickering was way less on KDE but without "amdgpu.dcdebugmask=0x10" I had massive lags when using the terminal (tested with kitty and konsole), which is apparently an issue with the panel refresh or buffering, since it was not actually lagging but a rendering issue with the display not showing me the updates (e.g. text typed) if I didn't move the cursor.  Adding "amdgpu.dcdebugmask=0x10" fixed that issue as well.

@ppvan: Interesting that the LTS kernel is not affected by this. Need to try that as well.
@seth: Thank you very much for the support and sorry for missing the essential parameter you mentioned.

Offline

Board footer

Powered by FluxBB