Skip to contentSkip to conversation

Freesync causes in-game blackscreens when game has low fps.

Bug 110856 [email protected] 1 participant 15 messages Jun 7, 2019 – Nov 19, 2019

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=110856

Bug ID: 110856
Summary: Freesync causes in-game blackscreens when game has low
fps.
Product: DRI
Version: XOrg git
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: critical
Priority: medium
Component: DRM/AMDgpu
Assignee: [email protected]
Reporter: [email protected]

When I play games on my Benq EX2303R 144hz monitor, the monitor shows blackscreens/turns of for a few seconds in low fps scenarios like in-game menus or during stutters. This is probably when the monitor exits it's VRR window. Freesync is working normally with the same hardware and software but an Acer XG270HU Freesync 1 monitor.

I have The following hardware:
an ASUS Strix Vega 64 8GB GPU
Benq EX3203r Freesync 2 Monitor
Lindy premium displayport cable.
Ryzen 7 1800x Stock clocks with SMT

Software:
MESA - 19.0.4-1
Operating System: Manjaro Linux
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.58.0
Qt Version: 5.12.3
Kernel Version: 5.2.0-1-MANJARO
OS Type: 64-bit
Processors: 16 × AMD Ryzen 7 1800X Eight-Core Processor
Memory: 15,7 GiB of RAM

