NVidia Optimus - Graphics card no longer can be activated by the primusrun command (bumblebee)

  • IMPORTANT:

Handling video card drivers is always a critical process and YOU RISK RUNNING OUT OF ACCESS TO THE MANJARO’S GRAPHICAL USER INTERFACE. So, first of all WE STRONGLY RECOMMEND burning a DVD or preparing a USB stick with the Manjaro’s installer ISO ( Manjaro - Downloads ). If something goes wrong you can access your Manjaro’s installation by booting your computer with the Manjaro’s installer and then run the manjaro-chroot -a command on the terminal.

To writing a Manjaro installer ISO to a USB stick you could use the dd bs=4M if=<PATH_TO_MANJARO_ISO> of=/dev/sd<DRIVE_LETTER> status=progress oflag=sync command - use the fdisk -l command to find out the <DRIVE_LETTER>. To burn to a DVD you could use the K3b application ( https://kde.org/applications/en/k3b ).

[Refs.: Burn an ISO File - Manjaro , http://manjaro-linux.com.br/forum/topic5037.html ]

  • INSTALL NVIDIA PRIME:

Find out the exact old bumblebee driver name with the command…

mhwd -li

… and, if applicable, remove with this example command…

mhwd -f -i pci video-hybrid-intel-nvidia-<VERSION_NUMBER>xx-bumblebee

If applicable, remove optimus-manager

yay -R optimus-manager

Install new Nvidia prime driver…

mhwd -f -i pci video-modesetting
mhwd -f -i pci video-hybrid-intel-nvidia-450xx-prime

Create the 10-prime-offload.conf Xorg configuration file with this command…

read -r -d '' FILE_CONTENT << 'HEREDOC'
BEGIN
Section "ServerLayout"
    Identifier "layout"
    Screen 0 "intel"
    Inactive "nvidia"
    Option "AllowNVIDIAGPUScreens"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0:2:0"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
EndSection

END
HEREDOC
echo -n "${FILE_CONTENT:6:-3}" > '/etc/X11/xorg.conf.d/10-prime-offload.conf'

TIP: Use the command lspci | grep -E "VGA|3D" to confirm the BusID of each device.

Run the command…

systemctl set-default multi-user.target

… and reboot your computer.

IMPORTANT: The systemctl set-default multi-user.target command will cause your graphical user interface to be temporarily unusable. Therefore, access this thread via another device (a smart phone, for example) as the next commands must be executed manually after reboot and login.

modprobe nvidia
modprobe nvidia_modeset
modprobe nvidia_drm
systemctl set-default graphical.target
reboot

Done!

Thanks to @pobrn @Fabby @cscs @ddns ! :grin:

1 Like