Can't install NVidia drivers

Got a new laptop: Alienware m16 R2 Utra 9 with an NVidia 4060 + 8gb

I tried to follow the instructions of: Configure Graphics Cards - Manjaro it didn’t work.

I tried the NVidia from the Manjaro setting manager > hardware and it won’t let me install the nvidia because I already have the hybrid nvidia prime.

$ sudo mhwd -a pci nonfree 0300
[sudo] password for froggy: 
> Skipping already installed config 'video-hybrid-intel-nvidia-prime' for device: 0000:01:00.0 (0300:10de:28e0) Display controller nVidia Corporation 
> Skipping already installed config 'video-hybrid-intel-nvidia-prime' for device: 0000:00:02.0 (0300:8086:7d55) Display controller Intel Corporation 

here’s the current:

 $ mhwd -li
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2024.05.06                true            PCI
     video-modesetting            2020.01.13                true            PCI
video-hybrid-intel-nvidia-prime            2023.03.23               false            PCI

no mkinicpio module is loaded

 $ cat /etc/mkinitcpio.conf|grep MODULES
# MODULES
#     MODULES=(usbhid xhci_hcd)
MODULES=()
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
##   This setup specifies all modules in the MODULES setting above.
# MODULES_DECOMPRESS
#MODULES_DECOMPRESS="no"

nvidia-msi shows

$ nvidia-smi
Sun Mar 23 12:41:12 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.144.03             Driver Version: 550.144.03     CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 4060 ...    Off |   00000000:01:00.0  On |                  N/A |
| N/A   45C    P8              4W /   80W |     299MiB /   8188MiB |      4%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A       997      G   /usr/lib/Xorg                                 289MiB |
|    0   N/A  N/A      1199      G   xfwm4                                           3MiB |
+-----------------------------------------------------------------------------------------+

and here’s inxi

$ inxi -Gxxx
Graphics:
  Device-1: Intel Meteor Lake-P [Intel Arc Graphics] vendor: Dell driver: i915
    v: kernel arch: Xe-LPG ports: active: none empty: DP-1,DP-2 bus-ID: 00:02.0
    chip-ID: 8086:7d55 class-ID: 0300
  Device-2: NVIDIA AD107M [GeForce RTX 4060 Max-Q / Mobile] vendor: Dell
    driver: nvidia v: 550.144.03 arch: Lovelace pcie: speed: 2.5 GT/s lanes: 8
    bus-ID: 01:00.0 chip-ID: 10de:28e0 class-ID: 0300
  Device-3: Realtek Integrated_Webcam_FHD driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 3-9:5 chip-ID: 0bda:557c
    class-ID: fe01 serial: 200901010001
  Display: x11 server: X.org v: 1.21.1.16 compositor: xfwm4 v: 4.20.0
    driver: X: loaded: modesetting,nouveau failed: nvidia
    alternate: fbdev,nv,vesa dri: iris gpu: i915,nvidia display-ID: :0.0
    note: <missing: xdpyinfo/xrandr>
  Monitor-1: Unknown-1 size-res: N/A modes: 2560x1600
  API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia gbm:
    drv: kms_swrast surfaceless: drv: nvidia x11: drv: nvidia inactive: wayland
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia v: 550.144.03 glx-v: 1.4
    direct-render: yes renderer: NVIDIA GeForce RTX 4060 Laptop GPU/PCIe/SSE2
  Info: Tools: api: eglinfo,glxinfo de: xfce4-display-settings
    gpu: nvidia-settings,nvidia-smi x11: xprop

Are you sure the laptop has a mux-switch so that you can use the nvidia gpu directly? Otherwise, you need to rely on “Optimus” which is a software switch.

Anyway, it is a bad idea to install the nvidia-only config of mhwd if the iGPU is hardwired to the laptop screen, since you will get a black screen. :slight_smile:

What is your real problem?

For me the problem is that I need the GPU to run openCL. It’s for Darktable, Digikam and Upscayl.

Darktable & digikam can run w/o the NVDIA (but slow), but upscayl needs the
NVidia gpu.

Run it like this on the terminal:

prime-run /usr/bin/darktable

That way, NVIDIA will manage the GPU acceleration for this program on demand. So OpenGL, OpenCL and Vulkan.

Copy the desktop file and modify the Exec= line with an editor of your choice.

mkdir -p $HOME/.local/applications
cp /usr/share/applications/org.darktable.darktable.desktop $HOME/.local/share/applications/

Your desktop file in the home directory will “overwrite” the system desktop file.

Excellent!

Sorry but I’m an old dinosaur and I don’t understand how to I install the CUDAs for the nvidia if I don’t have the nvidia drivers installed?

The driver is installed:

Look, there are separate packages:

  1. Kernel space module | package: linux612-nvidia or nvidia-dkms (the driver)
  2. User space libraries | package: nvidia-utils (the graphics stack)

:notebook: Each driver must be compiled against each kernel version.

Kernel space driver is there to communicate with the hardware through the kernel and the user space libraries provides OpenGL, OpenCL and Vulkan while communicating with the kernel space driver, so that graphical programs can access the GPU.

CUDA is a toolkit for development and is a separate package of 7GB: cuda

  1. Thanks for taking the time to explain.
  2. If I understand you correctly. I just have not finished the NVidia install and need to install:
    – linux612-nvidia
    – nvidia-utils
    – cudas

Thanks

No, the driver is installed and the libraries. That is part of the mhwd config / install script. Only cuda, if you really need that, needs to be installed explicitly.

Look, with hybrid gpus the dedicated GPU, thus NVIDIA runs only on demand by default. Like running it with prime-run as explained. Windows has also such a thing, but most modern programs have an internal switch to use the dGPU automatically. On Linux, you need to do it yourself manually.

With software like optimus-manager or envycontrol you can switch the entire desktop to dedicated gpu back and forth easier.

Usually, your HDMI/DP port for external screens is wired to the NVIDIA GPU. Therefore, since NVIDIA is proprietary, the intel driver cannot communicate with the nvidia driver, but the nvidia driver can communicate with the intel driver, sort of. So, you need to switch to NVIDIA then entirely to get a picture on the external screen. These managers above makes it easier to handle.

:notebook: I don’t use nvidia any more at home.

This is in response to everybody that helped me setup the nvidia.

Installing the cudas wasn’t enough, I also had to upgrade the bios from 1.9.0 to 1.10.0 with a default reset (not a factory reset) and cleanup a few bios settings.

Now, it’s working :slight_smile: thank you

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.