Skip to content

Conversation

@nfp0
Copy link
Contributor

@nfp0 nfp0 commented Sep 13, 2025

Description

This seems to be enough to fix the fullscreen issue that many people are having on KDE and Gnome on Wayland when Monitor Index is set to Auto.
I have tested on KDE on my system and it seems to restore the Auto behaviour back to how it was before the bug, which means Auto opens RetroArch on the active monitor. In the case of KDE, "active monitor" means the monitor where the cursor is located.

Please only merge this after verifying that the change does not cause issues on other DEs. I have only tested on my machine on KDE Plasma 6.4.5

Related Issues

This should fix #17372

@nfp0
Copy link
Contributor Author

nfp0 commented Sep 13, 2025

I know the splash screen I removed was there as a workaround to obtain information about the active monitor for Vulkan on Wayland. For for some reason, removing it fixes the issue on KDE.

But I am afraid it might cause issues on other compositors, so please if anyone can test it on as many compositors as possible, that would be nice.

@LibretroAdmin
Copy link
Contributor

Do you have someone in mind who could test this?

@gouchi
Copy link
Member

gouchi commented Sep 14, 2025

Also some testing advices for Wayland in this meta issue.

It will work with or without libdecor ? Because there is a condition when doing the fullscreen.

@nfp0
Copy link
Contributor Author

nfp0 commented Sep 14, 2025

@LibretroAdmin No, only the users affected by it on the #17372 issue.
I asked there if any of them could do additional tests on other compositors.

@gouchi With my previous changes, it looks like disabling libdecor makes Auto have the same behaviour as setting a monitor index manually.
In my case (dual monitors with one 1440p and one 1080p), the fullscreen window shows up like this.
image

Before my change, Auto with libdecor disabled correctly filled the whole screen, but setting a monitor index manually results in the same bug as the picture above, so for libdecor disabled there must be another unrelated bug at work here.

But since libdecor disabled + Auto was working fine, I have now pushed some changes in which I only disable the splash screen if libdecor is enabled. I hope the changes look better now.

@nfp0 nfp0 changed the title Wayland: Remove splash screen to fix fullscreen on Auto monitor index Wayland: Remove splash screen if HAVE_LIBDECOR_H to fix fullscreen on Auto monitor index Sep 14, 2025
@LibretroAdmin
Copy link
Contributor

@ColinKinloch could you perhaps test this please?

@f4mrfaux
Copy link

pulling this and testing as well

@ColinKinloch
Copy link
Contributor

@ColinKinloch could you perhaps test this please?

Will do.

I added the splash screen when I didn't have a great understanding of Wayland.
I was unknowingly working around a bug in mutter where if a toplevel is first committed as full screen it maps to the output closest to the origin (0,0). Also it's possible I thought outputs weren't enumerated unless something was on screen 🤷.

In any case I'm in favour of removing the splash completely and accepting that retroarch exposes a bug in gnome prior to the next stable version, 49.0.

I have some incomplete work from December with a huge refactor, but it got too big and I got too busy.
It more strictly adhears to the protocol re: toplevel configure events, cleans up the wl_output list, and updates the wl_compositor and xdg-shell protocol version numbers.

I'll try splitting it up and submitting it.

@ColinKinloch
Copy link
Contributor

Does #17320 change the behaviour in any way?

@zedhqx4
Copy link

zedhqx4 commented Sep 17, 2025

That only fixes half the issue. It boots correctly now in full screen, but if you change the monitor index or do fullscreen toggle, i.e. press F and then F again. The issue presents it self again.

@ColinKinloch
Copy link
Contributor

RetroArch destroys the video driver and disconnects from the Wayland socket when transitioning between full screen and windowed modes. It should be equally broken on launch and transition.

@nfp0
Copy link
Contributor Author

nfp0 commented Sep 17, 2025

@zedhqx4 Interesting, that does not happen to me on KDE.
What compositor are you using?

@LibretroAdmin
Copy link
Contributor

Where are we with this pr?

@ColinKinloch
Copy link
Contributor

Testing with kwin_wayland --output-count 2 the issue is fixed in the Vulkan driver but not the gl driver.
Though I'm not seeing any regression, so I see no problem with merging it. It's no less of a hack than the rest of the wayland code.

@LibretroAdmin LibretroAdmin merged commit 1cb11b5 into libretro:master Oct 4, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Wayland] Fullscreen mode doesn't initialize correctly on dual-monitor setups

6 participants