Not able to install nvidia drivers for my graphics card

At least, inxi is working properly again:

Graphics:
  Device-1: Intel Alder Lake-P GT2 [Iris Xe Graphics] driver: i915 v: kernel
  Device-2: NVIDIA GA107M [GeForce RTX 3050 Ti Mobile] driver: N/A

But still no driver for the GeForce…
(or would I have to reboot before anyways?)

Are you still in kernel 6.5? I thought we moved to 6.6

Please ensure you are booted into 6.6

uname -r

(if not you will need to boot into 6.6. selection can be made from grub during boot.)
If you are, then you can remove the 6.5 kernel, as it is EOL (end of life).

Then continue.


When we get there you will still not be using nvidia. At least not by default or for the desktop.
You have hybrid graphics.
That is an integrated intel iGPU, and a dedicated nvidia dGPU.
prime (and the associated mhwd profiles) helps with this by providing the necessary configs and scripts to use nvidia selectively.

Again, when we get there, we will then be able to test this functionality.

glxinfo | grep 'renderer string'
prime-run glxinfo | grep 'renderer string'

In this example if things are working as they should, the first command should return the intel device, and the second command should return the nvidia.

Ok, I checked the kernel version. I am in 6.6…

I

All the better I suppose.

Print all associated packages just to check:

pacman -Qs linux65

Delete all of those:

sudo pacman -Rns $(pacman -Qsq linux65)

(or sudo pacman -Rns package1 package2 …)

And we should be able to continue from there.

Done. It was only one package and now it’s gone.

And with that, hopefully mhwd can go through, and after a reboot check

inxi -Fazy
mhwd -li -l 
glxinfo | grep 'renderer string'
prime-run glxinfo | grep 'renderer string'

(we should see a good inxi, mhwd should show the current prime profile in use, glxinfo should show intel, and prime-run glxinfo should show nvidia)

Note. I’m taking a walk. Be back in an hour or less. If anything goes wrong try not to lose hope. :slight_smile:

mhwd went through. After reeboot, inxi looks like this:

System:
  Kernel: 6.6.16-2-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc avail: acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-6.6-x86_64
    root=UUID=3a9d70b4-f2bc-4476-bc4f-95a75e051ada rw rootflags=subvol=@
    nouveau.modest=0 quiet apparmor=1 security=apparmor udev.log_priority=3
  Desktop: Cinnamon v: 6.0.4 tk: GTK v: 3.24.41 wm: Muffin v: 6.0.1
    tools: cinnamon-screensaver vt: 7 dm: LightDM v: 1.32.0 Distro: Manjaro
    base: Arch Linux
Machine:
  Type: Laptop System: ASUSTeK product: Vivobook_ASUSLaptop N7401ZE_N7401ZE
    v: 1.0 serial: <superuser required>
  Mobo: ASUSTeK model: N7401ZE v: 1.0 serial: <superuser required>
    uuid: <superuser required> UEFI: American Megatrends LLC. v: N7401ZE.301
    date: 06/02/2022
Battery:
  ID-1: BAT0 charge: 73.5 Wh (100.0%) condition: 73.5/70.0 Wh (105.0%)
    volts: 13.1 min: 11.9 model: ASUSTeK ASUS Battery type: Li-ion serial: N/A
    status: full cycles: 11
