Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 939201 - gnome-base/gdm no Wayland option
Summary: gnome-base/gdm no Wayland option
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-07 02:38 UTC by thezombiehunter
Modified: 2024-09-19 02:54 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description thezombiehunter 2024-09-07 02:38:28 UTC
Hi Leio!

You helped me fix Wayland on GDM/Gnome from IRC a week or so ago. I updated and rebooted my system and when it came back up GNOME is again only loading in X11 instead of Wayland.

I can force it to load Wayland from terminal or SDDM, which works. But GDM is lacking the Wayland option.

I don't remember how we fixed it the first time. I know it involved re-emerging gnome, but that doesn't seem to be fixing it this time.

I am using the latest version on ~amd64 with a AMD iGPU (display attached) and a Nvidia dGPU (the Nvidia dGPU is used through the AMD iGPU for gaming and has no display attached to it).

The gnome session runs on the AMD iGPU, it does not show up in nvidia-smi.
Comment 1 Ionen Wolkens gentoo-dev 2024-09-07 11:52:34 UTC
Haven't looked at the current rules so these bugs could be outdated but, depending on what is preventing it from showing up, possibly be a duplicate or related to bug #873160 or, if split-usr, perhaps bug #873154.

For the former, this will be fixed soon by [1].

Could be something else entirely when it comes to intel/amd+nvidia offloading setups though. GDM is kind of picky when it comes to showing wayland with nvidia.

[1] https://github.com/gentoo/gentoo/pull/38482
Comment 2 Ionen Wolkens gentoo-dev 2024-09-12 10:20:20 UTC
(In reply to Ionen Wolkens from comment #1)
> Could be something else entirely when it comes to intel/amd+nvidia
> offloading setups though. GDM is kind of picky when it comes to showing
> wayland with nvidia.
Was just re-looking at /usr/lib/udev/rules.d/61-gdm.rules' nvidia related bits...

># disable wayland if nvidia-drm modeset is not enabled
>ATTR{parameters/modeset}!="Y", GOTO="gdm_disable_wayland"
This is fine, default if USE=wayland on nvidia-drivers and we do want it to skip wayland if that's disabled.

>TEST{0711}!="/usr/bin/nvidia-sleep.sh", GOTO="gdm_disable_wayland"
Should be ok, that's always installed.

>TEST{0711}!="/usr/lib/systemd/system-sleep/nvidia", GOTO="gdm_disable_wayland"
Could potentially be wrong on openrc+split-usr given systemd.eclass' systemd_get_sleepdir() returns /lib/systemd/system-sleep (w/o /usr) if it couldn't use pkg-config w/o systemd.pc (bug #873154)

It would probably make more sense to fix this in systemd.eclass for all fallback paths given we know systemd moved on from /lib.

>ENV{NVIDIA_PRESERVE_VIDEO_MEMORY_ALLOCATIONS}!="1", GOTO="gdm_disable_wayland"
That should be fixed after the aforementioned PR is merged, currently this always disable wayland for nvidia unless users did manual changes (bug #873160)

="0" is technically ok for users that never use suspend/hibernate though.

>IMPORT{program}="/bin/sh -c 'echo NVIDIA_HIBERNATE=`systemctl is-enabled nvidia-hibernate`'"
>ENV{NVIDIA_HIBERNATE}!="enabled", GOTO="gdm_disable_wayland"
The PR will enable these non-daemon oneshot services by default, and install a hook to (hopefully) accomplish a similar task on elogind.

...but using systemctl isn't going to work with openrc+elogind.

Likewise irrelevant for users that never use suspend/hibernate.

># If this is a hybrid graphics laptop with vendor nvidia driver, disable wayland
>LABEL="gdm_hybrid_nvidia_laptop_check"
>TEST!="/run/udev/gdm-machine-is-laptop", GOTO="gdm_hybrid_nvidia_laptop_check_end"
>TEST!="/run/udev/gdm-machine-has-hybrid-graphics", GOTO="gdm_hybrid_nvidia_laptop_check_end"
>TEST!="/run/udev/gdm-machine-has-vendor-nvidia-driver", GOTO="gdm_hybrid_nvidia_laptop_check_end"
>GOTO="gdm_disable_wayland"
>LABEL="gdm_hybrid_nvidia_laptop_check_end"
And this one kills it for your setup regardless of the rest.

I did hear of users bypassing these rules (or even deleting the whole file?) and be happily using gnome+wayland+hybrid nvidia w/ gdm though. If lucky maybe suspend will work, but if not may need to go back to Xorg unless don't use suspend even on a laptop.

For users, haven't tried but INSTALL_MASK'ing the whole file may be a viable workaround, don't think other things it does will matter if you know what you want rather than letting it pick for you.

For our packaging, not planning to change anything myself given I don't use gdm/gnome. Was just laying out what's happening if anyone wants to improve things. Respecting upstream and leaving as-is is one option (this includes refusing to use wayland on non-systemd and hybrid setups, RESOLVED UPSTREAM), trying to convince them is another, modifying it downstream and allowing non-systemd and/or hybrid is an option too albeit we will be on our own if anything comes up.
Comment 3 thezombiehunter 2024-09-19 02:32:43 UTC
I downgraded to 45.5 and it works on that version lol

Go figure :(
Comment 4 thezombiehunter 2024-09-19 02:54:04 UTC
Then I did a selective ~amd64 on gnome-base/* and gnome-extra/* and can confirm wayland works from gdm now with my setup on gnome 46.

Seems to be an issue with the entire system being ~amd64 (i rebuilt with just amd64 this time).