swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.72k stars 1.11k forks source link

Freeze with fullscreen apps on multi-GPU setups #8404

Open mt190502 opened 1 month ago

mt190502 commented 1 month ago

Please fill out the following:

Nefsen402 commented 1 month ago

Does running with the environment variable WLR_SCENE_DISABLE_DIRECT_SCANOUT=1 workaround the problem?

emersion commented 1 month ago

Seems like a duplicate of https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3910

Nefsen402 commented 1 month ago

This user is running 1.10-rc2 so I would expect they aren't running wlroots git?

emersion commented 1 month ago

Eh right!

Can you obtain debug logs?

mt190502 commented 1 month ago

Sure. But I can't post the logs right now because I'm busy. I can give detailed information about the packages

❯ rpm -qa | grep -Ei 'sway|wlroots'
swaybg-1.2.1-2.fc41.x86_64
wlroots0.17-0.17.4-1.fc41.x86_64
swaylock-1.8.0-1.fc41.x86_64
swayidle-1.8.0-5.fc41.x86_64
wlroots-0.18.1-1.fc41.x86_64
sway-wallpapers-1.10~rc2-1.fc41.noarch
sway-config-upstream-1.10~rc2-1.fc41.noarch
sway-1.10~rc2-1.fc41.x86_64
mt190502 commented 1 month ago

Does running with the environment variable WLR_SCENE_DISABLE_DIRECT_SCANOUT=1 workaround the problem?

I'm not tried this. But I tried sway -D noscanout before. The situation has not changed.

mt190502 commented 1 month ago

Does running with the environment variable WLR_SCENE_DISABLE_DIRECT_SCANOUT=1 workaround the problem?

I tried this now. This works fine.

mt190502 commented 1 month ago

@emersion @Nefsen402 I collected debug logs

In both cases I ran counter strike

cmdline: WLR_SCENE_DISABLE_DIRECT_SCANOUT=1 sway &>swaywm-noscanout.log swaywm-noscanout.log

cmdline: sway &>swaywm-scanout.log swaywm-scanout.log

emersion commented 2 weeks ago
00:01:02.492 [ERROR] [wlr] [render/egl.c:705] EGL implementation doesn't support modifiers
00:01:02.492 [ERROR] [wlr] [backend/drm/renderer.c:88] Failed to import source buffer into multi-GPU renderer
00:01:02.492 [ERROR] [sway/desktop/output.c:317] Page-flip failed on output HDMI-A-4
StefVdHaute commented 1 week ago

I can confirm this problem.

Omar007 commented 1 week ago

Noticed very similar behaviour to the above on a desktop system with iGPU and dGPU.
The iGPU is running a secondary monitor, the dGPU is running the primary monitor. (I know primary/secondary doesn't strictly exist on Wayland but it best illustrates how I use them).

I ran into this when I fullscreened LibreOffice on the primary monitor; it suddenly seemed like my system froze up fully. It was only when I saw my mouse cursor move fine onto the secondary monitor that I realized it wasn't actually frozen. When I hit the fullscreen hotkey to de-fullscreen LibreOffice everything went back to normal again on the primary monitor.
Of note is that fullscreening LibreOffice worked fine when it was located on the secondary monitor instead.

Because the system is an iGPU+dGPU system I had also attempted to run with DRI_PRIME=1 to see if that changed the behaviour; it did not.

Running with WLR_SCENE_DISABLE_DIRECT_SCANOUT=1 it works fine on the primary monitor.

zDEFz commented 7 hours ago

WLR_SCENE_DISABLE_DIRECT_SCANOUT=1 also fixes my multi-gpu issue

parnavh commented 7 hours ago

WLR_SCENE_DISABLE_DIRECT_SCANOUT=1 works for me too