I'd like to preface this by saying I'll be putting in my own merge requests in the coming days as suggested by @dr460nf1r3 here and this is a pared-down version of the ~2000 word document I put together in the |redacted| hours of research I've done in the time since that original post went up. @librewish may also be interested in this based on recent contributions to the repos mentioned.
The Issues At Hand
Overall, the Garuda GNOME edition has a handful of quirks/oddities/issues brought about in the way garuda-gnome-settings
and garuda-common-setting
are configured, as well as the implementation of gdmwayland-on.sh
in garuda-assistant
. It's possible that garuda-bash-config
and somewhere else a handful of GNOME files are getting configured(?) are tangentially related here. What follows is mostly a thoroughly-updated re-hash of my previous post
- The most primary breakage is that of Qt-based apps failing to launch, GNOME extensions being disabled, and GNOME user application themes failing to apply when logging back in under "GNOME on Xorg" after enabling the "GDM Wayland" option in Garuda Assistant.
- This occurs because the
gdmwayland-on.sh
pipes a number of Wayland-specific environment variables into/etc/environment
which then clash with X11 and are not fully overwritten by any file sourced for vars under exclusively under "GNOME on Xorg" - The relevant variables are
QT_QPA_PLATFORM=wayland
,QT_QPA_PLATFORMTHEME=qt5ct
, andXDG_SESSION_TYPE=wayland
, although I have not tested if_JAVA_AWT_WM_NONREPARENTING=1
andMOZ_ENABLE_WAYLAND=1
cause any additional problems. Under X11 where it is sourced,~/.profile
does setQT_QPA_PLATFORMTHEME="gnome"
but makes no changes to the other two. - More specifically,
XDG_SESSION_TYPE=wayland
appears to be responsible for the extension and theme breakage, whileQT_QPA_PLATFORM=wayland
(or some combination of its interface with the other relevant variables) causes the Qt issue. - As I've noted before, it seems weird to me that a handful of other variables are also included in the
gdmwayland-on.sh
, but they're not breaking anything so I haven't touched them. - NOTE: the checks in Garuda Assistant and the related operations don't work if
WaylandEnable
in/etc/gdm/custom.conf
has been edited totrue
. This isn't really an issue though.
- This occurs because the
- Qt-based applications do not use GNOME native titlebars, regardless of whether "GDM Wayland" is enabled, if a user theme has been applied, and they only sort of use the default theme OOTB because of
QT_QPA_PLATFORMTHEME="gnome"
.- This is achievable, although I'm unclear exactly why the fix below works. There may also be a reason this is disabled or the existing Qt configuration is preferred.
- Both the Wayland backend for GDM itself, and the option to choose between Wayland and Xorg for the GNOME shell are disabled OOTB, which is atypical for GNOME installations in general. The existing configuration is already dependent on both the Wayland and X display servers and under vanilla installs both are enabled by default.
- The checks made in
/usr/lib/udev/rules.d/61-gdm.rules
seem set appropriately to disable GDM's Wayland backend in favor of X when it's called for, and set Xorg as the preferred GNOME Shell session regardless.
- The checks made in
- Despite GNOME fully implementing XDG Autostart and the files being correctly placed, the
initial-user-setup.desktop
fromgaruda-common-settings
and thebashrc-setup.desktop
fromgaruda-bash-config
don't work, while thedconf-load.desktop
and it's associated scripts fromgaruda-gnome-settings
do execute appropriately on first run.- I have no idea why this is the case, but if they do work on the dragonized edition it's probably something weird and GNOME-specific.
- Said
dconf
script applies a couple keys for GNOME Terminal that don't exist anymore.
I noticed some other issues/oddities in the course of all this, but they appear unrelated. I can provide them if anyone would like, but won't be addressed in my own immediate work.
Possible Fixes
- A few tiny changes to
gdmwayland-on.sh
and the~/.profile
supplied bygaruda-gnome-settings
could fix issues 1-3 without affecting non-GNOME editions. However, there are other possibly better/cleaner solutions. I have these changes ready but would like to check a few more things. - Lines to also edit
~/.profile
could be added togdmwayland-on.sh
. This fix requires the least changes to solve the most issues while keeping Garuda's default behaviors if that is desired. - According to the Wayland Session Start Docs and this section of the environment variables Archwiki page, it seems possible to have Wayland source files that X11 will not. This means that a better implementation of
gdmwayland-on.sh
could fix issue 1 by enabling Wayland and setting the appropriate vars separately for Wayland and X11 without messing with/etc/environment
at all. - Alternatively, the default
custom.conf
and.profile
could be changed in conjunction with the addition of the appropriate Wayland.conf
to fix 1-3 OOTB. - To fix 2 by itself or in addition to anything else here, some combination of setting
QT_QPA_PLATFORMTHEME=gtk3
andQT_QPA_PLATFORM=xcb
globally does the trick. Garuda ships with a gtk3 platform plugin for Qt, and using the X backend even under Wayland is (I'm guessing) making the apps just use Xwayland so the native decorations get applied? No idea quite how this works or if=gtk3
is actually necessary.- Worth noting here that there are a handful of other things that seem to be leftovers of some point when Garuda GNOME shipped with
qt5ct
and/orkvantum
.
- Worth noting here that there are a handful of other things that seem to be leftovers of some point when Garuda GNOME shipped with
- I'm still working on a fix for issue 4. A couple deletions in
garuda-dconf.ini
would fix issue 4.2, but I'm waiting until I have an overall picture of mygaruda-gnome-settings
changes before opening a merge. - The first-run
.desktop
scripts could be consolidated into one GNOME-specific solution to fix issue 4 and cleanup some of the KDE-specific leftovers fromgaruda-common-settings
, but this change could put the GNOME Edition out of sync with the other editions and their respectivegaruda-desktop-settings
providers.
Closing Notes
In addition to the listed fixes, any of which I could implement and merge, I'm personally putting together a more thorough re-work of the GNOME situation in general, but that's much further from being ready to merge. At this point, I've probably also put together enough to contribute a bit to the wiki so I'll use the appropriate channels for that.
If anyone would like the larger // messier // more technical research doc I made that includes all of the potentially relevant external documentation I can drop that as well.
Thanks again to the devs, much love