Skip to content

Instantly share code, notes, and snippets.

@brunorozendo
Last active October 30, 2020 18:26
Show Gist options
  • Save brunorozendo/a3e8b47318938faefc1d185bda06529f to your computer and use it in GitHub Desktop.
Save brunorozendo/a3e8b47318938faefc1d185bda06529f to your computer and use it in GitHub Desktop.
Arch linux Nvidia notebook

install

sudo pacman -S nvidia 
sudo pacman -S lib32-nvidia-utils
sudo pacman -S nvidia-settings 

Create conf file

sudo nano /etc/X11/xorg.conf.d/20-nvidia.conf

Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
    Option "AllowEmptyInitialConfiguration"
    BoardName "GeForce 940MX"
EndSection

Create init file

sudo nano /usr/share/gdm/greeter/autostart/optimus.desktop

[Desktop Entry]
Type=Application
Name=Optimus
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"
NoDisplay=true
X-GNOME-Autostart-Phase=DisplayServer

Copy init file

sudo cp /usr/share/gdm/greeter/autostart/optimus.desktop /etc/xdg/autostart/optimus.desktop

reboot

@nexus166
Copy link

thanks a lot! I even have the same GPU so for once it's just a CTRL-C/CTRL-V 🤣

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