You are not logged in.

#1 2025-02-10 14:07:10

StopkaPeter
Member
From: Slovakia
Registered: 2019-05-20
Posts: 31

[SOLVED]The simpledrm doesn't automatically bypass with NVIDIA drivers

On the Arch Wiki - Nvidia Drivers -> 2. Wayland configuration -> 2.1 Basic support. There is a part where it is written:

There are two kernel parameters for the nvidia_drm module to be considered: modeset and fbdev. Both are enabled by default when using the nvidia-utils package.

and also had a note:

Kernels officially supported by Arch enable simpledrm, while NVIDIA driver requires efifb or vesafb when nvidia_drm.fbdev is disabled/unavailable (version < 545).

And that's true, from nvidia-utils version 560.35.03-5 and up contains a patch that set nvidia-drm.modeset=1 and nvidia_drm.fbdev=1 as default and is also possible to verify it. Both commands return "Y".

cat /sys/module/nvidia_drm/parameters/modeset
cat /sys/module/nvidia_drm/parameters/fbdev

There is also patch from arch linux version v6.11.6-arch1 and up skip simpledrm if nvidia-drm.modeset=1 is set.

Unfortunately, it looks like the patch isn't working. When I check the output of dmesg, I see simpledrm activated.

[    0.445813] ACPI: bus type drm_connector registered
[    0.577891] simple-framebuffer simple-framebuffer.0: [drm] Registered 1 planes with drm panic
[    0.577894] [drm] Initialized simpledrm 1.0.0 for simple-framebuffer.0 on minor 0
[    0.579966] simple-framebuffer simple-framebuffer.0: [drm] fb0: simpledrmdrmfb frame buffer device
[    3.197450] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    4.635196] [drm] Initialized nvidia-drm 0.0.0 for 0000:01:00.0 on minor 1
[    4.681535] fbcon: nvidia-drmdrmfb (fb0) is primary device
[    4.766332] nvidia 0000:01:00.0: [drm] fb0: nvidia-drmdrmfb frame buffer device
[    9.528952] systemd[1]: Starting Load Kernel Module drm...
[    9.547162] systemd[1]: modprobe@drm.service: Deactivated successfully.
[    9.547333] systemd[1]: Finished Load Kernel Module drm.

On the other hand, if I didn’t rely on automatic fbdev and modeset settings through nvidia-utils and manually set nvidia_drm.modeset=1 and nvidia_drm.fbdev=1 like I used to in kernel commands and regenerate initramfs, then simpledrm is no longer activated

[    0.000000] Command line: root=UUID=c9bf8a69-be66-4395-921e-e1237265991c rw bgrt_disable nvidia_drm.modeset=1 nvidia_drm.fbdev=1
[    0.000000] The simpledrm driver will not be probed
[    0.024966] Kernel command line: root=UUID=c9bf8a69-be66-4395-921e-e1237265991c rw bgrt_disable nvidia_drm.modeset=1 nvidia_drm.fbdev=1
[    0.613501] ACPI: bus type drm_connector registered
[    3.389905] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    4.813953] [drm] Initialized nvidia-drm 0.0.0 for 0000:01:00.0 on minor 0
[    4.827804] fbcon: nvidia-drmdrmfb (fb0) is primary device
[    4.908152] nvidia 0000:01:00.0: [drm] fb0: nvidia-drmdrmfb frame buffer device
[    9.730504] systemd[1]: Starting Load Kernel Module drm...
[    9.751396] systemd[1]: modprobe@drm.service: Deactivated successfully.
[    9.751490] systemd[1]: Finished Load Kernel Module drm.

I want to ask if this is a bug or intentional ?

Last edited by StopkaPeter (2025-02-12 20:03:26)

Offline

#2 2025-02-10 15:46:11

cryptearth
Member
Registered: 2024-02-03
Posts: 1,340

Re: [SOLVED]The simpledrm doesn't automatically bypass with NVIDIA drivers

have you removed kms from hooks in mkinitcpio.conf and regenrated the initramfs?

Offline

#3 2025-02-10 15:56:15

StopkaPeter
Member
From: Slovakia
Registered: 2019-05-20
Posts: 31

Re: [SOLVED]The simpledrm doesn't automatically bypass with NVIDIA drivers

cryptearth wrote:

have you removed kms from hooks in mkinitcpio.conf and regenrated the initramfs?

Hi, yes, I removed kms from the hooks in /etc/mkinitcpio.conf and regenerated the initramfs. As far as I know, kms is removed to prevent the nouveau driver from being included in the initramfs, meaning it won't be loaded in early KMS. Then, the NVIDIA drivers are installed, which include a blacklist for the nouveau driver to ensure it doesn't load in late KMS either—if I understand it correctly.

My question is more about simpledrm, which shouldn't load at all due to the mentioned patch above, but it only works when explicitly nvidia_drm.modeset=1 is set in the kernel command line or bootloader options. It doesn't accept fact that the patch included in nvidia-utils already enables modeset and fbdev by default.

Offline

#4 2025-02-10 17:41:07

seth
Member
Registered: 2012-09-03
Posts: 61,712

Re: [SOLVED]The simpledrm doesn't automatically bypass with NVIDIA drivers

The feature is enabled in the module but in order to block the simplydumb device, you /have/ to add the parameter to the https://wiki.archlinux.org/title/Kernel_parameters which is parsed by the kernel as a hack to get rid of this POS.
All the modules load way too late, regardless of the initramfs, to have any impact on this.

