ValveSoftware / SteamOS

SteamOS community tracker
1.6k stars 70 forks source link

Enabling VRR causes black screen flicker and external display disconnects #1410

Open dangerousdonut opened 8 months ago

dangerousdonut commented 8 months ago

Your system information

Please describe your issue in as much detail as possible:

I'm encountering the following problem using a Steam Deck that's connected to an external monitor (ASUS VG249QL3A) via Displayport using Valve's Steam Deck Docking Station.

When toggling VRR on from the "..." menu in the Deck's game mode, the screen will begin intermittently flickering to black and when these disruptions are long enough, my monitor will report it is not receiving a signal anymore. What I expected would happen is that the image would be output without the screen frequently going black.

Leaving VRR enabled in the global performance profile (i.e. outside of a game) and setting the game to sleep, will often lead to no image being received on the monitor upon wakeup.

After re-imaging, VRR initially seemed to work properly. Then, a new issue arose: screen brightness started strobing/flickering and later the intermittent black screens returned. Re-imaging again solved this brightness strobing, but the intermittent black screens remain.

I don't have other VRR-capable hardware to test this monitor with to exclude it being a hardware issue on its side, but this is the third monitor (but of different make) that I've had very similar issues with, so it would be quite a coincidence.

In non-VRR usage, the monitor performs as expected and without notable quirks.

The issue was also present prior to the recent stable branch update to SteamOS 3.5.17.

I haven't tested VRR in desktop mode. I'm not sure how to do that, but if it will help I can look into it.

