You are not logged in.
I have done everything that wiki said, i.e.:
I have set up DRM KMS as well as Preserve video memory after suspend and enabled these services "nvidia-persistenced.service, nvidia-suspend.service, nvidia-hibernate.service, and nvidia-resume.service"
$ cat /etc/modprobe.d/nvidia.conf
options nvidia-drm modeset=1
options nvidia-drm fbdev=1
options nvidia NVreg_PreserveVideoMemoryAllocations=1
options nvidia NVreg_UsePageAttributeTable=1
I am still not able to log in to gnome on wayland via GDM.
The wiki also says to do this
# ln -s /dev/null /etc/udev/rules.d/61-gdm.rules
but I am running GDM 46 with NVIDIA 560, must I do that?
EDIT: I have set up mkinitcpio and using nvidia-open(but this also happens in proprietary drivers)
Last edited by Ayu2805 (2024-09-01 16:19:15)
Offline
setting up the symlink will simply disable GDMs rules and just show you wayland as an option.
FWIW AFAIK later options override previous options in the modprobe logistics. you should have one options line per module and space separate distinct options. i.e.
options nvidia-drm modeset=1 fbdev=1
#Add the temporary file path, you want that on a persistent location.
options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_UsePageAttributeTable=1 NVreg_TemporaryFilePath=/var/tmp
Offline
setting up the symlink will simply disable GDMs rules and just show you wayland as an option.
Should I set it up?
you should have one options line per module and space separate distinct options
I see, I will so that instead but still doing it doesn't show up wayland.
Offline
Do you have the nvidia modules in initramfs? That would imply you need to regenerate your initramfs on modprobe config changes -- did you do that?
I'm not sure what kind of demands the rule wants to make now, but they are mostly quite superfluous. The only real hard requirement for Wayland is the modeset parameter, if you just want it to show you can set it up (e.g. if you're not using suspend you don't actually need the videomemory and temporaryfilepath directives)
Offline
Do you have the nvidia modules in initramfs? That would imply you need to regenerate your initramfs on modprobe config changes -- did you do that?
Yes I did. I have these in mkinitcpio.conf
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
BINARIES=()
FILES=()
HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block filesystems fsck)
Offline
I have done everything that wiki said, i.e.:
I have set up DRM KMS as well as Preserve video memory after suspend and enabled these services "nvidia-persistenced.service, nvidia-suspend.service, nvidia-hibernate.service, and nvidia-resume.service"
$ cat /etc/modprobe.d/nvidia.conf options nvidia-drm modeset=1 options nvidia-drm fbdev=1 options nvidia NVreg_PreserveVideoMemoryAllocations=1 options nvidia NVreg_UsePageAttributeTable=1
I am still not able to log in to gnome on wayland via GDM.
The wiki also says to do this
# ln -s /dev/null /etc/udev/rules.d/61-gdm.rules
but I am running GDM 46 with NVIDIA 560, must I do that?
EDIT: I have set up mkinitcpio and using nvidia-open(but this also happens in proprietary drivers)
DESCRIPTION:
Hello could you try to provide some more information such as "actual results" and "expected results" of your issue? I want to help, but could use some more insight/debug for helping better.
However going in blind there is one thing I noticed, have experienced, and suspect may be a good starting point.
Also note: from my experience you shoudn't have to get into udev rules and manually having to enable nvidia.services (in fact i recall once enabling nvidia-persistenced actually messed up my setup a little), and sometimes the wiki can take us a little too far down the rabbit hole when our solution may be more near the entrance, so lets start by debugging uptop before we go there.
Tips (assuming your using dual-gpu setup):
When configuring NVIDIA with Wayland it (and specifically if you have an integrated-gpu running multidisplay alongside your NVIDIA gpu, such as {intel-graphics | AMD-ryzen} )
is necessary to early load the nvidia_drm.modeset parameter (as you have in your modprobe.d configuration file), but somewhere earlier (such as via mkinitcpio, dracut, /etc/kernel/cmdline, grub (DEFAULT_LINUX_CMDLINE=)).
When you use modprobe.d/modules-load.d, the settings your configure are occuring via systemd (for a visual example of loading orders see my diagram below). You might be able to load the systemd module in an initramfs and bring the kernel parameters into scope before the system can accidentally pull in the IGD, but in my experience kernel-cmdline or initramfs is easier.
Additionally there are known issues when utilizing dual-gpu configurations with wayland, and it's generally required to disable your integrated GPU (if that's your setup) in bios if possible and utilize PEG instead of IGD. From my experience this is fine because Xwayland with Nvidia isn't natively supported and it gets really messy as of lately if utilizing dual gpus to granuarly configure and dictate kernel race conditions fighting one another for using their drivers. In summary I think there is an issue with getting GDM to use wayland with an NVIDIA driver if the default mesa/xf86/nouveau drivers load before it, I believe GDM initializes right after initramfs and sets-determines it's backend then.
[VMLINUZ > BOOTLOADER (kernel-cmdline) > INITRAMFS (DRACUT | MKINITCPIO) > SYSTEMD (/etc/modprobe.d/* | /etc/modules-load.d)
[GRUB_CMDLINE] > [MKINITCPIO] [MKINITCPIO_MODULES] [MKINITCPIO_MODULES_SYSTEMD] *this is where your setup is loading /etc/modprobe.d
Debug Nvidia Driver:
A workaround you could test out is at the Gnome login screen --> switching to another tty with (ctrl + alt + 3) or some other number besides 1 and 2 since that's being used, and check the status of nvidia's driver.
Check if nvidia gpu is even being utilized, usually there is at least an xorg or xwayland process from the login, but maybe you have to login (I'd assume if nothing shows it may not be used).
nvidia-smi
Check if nvidia drivers modeset is actually enabled and set to Y or 1.
cat /sys/modules/nvidia_drm/parameters/modeset
TLDR Repro Steps (for what i would do, given available info):
1. We will remove the current nvidia.conf since we will instead be loading it earlier.
rm /etc/modprobe.d/nvidia.conf
2. We will add this line to either config below to load nvidia drivers earlier.
For EFI/UKI (and maybe systemd not sure):
nano /etc/kernel/cmdline
nvidia_drm.modeset=1
For Grub:
nano /etc/default/grub
Append this line to one of Grub's cmdline parameters such as GRUB_CMDLINE_LINUX:
GRUB_CMDLINE_LINUX="nvidia_drm.modeset=1
This symbolizes that we are setting the nvidia_drm kernel module parameter called modeset to a value of 1.
Regenerate the grub-config so it spits out an updated version to your boot/efi drive.
grub-mkconfig -o /boot/default/grub.conf
Regenerate initramfs for good luck
mkinitcpio -P
Regenerate grub config since to pull in mkinitcpio which we should've done in reverse orders just a sec ago
grub-mkconfig -o /boot/default/grub.conf
3. Reboot and hopefully things work.
4. If things break edit /etc/default/grub , and remove nvidia_drm.modeset=1 > regenerate grub with grub-mkconfig -o /boot/default/grub.conf
Last edited by YCDA (2024-09-01 11:29:47)
Offline
3. Reboot and hopefully things work.
4. If things break edit /etc/default/grub , and remove nvidia_drm.modeset=1 > regenerate grub with grub-mkconfig -o /boot/default/grub.conf
I did everything but no success although it didn't break anything. For more information I use GTX 1650
Offline
NVreg_TemporaryFilePath=/var/tmp
Rebooting after adding this temporary file path shows a black screen
Last edited by Ayu2805 (2024-09-01 12:06:48)
Offline
YCDA wrote:3. Reboot and hopefully things work.
4. If things break edit /etc/default/grub , and remove nvidia_drm.modeset=1 > regenerate grub with grub-mkconfig -o /boot/default/grub.confI did everything but no success although it didn't break anything. For more information I use GTX 1650
Hmm sorry that didn't fix it, lets try some other modifications.
Could you possibly provide me info for these topics/questions I'm about to list below (feel free to inline your responses if you want, I'll notice):
Does your setup utilize an Nvidia dedicated GPU and have a capable integrated GPU?
What boot method are you using (grub | systemd-boot | EFI | refind | clover | UEFI-EFI) - archinstall defaults to systemd-boot I think
What additional packages have you installed, could you post the output from a pacman query-explicit cmd, so we can visualize if there are any driver conflicts or dependency issues
pacman -Qe
Most importantly , what actual-results are you seeing/getting, what expected-results should be occuring (given this was working), and how far into GDM can you traverse after booting before your problem occurs . For example, are you able to reach the GDM login screen/service and enter your information - to only be returned with a nonresponsive blackscreen; Does your system initially boot you into a TTY terminal with no display manager, hinting for a display manager issue; Is the issue isolate to wayland, and X11 GDM login option works, sybolizing wayland related issues? These are some of the initial blackbox testing cases we should run to get an idea of what's not working.
Any more info on the process would be good if possible, because I feel like we could solve the issue quicker if there was a little more info about the situation.
Last edited by YCDA (2024-09-01 12:18:14)
Offline
Could you possibly provide me info for these topics/questions I'm about to list below (feel free to inline your responses if you want, I'll notice)
I have both integrated (intel) as well as dedicated(nvidia) gpu although I don't have any option to disable integrated gpu.
I use grub
Welp, I don't have any specific stuff installed, I have installed all the necessary packages for intel drivers as well as nvidia-open drivers
Offline
YCDA wrote:Could you possibly provide me info for these topics/questions I'm about to list below (feel free to inline your responses if you want, I'll notice)
I have both integrated (intel) as well as dedicated(nvidia) gpu although I don't have any option to disable integrated gpu.
I use grub
Welp, I don't have any specific stuff installed, I have installed all the necessary packages for intel drivers as well as nvidia-open drivers
Dam. How far into GDM are you able to get?
Also I think I did something like this on my laptop running (eD-gpu) AMD-Ryzen w/ Nvidia GTX 3060, and think it may have sorted out a GDM freezing issue with wayland configuration for setting up Nvidia as the main card. I think i recall my system freezing right as GDM initialized, which forced me to pivot into TTY, and I had set WaylandEnable=true, to be specific, but ended up just leaving it uncommented and was able to get through, I think it's related to how ozone_platform=auto works on chrome_flags vs the default setting, where auto attempts wayland, and fallsback to X11, or perhaps in this case maybe XWayland, if maybe since NVIDIA needs Xwayland, but Xwayland needs xorg inside of Wayland. SInce GDM initializing to a config set statically to wayland it maybe prevents xorg in wayland (xWayland) from initializing - hence breaking nvidia's only Wayland workaround. GDM then isn't able to create the Xwayland video input/output sink necessary, or realize that it's needed. If your comfortable with no display manager, it can kinda help get past some of these early video card hurdles, which is especially helpful if it's only a display manager creating the block to the actualy gnome desktop. I use KDE so i usually just use a command like /usr/bin/startplasma-wayland from a tty shell and don't use SDDM, and maybe there is something for gnome to just start the desktop from a shell?
❯ nano /etc/gdm/custom.conf
# GDM configuration storage
[daemon]
# I think commenting this out provides Wayland with X11 fallback, or at least solved my Nvidia only GDM issues on my laptop.
# You still get the options for like loading and selecting gnome (wayland) gnome(x11) options in the corner login screen, but i believe this was a workaround.
# WaylandEnable=true
Last edited by YCDA (2024-09-01 12:56:28)
Offline
@YCDA could you refrain from full posting unreflected and likely wrong overly verbose chatgpt responses? It bloats the thread with random bullshit of which 90% doesn't really apply.
@Ayu2809 Either add the rule so you can start wayland or post the link you're getting from
sudo journalctl -b | curl -F 'file=@-' 0x0.st
after GDM doesn't show you the wayland option
Offline
@YCDA could you refrain from full posting unreflected and likely wrong overly verbose chatgpt responses? It bloats the thread with random bullshit of which 90% doesn't really apply.
@Ayu2809 Either add the rule so you can start wayland or post the link you're getting from
sudo journalctl -b | curl -F 'file=@-' 0x0.st
after GDM doesn't show you the wayland option
@V1del Sure my bad just tryna help, but you don't gotta be condescending when you disagree though, it's not really a good way to go about building a chill community.
Offline
Either add the rule so you can start wayland or post the link you're getting from
sudo journalctl -b | curl -F 'file=@-' 0x0.st
after GDM doesn't show you the wayland option
Uhhhh.....I am stuck on a black screen with a dash cursor(not even blinking), I can't even switch to a different tty. Can you help me on that first?
Edit: All I did was:
echo -e "options nvidia-drm modeset=1 fbdev=1\noptions nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_UsePageAttributeTable=1" | sudo tee /etc/modprobe.d/nvidia.conf > /dev/null
sudo sed -i 's/MODULES=\(.*\)/MODULES=\(nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf
sudo mkinitcpio -P
sudo systemctl enable nvidia-persistenced nvidia-hibernate nvidia-resume nvidia-suspend switcheroo-control
Edit: It seems, spamming ghe Alt+F3 right after booting with linux-fallback led me to tty3
Last edited by Ayu2805 (2024-09-01 13:08:53)
Offline
post the link you're getting from
sudo journalctl -b | curl -F 'file=@-' 0x0.st
after GDM doesn't show you the wayland option
Here you go: https://0x0.st/XvnJ.txt
Offline
There's no attempt to even start GDM in that journal - can you "sudo systemctl start gdm"?
If not, post the output of "systemctl status gdm" and an updated journal.
@YCDA, you'll find people to be way more chill once you stop spamming chatgpt nonsense all over the board.
Offline
There's no attempt to even start GDM in that journal - can you "sudo systemctl start gdm"?
If not, post the output of "systemctl status gdm" and an updated journal.
Okay I found out that I was missing xorg-server, but still GDM not turning on because xorg-server is missing only means that it's not running wayland.
I just want to know if there's a way to run GDM with Wayland (to start Gnome Wayland) without doing the symlink trick.
Well it's not like I have something against the symlink thingy it's just that I did everything that wiki said but I got no success.
Last edited by Ayu2805 (2024-09-01 15:07:18)
Offline
I just want to know if there's a way to run GDM with Wayland (to start Gnome Wayland) without doing the symlink trick.
Probably no, but please post an updated system journal that actually covers an attempt to start GDM (on wayland, then falling over to X11)
Offline
Probably no, but please post an updated system journal that actually covers an attempt to start GDM (on wayland, then falling over to X11)
Then wiki should be updated accordingly.
Well her you go:
https://0x0.st/Xv5G.txt
Last edited by Ayu2805 (2024-09-01 15:28:31)
Offline
There's absolutely no effort being made to start GDM on wayland, have you maybe configured https://wiki.archlinux.org/title/GDM#Use_Xorg_backend ?
Offline
There's absolutely no effort being made to start GDM on wayland, have you maybe configured https://wiki.archlinux.org/title/GDM#Use_Xorg_backend ?
Nope, I didn't touch that.
I use my script to install some stuff after arch installation and here's a part that's responsible for nvidia:
sudo pacman -S --needed --noconfirm nvidia-open-dkms nvidia-settings nvidia-prime opencl-nvidia switcheroo-control
echo -e "options nvidia-drm modeset=1 fbdev=1\noptions nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_UsePageAttributeTable=1" | sudo tee /etc/modprobe.d/nvidia.conf > /dev/null
sudo sed -i 's/MODULES=\(.*\)/MODULES=\(nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf
sudo mkinitcpio -P
sudo systemctl enable nvidia-persistenced nvidia-hibernate nvidia-resume nvidia-suspend switcheroo-control
And then I rebooted. This should be good right? I didn't do anything apart from this.
Edit: I use linux(stable) kernel on my current system but since I use the same script to install on my desktop(where I use linux-zen) I have used the *-dkms driver everywhere instead for different builds for each kernel, is it related to my issue?
Last edited by Ayu2805 (2024-09-01 15:44:01)
Offline
Ah, I missed
Sep 01 20:55:42 hp kernel: nvidia-modeset: Loading NVIDIA UNIX ____Open____ Kernel Mode Setting Driver for x86_64 560.35.03 Release Build (archlinux-builder@hp)
If you shadow the udev rule, does GDM implicitly start on wayland?
Offline
If you shadow the udev rule, does GDM implicitly start on wayland?
Uhh, you talking about the symlink thingy? If yes then indeed after doing it, it boots with Wayland
Last edited by Ayu2805 (2024-09-01 15:59:47)
Offline
Looking at the udev rule, it tries to read out some values of the module but more importantly the current version has
# 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"
Ie. it's unconditionally disabled if you've a hybrid setup involving nvidia.
Offline
Looking at the udev rule, it tries to read out some values of the module but more importantly the current version has
# 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"
Ie. it's unconditionally disabled if you've a hybrid setup involving nvidia.
I see, I indeed have a laptop with integrated gpu+nvidia gpu and there's no way to disable to integrated gpu in bios.
Does that mean I have no option other than shadowing the udev rule?
Last edited by Ayu2805 (2024-09-01 16:11:38)
Offline