You are not logged in.

#1 2022-09-27 08:37:30

alexd73
Member
Registered: 2022-09-27
Posts: 5

[Solved] GDM (wayland) stops running after setting nvidia-drm.modeset

Previously, I used the nouveau driver with wayland. But nvenc is not working in this case.

I installed nvidia driver that only works in X11 for me.
Then I followed instruction https://wiki.archlinux.org/title/NVIDIA … de_setting and added nvidia-drm.modeset=1 to /etc/default/grub. And GDM stopped loading. Just an underscore blinking in the left top corner. I should note, it worked a couple of times yesterday. But it broken today again.
I added MODULES=(intel_agp i915 nvidia nvidia_modeset nvidia_uvm nvidia_drm) to early loading but it doesn't help me.

Can you please advise this? Thank you!

journalctl -b -u gdm.service
https://pastebin.com/W8Vf1CH7
I have commented (/run/gdm/custom.conf) WaylandEnable=false
This is a new log https://pastebin.com/uPmjBS1c

/etc/gdm/custom.conf

# GDM configuration storage

[daemon]
# Uncomment the line below to force the login screen to use Xorg
#WaylandEnable=true

[security]

[xdmcp]

[chooser]

[debug]
# Uncomment the line below to turn on debugging
Enable=true

systemctl status gdm.service

● gdm.service - GNOME Display Manager
     Loaded: loaded (/usr/lib/systemd/system/gdm.service; enabled; preset: disabled)
     Active: active (running) since Tue 2022-09-27 10:39:35 MSK; 1min 14s ago
   Main PID: 1874 (gdm)
      Tasks: 3 (limit: 18954)
     Memory: 1.4M
        CPU: 19ms
     CGroup: /system.slice/gdm.service
             └─1874 /usr/bin/gdm

сен 27 10:39:43 dev gdm[1874]: Gdm: GdmLocalDisplayFactory: System supports graphics
сен 27 10:39:43 dev gdm[1874]: Gdm: GdmLocalDisplayFactory: Getting session type (prefers xorg, falling back: yes)
сен 27 10:39:43 dev gdm[1874]: Gdm: GdmLocalDisplayFactory: Both Wayland and Xorg are unavailable
сен 27 10:39:43 dev gdm[1874]: Gdm: GdmLocalDisplayFactory: seat0 doesn't yet support graphics.  Waiting 10 seconds to try again.
сен 27 10:39:44 dev gdm[1874]: Gdm: GdmLocalDisplayFactory: received VT change event
сен 27 10:39:44 dev gdm[1874]: Gdm: GdmLocalDisplayFactory: VT changed from 1 to 2
сен 27 10:39:44 dev gdm[1874]: Gdm: GdmLocalDisplayFactory: active VT is not initial VT, so ignoring
сен 27 10:39:45 dev gdm[1874]: Gdm: GdmLocalDisplayFactory: received VT change event
сен 27 10:39:45 dev gdm[1874]: Gdm: GdmLocalDisplayFactory: VT changed from 2 to 3
сен 27 10:39:45 dev gdm[1874]: Gdm: GdmLocalDisplayFactory: active VT is not initial VT, so ignoring

Last edited by alexd73 (2022-09-30 10:49:41)

Offline

#2 2022-09-27 17:28:33

dungeonseeker
Member
Registered: 2022-04-06
Posts: 7

Re: [Solved] GDM (wayland) stops running after setting nvidia-drm.modeset

First and most importantly, does your system have a hybrid GPU?

If no then you don't need intel_agp or i915 in your initramfs. If yes then I would recommend not having any early loading modules at all, having them can cause switching to behave strangely.

On my hybrid laptop I get this exact behaviour if I have "xf86-video-intel" installed.

From the blinking cursor press CTRL+F3, login then run "sudo pacman -Q xf86-video-intel". If it is installed remove it with "sudo pacman -R xf86-video-intel" then reboot and see if that helps. FYI most distros now recommend skipping xf86-video-intel and allowing X to fall back to modesetting anyway.

When you added the nvidia_drm.modeset=1 kernel parameter you also ran grub-mkconfig afterwards, right? Again my hybrid laptop needs that for the Nvidia GPU to work at all. If all else fails you can press "e" on the grub entry, scroll to the "linux     vmliuz...." line and add it to the end then press F10. Also remember if you're using nvidia-dkms, instead of adding it as a KP you must instead create a new file in "/etc/modprobe.d", call it "nvidia.conf" and add "options nvidia_drm modeset=1" to it.

