RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

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

Open CosmicHeron opened this issue 11 months ago • 18 comments

Is there an existing issue for this?

  • [X] This is a bug in RetroArch frontend
  • [X] I have searched the existing issues

Description

When setting RetroArch (version 1.20.0, Flatpak version) to launch in fullscreen mode the application appears to set itself to a resolution that is larger that the main display and also offset itself by half the width and height of the main monitor.

Screenshot_20250108_131136

The workarounds are to either alt-tab out of RetroArch (it will reposition itself to the top left corner and set the right dimensions) or by disabling the secondary monitor before launching RetroArch. Manually setting the fullscreen resolution inside RetroArch or enabling/disabling fullscreen windowed mode doesn't seem to do anything.

I have tried the nightly AppImage version (2025-01-08 11:29) and that one appears to work correctly.

Expected behavior

When set to run in fullscreen mode RetroArch positions itself to the origin point of the primary monitor and matches its dimensions to the resolution of the monitor it's running on.

Steps to reproduce the bug

  1. Launch RetroArch and set it to fullscreen mode
  2. Note that it's now offset and larger than the monitor's resolution

Version/Commit

1.20.0

Bisect Results

1.19.1

Check in the nightly version

No, looks like this is already resolved

Platform & operating system

Arch Linux

Affected Cores

No response

Environment information

  • Arch Linux
  • KDE Plasma on Wayland
  • Dual-monitor setup; main monitor on the left side, both the same resolution & refresh rate (4K/144Hz)
  • RetroArch installed from Flathub

Relevant log output

No response

CosmicHeron avatar Jan 08 '25 13:01 CosmicHeron

Hi, thanks for reporting!

No, looks like this is already resolved

Does that mean that issue does not occur with a current nightly, only with 1.20.0?

zoltanvb avatar Jan 09 '25 21:01 zoltanvb

That's right, only with version 1.20.0 that's currently on Flathub.

Edit: Retested with the latest nightly (2025-01-09_RetroArch) to double check and yeah, fullscreen initializes correctly with it.

CosmicHeron avatar Jan 09 '25 21:01 CosmicHeron

Hi,

Then, please close this issue if it is only related to the Flatpak package which already has an issue opened.

Thank you.

gouchi avatar Jan 14 '25 16:01 gouchi

Closing as a duplicate then.

CosmicHeron avatar Jan 14 '25 16:01 CosmicHeron

There's been some thinking this is a Wayland thing. Since I don't have a way to test on Wayland, I'm not sure how much help I can be here. But, I can re-open this issue.

RobLoach avatar Jan 24 '25 16:01 RobLoach