CPU:
  Info: model: 12th Gen Intel Core i7-12700H bits: 64 type: MST AMCP
    arch: Alder Lake gen: core 12 level: v3 note: check built: 2021+
    process: Intel 7 (10nm ESF) family: 6 model-id: 0x9A (154) stepping: 3
    microcode: 0x430
  Topology: cpus: 1x cores: 14 mt: 6 tpc: 2 st: 8 threads: 20 smt: enabled
    cache: L1: 1.2 MiB desc: d-8x32 KiB, 6x48 KiB; i-6x32 KiB, 8x64 KiB
    L2: 11.5 MiB desc: 6x1.2 MiB, 2x2 MiB L3: 24 MiB desc: 1x24 MiB
  Speed (MHz): avg: 443 high: 797 min/max: 400/4600:4700:3500 scaling:
    driver: intel_pstate governor: powersave cores: 1: 510 2: 400 3: 400 4: 400
    5: 400 6: 400 7: 400 8: 770 9: 797 10: 400 11: 400 12: 400 13: 400 14: 400
    15: 400 16: 400 17: 400 18: 400 19: 400 20: 400 bogomips: 107560
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced / Automatic IBRS, IBPB: conditional,
    RSB filling, PBRSB-eIBRS: SW sequence
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Alder Lake-P GT2 [Iris Xe Graphics] vendor: ASUSTeK
    driver: i915 v: kernel arch: Gen-12.2 process: Intel 10nm built: 2021-22+
    ports: active: eDP-1 empty: DP-1,DP-2 bus-ID: 0000:00:02.0
    chip-ID: 8086:46a6 class-ID: 0300
  Device-2: NVIDIA GA107M [GeForce RTX 3050 Ti Mobile] vendor: ASUSTeK
    driver: nvidia v: 545.29.06 alternate: nouveau,nvidia_drm non-free: 545.xx+
    status: current (as of 2024-02; EOL~2026-12-xx) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-2023 bus-ID: 0000:01:00.0
    chip-ID: 10de:25a0 class-ID: 0302
  Device-3: Sonix USB2.0 FHD UVC WebCam driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-9:4 chip-ID: 3277:0016
    class-ID: 0e02
  Display: x11 server: X.org v: 1.21.1.11 with: Xwayland v: 23.2.4 driver: X:
    loaded: modesetting,nvidia unloaded: nouveau alternate: fbdev,nv,vesa
    dri: iris gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 2880x1800 s-size: <missing: xdpyinfo>
  Monitor-1: eDP-1 model: Samsung 0x416d built: 2021 res: 2880x1800 hz: 120
    dpi: 234 gamma: 1.2 size: 312x195mm (12.28x7.68") diag: 368mm (14.5")
    ratio: 16:10 modes: 2880x1800
  API: EGL v: 1.5 hw: drv: intel iris drv: nvidia platforms: device: 0
    drv: nvidia device: 2 drv: iris device: 3 drv: swrast gbm: drv: nvidia
    surfaceless: drv: nvidia x11: drv: iris inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 23.3.5-manjaro1.1
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel Graphics (ADL GT2)
    device-ID: 8086:46a6 memory: 14.96 GiB unified: yes
Audio:
  Device-1: Intel Alder Lake PCH-P High Definition Audio vendor: ASUSTeK
    driver: sof-audio-pci-intel-tgl
    alternate: snd_hda_intel,snd_sof_pci_intel_tgl bus-ID: 0000:00:1f.3
    chip-ID: 8086:51c8 class-ID: 0401
  Device-2: NVIDIA vendor: ASUSTeK driver: snd_hda_intel v: kernel
    bus-ID: 0000:01:00.1 chip-ID: 10de:2291 class-ID: 0403
  API: ALSA v: k6.6.16-2-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.0.3 status: off tools: pw-cli
  Server-3: PulseAudio v: 17.0 status: active with: pulseaudio-alsa
    type: plugin tools: pacat,pactl,pavucontrol
Network:
  Device-1: Intel Alder Lake-P PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 0000:00:14.3 chip-ID: 8086:51f0 class-ID: 0280
  IF: wlo1 state: up mac: <filter>
  Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
Bluetooth:
  Device-1: Intel AX211 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 3-10:5 chip-ID: 8087:0033
    class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 3 state: up address: see --recommends
RAID:
  Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd
    v: 0.6 port: N/A bus-ID: 0000:00:0e.0 chip-ID: 8086:467f rev: class-ID: 0104
