Skip to content

KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied - cc-switch

Quick fix

Resolve cc-switch white screen DRM permission errors on Linux by disabling WebKit hardware acceleration, specifying NVIDIA rendering, or using the CLI version.

Error output
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: 权限不够
English translation

KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied

This issue occurs when running the Tauri2-based GUI version of cc-switch on Linux systems (e.g., Linux Mint). The underlying WebKit fails to create GBM buffers for hardware-accelerated rendering because the current user lacks write permissions to /dev/dri devices, or NVIDIA driver render offloading is misconfigured, causing DRM_IOCTL_MODE_CREATE_DUMB to fail and resulting in a white screen crash.

  1. Disable WebKit hardware acceleration. Launch cc-switch in the terminal with the following environment variables (maintainers have included WEBKIT_DISABLE_DMABUF_RENDERER=1 by default in subsequent versions to mitigate this): WEBKIT_DISABLE_DMABUF_RENDERER=1 WEBKIT_DISABLE_COMPOSITING_MODE=1 LIBGL_ALWAYS_SOFTWARE=1 cc-switch

  2. For NVIDIA GPU users, force rendering using the dedicated graphics card. Run the following command in the terminal to launch: __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only cc-switch

  3. Check user group permissions. Ensure the current user is added to the video and render groups (note: some users report errors persist after joining; in such cases, rely on the environment variable methods above): sudo usermod -aG video,render $USER

  4. If the GUI version consistently fails to render due to an older system version, it is recommended to abandon the GUI and download/use the CLI version of cc-switch from https://github.com/SaladDay/cc-switch-cli.

Toolcc-switch
Version3.1.2 - 3.7.1
PlatformsLinux
What should I do if nv_gbm_create_device_native failed still occurs after adding the user to the video and render groups?
This indicates a compatibility issue between the NVIDIA driver and WebKit's GBM rendering. Try using environment variables like WEBKIT_DISABLE_DMABUF_RENDERER=1 to disable hardware acceleration, or launch using NVIDIA-specific environment variables.
Can running the AppImage with sudo resolve the permission denied issue?
No. Running with sudo does not resolve underlying DRM permissions or NVIDIA GBM driver issues, and will cause D-Bus session bus acquisition failures (error: Unable to get the session bus). Avoid using sudo.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.