(Reposting this from a different issue, since this one seems more exact to what I'm experiencing.)

I have the exact same problem on a clean new RetroArch config. I am running KDE Wayland on Arch and I have 2 screens. I have tested both 1.20.0 and the latest git commit. The problem happens in both, but it does not happen on 1.19.1

In fullscreen mode, if RetroArch's "Monitor Index" setting is set to "Auto", it will show up in a window off-center as you can see here:

Image (Log in the background, in case it helps)

Alt-tabbing makes it go to the correct position (fill the whole screen). Setting "Monitor Index" to specific monitors also works correctly. It's only the "Auto" that is failing.

This is happening to me in both Vulkan and GLcore. Worse yet, on GLcore, even setting the "Monitor Index" does not fix the issue.

@RobLoach Can I help somehow with logs or any testing?

nfp0 avatar Feb 15 '25 12:02 nfp0

Tried setting the output display manually and now it does go fullscreen. Though for some reason the numbers seem to be swapped, setting it to 1 goes to my secondary display (plugged into DP-2) and changing it to 2, it goes to the primary one (plugged into DP-1). Not sure if that it at all related to this issue though.

CosmicHeron avatar Feb 15 '25 15:02 CosmicHeron

@CosmicHeron I noticed the same here. Furthermore one time I noticed the number were swapped after I woke my computer from sleep, or after connecting/disconnecting another monitor (don't remember exactly). But that's perhaps because the monitors were enumerated in a different order by the OS.

nfp0 avatar Feb 16 '25 12:02 nfp0

I have the exact same issue. I'm also on Wayland KDE on Arch Linux and have downloaded Retroarch via pacman. In addition to alt tabbing, pressing the Super ("Windows") key to open the application launcher also fixes it.

Edit: Setting the monitor number to a fixed value fixes this issue, but when it's on auto it does not work. Also if you disable and then enable fullscreen again it will be at the wrong position, and this time it can only be fixed by restarting retroarch.

Tsoomer avatar Feb 27 '25 16:02 Tsoomer

I am experiencing this all as well on a fresh install of Bazzite. None of the above methods seem to work for me to get it into full screen. Attached is the best it does.

Image

datapadinnovations avatar Mar 07 '25 04:03 datapadinnovations

Hi @CosmicHeron if the issue is specifically happening with dual monitors please rename the issue title accordingly to something like Fullscreen mode doesn't initialize correctly when using dual monitors on Wayland

Thank you.

gouchi avatar Mar 07 '25 13:03 gouchi

@gouchi done

CosmicHeron avatar Mar 07 '25 13:03 CosmicHeron

I can confirm this only happens on multi-monitor setups. When I have only one monitor enabled, it works fine.

nfp0 avatar Mar 07 '25 21:03 nfp0

I appear to be experiencing this issue with only one monitor. Alt + Tabbing has no effect on the position of the window. I am on KDE Plasma 6.3.4 and installed from pacman. Trying this with a game running immediately crashes retroarch. (On a likely unrelated note, fullscreening with Mugen64 running crashes retroarch.)

Image

PRNDLB avatar Apr 27 '25 19:04 PRNDLB

Two things that might be relevant.

First of all, this happens to me too, but i can solve it by dragging the window on either screen, it will suddenly snap into full screen then. But i have to open it on the opposite Screen i want to play on. for example i want to play on the right screen, i have to open it on the left screen, enable full screen and then drag it onto the right screen.

https://youtu.be/08KhFebadzw

In addition, like with @PRNDLB , i am experiencing this issue only with one monitor too, i could fix it by setting the Video Output to Vulkan, but Flycast no longer works for me then just crashing (https://github.com/libretro/RetroArch/issues/18026), other emulators had no issue so far though, so that might be an workaround for some.

Demonstrating that here: https://youtu.be/QPMstEZlK0Q

Vamp898 avatar Jun 19 '25 03:06 Vamp898

I suspect this is a KWin Wayland issue specifically. KWin devs need to be made aware of it.

AlexFolland avatar Jun 19 '25 04:06 AlexFolland

Was anyone able to test it with Mutter (GNOME) yet? As an Gentoo user, I disabled pretty much everything relevant to GNOME and GTK, it's doable but it would be some effort for me to test that and I need that machine for work too.

If an Archlinux user would want to test that, I'd highly appreciate that :P

Vamp898 avatar Jun 19 '25 04:06 Vamp898

I tested it with Weston, the reference Compositor for Wayland, exact same issue.

Single Display: Using Vulkan, fullscreen works fine. Using gl/glcore will lead to the exact same issue as in KWin. So this is not KWin specific.

Multi Display: Its even less functional than in KWin, it jumps all over the place when you try to enable fullscreen

Video demonstrating the issue under Weston https://youtu.be/xArFjpurWZc

Vamp898 avatar Jun 21 '25 07:06 Vamp898

[Bazzite 42, Wayland, RetroArch 1.21.0 flatpak]

I found an interesting behavior within retroarch settings. Under Settings->Video->Output->Monitor Index you can reproduce the behavior by changing index, without restarting the application. On index 0 it misaligns with multiple monitors, with index 1 or 2 (or greater) it aligns with my first and second monitor properly.

I did test if setting the monitor index fixes the issue but it appears on next start regardless of setting. Is it possible that the last few updates to the flatpak aren't respecting the monitor index and are defaulting to 0? Could a simple fix be to have the application re-set the last monitor index upon bootup?

creator5280 avatar Jun 25 '25 20:06 creator5280

I present this issue when on wayland, im compiled from source. Im on Arch, it happens in both KDE and Gnome, didnt test any other DE.

I've noticed that

A) the AppImage works fine, it opens correctly. from whichever monitor it was launched, on auto it opens fullscreen, and i can toggle Fullscreen with no issue.

B) Flatpak also presents the issue.

C) it might be my build but, also noticed that when launched from terminal my build gets this message (only on wayland, it doesnt show on X11)

Gtk-Message: 18:11:25.997: Failed to load module "appmenu-gtk-module"

which doesnt show with nightly AppImage.

Also while changing monitor index or toggling Fullscreen i get

(retroarch:3909): Gtk-WARNING **: 18:16:32.163: gtk_disable_setlocale() must be called before gtk_init()

(retroarch:3909): Gtk-WARNING **: 18:16:34.495: gtk_disable_setlocale() must be called before gtk_init()

(retroarch:3909): Gtk-WARNING **: 18:16:35.497: gtk_disable_setlocale() must be called before gtk_init()

(retroarch:3909): Gtk-WARNING **: 18:16:36.684: gtk_disable_setlocale() must be called before gtk_init()

On flatpak i dont get the Gtk-Message of failed to load module, but it doesnt open correctly, when toggling Fullscreen with flatpak i do get

(retroarch:2): Gtk-WARNING **: 18:23:50.907: gtk_disable_setlocale() must be called before gtk_init()

