Witko / nvidia-xrun

Utility to run separate X with discrete nvidia graphics with full performance
GNU General Public License v2.0
488 stars 69 forks source link

nvidia-xrun fails to disable the intel graphics card. Nvidia is enabled by default #130

Open shakolan opened 5 years ago

shakolan commented 5 years ago

Can anyone please help me? I am desperate. I can't seem to fix it. Nvidia is enabled by default

kadogo commented 4 years ago

Hello @shakolan

I not remember exactly what I did (I had few read on Arch and other stuff but I will try to add here all my configuration in case it help. I use Debian in case it can help too.

# cat /etc/modprobe.d/nvidia.conf 
install nvidia modprobe -i nvidia-current $CMDLINE_OPTS

install nvidia-modeset modprobe nvidia ; modprobe -i nvidia-current-modeset $CMDLINE_OPTS

install nvidia-drm modprobe nvidia-modeset ; modprobe -i nvidia-current-drm $CMDLINE_OPTS

install nvidia-uvm modprobe nvidia ; modprobe -i nvidia-current-uvm $CMDLINE_OPTS

remove nvidia modprobe -r -i nvidia-drm nvidia-modeset nvidia-uvm nvidia

remove nvidia-modeset modprobe -r -i nvidia-drm nvidia-modeset

# These aliases are defined in *all* nvidia modules.
# Duplicating them here sets higher precedence and ensures the selected
# module gets loaded instead of a random first match if more than one
# version is installed. See #798207.
alias   pci:v000010DEd00000E00sv*sd*bc04sc80i00*        nvidia
alias   pci:v000010DEd00000AA3sv*sd*bc0Bsc40i00*        nvidia
alias   pci:v000010DEd*sv*sd*bc03sc02i00*               nvidia
alias   pci:v000010DEd*sv*sd*bc03sc00i00*               nvidia
# cat /etc/systemd/system/nvidia-disable.service 
[Unit]
Description="Disable NVIDIA PCI bus"

[Service]
ExecStart=/bin/bash -c 'tee /sys/bus/pci/devices/0000:01:00.0/remove <<< 1'

[Install]
WantedBy=multi-user.target

The first file look pretty normal to me, but just in case I copy paste it.

The systemd service let you disable the nvidia pci bus, not forget to change the pci bus if needed. I really not remember if I did something more or if it will fix your intel card issue but I remember I had my nvidia card always up after an upgrade of Debian.

Good luck

Edit: There is a big chance I took the nvidia disable service somewhere on Arch wiki/forum but I not remember anymore