sudo pacman -S nvidia
sudo pacman -S lib32-nvidia-utils
sudo pacman -S nvidia-settings
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
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
thanks a lot! I even have the same GPU so for once it's just a CTRL-C/CTRL-V 🤣