(retroarch:2): Gtk-WARNING **: 18:23:54.297: gtk_disable_setlocale() must be called before gtk_init()

In both my build and flatpak if i set a monitor index it opens fullscreen correctly but it seems the starting location is the Top left corner in the center of the screen, then it moves to fullscreen, if i toggle fullscreen it breaks

A common thing is both flatpak and my build have pipewire enabled, AppImage doesnt. Both my build and flatpak use Qt6, flatpak 6.8.3 and mine 6.9.1. AppiImage is build with Qt5, Qt 5.5.1

zedhqx4 avatar Jun 26 '25 00:06 zedhqx4

It does work perfectly, as one would expect, on LabWC. As LabWC solved a tons of other issues i had with KDE/GNOME, i am beginning to think that just all major DE are bad... maybe, maybe not.

But it does work perfectly with LabWC.

  • It opens on the screen i start it
  • I can switch without issues between fullscreen and window mode
  • It does stay in fullscreen when i start a game
  • I can move it between the screens and use fullscreen without issues.

So all issues are gone. So it is obviously not the fault of RetroArch

Vamp898 avatar Jul 26 '25 14:07 Vamp898

@Vamp898 You tested it in Weston and it was failing there. If it fails on Gnome, KDE and Weston, it's likely to be something on the RetroArch side. LabWC might be doing something out of the Wayland spec, or on an older version of the protocol maybe?

nfp0 avatar Jul 28 '25 10:07 nfp0

I thought so at first, but I was told that Weston can not be used to verify such things. My Drawing Tablet also doesn't work on Weston, but is supported by Wayland/libinput and does work on everything but Weston.

I also tested with Sway, woodland and wayfire and it works with all of these too.

So I can say it does work on

  • Sway (Uses latest Wayland protocols)
  • LabWC (I tested with an older and the newest version that uses latest Wayland)
  • Wayfire (uses an older Wayland protocol)
  • Woodland (uses an slightly older Wayland protocol)

It does not work on

  • GNOME
  • KDE

The 4 where it works all have in common that they are very simple and basic, bare bones Wayland Compositors without any fancy features or extras

Vamp898 avatar Jul 28 '25 15:07 Vamp898

Same here — I'm on Arch Linux with KDE Plasma, Wayland, and two displays. No matter what options I set in RetroArch, it always launches as a window centered across both displays. Dragging it slightly onto the main display fixes it, and then it goes fullscreen.

mikelexp avatar Aug 25 '25 11:08 mikelexp

One and a half updates from me: 0.5, I am now using two monitors, like most others with this issue, although I stand by that at least can it still happens with one monitor as well. 1.5, A workaround for this issue is to just use KDE Plasma's 'make fullscreen' feature instead of retroarch's fullscreen feature. This can be done through right-clicking on the title bar > More Actions > Fullscreen, or with a keyboard shortcut (I think it's Meta + PgUp by default, but I may have set that at some point). It maximizes to one screen, hides the title bar and application bar, and works pretty much exactly how I want my fullscreen games to work.

PRNDLB avatar Aug 25 '25 11:08 PRNDLB

Did anyone try to open an bug report at KDE/GNOME? With 4 WM where it works, there is a chance that it's their WM causing this

Vamp898 avatar Aug 25 '25 15:08 Vamp898

just adding to this same in CachyOS (Arch) KDE both Appimage and Flatpak when Vulkan is enabled on Wayland I have a second PC that is vanilla arch connected to a single 4K it behaves the same unless I set scaling to 100% not ideal for a TV though. I'm happy to collect more data if it is helpful.

CPU: AMD Ryzen 7 7700 GPU: AMD Radeon RX 9070 XT Display (Odyssey G7): 3840x2160 @ 165 Hz (as 3072x1728) in 31" [External] Display (ARZOPA): 1920x1080 @ 60 Hz (as 1536x864) in 14" [External] KDE Plasma 6.4.4 WM: KWin (Wayland) Kernel: Linux 6.16.4-3-cachyos

damobeanrod avatar Aug 29 '25 09:08 damobeanrod

Same problem here with exact same conditions: Arch, Kwin, Wayland, 2 monitors. I just can't have fullscreen at all. At this point I wonder if there's a way to make retroarch thing it's on X11 and if it would even work.

jmfergeau avatar Sep 07 '25 20:09 jmfergeau

Or.... People open an Bug report at KDE and they fix it^^ but yes, is possible to force applications to use X11 instead of Wayland

Vamp898 avatar Sep 08 '25 00:09 Vamp898

@jmfergeau

Try switching between windows with alt+tab. This trick works for me in GNOME.

archerallstars avatar Sep 08 '25 00:09 archerallstars