Nvidia Dedicated GPU not recognized

This has happened before to me and I fixed it by reinstalling my os, I don’t want to do it anymore.
I get

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)

when doing lspci | grep VGA

And

==> Unable to remove module nvidia/465.27 for kernel 5.12.2-1-MANJARO: Not found in dkms status output.
==> Unable to remove module nvidia/465.27 for kernel 5.9.16-1-MANJARO: Not found in dkms status output.
:: Elaborazione delle modifiche al pacchetto...
(1/1) reinstallazione nvidia-dkms                  [######################] 100%
:: Esecuzione degli hook di post-transazione...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Install DKMS modules
==> Unable to install module nvidia/465.27 for kernel 5.12.2-1-MANJARO: Missing kernel headers.
==> Unable to install module nvidia/465.27 for kernel 5.9.16-1-MANJARO: Missing kernel headers.

when trying to install nvidia or nvidia-dkms

Hi @kz-n,

  1. Please see How to provide good information
  2. From the title I’m assuming you have a laptop with both an nvidia as well as an intel GPU. And while I don’t have one, so don’t have any experience with it, I can tell you that for that you need the hybrid drivers, which, at least to me, doesn’t look installed.

Sorry, I sent the message uncomplete and did an edit to fill it, I guess it didn’t go through.
Yes, I have a laptop with two GPUs, and I do beleive I need hybrid drivers.
I don’t think I have them installed as if i try to remove video-hybrid-intel-nvidia-430xx-bumblebee it says the config is not present.
How would I install it?
Also, update on what I sent, I upgraded to 5.12 and my headers didn’t install, I now don’t get that error and can build drivers succeessfully, I only still get it for 5.9, which I’m not running.

Unless you need a specific feature only available in kernel 5.12 or later, I’d suggest you install and use 5.10 as it’s and LTS version.

To install it, open a terminal and run,

sudo mhwd-kernel -i linux510

and then reboot. Hold shift in just after the BIOS screen to get to the grub menu. On iy, use you up/down arrow and navigate to the “Advanced…” menu. Press Enter to select it. On the screen that appears, select kernel 5.10 to use.

When booted, login and open a terminal again. Time to see which drivers are installed. To do so, run:

sudo mhwd --listinstalled

It should return a list very similar to this one:

mhwd --listinstalled
> Installed PCI configs:
--------------------------------------------------------------------------------
NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-nvidia            2020.11.30               false            PCI


Warning: No installed USB configs!

If not, no worries, and you can skip the removal of the old drivers.

To remove the old ones, run:

sudo mhwd --remove <driverName>

for every one listed there. For example, in this case I would have had to run:

sudo mhwd --removee video-nvidia

Now you need to check which drivers are available. To do so, in the terminal, run:

sudo mhwd --list

In the list you should, at least theoretically, be able to see which drivers are available for you. Choose the hybrid one and install it with:

sudo mhwd --install <driverName>

Where <driverName> is the name prrovided you ppicked earlier. For example, mine would be:

sudo mhwd --insttall video-nvidia

This should, at least theoretically, install the hyrid drivers for you.

can you please provide

inxi -Fza 
sudo mhwd-kernel -li
sudo ls /etc/mkinitcpio.d/*.preset
sudo mhwd -li 

we do not use nvidia & nvidia-dkms in manjaro repos , it comme with linuxNM-nvidia drivers

Regardless if I try to install video-nvidia, or video-hybrid-intel-nvidia-prime I get “error: the following package has not been found: linux59-nvidia” “Error: pacman failed!” “Error: script failed!”

Relating to @stephane’s comment,

System:    Kernel: 5.10.36-2-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 root=UUID=c87bf33e-d680-4cbb-9e74-04762959fd2a ro quiet apparmor=1 
           security=apparmor resume=UUID=a770fe50-ece5-429c-84ef-4c4da2c38d82 udev.log_priority=3 
           Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm4 vt: 7 dm: LightDM 1.30.0 Distro: Manjaro Linux 
           base: Arch Linux 
Machine:   Type: Laptop System: ASUSTeK product: GL753VD v: 1.0 serial: <filter> 
           Mobo: ASUSTeK model: GL753VD v: 1.0 serial: <filter> UEFI: American Megatrends v: GL753VD.306 date: 01/02/2018 
Battery:   ID-1: BAT0 charge: 36.8 Wh (95.8%) condition: 38.4/48.2 Wh (79.7%) volts: 16.2 min: 14.4 model: Simplo SDI ICR18650 
           type: Li-ion serial: <filter> status: Unknown cycles: 33 
CPU:       Info: Quad Core model: Intel Core i7-7700HQ bits: 64 type: MT MCP arch: Kaby Lake family: 6 model-id: 9E (158) 
           stepping: 9 microcode: DE cache: L2: 6 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 bogomips: 44817 
           Speed: 1486 MHz min/max: 800/3800 MHz Core speeds (MHz): 1: 1486 2: 1402 3: 1484 4: 1401 5: 1400 6: 1408 7: 1400 
           8: 1438 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX unsupported 
           Type: l1tf mitigation: PTE Inversion 
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: srbds mitigation: Microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel HD Graphics 630 vendor: ASUSTeK driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:591b 
           class-ID: 0300 
           Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] vendor: ASUSTeK driver: nvidia v: 465.27 
           alternate: nouveau,nvidia_drm bus-ID: 01:00.0 chip-ID: 10de:1c8d class-ID: 0302 
           Device-3: Realtek USB2.0 HD UVC WebCam type: USB driver: uvcvideo bus-ID: 1-11:9 chip-ID: 0bda:57f6 class-ID: 0e02 
           serial: <filter> 
           Display: x11 server: X.Org 1.20.11 driver: loaded: modesetting,nvidia alternate: fbdev,intel,nouveau,nv,vesa 
           display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 3286x1080 s-dpi: 96 s-size: 869x285mm (34.2x11.2") s-diag: 915mm (36") 
           Monitor-1: eDP-1 res: 1920x1080 hz: 60 dpi: 128 size: 382x215mm (15.0x8.5") diag: 438mm (17.3") 
           Monitor-2: HDMI-1 res: 1366x768 hz: 60 dpi: 85 size: 410x230mm (16.1x9.1") diag: 470mm (18.5") 
           OpenGL: renderer: Mesa Intel HD Graphics 630 (KBL GT2) v: 4.6 Mesa 21.1.0 direct render: Yes 
Audio:     Device-1: Intel CM238 HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:a171 
           class-ID: 0403 
           Device-2: Logitech G432 Gaming Headset type: USB driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-1.2:4 
           chip-ID: 046d:0a9c class-ID: 0300 serial: <filter> 
           Device-3: Native Instruments KOMPLETE KONTROL M32 type: USB driver: hid-generic,snd-usb-audio,usbhid 
           bus-ID: 1-1.3:6 chip-ID: 17cc:1860 class-ID: fe01 serial: <filter> 
           Sound Server-1: ALSA v: k5.10.36-2-MANJARO running: yes 
           Sound Server-2: JACK v: 0.125.0 running: no 
           Sound Server-3: PulseAudio v: 14.2 running: yes 
           Sound Server-4: PipeWire v: 0.3.27 running: no 
Network:   Device-1: Intel Wireless 7265 driver: iwlwifi v: kernel port: e000 bus-ID: 02:00.0 chip-ID: 8086:095a 
           class-ID: 0280 
           IF: wlp2s0 state: up mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK driver: r8169 v: kernel port: d000 
           bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200 
           IF: enp3s0 state: down mac: <filter> 
Bluetooth: Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 bus-ID: 1-9:7 chip-ID: 8087:0a2a 
           class-ID: e001 
           Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends 
Drives:    Local Storage: total: 2.05 TiB used: 90.77 GiB (4.3%) 
           SMART Message: Required tool smartctl not installed. Check --recommends 
           ID-1: /dev/sda maj-min: 8:0 vendor: Micron model: 1100 MTFDDAV256TBN size: 238.47 GiB block-size: physical: 512 B 
           logical: 512 B speed: 6.0 Gb/s rotation: SSD serial: <filter> rev: A020 scheme: GPT 
           ID-2: /dev/sdb maj-min: 8:16 vendor: Toshiba model: MQ01ABD100 size: 931.51 GiB block-size: physical: 4096 B 
           logical: 512 B speed: 3.0 Gb/s rotation: 5400 rpm serial: <filter> rev: 1A scheme: GPT 
           ID-3: /dev/sdc maj-min: 8:32 type: USB vendor: Western Digital model: WD Elements 25A2 size: 931.48 GiB block-size: 
           physical: 512 B logical: 512 B serial: <filter> rev: 1021 scheme: GPT 
Partition: ID-1: / raw-size: 229.37 GiB size: 224.77 GiB (97.99%) used: 90.77 GiB (40.4%) fs: ext4 dev: /dev/sda2 maj-min: 8:2 
           ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) used: 312 KiB (0.1%) fs: vfat dev: /dev/sda1 
           maj-min: 8:1 
Swap:      Kernel: swappiness: 60 (default) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/sda3 maj-min: 8:3 
Sensors:   System Temperatures: cpu: 48.5 C mobo: N/A 
           Fan Speeds (RPM): cpu: 2000 
Info:      Processes: 240 Uptime: 10m wakeups: 1 Memory: 15.52 GiB used: 1.94 GiB (12.5%) Init: systemd v: 248 tool: systemctl 
           Compilers: gcc: 10.2.0 Packages: 1334 pacman: 1319 lib: 429 flatpak: 7 snap: 8 Shell: Bash v: 5.1.8 
           running-in: xfce4-terminal inxi: 3.3.04 
Currently running: 5.10.36-2-MANJARO (linux510)
The following kernels are installed in your system:
   * linux510
   * linux59
/etc/mkinitcpio.d/linux510.preset  /etc/mkinitcpio.d/linux59.preset
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
     video-modesetting            2020.01.13                true            PCI


Warning: No installed USB configs!

Note I did this after following what @Mirdarthos said.

I’m sorry. I did not let you remove kernel version 5.12 first.

After installing it and restarting, what you’ve done, open a terminal and remove kernel version 5.12 first. To do so, run:

sudo mhwd --remove linux512

Also make sure kernel version 5.9 is removed, by running:

sudo mhwd --remove linux59

Since that seems too be what’s causing the error.

Afterwards continue with installing the drivers as before.

I already removed 5.12 through manjaro settings manager, The shift when booting thing didn’t work so I forced it to run 5.10.

Doesn’t show .12

Here, Done.

[kz-n@kz-n Scrivania]$ sudo mhwd-kernel -li
Currently running: 5.10.36-2-MANJARO (linux510)
The following kernels are installed in your system:
   * linux510

Then continue from installing the nvidia hybrid driver.

I did it, However for some reason i also have the bumblebee driver and I can’t remove it.

> 0000:01:00.0 (0302:10de:1c8d) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2020.11.30               false            PCI
video-hybrid-intel-nvidia-390xx-bumblebee            2020.11.30               false            PCI
          video-nvidia            2020.11.30               false            PCI
    video-nvidia-390xx            2020.11.30               false            PCI
           video-linux            2018.05.04                true            PCI


> 0000:00:02.0 (0300:8086:591b) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2020.11.30               false            PCI
video-hybrid-intel-nvidia-390xx-bumblebee            2020.11.30               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


[kz-n@kz-n Scrivania]$ sudo mhwd --remove pci video-hybrid-intel-nvidia-390xx-bumblebee
Error: config 'video-hybrid-intel-nvidia-390xx-bumblebee' is not installed!

OK, to be honest, now, with that, I’m totally stumped and don’t know if it’s safe to leave it there or not.

Maybe you can see what happens if you restart, but I have no idea what’ll happen and take no responsibility if something breaks. However. if it works, you can feel free to heap on the praise.

Another option is, of course, to wait and see if someone that does know can tell you if it’s safe or not.

I went for it, I restarted.
It works! Thanks for this solution!
I’ll keep this open in case I did something wrong and I have a time bomb on my gpu :grin:.

Good to hear!

Hence my disclaimer…

can you returns

sudo mhwd -li 

Don’t worry @stephane, we managed.