Repository navigation
Direct scanout causes black screen in some games running via native wayland #14843
Replies: 22 comments 26 replies
|
Confirmed on my amdgpu laptop when playing Celeste with native Wayland, specifically when using Vulkan. OpenGL continues to work. Not gonna bother bisecting because I'm currently in China and have no intention to. Someone else should bisect |
|
Try with |
Try with this patch, or set non_shader_cm to 1. |
|
Hello, i have nothing else to add, other than that im experiencing a similar issue - #14828 |
|
Can confirm this happens on my 5060 Ti 16gb. It was perfectly fine prior to upgrading Hyprland. |
|
Can confirm it's also happening here on my RDNA2 GPU. |
|
Still happens on my 5060 Ti on 0.55.3 |
|
Still happens on my 5060 Ti on 0.55.4 |
|
i hope this issue fixes soon... |
|
I have games that, with other compositors (Sway, Jay), get direct scanout on my 9070 XT, but don't on my 5700 XT. Hyprland will attempt direct scanout on both GPUs, and will black screen on the 5700 XT. Seems |
|
Happens on me too. Only on one game, EZFN (Fortnite project) through Proton GE 11 on native Wayland with direct scanout. Arch Linux with vanilla kernel 7.1.3 Does not happen on KDE plasma. |
|
I'm experiencing this bug too in Overwatch under Hyprland 0.56.1. Setting render:direct_scanout = 0 avoids the problem entirely. The same game under XWayland (without PROTON_ENABLE_WAYLAND=1) is unaffected at any direct_scanout value. Not reproducible on other compositors:
Steps to reproduce:
|
|
Is this going to be ignored? Sincerely it's been weeks I've had this problem. Latest commit still doesn't fix it. Here is a log: Let me know if the log is wrong, and I also can debug further if needed. |
|
This issue also causes issues when trying to run mpv in fullscreen on an nvidia dgpu. So if people are reporting an issue with flickering or black screens in mpv redirect them to this. |
|
I noticed something interesting in valheim, when i encounter this issue, it renders properly in menus. So for instance if i'm in game and i open my inventory the screen is no longer black, i close the inventory and the screen goes black, this is very odd. |
|
Issue is still happening, i've noticed it especially when trying to fullscreen mpv. It makes my laptop's monitor turn of for a second, then mpv actually appears fullscreen and displays correctly. If i then try to unfullscreen it, my monitor turns off for a second again, and after it just displays the un-fullscreened mpv propertly with the rest of the windows. My laptop has a Meteor Lake-P Intel iGPU. quirks.skip_non_kms_dmabuf_formats=true does not fix the issue. |
|
Here's what I've discovered, YMMV.
|
|
0001-monitor-skip-direct-scanout-of-buffers-kms-cannot-take.patch Setup:
Cause:
My patch (tested, fixes it for me):
Optional idea for aquamarine:
|
|
Ran into this issue too and have a fork ready that fixes it to actually use direct scanout. The way I interpret @blackixxce12 's patch it just seems to skip it in those cases? Direct scanout works much better for me in some games and i've been using my fork with great results. I can't link to it because Hyprland's AI policy would not allow it (funny that their exclusive sponsor's stance on these kinds of commits is so wildly different but they can do what they want I guess), but anyone should feel free to steal the work in my fork, rewrite it for yourself and create a human PR. I just cba for something I quickly fixed in my spare time, I just wanted to play my game. Also relevant: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/5366 Mutter's fix for a related issue that got merged a few days ago. |
|
Here's a work around for any games where Create a window rule for any game you experience mode switch black screens for, and set the content type to "video" and set direct_scanout to 2. This lets vrr function while disabling DS for problem games. example: |
|
Another data point, from AMD and mpv rather than NVIDIA and games:
Same clip and setup, 12 s each:
I checked v0.57.1 in case the new commit coordinator changed this. The path is the same. After a failed test, Measured and written up with an AI agent (Claude, via Hermes); every number above comes from real runs on this machine. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Workaround
set quirks.skip_non_kms_dmabuf_formats = 1
Hyprland version
Hyprland 0.55.2 built from branch v0.55.2 at commit 39d7e20 clean (version: bump to 0.55.2).
Date: Sat May 16 12:59:19 2026
Tag: v0.55.2, commits: 7319
Libraries:
Hyprgraphics: built against 0.5.1, system has 0.5.1
Hyprutils: built against 0.13.1, system has 0.13.1
Hyprcursor: built against 0.1.13, system has 0.1.13
Hyprlang: built against 0.6.8, system has 0.6.8
Aquamarine: built against 0.11.0, system has 0.11.0
Version ABI string: 39d7e209c79d451efab1b21151d5938289da838d_aq_0.11_hu_0.13_hg_0.5_hc_0.1_hlg_0.6
No flags were set.
Regression
Yes, this started happening after Hyprland 0.55. The games worked fine before.
Describe the bug
Some Steam games like cyberpunk 2077 and helldivers 2, running through proton in native wayland mode go completely black when direct scanout is active (fullscreen) . The game is still running in the background, it does not freeze, audio continues playing, input still work, but the monitor is black.
If a mouse cursor is being rendered on screen, like in an inventory or pause menu, the screen comes back.But as soon as the cursor goes away again, the screen goes black. Setting the game window to floating fixes the issue because it disables direct scannout.
This only happens when a game is running under native wayland. games going through xwayland works just fine with direct scannout. OBS does not properly show the issue because it will disable direct scanout, so I recorded the monitor externally using my phone instead.
Also, Some games like subnautica 2 are not affected by this issue and work just fine with wayland and direct_scanout
This also might just be a nvidia only bug with direct_scanout and native wayland but thats just speculation.
Reproduction steps
Using Hyprland 0.55.x, With direct_scanout=1 or direct_scanout=2, start an affected game in native wayland mode, Once the game is fullscreen with no cursor, the screen becomes black. Opening a menu where a cursor renders restores the image temporarily.
System info and config
vid.1.mp4
hypr-systeminfo.txt
All reactions