(Hi, I'm new to filing bugs so I'm not sure if this is the right place to post this.
If it's the wrong place please tell me where I can file this in.)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=110856

Arek Tumas <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Priority|medium |high

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=110856

Nicholas Kazlauskas <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #1 from Nicholas Kazlauskas <[email protected]> --- Please attach a full dmesg log and an Xorg log if you're using X.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=110856

--- Comment #2 from Arek Tumas <[email protected]> --- Created attachment 144527
--> https://bugs.freedesktop.org/attachment.cgi?id=144527&action=edit
Dmesg log file

This is during a Rocket League session with kernel version 5.1.4-1-MANJARO

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=110856

--- Comment #3 from Arek Tumas <[email protected]> --- Created attachment 144528
--> https://bugs.freedesktop.org/attachment.cgi?id=144528&action=edit
Xorg.0.log file

This is the Xorg.0.log file during a Rocket League session with kernel version 5.1.4-1-MANJARO

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=110856

--- Comment #4 from Arek Tumas <[email protected]> ---
These are the log files during Rocket League with VRR enabled.
I recorded these with kernel version 5.1.4-1-MANJARO as the 5.2 kernel is not finished yet. If You need these with kernel 5.2-rc4 then I can also send them too.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=110856

--- Comment #5 from Arek Tumas <[email protected]> --- Created attachment 144530
--> https://bugs.freedesktop.org/attachment.cgi?id=144530&action=edit
DMESG log with 5.2-rc4 kernel

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=110856

--- Comment #6 from Arek Tumas <[email protected]> --- Created attachment 144531
--> https://bugs.freedesktop.org/attachment.cgi?id=144531&action=edit
Xorg.0.log file with 5.2-rc4 kernel

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=110856

--- Comment #7 from Ropid <[email protected]> ---
I saw the same issue when I tried the BenQ EX3203R for a few days. I could work around the problem by extracting and saving the monitor's EDID in a file, and changing the VRR range in that file from the original 24-144Hz to 48-144Hz. I then overrode the monitor's EDID on the kernel command line with this parameter here:

drm_kms_helper.edid_firmware=DP-1:edid/edid-benq-xr3203r-vrr-48-144.bin

My customized EDID file is this:

$ base64 /usr/lib/firmware/edid/edid-benq-xr3203r-vrr-48-144.bin 
AP///////wAJ0WZ/RVQAABkcAQS1Rid4P901rE9FrCYQUFQlSwDR/NHo0cCzAKnAgYCBAIHAVl4A
oKCgKVAvIDUAgGghAAAaAAAA/QAwkN7ePAEKICAgICAgAAAA/ABCZW5RIEVYMzIwM1IKAAAAEAAA
AAAAAAAAAAAAAAAAAdUCA1VwUVxbWj9AEB8iISAEExIDAWFrIwkHB4MBAADiAMBtAwwAEAA4eCAA
YAECA2fYXcQBeAADbRoAAAIDMJAAA2A3CC/jBeMB5A9g/AHmBgcBYF06+OMAoKCgMlAIIJgEgGgh
AAAeB4KAUHA4TUAIIPgM4A4RAAAcAAAAAAAAqw==

If you want to try this custom EDID file I used, run that base64 encoded text I shared here through "base64 --decode > filename.bin" to get the binary file.

For the kernel parameter, the output ports are named differently than in Xorg. You can get the output port name where the monitor is connected like this:

$ grep . /sys/class/drm/card*-*/status
/sys/class/drm/card0-DP-1/status:connected
/sys/class/drm/card0-DP-2/status:disconnected
...

About how I created the EDID file, it was with a Windows tool named "Custom Resolution Utility". It can extract the EDID from the monitor/driver and save it in a file, and can customize the VRR data structure in there.

I only tried 48Hz for minimum VRR range and this worked fine, there were no black screens anymore. I don't know what other values work with the EX3203R.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=110856

--- Comment #8 from Arek Tumas <[email protected]> ---

I've tried it but it did not work. I made a custom edid.bin file through CRU on windows, but in rocket League when I click on menus the screen resets/flashes black (as in the monitors hardware does). Also when I select the frame rate target below the vrr window it stays black. It does happen less in in-game 3d scenes I think, but that may be subjective. This happens all the time in Witcher 2.
I've been on this for hours. I also tried advice from the following sites later on:
https://forum.manjaro.org/t/solved-setting-custom-resolution-for-second-monitor-via-xorg-conf/83693/18

https://kodi.wiki/view/Creating_and_using_edid.bin_via_xorg.conf#Configure_xorg_to_read_custom_EDID_file

I of course adjusted it for amdgpu purposes.

I've tried these settings in /usr/share/X11/xorg.conf.d/10-amdgpu.conf according to those tutorials:

Section "OutputClass"
Identifier "AMDgpu"
MatchDriver "amdgpu"
Driver "amdgpu"
EndSection
Section "Device"
Identifier "AMD"
Driver "amdgpu"
Option "ConnectedMonitor" "DP-2"
Option "CustomEDID" "DP-2:/etc/X11/edid.bin"
Option "IgnoreEDID" "false"
Option "UseEDID" "true"
Option "VariableRefresh" "true"
Option "TearFree" "on"
Option "DRI" "3"
# Option "AccelMethod" "glamor"
EndSection

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=110856

--- Comment #9 from Arek Tumas <[email protected]> --- Created attachment 144534
--> https://bugs.freedesktop.org/attachment.cgi?id=144534&action=edit
/etc/mkinitcpio.conf

I also changed this file to point to my custom edid.bin file

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=110856

--- Comment #10 from Ropid <[email protected]> ---
Those Xorg config options you tried to use do not exist on the xf86-video-amdgpu driver (I mean "CustomEDID" etc.). Those EDID options you used are unique Nvidia driver config options and do not exist in any other driver.

If you are intersted, you can find a list about possible Xorg options for amdgpu by running "man 4 amdgpu", and then there's more general stuff documented in "man xorg.conf". There is sadly nothing about EDID anywhere.

For the open drivers that use kernel-mode-setting, you need to tell the driver about your EDID file on the kernel command line. That's the only way to do it.

In the /etc/mkinitcpio.conf file you shared, you made a mistake on the "MODULES=..." line. You need to remove that "drm_kms_helper..." text from that line. That text you added there has to go onto the kernel command line, not into mkinitcpio.conf.

The only thing you have to do in /etc/mkinitcpio.conf is what you already did on the "FILES=..." line.

About that "drm_kms_helper..." kernel command line parameter, where you have to add it is your boot loader's configuration file. I don't know how that works on Manjaro.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=110856

--- Comment #11 from Arek Tumas <[email protected]> ---
Alright! The workaround is now working. To summarize:
All I needed to do is put the custom edid.bin file (that i made on windows with the custom resolution utility with the minimum VRR set to 48 instead of 24) in /lib/firmware/edid
Then edid /etc/default/grub with the following line:
GRUB_CMDLINE_LINUX_DEFAULT="drm.edid_firmware=DP-2:edid/edid.bin quiet" (You need to change DP-2 to whatever you get with "grep . /sys/class/drm/card*-*/status" )
After that I did "sudo update-grub" and rebooted the machine.

It's working flawlessly :) The upside of this method is that it is permanent.

Thank You for Your time and effort to help me Nicholas! Your pointers were priceless!

Also I don't know if it's feasible but it would be nice if this workaround wouldn't be needed in the first place.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#13 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=110856

--- Comment #12 from Arek Tumas <[email protected]> ---
Oh and Ropid - Many Thanks to You too! I meant to thank both of You guys!

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#14 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=110856

Martin Peres <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |MOVED

--- Comment #13 from Martin Peres <[email protected]> --- -- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/813.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel