Skip to content

Instantly share code, notes, and snippets.

@Ligh7bringer
Last active February 6, 2021 14:34
Show Gist options
  • Save Ligh7bringer/ec3db82f064aa9ea35a7e904c86d9367 to your computer and use it in GitHub Desktop.
Save Ligh7bringer/ec3db82f064aa9ea35a7e904c86d9367 to your computer and use it in GitHub Desktop.
  1. Create /etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf:
Section "OutputClass"
    Identifier "AMD"
    MatchDriver "amdgpu"
    Driver "modesetting"
EndSection

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "PrimaryGPU" "yes"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
EndSection
  1. Add to ~/.xinitrc:
xrandr --setprovideroutputsource modesetting NVIDIA-0 
xrandr --auto

Performance is not greeat, screen tearing and nvidia gpu is always powered on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment