Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Unable to use Wayland after switching to nvidia proprietary drivers

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
dmakwana
Posts: 3
Joined: 2024-03-30 16:05

Unable to use Wayland after switching to nvidia proprietary drivers

#1 Post by dmakwana »

Hi,
I recently installed debian 12, then I wanted to use the nvidia proprietary drivers instead of the noveau drivers. But after installing the drivers and cuda. I'm unable to use the three fingers gestures, I checked the

Code: Select all

echo $XDG_SESSION_TYPE
. And now it's outputting x11 instead of wayland. I followed this thread on the wiki. I have nvidia-smi, nvcc properly working, I have installed nvidia-cuda-toolkit, nvidia-suspend-common, nvidia-driver. Set the kernel parameter nvidia-drm.modeset. and

Code: Select all

cat /proc/driver/nvidia/params | grep PreserveVideoMemoryAllocations
outputs 1. I have enabled the required services nvidiasuspend.service, nvidia-hibernate.service, nvidia-resume.service.

User avatar
@ttila
Posts: 157
Joined: 2017-12-13 16:57
Has thanked: 2 times
Been thanked: 15 times

Re: Unable to use Wayland after switching to nvidia proprietary drivers

#2 Post by @ttila »

Are you using drivers from the official Debian repo??

1) If you use gdm3 in /etc/gdm3/custom.conf, do you have this enabled?:

Code: Select all

"WaylandEnable=true"
2) Have you installed these packages libnvidia-egl-gbm1 and libnvidia-allocator1? add libnvidia-egl-wayland1 too (egl hardware acceleration under wayland).
3) I assume in the /etc/default/grub file there is the line

Code: Select all

GRUB_CMDLINE_LINUX="nvidia-drm.modeset=1"
If not add it and launch as root with

Code: Select all

update-grub
The wiki says something different where save this setting.

dmakwana
Posts: 3
Joined: 2024-03-30 16:05

Re: Unable to use Wayland after switching to nvidia proprietary drivers

#3 Post by dmakwana »

Hi @ttila, Sorry for the late reply,
Yes, I am using drivers from the official Debian repo.
1) I just noticed that /etc/gdm3 doesn't have custom.conf file. which is strange because I installed the gnome from the installer, So, I guess it should use gdm3 by default.
2) I did not have those packages that you mentioned, but even after installing there is no change.
3) I have set the kernel parameter using the file /etc/default/grab. Here's the relevant line

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet nvidia_drm.modeset=1"
.

User avatar
@ttila
Posts: 157
Joined: 2017-12-13 16:57
Has thanked: 2 times
Been thanked: 15 times

Re: Unable to use Wayland after switching to nvidia proprietary drivers

#4 Post by @ttila »

dmakwana wrote: 2024-04-08 14:18 1) I just noticed that /etc/gdm3 doesn't have custom.conf file. which is strange because I installed the gnome from the installer, So, I guess it should use gdm3 by default.
2) I did not have those packages that you mentioned, but even after installing there is no change.
3) I have set the kernel parameter using the file /etc/default/grab. Here's the relevant line

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet nvidia_drm.modeset=1"
.
Don't worry.
1) from the gdm debian wiki i read this:

Code: Select all

In Debian 10 and newer, GDM will use Wayland by default on supported hardware. This can be overridden in the /etc/gdm3/daemon.conf file by uncommenting the WaylandEnable=false line, forcing it to instead use X1
So the real config file is stored here "/etc/gdm3/daemon.conf". I use sddm and not gdm3.
2) my mistake those packages are needed when you use a wlroot compositor, Gnome/kde can use directly the EGL infrastructure. I use labwc and i need them.
3) perfect!!!

dmakwana
Posts: 3
Joined: 2024-03-30 16:05

Re: Unable to use Wayland after switching to nvidia proprietary drivers

#5 Post by dmakwana »

Thanks @ttila. The output of

Code: Select all

sudo cat /sys/module/nvidia_drm/parameters/modeset
. is Y, So I guess the kernel parameter is set correctly, It was using Wayland session before, but after trying to switch to nvidia proprietary drivers instead of nouveau created this problem. The value of

Code: Select all

echo $XDG_SESSION_TYPE
outputs x11. I don't know why it's not launching Wayland. I am not able to use the three finger gestures due to this. Maybe I'm missing something.

User avatar
@ttila
Posts: 157
Joined: 2017-12-13 16:57
Has thanked: 2 times
Been thanked: 15 times

Re: Unable to use Wayland after switching to nvidia proprietary drivers

#6 Post by @ttila »

It is important to set the "nvidia_drm.modeset=1" in early stage of booting process and the grub setting is right for you.
Did you edit the option "WaylandEnable=true" in "/etc/gdm3/daemon.conf"?

User avatar
fabien
Forum Helper
Forum Helper
Posts: 737
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 67 times
Been thanked: 173 times

Re: Unable to use Wayland after switching to nvidia proprietary drivers

#7 Post by fabien »

dmakwana wrote: 2024-04-08 18:08 I don't know why it's not launching Wayland.
I think this post might help answer that question.
ImageShare your Debian SCRIPTS
There will be neither barrier nor walls, neither official nor guard, there will be no more desert and the entire world will become a garden. — Anacharsis Cloots

Post Reply