Drives:
  Local Storage: total: 953.87 GiB used: 17.7 GiB (1.9%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Micron model: 3400 MTFDKBA1T0TFH
    size: 953.87 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: P7MA002 temp: 35.9 C
    scheme: GPT
Partition:
  ID-1: / raw-size: 953.57 GiB size: 953.57 GiB (100.00%) used: 17.7 GiB (1.9%)
    fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 576 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 953.57 GiB size: 953.57 GiB (100.00%)
    used: 17.7 GiB (1.9%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 953.57 GiB size: 953.57 GiB (100.00%)
    used: 17.7 GiB (1.9%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: file size: 512 MiB used: 0 KiB (0.0%) priority: -2
    file: /swap/swapfile
Sensors:
  System Temperatures: cpu: N/A mobo: N/A
  Fan Speeds (rpm): cpu: 2000
Info:
  Memory: total: 16 GiB note: est. available: 15.32 GiB used: 1.63 GiB (10.6%)
  Processes: 399 Power: uptime: 0m states: freeze,mem,disk suspend: s2idle
    avail: deep wakeups: 0 hibernate: platform avail: shutdown, reboot, suspend,
    test_resume image: 6.12 GiB services: csd-power,upowerd Init: systemd
    v: 255 default: graphical tool: systemctl
  Packages: 1157 pm: pacman pkgs: 1147 libs: 336 tools: pamac,yay pm: flatpak
    pkgs: 6 pm: snap pkgs: 4 Compilers: clang: 16.0.6 gcc: 13.2.1 Shell: Bash
    v: 5.2.26 running-in: gnome-terminal inxi: 3.3.33


mhwd -li -l

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


Warning: No installed USB configs!
> 0000:01:00.0 (0302:10de:25a0) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2023.03.23               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2023.03.23               false            PCI
          video-nvidia            2023.03.23               false            PCI
    video-nvidia-470xx            2023.03.23               false            PCI
           video-linux            2018.05.04                true            PCI


> 0000:00:02.0 (0300:8086:46a6) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2023.03.23               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2023.03.23               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


and finally glxinfo and prime-run glxinfo:

[timok@VivoLinux ~]$ glxinfo | grep 'renderer string'
OpenGL renderer string: Mesa Intel(R) Graphics (ADL GT2)
[timok@VivoLinux ~]$ prime-run glxinfo | grep 'renderer string'
OpenGL renderer string: NVIDIA GeForce RTX 3050 Ti Laptop GPU/PCIe/SSE2
[timok@VivoLinux ~]$ 

As far as I can judge that, that looks good. Am I right? Although there is still 740 stuff shown by mhwd.

The first section is whats actually installed.
The sections after are what is available.

The only extra thing here is you can technically dispose of the video-linux profile, as thats a catch-all for multiple opensource drivers … and you only need modesetting and nvidia+prime.

So yeah we are looking good.

Something else to mention might be

  • A, if you want to start something with nvidia all the time you might want to make a special .desktop file for it like ‘firefox-nvidia’ or similar, or just overwrite the existing one by copying it into ~/.local/share/applications and prefacing every Exec command with prime-run.

  • B, you probably rarely want to do the above. Your intel is likely sufficient for most things, will be more widely compatible, and much more energy efficient. Largely you will only want the nvidia for graphics intensive situations like 3D modeling in Blender, or Games.

  • C, if you are a gamer and you use steam … you will probably want to use the nvidia. But you do not want to just start steam with prime-run. Instead edit any given games launch options and place (exactly like this, assuming no other options)
    prime-run %command%

For me, it clearly is B.

I want to do photo and video editing stuff. I mainly need the GPU power for that. Most of the time, I want the intel to work and safe energy.

I would like the nvidia to jump in, when it is needed.

That’s exactly the way it is set up now, did I get that right?

Right now, I can go into the NVIDIA Settings (GUI) and switch between Auto, Adaptive and Performance mode. That’s what I am used to from my former Linux mint with this Laptop.

How can I dispose that video-linux mode?

This will not happen automatically, and I highly doubt it ever did on any other linux distro.

That is changing the ‘power profile’ of the nvidia card.
Which would have no impact if the nvidia is not running.

I cannot speak to your other configuration … but if it wasnt using PRIME, then it was probably using one GPU or the other. Most of the time trying nvidia-only on a hybrid system without extra configuration (like reverse-prime or a BIOS option, etc) would break things.

The iGPU being integrated and thus required for communication with the addon dGPU on some level. Usually meaning some firmware setting if possible at all.

I find it likely you were just never using the nvidia before but didnt realize it.

No, you use intel unless you use prime-run or some other incantation.
(like a script with certain environment variables that would do something similar to prime-run)

Then just do prime-run gimp (or equivalent) when you want the extra power.

I will repeat that if you want to avoid typing this all the time you can copy an existing desktop file and edit it to include prime-run. ex:

cp /usr/share/applications/gimp.desktop ~/.local/share/applications

(then edit the ~/.local/share/applications/gimp.desktop to use prime-run)
And whenever you start gimp from the menu it will use your drop-in desktop file, and thus prime-run.
Another approach would be to use aliases, such as in ~/.bashrc, ex

alias gimp="prime-run gimp"

(now whenever gimp is run, it will be replaced by prime-run gimp)

Again, both of those approaches are for ‘future convenience’ and are not required.

Should just be

sudo mhwd -r pci video-linux

I doubt its hurting anything. Its just not needed.

Ok, I think, I got it now. I think I will edit the files you mentioned to make gimp and some other applications prime-run and the rest can stay as it is now.

Again: Thank’s alot for your support!

Glad its sorted.

(Even if its not quite how you might imagine would be optimal.)

I find most people become rather disappointed with hybrid machines after they get to know them.
I might even say the majority end up swearing to never buy one again. :sweat_smile:

Heres the Archwiki for pretty much everything you would want to know about PRIME:

https://wiki.archlinux.org/title/PRIME

PS.
One more thing. I find these tools largely unnecessary.
But some folks seem to like them.
They would provide you with ‘I want to reboot into nvidia only, intel only, hybrid’ options.
If that sounds good to you then see these tools like envycontrol, which I highly suggest over the alternatives like optimus-manager.

I don’t think it is disappointing. I can always choose wether I want the nvidia or not. Even if I had to type in prime-run every single time I want to start a programm like that I wouldn’t mind, because it will not be that often. I sometimes need it, but I clearly do not want my machine to last less than 3 hours all the time. So for me it is ok the way it is.

Especially for laptops I think its better than being stuck on a heavy nvidia all the time without reason.
But they do bring some headaches. To be fair, a decent share of which is simply nvidia itself.

Please also see my edit I added before seeing this last post. :slight_smile:

I already did that. I do use cinnamon. So I do not know, if that works. At least it is available in the repositories.

It would work, but there would not be a GUI (unless there is one someone made I am not aware of)

ex:
Set graphics mode to nvidia, enable ForceCompositionPipeline and Coolbits with a value of 24:

sudo envycontrol -s nvidia --force-comp --coolbits 24

(then you would need to reboot, and then find yourself in that nvidia-only situation)

Personally I see very little reason to do this, but its obvious many users out there do appreciate that kind of utility, so I felt like making a mention.

1 Like

You won’t believe it:

Of course I had to check out envycontrol. Installed it and tested it.
Switching to nvidia mode → no problem
switching to intel → no problem
switching back to hybrid → blackscreen
:face_with_raised_eyebrow: :rofl:

At that point you wont be best served by me.

I might be able to help undo the things, but only with some research.

If I am to understand you … you installed the envycontrol package, used it a bit with the switch commands, and now switching to hybrid again results in black screen.

Looking at the source (GitHub - bayasdev/envycontrol: Easy GPU switching for Nvidia Optimus laptops under Linux) I note

But most importantly for us

So I might guess

sudo envycontrol --reset

Would be helpful.

If you need help getting interaction with the system then please see this guide (runlevel 3?)

Exactly. But --reset already did the job and I am in hybrid mode and fine again… :slightly_smiling_face:

1 Like

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