FS#74466 - [gdm] [nvidia] update adds udev rules that require redundant service for wayland to be selectable

Attached to Project: Arch Linux
Opened by Keckle (KeckleKnight) - Thursday, 14 April 2022, 15:35 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Monday, 06 June 2022, 00:51 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Felix Yan (felixonmars)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:
A gdm update added udev rules that disable wayland options on machines with nvidia drivers if they don't have full gpu ram preservation through suspend/hibernate enabled.
Because of this, the services nvidia-suspend, nvidia-hibernate, and nvidia-resume must be enabled. Additionally, the modprobe option NVreg_PreserveVideoMemoryAllocations=1 must be set.
Lines 55-66 in /usr/lib/udev/rules.d/61-gdm-rules contain these checks.

This wiki pages explains the steps for this, however according to them nvidia-resume shouldn't be used, since the functionality is already handled by systemd by default.
https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Preserve_video_memory_after_suspend
"Contrary to NVIDIA's instructions, it is currently not necessary to enable nvidia-resume (and it is in fact probably not a good idea to enable it), because the script does the same thing as the service (but slightly earlier), and it is enabled by default (Systemd calls it after waking up from a suspend)."

I understand one could just overwrite these rules in /etc/udev/rules.d/, however it seems odd the default gdm rules require a service that shouldn't be used just for wayland to work.

As I look more into this issue, I'm unsure if this is an upstream issue with nvidia/gdm, or if this is an issue with how the nvidia-utils (containing /usr/lib/systemd/system-sleep/nvidia) and gdm Arch repo packages are maintained.

Additional info:
* gdm 42.0+r11+g4a52f026-1

Steps to reproduce:
Launch gdm during boot
Click account to login to
Click bottom right cog wheel.
Wayland option is missing.
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Monday, 06 June 2022, 00:51 GMT
Reason for closing:  Fixed
Additional comments about closing:  Installation note in nvidia-utils.
Comment by Jan Alexander Steffens (heftig) - Wednesday, 27 April 2022, 21:22 GMT
Unfortunately, I have no idea how this is supposed to work. The rules test that *both* the sleep hook and the services are enabled.
Comment by Jan Alexander Steffens (heftig) - Wednesday, 27 April 2022, 21:24 GMT Comment by Sven-Hendrik Haase (Svenstaro) - Wednesday, 27 April 2022, 23:33 GMT
I'm confused. Is anything needed to be done in the nvidia packages for this?
Comment by Jan Alexander Steffens (heftig) - Sunday, 05 June 2022, 23:46 GMT Comment by Sven-Hendrik Haase (Svenstaro) - Monday, 06 June 2022, 00:50 GMT
There's now a note in the package so I'd consider this task done. I'm not sure always activating the service is good in all circumstances but now we make the user aware and I think that's good enough.

Loading...