Edit - Just noticed you're wanting Wayland, if you have a hybrid laptop Wayland will be disabled by default. Perhaps its simply because you're trying to force GDM into Wayland mode?

Last edited by dungeonseeker (2022-09-27 17:32:58)

Offline

#3 2022-09-27 17:50:46

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,300

Re: [Solved] GDM (wayland) stops running after setting nvidia-drm.modeset

GDM also requires you to set up https://wiki.archlinux.org/title/NVIDIA … er_suspend for the nvidia GPU.

Offline

#4 2022-09-28 10:25:31

alexd73
Member
Registered: 2022-09-27
Posts: 5

Re: [Solved] GDM (wayland) stops running after setting nvidia-drm.modeset

dungeonseeker wrote:

Edit - Just noticed you're wanting Wayland, if you have a hybrid laptop Wayland will be disabled by default. Perhaps its simply because you're trying to force GDM into Wayland mode?

Yes, I'm wanting Wayland on a hybrid laptop. Is it impossible at all? I cannot found reliable information about it.
It confuses me that I was able to boot up wayland session a couple of times with nvidia driver (setted KP  nvidia_drm modeset=1) and wayland worked fine on the nouveau driver.

I noticed WaylandEnable=false is setted every boot in /run/gdm/custom.conf even I deleted it

~ cat /run/gdm/custom.conf
[daemon]
WaylandEnable=false

~ cat /etc/gdm/custom.conf
# GDM configuration storage

[daemon]
# Uncomment the line below to force the login screen to use Xorg
#WaylandEnable=true

[security]

[xdmcp]

[chooser]

[debug]
# Uncomment the line below to turn on debugging
Enable=true

Offline

#5 2022-09-28 10:39:06

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,300

Re: [Solved] GDM (wayland) stops running after setting nvidia-drm.modeset

nvidia-drm.modeset=1 is a basic requirement for any wayland support on nvidia.

GDM in particular also requires you to set up the resume/suspend hooks or it will disable Wayland again. You might also in general want to make sure that all your graphics drivers are appropriately loaded and add them to the MODULES=( ) array in your mkinitcpio.conf https://wiki.archlinux.org/title/Kernel … _KMS_start

Last edited by V1del (2022-09-28 10:40:25)

Offline

#6 2022-09-28 10:53:52

alexd73
Member
Registered: 2022-09-27
Posts: 5

Re: [Solved] GDM (wayland) stops running after setting nvidia-drm.modeset

V1del wrote:

GDM also requires you to set up https://wiki.archlinux.org/title/NVIDIA … er_suspend for the nvidia GPU.

Does this affect disabling wayland on boot?

Offline

#7 2022-09-28 11:01:02

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,300

Re: [Solved] GDM (wayland) stops running after setting nvidia-drm.modeset

Yes... As mentioned GDM enforces these things via an udev rule where it checks whether this stuff is set up. If you want to disable GDM's stringent checks for this (since the nvidia suspension hooks are not directly required just for working wayland as opposed to the modeset parameter) you can also disable GDM's check by disabling the udev rule it sets for that: https://wiki.archlinux.org/title/GDM#Wa … DIA_driver

Offline

#8 2022-09-28 19:11:07

alexd73
Member
Registered: 2022-09-27
Posts: 5

Re: [Solved] GDM (wayland) stops running after setting nvidia-drm.modeset

V1del wrote:

Yes... As mentioned GDM enforces these things via an udev rule where it checks whether this stuff is set up. If you want to disable GDM's stringent checks for this (since the nvidia suspension hooks are not directly required just for working wayland as opposed to the modeset parameter) you can also disable GDM's check by disabling the udev rule it sets for that: https://wiki.archlinux.org/title/GDM#Wa … DIA_driver

Thank you!

This helps to achieve the wayland:

# ln -s /dev/null /etc/udev/rules.d/61-gdm.rules

And I lost the external monitor. But I'm not losing hope, because I remember two successful cases of wayland booting. And a reddit user wrote about his happy day
NVIDIA 515 and GNOME on Wayland: HDMI finally works!
Can you nudge me in the right direction?

Offline

#9 2022-09-30 10:41:35

alexd73
Member
Registered: 2022-09-27
Posts: 5

Re: [Solved] GDM (wayland) stops running after setting nvidia-drm.modeset

This started working after the last Arch update.

So, I have
nvidia 515.76-3
Gnome 42.4
and I had to disable gdm-rules (ln -s /dev/null /etc/udev/rules.d/61-gdm.rules)

Last edited by alexd73 (2022-09-30 10:49:01)

Offline

Board footer

Powered by FluxBB