https://bugs.winehq.org/show_bug.cgi?id=58032
Bug ID: 58032 Summary: Wine ignores XDG_SESSION_TYPE Product: Wine Version: 10.3 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: scallegari@arces.unibo.it Distribution: ---
Wine recently appears well capable of using wayland. However, it seems to ignore the `XDG_SESSION_TYPE` env variable. Making wine work in wayland mode requires manually unsetting `DISPLAY`, which seems not adherent to common practice and XDG standards.
If the situation is only temporary (e.g., to favor X11 until wayland support is fully developed), please take my apologize for the noise.
https://bugs.winehq.org/show_bug.cgi?id=58032
mata sutupud@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sutupud@yahoo.com
--- Comment #1 from mata sutupud@yahoo.com --- Unsetting the DISPLAY variable is just an easy way to force the fallback for the graphics driver to be used that's configured in the registry via:
HKCU\Software\Wine\Drivers\Graphics = "x11,wayland"
The way to change the preference order would be to change it to "wayland,x11".
It's really a common theme that applications need to be told whether to target Wayland or XWayland, since only going by XDG_SESSION_TYPE is not really enough, and so lots of stuff needs further tweaking, for example this is what I've accumulated in my .profile:
export QT_QPA_PLATFORM="wayland;xcb" export GDK_BACKEND="wayland,x11" export SDL_VIDEODRIVER="wayland,x11" export MOZ_ENABLE_WAYLAND=1 export ELECTRON_OZONE_PLATFORM_HINT=auto export GVIM_ENABLE_WAYLAND=1
And some of them may actually break wine applicaitons if set, since for example a windows SDL application running in wine doesn't know what to do with wayland. Im sure there are more I've just not come across.
https://bugs.winehq.org/show_bug.cgi?id=58032
--- Comment #2 from Sergio Callegari scallegari@arces.unibo.it --- @mata
that's configured in the registry via: HKCU\Software\Wine\Drivers\Graphics = "x11,wayland"
Thanks, that's quite nice to know!
for example this is what I've accumulated in my .profile:
export QT_QPA_PLATFORM="wayland;xcb" export GDK_BACKEND="wayland,x11" export SDL_VIDEODRIVER="wayland,x11" export MOZ_ENABLE_WAYLAND=1 export ELECTRON_OZONE_PLATFORM_HINT=auto export GVIM_ENABLE_WAYLAND=1
Almost the same here. Incidentally, this is one of the things that I totally think that the wayland process got wrong: 1000 ways to do the same thing, one for each application, toolkit, whatever. It is OK to have a config variable for each toolkit/application, but that should be only to override a more general setting. And the latter is unfortunately lacking.
However, watching XDG_SESSION_TYPE seems to be assuming the role of a standard for a hint: if the session type is wayland and your application is capable of doing wayland properly, then wayland should probably be preferred. In the case of wine, I think that `HKCU\Software\Wine\Drivers\Graphics` should probably not take just an ordered list of display types, but also 'auto', standing for 'follow the session type', being the default.
IMHO the current situation is somehow unoptimal, because the fact that wine supports wayland becomes hard to discover. Most linux users will have DISPLAY set (because of apps needing Xwayland). With it wine is always started in X11 mode and people (like me!) keep thinking that wine cannot do wayland until they suffer so much about scaling that they discover the old wine-wayland project, they wonder why it does not exist any more, etc. Furthermore, the current status (X11 by default basically) might lead to wayland support remaining with little testing.
https://bugs.winehq.org/show_bug.cgi?id=58032
--- Comment #3 from mata sutupud@yahoo.com --- I'd love to see wayand become the default too at some, but I don't think we're there yet.
What I have experienced so far is that, when it comes to games, when it works in wayland it usually feels a lot smoother than on XWayland. Thanks on this point to the devs for the great work! But some applications only work with the x11 driver, specially if you don't also use things like proton, dxvk, or special settings. For example for some games the game has no problems running on wayland, but the electron-based launcher doesn't work correctly. So if the game doesn't support running without or with an alternative launcher it gets tricky. If you're lucky it has a tray bar menu that works and allows to run stuff, for example like epic, but for that you first need to install everything on x11 first, or to re-login if wants you to. So in general, I'd say x11 for now is still the better default, becase more applications will work out of the box with it. Specially since wine can't know beforehand if what you want to run inside works with wayland or not. It's rare that something doesn't work on x11 but does on wayland (Rage2 is the only example I can think of that I could get to work on wayland but freezes on x11).