Offline

#5 2025-02-12 20:02:15

StopkaPeter
Member
From: Slovakia
Registered: 2019-05-20
Posts: 31

Re: [SOLVED]The simpledrm doesn't automatically bypass with NVIDIA drivers

seth wrote:

The feature is enabled in the module but in order to block the simplydumb device, you /have/ to add the parameter to the https://wiki.archlinux.org/title/Kernel_parameters which is parsed by the kernel as a hack to get rid of this POS.
All the modules load way too late, regardless of the initramfs, to have any impact on this.

Thank you for the explanation. I am marking this topic as solved. In conclusion, I would like to add that it might be good to update the wiki to mention that simpledrm is incompatible with NVIDIA drivers and should be skipped for proper Wayland functionality by setting the modeset=1 parameter in the kernel, modprobe.d, or the bootloader. The wiki does not explain this directly, and as I read through the topics, I see that people do not know they need to explicitly set modeset instead of relying on a patch in nvidia-utils, as I did.

Last edited by StopkaPeter (2025-02-12 20:03:39)

Offline

#6 2025-02-12 20:44:05

seth
Member
Registered: 2012-09-03
Posts: 61,712

Re: [SOLVED]The simpledrm doesn't automatically bypass with NVIDIA drivers

mention that simpledrm is incompatible with NVIDIA drivers

That's not technically true, but the simpledrm device keps causing problems esp. if fbdev doesn't work and/or on hybrid systems (atm)
The commandline behavior is a downstream hack and interim was even removed.

Did I miss the part where you were descibing the issues you face?
(The supposed behavior is the simpledrm device operates the framebuffer, then the nvidia driver shows up and takes over - w/o negative symptoms, that's nothing to phone home about)

Status quo is, users show up w/ unspecific GPU issues, the BBS squints at that, "could be the simpledrm device, disable it by…" and then either the thread is solved or we have to look for other things to blame.
There's also a discussion adjacent to the situation in the wiki… discussion page.

Offline

#7 2025-02-12 23:20:28

cryptearth
Member
Registered: 2024-02-03
Posts: 1,340

Re: [SOLVED]The simpledrm doesn't automatically bypass with NVIDIA drivers

// sorry upfront for the kind of rant that follows after the actual topic relevant explanation

StopkaPeter wrote:

that it might be good to update the wiki to mention that simpledrm is incompatible with NVIDIA drivers and should be skipped by setting the modeset=1 parameter in the the bootloader. The wiki does not explain this directly

I corrected that for you - please see what I removed

StopkaPeter wrote:

as I read through the topics, I see that people do not know they need to explicitly set modeset, as I did.

well - as I corrected your line - it seems you failed for the same as those you mentioned: the wiki is fine - most people, like yourself, just doesn't read it careful enough
to quote the wiki from top to bottom in its very current form let me highlight what people have to read and have to follow exactly:

wiki wrote:

install the appropriate driver for your card
Remove kms from the HOOKS array in /etc/mkinitcpio.conf and regenerate the initramfs
If you are using Wayland you should not restart until after following #DRM kernel mode setting
Since NVIDIA does not support automatic KMS late loading, enabling DRM (Direct Rendering Manager) kernel mode setting is required to make Wayland compositors function properly
set the modeset=1 kernel module parameter for the nvidia_drm module
Kernels officially supported by Arch enable simpledrm, while NVIDIA driver requires efifb or vesafb
add nvidia, nvidia_modeset, nvidia_uvm and nvidia_drm to the initramfs
There are two kernel parameters for the nvidia_drm module to be considered: modeset and fbdev
Enabling modeset is necessary for all Wayland configurations
Enabling fbdev is necessary for some Wayland configurations. It is specifically a hard requirement on Linux 6.11 and later

as you see all required steps are in the wiki already - and in order - the main problem is about how people read the wiki - and IMO: how it's written

//here starts the rant part
I often criticize the wiki myself as more of a reference or extended manpage rather than a proper wiki - it's kind of like the bouncycastle javadoc: it expects the user to know all the things and is merely there to re-read specifics one may has forgotton due to the last time is about a decade ago - I failed the install guide myself TWICE the very first time because I just missed the line about installing an editor along with pacstrap as the base package does NOT provide any - and it's just so easy to miss it - the same goes for the nvidia page: all information are there - but one has to read it carefully line by line from top to bottom and has to do exactly that order - once you did it a few times you know your way around it and can do it blindly just require the wiki as a mere reference "ah, yea, I have to do this, than that and finally those"

am I the one who could re-write it better? I'm not sure - neither about the install guide nor the nvid page - but from experience and the many topics - mostly all those "fail to boot after update" I notice all the short commings of arch and its wiki: yes, arch is highly customizable - but due to exactly this "there're many ways" its up to the user to figure one out on thier own - be it proper partitioning or fstab so the system can successfully update the kernel and bootloader - or be it the correct installation of nvidia proprietary drivers - this is where other distributions like ubuntu are so newbie friendly: canonical has figured out one way and takes it away from the user by doing it for them - ensuring it just works for the most people
for arch it doesn't matter how you get your system up to a point it works like you want it to - but it's up to you to figure that out mostly on your own

//TLDR
all info are in the wiki - to get it working properly you have to read and follow it carefully

Offline

Board footer

Powered by FluxBB