VRR Flickering/Tearing on high refresh Ultra Wide monitor

(For solution see post in reply below.)

I upgraded to an ultra wide: AOC CU34G2XP/BK, a 3440x1440p 180Hz monitor.

The issue:
High resolution high refresh rate monitors causing “bad flickering & tearing”, on exclusive fullscreen and borderless fullscreen Proton/Wine games (See three video’s with the issue below for reference.) when VRR/Adaptive Sync is enabled.
And GPU MCLK not switching or getting stuck between idle state and load state, seen in exclusive fullscreen.

Video’s (360p sry) showing the flickering & tearing issue:

  1. https://youtu.be/78Cs1pvkpvg
  2. https://youtu.be/66FNPu0qYCg
  3. https://youtu.be/WeSw3lS9qv8

Occurrences are intermittent.
Mostly after a system resume from sleep, or after monitor has gone into power save. Less likely on a cold boot.

Temporary workaround is to power cycling the monitor, physically or via software (ddcutil).

This issue is partially reproducable.
System logs show nothing out of the ordinary when the issue occurs.

Tested without result:

  • Tested refresh rates all high refresh rate ranges.
  • VRRtest, it does not exhibit/trigger the issue
  • Tested 2 high quality DP 1.4 cables.
  • upgrading to Kernel from 6.12 to 6.13.
  • Tested a launch script (gamemoderun) to enable/disable Adpative Sync.

What does work:

  • Disabling VRR within monitor OSD.
  • Power cycling the monitor, then restarting the game.
  • Logging out and back in.

System:
Monitor 3440x1440P @180Hz
CPU: AMD R7 5700X
GPU: AMD Radeon 6700 XT
MOBO: MSI B450 Tom. Max
RAM: 32Gb 3600Mhz cl16 G.Skill

Full system info:
inxi -v7azy : System information. - Pastebin.com

From what I gathered/read, could this be related to a VRR issue with AMD GPU’s in MESA or RADV?
Anyone know more about this? Also I’ve read 6.14 should come with some fix for this, but is my issue related to this fix?

Can someone with deep system knowledge help me out on this problem?

Mod edit:- Title modified to improve Search results.
User edit:- Modified title te reflect solution, removed fluff from post and rewritten/clarified the post for the found solution.

I have probably found what triggers the flickering issue.
It’s related to KDE Power Management and Turn off screen function.

When the screen gets turned off,then back on again, this triggers something that causes the flickering in games.

Workaround is to power cycling the monitor, by pressing the physical power button or via ddcutil. This resets something. Question is what.

On Arch forums there is also a report from last month with a similar issue without the black screen:
https://bbs.archlinux.org/viewtopic.php?id=303643

Edit: this seems more intermittent, turned on Turn off screen and let the it go to sleep, 1 min waking it up, but the flickering did not occur.

Solution found!

The problem
The issue has to do with the monitor vblanking period, set in the EDID, causing MESA/AMD GPU to switch MCLK ‘badly’ between MCLK idle state and high state or getting stuck in either.
Your AMD GPU MCLK states are listed here: cat /sys/class/drm/card**/device/pp_dpm_mclk

This causes frame-buffer issues and flickering or black screen flickering and or MCLK becoming stuck at either idle 96Mhz resulting in very bad FPS, or on desktop max MCLK Mhz increasing power draw at idle.

Reported issue on Mesa’s GitLab (4yrs ago).

The solutions

By 1) enabling ‘reduced blanking’ calculation for digital displays via GRUB kernel parameter, or 2) using the Xorg or Wayland solution found in the link above.

The easiest solution is 1) through GRUB kernel parameter.

Step 1
First, this applies only to KDE/Wayland, gather on which port your affected monitor is connected to by running:
kscreen-doctor -o

Example output:

Output: 1 DP-1
        enabled
        connected
        priority 1
        DisplayPort
        Modes:  1:3440x1440@180!  2:3440x1440@60  3:3440x1440@165  4:3440x1440@144*  5:3440x1440@120  6:3440x1440@100  7:3440x1440@75  8:3440x1440@30  9:2560x1080@60  10:2560x1080@60  11:2560x1080@50  12:1920x1200@180  13:1920x1080@120  14:1920x1080@120  15:1920x1080@60  16:1920x1080@60  17:1920x1080@60  18:1920x1080@60  19:1920x1080@60  20:1920x1080@50  21:1920x1080@50  22:1600x1200@180  23:1680x1050@60  24:1280x1024@75  25:1280x1024@60  26:1440x900@60  27:1280x800@180  28:1280x720@60  29:1280x720@60  30:1280x720@60  31:1280x720@50  32:1024x768@100  33:1024x768@75  34:1024x768@70  35:1024x768@60  36:832x624@75  37:800x600@100  38:800x600@75  39:800x600@72  40:800x600@60  41:800x600@56  42:720x576@50  43:720x576@50  44:720x480@60  45:720x480@60  46:720x480@60  47:720x480@60  48:640x480@100  49:640x480@75  50:640x480@73  51:640x480@67  52:640x480@60  53:640x480@60  54:640x480@60  55:720x400@70  56:1600x1200@60  57:1280x1024@60  58:1024x768@60  59:1920x1200@60  60:1280x800@60  61:2560x1440@60  62:1920x1080@60  63:1600x900@60  64:1368x768@60  65:1280x720@60

etc...

My monitor is connected to Output: DP-1.
When connected to HDMI it will read: HDMI-A-1.
The Modes: line will show all resolutions and refresh rates supported by your monitor.
Note: for me, having an ultra wide, my relevant resolutions will only be 3440x1440.

Step 2:
Open a text editor of choice to temporarily note the kernel arguments that you will need to add to grub in Step 3.

The formula is:
video="Output connection":"Resolution Width x Height"MR@refresh-rate
Note down all the resolutions you want to use.

Example result I used, one for 180Hz mode OR one for 144Hz mode:
video=DP-1:3440x1440MR@175Hz
video=DP-1:3440x1440MR@145Hz

Step 3:

Edit Grub (with an editor) of choice: sudo nano /etc/default/grub
Go to the line GRUB_CMDLINE_LINUX_DEFAULT=" " add the entries here or add them at line GRUB_CMDLINE_LINUX=" "

Note: you can only add 1 video= line

As example my GRUB with the mode for 180Hz it looks like this: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash udev.log_priority=3 video=DP-1:3440x1440MR@175Hz"

Save and exit.
Run sudo update-grub
Reboot

Conclusion and Caveat
This solution is not 100% water tight, on my system when resuming from Sleep the MCLK will still get stuck to 1000Mhz.
The workaround for this, as mentioned in the MESA GitLab thread, to re-set your refresh-rate down and back to where you want it again.

This can be scripted or using command linked to keyboard shortcut, using kscreen-doctor
My script/command I use as example: kscreen-doctor output.DP-1.mode.5 && sleep 1 && kscreen-doctor output.DP-1.mode.4

Hope this helps someone.

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