Nvidia driver is not working

Then I have to run these commands in order to use my graphic card each time!?

Just to be sure: You are on your local installation and not on a live session?

Install this:

pamac install mesa-utils vulkan-tools nvidia-prime

and re-run the commands.

Yes these commands are modern version for offloading GLX to nvidia. If you need something like xandr prime-reverse, then you need a custom xorg config file.

Soā€¦

prime-run <your_program>

OR if possibleā€¦ set the nvidia card as first GPU at the UEFI. But on Laptops that is in most cases not possible.

That is what I mean with custom xorg config: ChapterĀ 34.Ā Offloading Graphics Display with RandR 1.4

Yes, Iā€™m on my local installation.

after installing the packages:

$ prime-run glxinfo | grep "OpenGL renderer"
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  50
  Current serial number in output stream:  51
$ prime-run vulkaninfo
ERROR: [Loader Message] Code 0 : loader_scanned_icd_add: Could not get 'vkCreateInstance' via 'vk_icdGetInstanceProcAddr' for ICD libGLX_nvidia.so.0
Cannot create Vulkan instance.
This problem is often caused by a faulty installation of the Vulkan driver or attempting to use a GPU that does not support Vulkan.
ERROR at /build/vulkan-tools/src/Vulkan-Tools-1.2.203/vulkaninfo/vulkaninfo.h:670:vkCreateInstance failed with ERROR_INCOMPATIBLE_DRIVER

What if the package that Iā€™m willing to open doesnā€™t support cli opening(like davinci resolve video editor that forced me to install a graphic card in first place)?!
Canā€™t I just use my graphic card like a normal person? :frowning:

Please check that:

Set the Paths:

export configs=(  "/etc/X11/xorg.conf" "/etc/X11/xorg.conf.d/*.conf" "/etc/modprobe.d/*.conf" "/etc/modules-load.d/*.conf" )

Read all configs and print them on the terminal:

for x in ${configs[@]}; do echo -e "\n---$x---\n$(cat $x)"; done

and

Check if the nvidia modle is loaded:

lsmod | grep -i "nvidia"

As saidā€¦ the default way nowadays is offloading only programs which you explicitly want to offload. Howeverā€¦ there is a tool called: optimus-manager which can switch the gpu. But you need to relog on every switch.

what does it do?

It reads all config files related to the gpu and print them on the terminal.

$ export configs=(  "/etc/X11/xorg.conf" "/etc/X11/xorg.conf.d/*.conf" "/etc/modprobe.d/*.conf" "/etc/modules-load.d/*.conf" )
for x in ${configs[@]}; do echo -e "\n---$x---\n$(cat $x)"; done
cat: /etc/X11/xorg.conf: No such file or directory

---/etc/X11/xorg.conf---

cat: '/etc/X11/xorg.conf.d/*.conf': No such file or directory

---/etc/X11/xorg.conf.d/*.conf---

cat: '/etc/modprobe.d/*.conf': No such file or directory

---/etc/modprobe.d/*.conf---

cat: '/etc/modules-load.d/*.conf': No such file or directory

---/etc/modules-load.d/*.conf---

and the grep couldnā€™t find nvidia in lsmod command

ah wellā€¦ zshell again :man_facepalming:

run: bash and then re-run the commands pls.

I think this also worth mentioning that in nvidia-linux forum they handed this link to install graphic driver: How to install & configure nvidia driver on arch linux - Lintel Technologies Blog
wich directly uses pacman to install the driver

$ export configs=(  "/etc/X11/xorg.conf" "/etc/X11/xorg.conf.d/*.conf" "/etc/modprobe.d/*.conf" "/etc/modules-load.d/*.conf" )
for x in ${configs[@]}; do echo -e "\n---$x---\n$(cat $x)"; done
cat: /etc/X11/xorg.conf: No such file or directory

---/etc/X11/xorg.conf---


---/etc/X11/xorg.conf.d/00-keyboard.conf---
# Read and parsed by systemd-localed. It's probably wise not to edit this file
# manually too freely.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us"
EndSection

---/etc/X11/xorg.conf.d/90-mhwd.conf---
##
## Generated by mhwd - Manjaro Hardware Detection
##



---/etc/modprobe.d/mhwd-gpu.conf---
##
## Generated by mhwd - Manjaro Hardware Detection
##

blacklist nouveau
blacklist ttm
blacklist drm_kms_helper
blacklist drm
options nvidia "NVreg_DynamicPowerManagement=0x02"

---/etc/modules-load.d/mhwd-gpu.conf---
##
## Generated by mhwd - Manjaro Hardware Detection
##

nvidia
nvidia-drm

---/etc/modules-load.d/modules.conf---
# List of modules to load at boot

lsmod still doesnā€™t throw anything

Just a little tiny question: Did you restart the laptop after installing the driver?

Yes. of course

With what command can I know that the driver is working fine?

As you see here. The nvidia should get loaded on boot time.

Check the kernel messages:

sudo dmesg | grep -i nvidia

@megavolt @omano @Mirdarthos
I think I found the head of the problem. while booting, in a little moment under the
/dev/nvme0n1p3: clean, .... blocks message, it says [FAILED] Failed to start Load Kernel Modules

Sounds like nvidia to me, although I know I might be wrong.

youā€™re probably right.

maybe just uninstall the current driver and try 470xx driver as @megavolt said?

Edit: I think I had the same booting error for the first, video-nvidia, driver too

a Good idea, although I really donā€™t know what itā€™ll do.

But I think a better idea would be to remove all nvidia packages, especially those not installed with mwhd, reboot and reinstall everything with mwhd.