Solution to nvidia-drm Failed to grab modeset ownership

I’m writing this thread so that other users having the same problem can find a solution(took me alot of searching to find one)

Problem: Display managers or Desktop environments fail to launch the user is presented with a black screen and when they try to run startx or sddm as root they are greeted with the following message: “nvidia-drm Failed to grab modeset ownership”

Solution:
The solution is quite simple, i managed to get it working again by modifying the grub configuration, to do this execute the following tasks: You can replace VIM with whatever text editor you fancy)

sudo vim /etc/default/grub 

In this file you want to find the following rule

GRUB_CMDLINE_LINUX_DEFAULT=

You will want to add

nvidia-drm.modeset=1

To the beginning of the rule, after the ‘=’

When this is done save the file, and run the following command to update your grub boot configuration

sudo grub2-mkconfig -o /boot/grub/grub.cfg

After that reboot your computer, the problem should be fixed.

I think you can just add it in the boot loader kernel parameter also in yast or yast2. Am I right?

@JeroenMathon: thanks a lot for the info! I tried your fix since I have the same problem on latest TW with my GTX 960, but sadly it didn’t change anything. I still find these errors repeatedly in journalctl:


Nov 16 08:54:33 localhost kernel: [drm:drm_new_set_master [drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
Nov 16 08:54:40 localhost kernel: [drm:__nv_drm_connector_detect_internal [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to detect display state
Nov 16 08:54:40 localhost kernel: [drm:nv_drm_connector_get_modes [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to get mode at modeIndex 1 of NvKmsKapiDisplay 0x00000200

Still searching for a fix.

(Btw. I think there’s one typo in your post, the grub2-mkconfig parameter should be /boot/grub2/grub.cfg.)

@conram: I think you are right, the changes are reflected in the Yast Bootloader section.

Here is a thread on the nvidia-forums with a bunch of people with different driver versions, kernel versions and distros, but all with the same error: https://forums.developer.nvidia.com/t/ubuntu-21-10-failed-to-grab-modeset-ownership-with-495-44/193867

Yes it does the same as this method, thanks for mentioning it, its a more user friendly way to do this

Looks like a driver issue instead of kernel boot param, Have you tried asking it in the IRC/Matrix?

Also if you are using nvidia prime it might be a good idea to lock these packages at these versions, since these versions are currently working without problems:

S  | Name                      | Type    | Version                   | Arch   | Repository
---+---------------------------+---------+---------------------------+--------+----------------------
il | nvidia-computeG05         | package | 470.82.00-45.1            | x86_64 | (System Packages)
il | nvidia-gfxG05-kmp-default | package | 470.82.00_k5.14.11_2-45.1 | x86_64 | (System Packages)
il | nvidia-glG05              | package | 470.82.00-45.1            | x86_64 | (System Packages)
i+ | plasma5-applet-suse-prime | package | 1.1-2.2                   | noarch | Main Repository (OSS)
i+ | plasma5-applet-suse-prime | package | 1.1-2.2                   | noarch | openSUSE:Tumbleweed
i+ | plasma5-applet-suse-prime | package | 1.1-2.2                   | noarch | openSUSE-20211005-0
il | suse-prime                | package | 0.8.4-1.1                 | noarch | (System Packages)
il | x11-video-nvidiaG05       | package | 470.82.00-45.1            | x86_64 | (System Packages)
il | xf86-input-evdev          | package | 2.10.6-3.3                | x86_64 | (System Packages)
il | xf86-input-joystick       | package | 1.6.3-2.3                 | x86_64 | (System Packages)
il | xf86-input-keyboard       | package | 1.9.0-2.3                 | x86_64 | (System Packages)
il | xf86-input-libinput       | package | 1.2.0-2.1                 | x86_64 | (System Packages)
il | xf86-input-vmmouse        | package | 13.1.0-8.3                | x86_64 | (System Packages)
il | xf86-input-wacom          | package | 0.40.0-1.3                | x86_64 | (System Packages)
il | xf86-video-fbdev          | package | 0.5.0-2.3                 | x86_64 | (System Packages)
il | xf86-video-vesa           | package | 2.5.0-2.3                 | x86_64 | (System Packages)
il | xorg-x11-Xvnc             | package | 1.10.1-18.1               | x86_64 | (System Packages)
il | xorg-x11-Xvnc-module      | package | 1.10.1-18.1               | x86_64 | (System Packages)
il | xorg-x11-driver-video     | package | 7.6_1-19.5                | x86_64 | Main Repository (OSS)
il | xorg-x11-driver-video     | package | 7.6_1-19.5                | x86_64 | openSUSE:Tumbleweed
il | xorg-x11-driver-video     | package | 7.6_1-19.5                | x86_64 | openSUSE-20211005-0
il | xorg-x11-essentials       | package | 7.6_1-16.13               | noarch | Main Repository (OSS)
il | xorg-x11-essentials       | package | 7.6_1-16.13               | noarch | openSUSE:Tumbleweed
il | xorg-x11-essentials       | package | 7.6_1-16.13               | noarch | openSUSE-20211005-0
il | xorg-x11-fonts            | package | 7.6-42.2                  | noarch | Main Repository (OSS)
il | xorg-x11-fonts            | package | 7.6-42.2                  | noarch | openSUSE:Tumbleweed
il | xorg-x11-fonts            | package | 7.6-42.2                  | noarch | openSUSE-20211005-0
il | xorg-x11-fonts-converted  | package | 7.6-42.2                  | noarch | Main Repository (OSS)
il | xorg-x11-fonts-converted  | package | 7.6-42.2                  | noarch | openSUSE:Tumbleweed
il | xorg-x11-fonts-converted  | package | 7.6-42.2                  | noarch | openSUSE-20211005-0
il | xorg-x11-fonts-core       | package | 7.6-42.2                  | noarch | Main Repository (OSS)
il | xorg-x11-fonts-core       | package | 7.6-42.2                  | noarch | openSUSE:Tumbleweed
il | xorg-x11-fonts-core       | package | 7.6-42.2                  | noarch | openSUSE-20211005-0
il | xorg-x11-fonts-legacy     | package | 7.6-42.2                  | noarch | Main Repository (OSS)
il | xorg-x11-fonts-legacy     | package | 7.6-42.2                  | noarch | openSUSE:Tumbleweed
il | xorg-x11-fonts-legacy     | package | 7.6-42.2                  | noarch | openSUSE-20211005-0
il | xorg-x11-libX11-ccache    | package | 7.6-21.10                 | x86_64 | Main Repository (OSS)
il | xorg-x11-libX11-ccache    | package | 7.6-21.10                 | x86_64 | openSUSE:Tumbleweed
il | xorg-x11-libX11-ccache    | package | 7.6-21.10                 | x86_64 | openSUSE-20211005-0
il | xorg-x11-server           | package | 1.20.13-1.2               | x86_64 | (System Packages)
il | xorg-x11-server-Xvfb      | package | 1.20.13-1.2               | x86_64 | (System Packages)
il | xorg-x11-server-extra     | package | 1.20.13-1.2               | x86_64 | (System Packages)
il | xorgproto-devel           | package | 2021.5-1.1                | x86_64 | Main Repository (OSS)
il | xorgproto-devel           | package | 2021.5-1.1                | x86_64 | openSUSE:Tumbleweed
il | xorgproto-devel           | package | 2021.5-1.1                | x86_64 | openSUSE-20211005-0

Thanks Jeroen!

I don’t use prime, but I actually have another issue now with the new xorg-X11-server version, and locking the version would probably help, but unless Nvidia fixes the driver I don’t see my problems going away. I don’t want to deal with a partially version-locked system either, since I expect that to lead to potential instabilities, so I’ll use a different distro until I have a new PC.