Steps for reproducing this issue:

  1. Connect ASUS VG249QL3A to Steam Deck over Displayport using Valve's Docking Station
  2. Run a game in the Deck's game mode with variable frame rate or frame times
  3. Enable VRR (in the Steam Deck's gaming mode)

Attempted troubleshooting:

Monitor EDID ``` edid-decode (hex): 00 ff ff ff ff ff ff 00 06 b3 a0 24 e6 15 00 00 28 21 01 04 a5 35 1e 78 3b 54 15 ac 52 4e a2 25 0e 50 54 bf cf 00 81 40 81 80 95 00 71 4f 81 c0 b3 00 01 01 01 01 02 3a 80 18 71 38 2d 40 58 2c 45 00 0f 28 21 00 00 1e 00 00 00 fd 00 30 b4 fa fa 3c 01 0a 20 20 20 20 20 20 00 00 00 fc 00 56 47 32 34 39 51 4c 33 41 0a 20 20 20 00 00 00 ff 00 52 41 4c 4d 54 46 30 30 35 36 30 36 0a 01 11 02 03 30 f1 55 01 03 04 13 1f 12 02 11 90 0e 0f 1d 1e 14 05 3f 40 07 16 06 15 23 09 07 07 83 01 00 00 6d 1a 00 00 02 01 30 b4 00 00 00 00 00 00 5a 87 80 a0 70 38 4d 40 30 20 35 00 0f 28 21 00 00 1e a4 9c 80 a0 70 38 59 40 30 40 35 00 0f 28 21 00 00 1a 44 ac 80 a0 70 38 62 40 30 40 35 00 0f 28 21 00 00 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e8 ---------------- Block 0, Base EDID: EDID Structure Version & Revision: 1.4 Vendor & Product Identification: Manufacturer: AUS Model: 9376 Serial Number: 5606 Made in: week 40 of 2023 Basic Display Parameters & Features: Digital display Bits per primary color channel: 8 DisplayPort interface Maximum image size: 53 cm x 30 cm Gamma: 2.20 DPMS levels: Off Supported color formats: RGB 4:4:4, YCrCb 4:4:4, YCrCb 4:2:2 First detailed timing includes the native pixel format and preferred refresh rate Display is continuous frequency Color Characteristics: Red : 0.6728, 0.3212 Green: 0.3056, 0.6328 Blue : 0.1445, 0.0556 White: 0.3134, 0.3291 Established Timings I & II: IBM : 720x400 70.081663 Hz 9:5 31.467 kHz 28.320000 MHz DMT 0x04: 640x480 59.940476 Hz 4:3 31.469 kHz 25.175000 MHz Apple : 640x480 66.666667 Hz 4:3 35.000 kHz 30.240000 MHz DMT 0x05: 640x480 72.808802 Hz 4:3 37.861 kHz 31.500000 MHz DMT 0x06: 640x480 75.000000 Hz 4:3 37.500 kHz 31.500000 MHz DMT 0x08: 800x600 56.250000 Hz 4:3 35.156 kHz 36.000000 MHz DMT 0x09: 800x600 60.316541 Hz 4:3 37.879 kHz 40.000000 MHz DMT 0x0a: 800x600 72.187572 Hz 4:3 48.077 kHz 50.000000 MHz DMT 0x0b: 800x600 75.000000 Hz 4:3 46.875 kHz 49.500000 MHz DMT 0x10: 1024x768 60.003840 Hz 4:3 48.363 kHz 65.000000 MHz DMT 0x11: 1024x768 70.069359 Hz 4:3 56.476 kHz 75.000000 MHz DMT 0x12: 1024x768 75.028582 Hz 4:3 60.023 kHz 78.750000 MHz DMT 0x24: 1280x1024 75.024675 Hz 5:4 79.976 kHz 135.000000 MHz Standard Timings: DMT 0x20: 1280x960 60.000000 Hz 4:3 60.000 kHz 108.000000 MHz DMT 0x23: 1280x1024 60.019740 Hz 5:4 63.981 kHz 108.000000 MHz DMT 0x2f: 1440x900 59.887445 Hz 16:10 55.935 kHz 106.500000 MHz DMT 0x15: 1152x864 75.000000 Hz 4:3 67.500 kHz 108.000000 MHz DMT 0x55: 1280x720 60.000000 Hz 16:9 45.000 kHz 74.250000 MHz DMT 0x3a: 1680x1050 59.954250 Hz 16:10 65.290 kHz 146.250000 MHz Detailed Timing Descriptors: DTD 1: 1920x1080 60.000000 Hz 16:9 67.500 kHz 148.500000 MHz (527 mm x 296 mm) Hfront 88 Hsync 44 Hback 148 Hpol P Vfront 4 Vsync 5 Vback 36 Vpol P Display Range Limits: Monitor ranges (Bare Limits): 48-180 Hz V, 250-250 kHz H, max dotclock 600 MHz Display Product Name: 'VG249QL3A' Display Product Serial Number: '. . .' Extension blocks: 1 Checksum: 0x11 ---------------- Block 1, CTA-861 Extension Block: Revision: 3 Underscans IT Video Formats by default Basic audio support Supports YCbCr 4:4:4 Supports YCbCr 4:2:2 Native detailed modes: 1 Video Data Block: VIC 1: 640x480 59.940476 Hz 4:3 31.469 kHz 25.175000 MHz VIC 3: 720x480 59.940060 Hz 16:9 31.469 kHz 27.000000 MHz VIC 4: 1280x720 60.000000 Hz 16:9 45.000 kHz 74.250000 MHz VIC 19: 1280x720 50.000000 Hz 16:9 37.500 kHz 74.250000 MHz VIC 31: 1920x1080 50.000000 Hz 16:9 56.250 kHz 148.500000 MHz VIC 18: 720x576 50.000000 Hz 16:9 31.250 kHz 27.000000 MHz VIC 2: 720x480 59.940060 Hz 4:3 31.469 kHz 27.000000 MHz VIC 17: 720x576 50.000000 Hz 4:3 31.250 kHz 27.000000 MHz VIC 16: 1920x1080 60.000000 Hz 16:9 67.500 kHz 148.500000 MHz (native) VIC 14: 1440x480 59.940060 Hz 4:3 31.469 kHz 54.000000 MHz VIC 15: 1440x480 59.940060 Hz 16:9 31.469 kHz 54.000000 MHz VIC 29: 1440x576 50.000000 Hz 4:3 31.250 kHz 54.000000 MHz VIC 30: 1440x576 50.000000 Hz 16:9 31.250 kHz 54.000000 MHz VIC 20: 1920x1080i 50.000000 Hz 16:9 28.125 kHz 74.250000 MHz VIC 5: 1920x1080i 60.000000 Hz 16:9 33.750 kHz 74.250000 MHz VIC 63: 1920x1080 120.000000 Hz 16:9 135.000 kHz 297.000000 MHz VIC 64: 1920x1080 100.000000 Hz 16:9 112.500 kHz 297.000000 MHz VIC 7: 1440x480i 59.940060 Hz 16:9 15.734 kHz 27.000000 MHz VIC 22: 1440x576i 50.000000 Hz 16:9 15.625 kHz 27.000000 MHz VIC 6: 1440x480i 59.940060 Hz 4:3 15.734 kHz 27.000000 MHz VIC 21: 1440x576i 50.000000 Hz 4:3 15.625 kHz 27.000000 MHz Audio Data Block: Linear PCM: Max channels: 2 Supported sample rates (kHz): 48 44.1 32 Supported sample sizes (bits): 24 20 16 Speaker Allocation Data Block: FL/FR - Front Left/Right Vendor-Specific Data Block (AMD), OUI 00-00-1A: Version: 2.1 Minimum Refresh Rate: 48 Hz Maximum Refresh Rate: 180 Hz Flags 1.x: 0x00 Flags 2.x: 0x00 Maximum luminance: 0 (50.000 cd/m^2) Minimum luminance: 0 (0.000 cd/m^2) Unknown: 0x00 0x00 Detailed Timing Descriptors: DTD 2: 1920x1080 143.981451 Hz 16:9 166.587 kHz 346.500000 MHz (527 mm x 296 mm) Hfront 48 Hsync 32 Hback 80 Hpol P Vfront 3 Vsync 5 Vback 69 Vpol P DTD 3: 1920x1080 164.917418 Hz 16:9 192.788 kHz 401.000000 MHz (527 mm x 296 mm) Hfront 48 Hsync 64 Hback 48 Hpol P Vfront 3 Vsync 5 Vback 81 Vpol N DTD 4: 1920x1080 179.982369 Hz 16:9 212.019 kHz 441.000000 MHz (527 mm x 296 mm) Hfront 48 Hsync 64 Hback 48 Hpol P Vfront 3 Vsync 5 Vback 90 Vpol N Checksum: 0xe8 ---------------- Preferred Video Timing if only Block 0 is parsed: DTD 1: 1920x1080 60.000000 Hz 16:9 67.500 kHz 148.500000 MHz (527 mm x 296 mm) Hfront 88 Hsync 44 Hback 148 Hpol P Vfront 4 Vsync 5 Vback 36 Vpol P ---------------- Preferred Video Timings if Block 0 and CTA-861 Blocks are parsed: DTD 1: 1920x1080 60.000000 Hz 16:9 67.500 kHz 148.500000 MHz (527 mm x 296 mm) Hfront 88 Hsync 44 Hback 148 Hpol P Vfront 4 Vsync 5 Vback 36 Vpol P VIC 1: 640x480 59.940476 Hz 4:3 31.469 kHz 25.175000 MHz Hfront 16 Hsync 96 Hback 48 Hpol N Vfront 10 Vsync 2 Vback 33 Vpol N ---------------- Native Video Resolution: 1920x1080 ---------------- edid-decode SHA: 84ddf9155376 2021-10-03 10:37:45 Warnings: Block 1, CTA-861 Extension Block: Display Product Serial Number is set, so the Serial Number in the Base EDID should be 0. EDID: Base EDID: Some timings are out of range of the Monitor Ranges: Horizontal Freq: 15.625 - 212.019 kHz (Monitor: 250.000 - 250.000 kHz) CTA-861: Multiple native progressive timings are defined. Failures: Block 1, CTA-861 Extension Block: Missing VCDB, needed for Set Selectable RGB Quantization to avoid interop issues. EDID conformity: FAIL ```
killerdwarf15 commented 8 months ago

I have the same exact issue. This is with the official Valve Dock. VRR seems to break the connection to the tv. Flickering image about 3-4 times. It will usually stay on for a few minutes but eventually will go to a black screen and then stop displaying to the TV. My TV I am using is a LG C1 OLED with a HDMI 2.1 cable and the HDMI port on the dock.

TacoCake commented 8 months ago

Same issue for me, also LG TV

dangerousdonut commented 8 months ago

Same issue for me, also LG TV

Is this with HDMI? As I understand it, VRR is a bit hit and miss with it. I'm having issues with Displayport, and I was under the impression that it should generally work with DP.

TacoCake commented 8 months ago

Yes it is with HDMI, via the official dock

RodoMa92 commented 7 months ago

Can confirm the same behavior in the past on my MAG274QRF-QD on HDMI, VRR is half of the time broken sadly. Haven't tested again recently tho, might give it a shot again to see if the situation has improved.

dangerousdonut commented 7 months ago

Can confirm the same behavior in the past on my MAG274QRF-QD on HDMI, VRR is half of the time broken sadly. Haven't tested again recently tho, might give it a shot again to see if the situation has improved.

If you do test it, can you also check how it performs over Displayport?

Spurlos commented 7 months ago

Dell S2421HGF with Steam Deck dock over HDMI, VRR enablement is also flaky. Showed first frame and then turned black, with display saying that there is no input signal from device over HDMI 1. Feels like communication protocol screwed up and never reset it self.

After few back and forths, power down cycles, two different HDMI cables and an XBOX series X as a VRR test case for the monitor it became stable and I could enable VRR per game without issues.

It seems like setting minitor in VRR state with other device and switching to deck dock allowed SteamOS to properly "talk VRR" with the monitor.

/shrug

RodoMa92 commented 7 months ago

Yeah, just tested with HDMI and it's an instant black screen like flashes (seems to keep trying training an image but keep failing and retrying from the behaviour observed, there is a periodical slight change of black appearance each 5 seconds) until I revert it back (using Bazzite on latest kernel 6.7.9 + .121 dock firmware). I'll test DP shortly and report back here.

EDIT: Different behaviour on DP: I do get a periodical train but the image is extremely unstable: there are rare black squares that appears for single frames and the panel seems to keep wanting to retrain every 10 seconds. At least here I can see something on the display, which is basically impossible to have using HDMI VRR.

This is tested all from Desktop mode on KDE Wayland desktop.

sosodev commented 6 months ago

Can confirm that VRR is similarly non-functional with my LG C1 and official dock.

dangerousdonut commented 6 months ago

So, on the latest update on the Preview channel (SteamOS 3.6, build 20240509.100, Dock firmware 0.13.15.124), VRR now functions without intermittently losing the image/flickering to black. However, some issues remain.

When VRR is activated, the brightness of the image will flicker rapidly in non-black areas. This seems consistent across all brightness levels on my monitor. This might be a factor of the hardware rather than software. However, when VRR was intermittently working as I originally described it, this rapid brightness flicker did not occur. The brightness flicker stopped happening on its own.

In addition to the above, waking the Deck into VRR mode prevents any image from being shown on my monitor. I get an error notice saying "OUT OF RANGE". This seemingly only happens when the monitor has been in sleep as well and the Deck wakes it.

This is all over Displayport.

I'm wondering if I should close this one and create a new, separate issue for the VRR on wakeup/startup issue. Any suggestions?

sosodev commented 6 months ago

@dangerousdonut

I'm wondering if I should close this one and create a new, separate issue for the VRR on wakeup/startup issue. Any suggestions?

I'd recommend leaving this issue open until others have confirmed they're no longer having this problem too. Creating another issue to track your new problem is a good idea.

If nobody had commented on your issue then closing it would be reasonable but the comments here have turned this functionally turned this into a group report.

dangerousdonut commented 6 months ago

Replying to https://github.com/ValveSoftware/SteamOS/issues/1410#issuecomment-2110942567

Makes sense. I'll do just that.

ap4ss3rby commented 5 months ago

While I'm not a steam deck user, I believe I have some idea of what's going on. It appears that the issue may be the monitors being not properly compliant with the VRR spec, requiring frame doubling to work right, which as far my monitor's builtin FPS counter is saying, isn't working. This comes from a GTX 1060 on X11, and an intel i5-12400 iGPU using the experimental Xe driver on wayland, and a monitor that flickers and just goes blank when the refresh rate drops too low

dangerousdonut commented 5 months ago

While I'm not a steam deck user, I believe I have some idea of what's going on. It appears that the issue may be the monitors being not properly compliant with the VRR spec, requiring frame doubling to work right, which as far my monitor's builtin FPS counter is saying, isn't working. This comes from a GTX 1060 on X11, and an intel i5-12400 iGPU using the experimental Xe driver on wayland, and a monitor that flickers and just goes blank when the refresh rate drops too low

I'm now on 3.6 and VRR seems much improved there. But when I was still on 3.5, I do recall seeing my monitor's low frame rate compensation working when a game dropped below 48 fps (i.e. triggering multiples of the current frame rates).

The compliance angle seems very plausible though with how loose the back-of-the-box feature support seems to be. What kind of VRR does the Deck/SteamOS use anyway? Not Gsync of course, nor HDMI VRR. Is it Freesync or some custom implementation of the Adaptive Sync standard?

ClayCaramel commented 4 months ago

i use an official dock from valve with a standard usb mouse, usb keyboard, and a gigabyte G27QC A monitor through a displayport connection at 1440p and 165hz. when i enable VRR and/or HDR, it works fine until intermittently during gameplay the monitor goes blank for a couple of seconds before i can see anything again. my steam deck (lcd) is on the beta branch (3.5.19) and the docks firmware is on version 0.13.15.121. ive tried multiple different versions of steamos and dock firmwares, as well as the usual things recommended, and nothing helps for long.

Reboot70 commented 3 months ago

using the official dock, I've only noticed display link dropouts happening in the following scenarios:

The external display and/or cable is not rated for HDMI 2.0 (at least 14.4Gbps link speed). The external display and/or cable is not rated for DisplayPort 1.2 (at least 17.28 Gbit/s link speed).

SteamOS and/or its graphics driver does not recognize that the cable connected or the monitor connected does not support this spec.

In my case, the Steam Deck tries to set up a data link rate that exceeds both the cable spec and the monitor spec with HDMI 1.4 and a High-Speed HDMI cable. Whenever VRR is turned on for this type of connection, it requests a display output picture with a frame rate that exceeds the display HDMI spec. This explains why for some users (including me) there are intermittent drops in the link while VRR is turned on.

You'll need to work around this by telling SteamOS to set the monitor refresh rate to something the monitor and its associated HDMI/DP spec supports, i.e RGB 8-bit color 1920x1080p120hz for HDMI 1.4.

You likely won't have issues when you use an appropriate cable with an appropriate port on your monitor that supports the required versions of DP//HDMI.

canesalato commented 5 days ago

I am on 3.6.20 with updated dock firmware and still experiencing intermittent drops in the link while VRR is turned on, with the screen randomly going completely black until I disable VRR from the steam menu (I memorized the shortcut).

As far as I know, my setup should be up to standard: