Ubuntu 21.10 - "Failed to grab modeset ownership" with 495.44

In some cases opening the mode setting device may be intentional. As example when we have HMD ( Head mount display). I got this error message with SteamVr and with UnrealEditor with openXR Monado-service.

In Ubuntu 20.04 X server crashes with nvidia-driver-510 and nvidia-driver-495 when i start SteamVR with this message on dmesg console. Only combination that i have got working is nvidia-driver-470 with HMD mapped as Option “AllowHMD” “yes”

I had this issue appear when I disabled the iGPU (i965) to test Wayland on my machine. Turns out, it went away went I re-enabled the iGPU in the BIOS, and booted back to X11.

I have the same problem. My gui is affected by it ie. pixelated and flickering screen. If you google the issue, it seems to be quite common. It would be nice to have a real solution as opposed to some hand waving …

I get “[drm:nv_drm_master_set [nvidia_drm]] ERROR [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership” when trying to suspend ubuntu 20.04 and it won’t suspend it simply shows the login screen

I updated ubuntu yesterday and this porblem is gone. I couldn’t suspend my laptop before or even change my screen brightness, now all of a suden everything works as expected. Here’s some info, perhaps it might help

>>> lsb_release -a
Description:	Ubuntu 20.04.4 LTS
Release:	20.04
Codename:	focal


>>> uname -a
Linux Hostname 5.15.0-41-generic #44~20.04.1-Ubuntu SMP Fri Jun 24 13:27:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux


>>> dpkg -l | grep nvidia
ii  libnvidia-cfg1-515:amd64                      515.48.07-0ubuntu1                         amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-515                          515.48.07-0ubuntu1                         all          Shared files used by the NVIDIA libraries
rc  libnvidia-compute-510:amd64                   510.60.02-0ubuntu0.20.04.2                 amd64        NVIDIA libcompute package
rc  libnvidia-compute-510-server:amd64            510.73.05-0ubuntu0.20.04.1                 amd64        NVIDIA libcompute package
ii  libnvidia-compute-515:amd64                   515.48.07-0ubuntu1                         amd64        NVIDIA libcompute package
ii  libnvidia-compute-515:i386                    515.48.07-0ubuntu1                         i386         NVIDIA libcompute package
ii  libnvidia-container-tools                     1.10.0-1                                   amd64        NVIDIA container runtime library (command-line tools)
ii  libnvidia-container1:amd64                    1.10.0-1                                   amd64        NVIDIA container runtime library
ii  libnvidia-decode-515:amd64                    515.48.07-0ubuntu1                         amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-decode-515:i386                     515.48.07-0ubuntu1                         i386         NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-515:amd64                    515.48.07-0ubuntu1                         amd64        NVENC Video Encoding runtime library
ii  libnvidia-encode-515:i386                     515.48.07-0ubuntu1                         i386         NVENC Video Encoding runtime library
ii  libnvidia-extra-515:amd64                     515.48.07-0ubuntu1                         amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-515:amd64                      515.48.07-0ubuntu1                         amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-fbc1-515:i386                       515.48.07-0ubuntu1                         i386         NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-515:amd64                        515.48.07-0ubuntu1                         amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-515:i386                         515.48.07-0ubuntu1                         i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ml-dev                              10.1.243-3                                 amd64        NVIDIA Management Library (NVML) development files
rc  nvidia-compute-utils-510-server               510.73.05-0ubuntu0.20.04.1                 amd64        NVIDIA compute utilities
ii  nvidia-compute-utils-515                      515.48.07-0ubuntu1                         amd64        NVIDIA compute utilities
ii  nvidia-container-toolkit                      1.10.0-1                                   amd64        NVIDIA container runtime hook
ii  nvidia-cuda-dev                               10.1.243-3                                 amd64        NVIDIA CUDA development files
rc  nvidia-dkms-510-server                        510.73.05-0ubuntu0.20.04.1                 amd64        NVIDIA DKMS package
ii  nvidia-dkms-515                               515.48.07-0ubuntu1                         amd64        NVIDIA DKMS package
ii  nvidia-docker2                                2.11.0-1                                   all          nvidia-docker CLI wrapper
ii  nvidia-driver-515                             515.48.07-0ubuntu1                         amd64        NVIDIA driver metapackage
rc  nvidia-kernel-common-510-server               510.73.05-0ubuntu0.20.04.1                 amd64        Shared files used with the kernel module
ii  nvidia-kernel-common-515                      515.48.07-0ubuntu1                         amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-515                      515.48.07-0ubuntu1                         amd64        NVIDIA kernel source package
ii  nvidia-modprobe                               515.48.07-0ubuntu1                         amd64        Load the NVIDIA kernel driver and create device files
ii  nvidia-prime                                  0.8.16~0.20.04.2                           all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                               515.48.07-0ubuntu1                         amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-515                              515.48.07-0ubuntu1                         amd64        NVIDIA driver support binaries
ii  screen-resolution-extra                       0.18build1                                 all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-515                 515.48.07-0ubuntu1                         amd64        NVIDIA binary Xorg driver


>>> dmesg | grep nvidia
...
[19419.742319] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
...


>>> tail /var/log/apt/history.log
Start-Date: 2022-07-13  14:37:51
Commandline: apt upgrade
Install: linux-hwe-5.15-headers-5.15.0-41:amd64 (5.15.0-41.44~20.04.1, automatic), linux-image-5.15.0-41-generic:amd64 (5.15.0-41.44~20.04.1, automatic), linux-modules-extra-5.15.0-41-generic:amd64 (5.15.0-41.44~20.04.1, automatic), linux-modules-5.15.0-41-generic:amd64 (5.15.0-41.44~20.04.1, automatic), linux-headers-5.15.0-41-generic:amd64 (5.15.0-41.44~20.04.1, automatic)
Upgrade: linux-headers-generic-hwe-20.04:amd64 (5.13.0.52.59~20.04.31, 5.15.0.41.44~20.04.13), xserver-common:amd64 (2:1.20.13-1ubuntu1~20.04.2, 2:1.20.13-1ubuntu1~20.04.3), xserver-xorg-core:amd64 (2:1.20.13-1ubuntu1~20.04.2, 2:1.20.13-1ubuntu1~20.04.3), xserver-xorg-legacy:amd64 (2:1.20.13-1ubuntu1~20.04.2, 2:1.20.13-1ubuntu1~20.04.3), linux-image-generic-hwe-20.04:amd64 (5.13.0.52.59~20.04.31, 5.15.0.41.44~20.04.13), linux-generic-hwe-20.04:amd64 (5.13.0.52.59~20.04.31, 5.15.0.41.44~20.04.13), xserver-xephyr:amd64 (2:1.20.13-1ubuntu1~20.04.2, 2:1.20.13-1ubuntu1~20.04.3), xwayland:amd64 (2:1.20.13-1ubuntu1~20.04.2, 2:1.20.13-1ubuntu1~20.04.3), code:amd64 (1.69.0-1657183742, 1.69.1-1657615746), linux-firmware:amd64 (1.187.31, 1.187.32)

Hi, PLEASE I NEED HELP
i have a the same problem with Ubuntu 18.04 and NVIDIA Gforce 3060 (Dirver 515.48.07)
When i start videos with 60 fps, the PC crush and reboot after 2 or 3 minutes.
using vi /var/log/kern.log
i detect this error just before the crush :
[drm:nv_drm_master_set [nvidia_drm]] ERROR [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
Please my project is blocked and waiting a solution
Please Help

I have also this issue

Aug 21 00:12:39 donutloop kernel: [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
Aug 21 00:12:39 donutloop kernel: [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
Aug 21 00:12:39 donutloop kernel: [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
Aug 21 00:12:39 donutloop kernel: [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership

Exactly same issue here.

$ sudo dmesg -T | grep nvidia
[Sat Oct 15 17:49:04 2022] Command line: BOOT_IMAGE=/boot/vmlinuz-5.15.0-50-generic root=UUID=0bf4fa89-a3c7-4f77-ab88-d1c8493705f1 ro quiet splash nvidia-drm.modeset=1 vt.handoff=7
[Sat Oct 15 17:49:04 2022] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.15.0-50-generic root=UUID=0bf4fa89-a3c7-4f77-ab88-d1c8493705f1 ro quiet splash nvidia-drm.modeset=1 vt.handoff=7
[Sat Oct 15 17:49:36 2022] nvidia: loading out-of-tree module taints kernel.
[Sat Oct 15 17:49:36 2022] nvidia: module license ‘NVIDIA’ taints kernel.
[Sat Oct 15 17:49:36 2022] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[Sat Oct 15 17:49:36 2022] nvidia-nvlink: Nvlink Core is being initialized, major device number 511
[Sat Oct 15 17:49:36 2022] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
[Sat Oct 15 17:49:37 2022] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 520.61.05 Thu Sep 29 05:29:37 UTC 2022
[Sat Oct 15 17:49:37 2022] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[Sat Oct 15 17:49:38 2022] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0
[Sat Oct 15 17:49:43 2022] audit: type=1400 audit(1665836383.666:2): apparmor=“STATUS” operation=“profile_load” profile=“unconfined” name=“nvidia_modprobe” pid=984 comm=“apparmor_parser”
[Sat Oct 15 17:49:43 2022] audit: type=1400 audit(1665836383.666:3): apparmor=“STATUS” operation=“profile_load” profile=“unconfined” name=“nvidia_modprobe//kmod” pid=984 comm=“apparmor_parser”
[Sat Oct 15 17:56:51 2022] [drm:nv_drm_master_set [nvidia_drm]] ERROR [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership

$ cat /etc/issue
Ubuntu 22.04.1 LTS \n \l

$ uname -r
5.15.0-50-generic
$ cat /sys/module/nvidia/version
520.61.05

$ nvidia-smi
Sat Oct 15 18:06:06 2022
±----------------------------------------------------------------------------+
| NVIDIA-SMI 520.61.05 Driver Version: 520.61.05 CUDA Version: 11.8 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce … Off | 00000000:01:00.0 On | N/A |
| 28% 44C P0 24W / 100W | 56MiB / 4096MiB | 1% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 2101 G /usr/lib/xorg/Xorg 55MiB |
±----------------------------------------------------------------------------+

Disabled Wayland as suggested by some forums. Still the same problem.

Here is my X11 configuration:
$ cat /etc/X11/xorg.conf

nvidia-xconfig: X configuration file generated by nvidia-xconfig

nvidia-xconfig: version 520.61.05

nvidia-settings: X configuration file generated by nvidia-settings

nvidia-settings: version 510.47.03

Section “ServerLayout”
Identifier “Layout0”
Screen 0 “Screen0” 0 0
InputDevice “Keyboard0” “CoreKeyboard”
InputDevice “Mouse0” “CorePointer”
Option “Xinerama” “0”
EndSection

Section “Files”
EndSection

Section “InputDevice”

# generated from default
Identifier     "Mouse0"
Driver         "mouse"
Option         "Protocol" "auto"
Option         "Device" "/dev/psaux"
Option         "Emulate3Buttons" "no"
Option         "ZAxisMapping" "4 5"

EndSection

Section “InputDevice”

# generated from default
Identifier     "Keyboard0"
Driver         "kbd"

EndSection

Section “Monitor”
Identifier “Monitor0”
VendorName “Unknown”
ModelName “Samsung S23B370”
HorizSync 30.0 - 81.0
VertRefresh 50.0 - 75.0
Option “DPMS”
EndSection

Section “Device”
Identifier “Device0”
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “NVIDIA GeForce GTX 1650 SUPER”
EndSection

Section “Screen”
Identifier “Screen0”
Device “Device0”
Monitor “Monitor0”
DefaultDepth 24
Option “Stereo” “0”
Option “nvidiaXineramaInfoOrder” “DFP-1”
Option “metamodes” “1920x1080_60 +0+0”
Option “SLI” “Off”
Option “MultiGPU” “Off”
Option “BaseMosaic” “off”
SubSection “Display”
Depth 24
EndSubSection
EndSection

$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 36 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Vendor ID: GenuineIntel
Model name: Intel(R) Core™ i7-3770 CPU @ 3.40GHz
CPU family: 6
Model: 58
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
Stepping: 9
CPU max MHz: 3900.0000
CPU min MHz: 1600.0000
BogoMIPS: 6819.74
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush d
ts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_per
fmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq
dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2a
pic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm cpuid_fault epb p
ti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
xsaveopt dtherm ida arat pln pts md_clear flush_l1d
Virtualization features:
Virtualization: VT-x
Caches (sum of all):
L1d: 128 KiB (4 instances)
L1i: 128 KiB (4 instances)
L2: 1 MiB (4 instances)
L3: 8 MiB (1 instance)
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-7
Vulnerabilities:
Itlb multihit: KVM: Mitigation: VMX disabled
L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Mds: Mitigation; Clear CPU buffers; SMT vulnerable
Meltdown: Mitigation; PTI
Mmio stale data: Not affected
Retbleed: Not affected
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling
, PBRSB-eIBRS Not affected
Srbds: Vulnerable: No microcode
Tsx async abort: Not affected

Motherboard: Asus P8Z77-V PRO
Graphics card: Asus TUF Gaming Geforce GT 1650 Super

I have already tried different drivers (default 515 driver by Ubuntu 22.04, nvidia 515 driver, nvidia 520 driver). Issue persists. Display does not refresh and has black screen for most of the part.

I have removed all the Ubuntu shipped nvidia drivers as I hit nvidia_uvm undefined symbol issue.

$ dpkg -l | grep nvidia-5.15
ii linux-signatures-nvidia-5.15.0-48-generic 5.15.0-48.54 amd64 Linux kernel signatures for nvidia modules for version 5.15.0-48-generic
ii linux-signatures-nvidia-5.15.0-50-generic 5.15.0-50.56+1 amd64 Linux kernel signatures for nvidia modules for version 5.15.0-50-generic

Please help.

( Ubuntu 22.04.1 Nvidia 525.60.11 Kernel: 5.15.0-56-generic )

I have the line “options nvidia-drm modeset=1” in three files:

grep --include=*.conf -rnw ‘/’ -e “nvidia-drm” 2>/dev/null

“/usr/lib/modprobe.d/nvidia-kms.conf:3:options nvidia-drm modeset=1
“/etc/modprobe.d/nvidia-graphics-drivers-kms.conf:3:options nvidia-drm modeset=1
“/etc/modprobe.d/nvidia-nomodset.conf:1:options nvidia-drm modeset=1

If the lines are commented out, the error message disappears.
If you leave this uncommented in at least one of the files, the error message will appear again.

1 Like

I have the same issue in Debian when I’m using gdm and Gnome with ASUS TUF F17 (Nvidia 3060):

  • Error printed by dmesg: [drm:drm_new_set_master [drm]] ERROR [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
  • Fans are working differently (the laptop overheats more these days before how it was before and I’m not doing anything more CPU or GPU intensive than before)
  • When I change to console and back to graphics, keyboards are no longer working (CTRL+SHIFT+F1, CTRL+SHIFT+F2, CTRL+SHIFT+F3, …)
  • Output printed by the command: grep --include=*.conf -rnw ‘/’ -e “nvidia-drm” 2>/dev/null
    also mentions those options but in another configuration file:
    /etc/modprobe.d/supergfxd.conf:6:options nvidia-drm modeset=1

Commenting out that line fixed it for me, I checked and it worked. Good answer freeavagames.

3 Likes

Same errors for on:

  • Dell Precision 7560 with NVIDIA GA104GLM [RTX A4000 Mobile]
  • Ubuntu 22.04.02
  • Kernel 5.19.0-40-generic
1 Like

I’m experiencing these errors on:

  • Lenovo Thinkpad P15 gen2i with RTX A4000
  • Ubuntu 23.04
  • Kernel 6.2.0-20-generic
1 Like

I’m also getting this on Ubuntu 23.04 with Nvidia driver version 535

3 Likes

Yeah I am also getting this issue with 510, 515, 535 driver versions on ubuntu 20.04 kernel 5.15

1 Like

Hi all, I recently stumbled upon this forum after an automatic driver update started causing my 6.2.0-36-generic #37~22.04.1-Ubuntu machine to completely crash during gpu-intensive workloads. I noticed the modeset error in my dmesg logs, so I came here, thinking that was the issue. However, it sounds like that is actually benign, according to Ubuntu 21.10 - "Failed to grab modeset ownership" with 495.44 - #37 by amrits

The main symptom for me has been higher than expected CPU usage and stuttering. I’m happy to say that adding amd_iommu=on to my grub configuration (specifically, add it inside GRUB_CMDLINE_LINUX in /etc/default/grub, update-grub and reboot) has seemed to alleviate these symptoms, so I would advise anyone with an amd cpu experiencing these symptoms to try that out. I will update this post in case the problems ever return.

Update: nevermind, the problem persists. Frustrating.

Same error is happening over here!

Ubuntu 22.04.3 LTS 6.2.0-36-generic
NVIDIA Driver Version: 535.129.03
NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q]

3 Likes

I was able to solve the issue by turning on integrated graphics in the bios settings. I’m not using the integrated graphics device by somehow disabling it seems to have caused problems. I was experiencing lagginess of the OS and random crashes, but now everything is working fine.

Ubuntu 22.04.3 LTS 6.2.0-37-generic
NVIDIA Driver Version: 535.129.03
NVIDIA Corporation TU116 [GeForce GTX 1660 SUPER] (rev a1)

1 Like

Hmmm, interesting what you have said about the OS lagginess. I am experiencing the same here, and I was not sure what was going on. So, maybe it has the same root cause. Tks for sharing you experience with this issue.
The bad part of this approach for me is that I was using 2 external monitors (and the notebook screen as the third one), so now I can only use one. But I will test it for a few days to see if the OS lagginess goes away.

I am surprised to see that there is no concrete identification of this problem and solution after 2 years on NVIDIA forum till Dec-2023.

I am assuming that this is not the error specific to Ubuntu only now as everyone is getting this issue on Ubuntu with different kernel versions with different driver versions of NVIDIA. May be something is not handled in past changes of the driver.

As no workaround is working, so humble request to NVIDIA team, please help us to identify root cause of this issue by looking into driver code or drm code [ you guys better know :) ] and hence solution.
Because this issue may be causing further issues in the flow. I am getting screen freeze issue after Login to Ubuntu gnome session in 5 out of 10 attempts.

1 Like

Hi All,
The issue reported in this thread is for messages “Failed to grab modeset ownership” appearing in dmesg logs. As communicated earlier, it won’t impact functionality of the NVIDIA X driver that already has modesetting permission. Safe to ignore as long as long as you didn’t need the other client to actually get modesetting permission.
I would request to open a new thread for any other issues to avoid confusion and for better attention.