Prime seems to go backwards. Nvidia gpu to iGPU not other way around

Ok, here we go again.

I nearly lost my mind last time trying to deal with this that ended up with me disabling the iGPU and just running on my nvidia.

The problem was I could not get other tty:s to work.
I figured out that if I change tty it went to the hdmi port on my motherboard but never went further because it worked when I disabled the igpu so I left it at that.

But now that I understand a bit more of how manjaro and arch works in this matter I decided to give it another go.

I uninstalled my video-nvidia and installed the hybrid prime closed source drivers, desktop loaded and everything looked fine BUT the issue is still there, only tty2 (used to be tty1, its a bug, I know) works where my desktop gui is. So I tried starting tty3 and connected my hdmi output to that and yepp, it’s there. installed nvidia-settings in the tty because that apparently does not come with the mhwd installation and rebooted AND FORGOT I WAS ON THE IGPU HDMI.
Edit. Is it a bug nvidia-settings is not installed with mhwd?

For some reason video-linux also got installed, but that might have been because I had to removed the old drivers before installing hybrid, and that forced them to be installed because then the computer was without video drivers?
Should I uninstall them?

mhwd -li
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI
video-hybrid-amd-nvidia-prime            2023.03.23               false            PCI

Rebooted fine, logged in to my desktop and tried other tty and nothing, but the screen did not turn black like it did before, so I pressed oter tty:s a couple of times and BOOM, it worked. I then realized I had forgotten that I was on my igpu hdmi port. Sometimes I have to press the same F-key multiple times for the tty to “wake up”.

BUT, here is the strange part. I have read up on reverse prime and all that so I tried to reverse it back but that ended up in no desktop so I restored my snapshot (I so regret not saving the logs from this).

So I was back at using the igpu htmi on my desktop, and prime-run shows that I run on nvidia, so I tried a game on steam and YES!! It works this way!!!

My nvidia.conf is completely empty, apparently nothing is needed in there (I do not care about the coolbits and all that so I guess it’s fine, I just leave it like that)

Things I need help with.

  1. I would prefer to change back to my gpu hdmi, but can not for my life understand in what order I should do things. xrandr confuses the crap out of me. I think I should do this? But can’t figure out how. Or should I do this? Also very confused about what to do on that page.
    Edit. Trying to figure this out was what broke my desktop so I restored a snapshot that I mentioned earlier, that’s when I decided to write this post.

  2. if point 1 is not doable. I have a constant static noise when playing sound on my hdmi this way. I found some posts about it but all of them says their noise stops after a few seconds, mine doesn’t. Only on iGPU hdmi, not other outputs. On my nvidia hdmi this was not an issue. Is pipewire the only solution here you think?
    Edit, yes, pipewire solves this.

  3. What will happen when I get my new monitor and connect it to my gpu, I only have one igpu hdmi you know. I want to be ahead, will that break everything?

All below is from me on the iGPU hdmi.

System:
  Kernel: 6.4.6-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-6.4-x86_64
    root=UUID=700d034d-b99a-482b-880b-9060acf3a6b3 rw rootflags=subvol=@
    nvidia_drm.modeset=1 resume=UUID=5ae8fbf5-a704-41ea-be6d-bf26b38325ed
    udev.log_priority=3
  Desktop: KDE Plasma v: 5.27.6 tk: Qt v: 5.15.10 wm: kwin_x11 vt: 2 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop System: Gigabyte product: X670 AORUS ELITE AX v: -CF
    serial: <superuser required>
  Mobo: Gigabyte model: X670 AORUS ELITE AX v: x.x
    serial: <superuser required> UEFI: American Megatrends LLC. v: F10a
    date: 06/07/2023
CPU:
  Info: model: AMD Ryzen 9 7900X bits: 64 type: MT MCP arch: Zen 4 gen: 5
    level: v4 note: check built: 2022+ process: TSMC n5 (5nm) family: 0x19 (25)
    model-id: 0x61 (97) stepping: 2 microcode: 0xA601203
  Topology: cpus: 1x cores: 12 tpc: 2 threads: 24 smt: enabled cache:
    L1: 768 KiB desc: d-12x32 KiB; i-12x32 KiB L2: 12 MiB desc: 12x1024 KiB
    L3: 64 MiB desc: 2x32 MiB
  Speed (MHz): avg: 3406 high: 5436 min/max: 3000/5733 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 3000 2: 3000
    3: 2721 4: 3000 5: 3000 6: 5436 7: 3000 8: 3000 9: 3000 10: 3000 11: 3592
    12: 3000 13: 4903 14: 3000 15: 3000 16: 3000 17: 3000 18: 3000 19: 4700
    20: 4700 21: 3000 22: 3000 23: 3000 24: 4700 bogomips: 225283
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  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_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: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GA102 [GeForce RTX 3090] vendor: eVga.com. driver: nvidia
    v: 535.86.05 alternate: nouveau,nvidia_drm non-free: 535.xx+
    status: current (as of 2023-07) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s ports: active: none empty: DP-1,
    DP-2, DP-3, HDMI-A-1 bus-ID: 01:00.0 chip-ID: 10de:2204 class-ID: 0300
  Device-2: AMD Raphael vendor: Gigabyte driver: amdgpu v: kernel
    arch: RDNA-2 code: Navi-2x process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4
    speed: 16 GT/s lanes: 16 ports: active: HDMI-A-2 empty: DP-4,DP-5,DP-6
    bus-ID: 15:00.0 chip-ID: 1002:164e class-ID: 0300 temp: 53.0 C
  Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.2
    compositor: kwin_x11 driver: X: loaded: amdgpu,nvidia
    unloaded: modesetting,nouveau alternate: fbdev,nv,vesa dri: radeonsi
    gpu: amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: HDMI-A-2 mapped: HDMI-A-1 model: Asus VX279 serial: <filter>
    built: 2015 res: 1920x1080 hz: 60 dpi: 79 gamma: 1.2
    size: 621x341mm (24.45x13.43") diag: 690mm (27.2") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  API: OpenGL v: 4.6 Mesa 23.1.4 renderer: AMD Radeon Graphics
    (raphael_mendocino LLVM 15.0.7 DRM 3.52 6.4.6-1-MANJARO) direct-render: Yes
Audio:
  Device-1: NVIDIA GA102 High Definition Audio vendor: eVga.com.
    driver: snd_hda_intel v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s bus-ID: 01:00.1 chip-ID: 10de:1aef
    class-ID: 0403
  Device-2: AMD Rembrandt Radeon High Definition Audio driver: snd_hda_intel
    v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 15:00.1
    chip-ID: 1002:1640 class-ID: 0403
  Device-3: AMD Family 17h/19h HD Audio vendor: Gigabyte
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 15:00.6 chip-ID: 1022:15e3 class-ID: 0403
  API: ALSA v: k6.4.6-1-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: 0.3.75 status: off with: wireplumber status: active
    tools: pw-cli,wpctl
  Server-3: PulseAudio v: 16.1 status: active with: pulseaudio-alsa
    type: plugin tools: pacat,pactl
Network:
  Device-1: Realtek RTL8125 2.5GbE vendor: Gigabyte driver: r8169 v: kernel
    pcie: gen: 2 speed: 5 GT/s lanes: 1 port: e000 bus-ID: 0e:00.0
    chip-ID: 10ec:8125 class-ID: 0200
  IF: enp14s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: MEDIATEK MT7922 802.11ax PCI Express Wireless Network Adapter
    driver: mt7921e v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1 bus-ID: 0f:00.0
    chip-ID: 14c3:0616 class-ID: 0280
  IF: wlp15s0 state: down mac: <filter>
Bluetooth:
  Device-1: MediaTek Wireless_Device driver: btusb v: 0.8 type: USB rev: 2.1
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-7:5 chip-ID: 0e8d:0616
    class-ID: e001 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: see --recommends
Drives:
  Local Storage: total: 4.09 TiB used: 1.56 TiB (38.1%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 980 PRO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 5B2QGXA7 temp: 47.9 C
    scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 500GB
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 4B6Q scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 vendor: Western Digital
    model: WD30EFRX-68EUZN0 size: 2.73 TiB block-size: physical: 4096 B
    logical: 512 B speed: 6.0 Gb/s tech: HDD rpm: 5400 serial: <filter>
    fw-rev: 0A80 scheme: GPT
Partition:
  ID-1: / raw-size: 122 GiB size: 122 GiB (100.00%) used: 80.32 GiB (65.8%)
    fs: btrfs dev: /dev/sda7 maj-min: 8:7
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
    used: 292 KiB (0.1%) fs: vfat dev: /dev/sda5 maj-min: 8:5
  ID-3: /home raw-size: 104.53 GiB size: 104.53 GiB (100.00%)
    used: 46.05 GiB (44.1%) fs: btrfs dev: /dev/sda8 maj-min: 8:8
  ID-4: /var/log raw-size: 122 GiB size: 122 GiB (100.00%)
    used: 80.32 GiB (65.8%) fs: btrfs dev: /dev/sda7 maj-min: 8:7
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 38 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/sda6 maj-min: 8:6
Sensors:
  System Temperatures: cpu: 62.2 C mobo: N/A gpu: amdgpu temp: 53.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 453 Uptime: 46m wakeups: 0 Memory: total: 32 GiB note: est.
  available: 30.5 GiB used: 4.83 GiB (15.8%) Init: systemd v: 253
  default: graphical tool: systemctl Compilers: gcc: 13.1.1 clang: 15.0.7
  Packages: pm: pacman pkgs: 1528 libs: 421 tools: pamac,yay pm: flatpak
  pkgs: 0 Shell: Zsh v: 5.9 default: Bash v: 5.1.16 running-in: yakuake
  inxi: 3.3.28
xrandr --listproviders                                                                                                                                                                               ✔ 
Providers: number : 2
Provider 0: id: 0x56 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 4 associated providers: 1 name:AMD Radeon Graphics @ pci:0000:15:00.0
Provider 1: id: 0x20f cap: 0x2, Sink Output crtcs: 4 outputs: 7 associated providers: 1 name:NVIDIA-G0
glxinfo | grep "OpenGL renderer"
OpenGL renderer string: AMD Radeon Graphics (raphael_mendocino, LLVM 15.0.7, DRM 3.52, 6.4.6-1-MANJARO)

prime-run glxinfo | grep "OpenGL renderer"
OpenGL renderer string: NVIDIA GeForce RTX 3090/PCIe/SSE2

In short (again :face_exhaling:):

The proprietary driver has limitations when it comes to KMS. 1. It is disabled and 2. experimental. Use it at your own risk.

If you are now running your iGPU as a display and can prime-run the dGPU, then you have 0 access to the Nvidia card’s output connections (see above for why). Even if KMS is enabled, it still assumes it is the only one here and cannot interact with other cards, not like you would use INTEL + AMD (both open source), where it works out-of-the-box,

To get access to the Nvidia card’s output connections, you need to switch to the Nvidia card. This is done in Xorg by a so-called Prime-Reverse Configuration, where the image is then rendered on Nvidia, copied to the iGPU via the CPU and then displayed on the iGPU screen.

If you have a AMD + NVIDIA combination, then you have even more limitations.

1 Like

Yes, this was what I was suspecting as I mentioned in the OP, I am just VERY confused as to witch of the things I needed to do (prime synchronization, reverse rime or prime… Or all of them), they all kinda describe the same thing.
But following your answer I will go for the reverse prime and try to figure it out. This was what made my computer not boot last time, because I cant figure out what everything means.

Could someone help me interpret the wiki, they state:

If the second GPU has outputs that are not accessible by the primary GPU, you can use Reverse PRIME to make use of them. This will involve using the primary GPU to render the images, and then pass them off to the second GPU.

But to me, in that wiki, it is unclear as to witch of the gpu:s they consider primary and second gpu in their example.
Please help me understand.

In that arch wiki the last line is:

When this is done, the discrete card’s outputs should be available in xrandr, and you could do something like:
$ xrandr --output HDMI-1 --auto --above LVDS1

What is LVDS1? I cant figure that out. Is it the monitor they mean?
My xrander calls my monitor screen 0, should that be what I point it to?

xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
HDMI-A-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 621mm x 341mm
   1920x1080     60.00*+  50.00    59.94  
   1680x1050     59.88  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1280x800      60.00  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1440x576      50.00  
   1024x768      75.03    70.07    60.00  
   1440x480      60.00    59.94  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
DisplayPort-3 disconnected (normal left inverted right x axis y axis)
DisplayPort-4 disconnected (normal left inverted right x axis y axis)
DisplayPort-5 disconnected (normal left inverted right x axis y axis)
HDMI-1-0 disconnected (normal left inverted right x axis y axis)
DP-1-0 disconnected (normal left inverted right x axis y axis)
DP-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-2 disconnected (normal left inverted right x axis y axis)
DP-1-3 disconnected (normal left inverted right x axis y axis)
DP-1-4 disconnected (normal left inverted right x axis y axis)
DP-1-5 disconnected (normal left inverted right x axis y axis)

Last time I tried (and failed) also only had one HDMI showing in xrander --prop when doing this when I had the hdmi connected to the nvidia hdmi, but now also HDMI-A-1 is showing, so that might have been a reason it failed.

I still have timeshift so I’m not particularly worried, but I rather ask about something I don’t understand than having to restore a snapshot multiple times when trying. :frowning:

I really do understand this is not “supported” but I feel I am sooooo close to getting this fixed, I just need to understand what they want from me.

Edit
Should I uninstall the video-linux that got installed by themselves?
And is it a bug that nvidia-settings are not getting installed with mhwd -i? (nvidia-settings was removed when uninstalling with mhwd at least, good thing I had my config files backed up :open_mouth: )

Default: Your integrated GPU is the primary one and the dedicated GPU is the second one.

Now, to make use of the outputs of the dedicated gpu, you have to make this gpu the primary one and the integrated gpu the second one.

That is an old connection type, just like HDMI, DP or eDP etc.

There is no other type connected, thus cannot be used.

Maybe better take look at this tool: GitHub - Askannz/optimus-manager: A Linux program to handle GPU switching on Optimus laptops. which handles the xorg configuration for you. It might be too difficult for to do this manually.

It is also in the repos:

pamac install optimus-manager-qt 

I tried that a few months ago, but since I am on a desktop the program did not want to play nice with me.

But I think I have enough information now, the LVDS1 really helped me. I tried to google that but only found things about monitors, that’s why I got so confused.
I will make an img backup before starting to play with this, you “never know”, I dont want to rely 100% on snapshots for this.

THANK YOU FROM THE BOTTOM OF MY HEART!
Sometimes you just need a dude with a bigger linux beard to hold your hand and sing a lullaby, just like you did. :hearts:

I will report back how I got this solved, If I can. Otherwise I will return with a “I love you anyway” rant. xD

Edit
You probably don’t know and that is why you didn’t answer so I keep posting the questions and maybe someone else knows:

Should I uninstall the video-linux that got installed by themselves?
And is it a bug that nvidia-settings are not getting installed with mhwd -i? (nvidia-settings was removed when uninstalling with mhwd at least, good thing I had my config files backed up :open_mouth: )

Edit 2
And is it correct that when you install with mhwd the question “do you want to continue with the installation” is reponded with a “Y” automatically without me having a choice after starting the install?

No. This mhwd config contains the amdgpu driver for xorg.

No, it was separated.

Yes, mhwd is a helper script/app, which make use of --no-confirm parameter as always on scripts.

That is a bit old, but maybe it helps. Just replace radeon with amdgpu (since that is your driver).

1 Like

It should be installed by default. Logs, please.

@Yochanan It was a “while” ago (read yesterday xD), and not sure how to find the actual logs from mhwd. but here are the pacman logs from when I think was when I installed it. At least it is the first mention of nvidia prime: ( I ran an update before uninstalling ofc, hence the first upgrade)
I removed with sudo mhwd -r pci video-nvidia
And then installed with sudo mhwd -i pci video-hybrid-amd-nvidia-prime

cat /var/log/pacman.log | grep -i nvidia
[2023-07-25T19:16:18+0200] [ALPM] upgraded linux61-nvidia (535.86.05-3 -> 535.86.05-4)
[2023-07-25T19:16:21+0200] [ALPM] upgraded linux64-nvidia (535.86.05-3 -> 535.86.05-4)
[2023-07-25T19:17:15+0200] [ALPM] running '90-nvidia-utils.hook'...
[2023-07-25T19:19:06+0200] [PACMAN] Running 'pacman --noconfirm --cachedir /var/cache/pacman/pkg --config /etc/pacman.conf --root / -Rs nvidia-utils nvidia-settings libxnvctrl lib32-nvidia-utils linux61-nvidia linux64-nvidia'
[2023-07-25T19:19:06+0200] [ALPM] removed linux64-nvidia (535.86.05-4)
[2023-07-25T19:19:07+0200] [ALPM] removed linux61-nvidia (535.86.05-4)
[2023-07-25T19:19:07+0200] [ALPM] removed lib32-nvidia-utils (535.86.05-1)
[2023-07-25T19:19:07+0200] [ALPM] removed nvidia-settings (535.86.05-1)
[2023-07-25T19:19:07+0200] [ALPM] removed nvidia-utils (535.86.05-1)
[2023-07-25T19:19:15+0200] [PACMAN] Running 'pacman --noconfirm --cachedir /var/cache/pacman/pkg --config /etc/pacman.conf --root / --needed -S nvidia-utils libxnvctrl nvidia-prime lib32-nvidia-utils linux61-nvidia linux64-nvidia'
[2023-07-25T19:19:17+0200] [ALPM] installed nvidia-utils (535.86.05-1)
[2023-07-25T19:19:17+0200] [ALPM-SCRIPTLET] If you run into trouble with CUDA not being available, run nvidia-modprobe first.
[2023-07-25T19:19:17+0200] [ALPM-SCRIPTLET] If you use GDM on Wayland, you might have to run systemctl enable --now nvidia-resume.service
[2023-07-25T19:19:17+0200] [ALPM] installed nvidia-prime (1.0-4)
[2023-07-25T19:19:17+0200] [ALPM] installed lib32-nvidia-utils (535.86.05-1)
[2023-07-25T19:19:17+0200] [ALPM] installed linux61-nvidia (535.86.05-4)
[2023-07-25T19:19:19+0200] [ALPM] installed linux64-nvidia (535.86.05-4)
[2023-07-25T19:19:21+0200] [ALPM] running '90-nvidia-utils.hook'...
[2023-07-25T19:20:03+0200] [PACMAN] Running 'pacman --noconfirm --cachedir /var/cache/pacman/pkg --config /etc/pacman.conf --root / -D --asexplicit nvidia-utils libxnvctrl nvidia-prime lib32-nvidia-utils linux61-nvidia linux64-nvidia'

It only seems to install nvidia-utils libxnvctrl nvidia-prime lib32-nvidia-utils linux61-
nvidia linux64-nvidia. Maybe it’s upposed to be included in nvidia-utils?

sudo pacman -Qs nvidia                                                                                                                                                                               ✔ 
local/egl-wayland 2:1.1.12-1
    EGLStream-based Wayland external platform
local/lib32-libvdpau 1.5-1
    Nvidia VDPAU library
local/lib32-nvidia-utils 535.86.05-1
    NVIDIA drivers utilities (32-bit)
local/lib32-opencl-nvidia 535.86.05-1
    OpenCL implemention for NVIDIA (32-bit)
local/libvdpau 1.5-1
    Nvidia VDPAU library
local/libxnvctrl 535.86.05-1
    NVIDIA NV-CONTROL X extension
local/linux61-nvidia 535.86.05-4 (linux61-extramodules)
    NVIDIA drivers for linux
local/linux64-nvidia 535.86.05-4 (linux64-extramodules)
    NVIDIA drivers for linux
local/mhwd-nvidia 535.86.05-1
    MHWD module-ids for nvidia 535.86.05
local/mhwd-nvidia-390xx 390.157-7
    MHWD module-ids for nvidia 390.157
local/mhwd-nvidia-470xx 470.199.02-2
    MHWD module-ids for nvidia 470.199.02
local/nvidia-prime 1.0-4
    NVIDIA Prime Render Offload configuration and utilities
local/nvidia-utils 535.86.05-1
    NVIDIA drivers utilities
local/opencl-nvidia 535.86.05-1
    OpenCL implemention for NVIDIA
local/xf86-video-nouveau 1.0.17-2 (xorg-drivers)
    Open Source 3D acceleration driver for nVidia cards

Edit
I reverted back to directly after this install and NOT installing nvidia-settings, because I wanted to be as “clean” as possible, and since I don’t really “need” it as of now. If you were wondering where it went after me stating I installed it.

Edit 2
Maybe good with a fresh inxi as well so you know where I am exactly at this point. Have not gotten into anything further right now, I am still reading up on stuff before doing the actual “work”.
Still on the iGpu as of now, since it works “perfectly” here. xD

inxi -Fazy                                                                                                                                                                                           ✔ 
System:
  Kernel: 6.4.6-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-6.4-x86_64
    root=UUID=700d034d-b99a-482b-880b-9060acf3a6b3 rw rootflags=subvol=@
    nvidia_drm.modeset=1 resume=UUID=5ae8fbf5-a704-41ea-be6d-bf26b38325ed
    udev.log_priority=3
  Desktop: KDE Plasma v: 5.27.6 tk: Qt v: 5.15.10 wm: kwin_x11 vt: 2 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop System: Gigabyte product: X670 AORUS ELITE AX v: -CF
    serial: <superuser required>
  Mobo: Gigabyte model: X670 AORUS ELITE AX v: x.x
    serial: <superuser required> UEFI: American Megatrends LLC. v: F10a
    date: 06/07/2023
CPU:
  Info: model: AMD Ryzen 9 7900X bits: 64 type: MT MCP arch: Zen 4 gen: 5
    level: v4 note: check built: 2022+ process: TSMC n5 (5nm) family: 0x19 (25)
    model-id: 0x61 (97) stepping: 2 microcode: 0xA601203
  Topology: cpus: 1x cores: 12 tpc: 2 threads: 24 smt: enabled cache:
    L1: 768 KiB desc: d-12x32 KiB; i-12x32 KiB L2: 12 MiB desc: 12x1024 KiB
    L3: 64 MiB desc: 2x32 MiB
  Speed (MHz): avg: 3070 high: 4700 min/max: 3000/5733 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 3000 2: 3000
    3: 3000 4: 3000 5: 3000 6: 3000 7: 3000 8: 3000 9: 3000 10: 3000 11: 3000
    12: 3000 13: 3000 14: 3000 15: 3000 16: 3000 17: 3000 18: 3000 19: 4700
    20: 3000 21: 3000 22: 3000 23: 3000 24: 3000 bogomips: 225243
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  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_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: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GA102 [GeForce RTX 3090] vendor: eVga.com. driver: nvidia
    v: 535.86.05 alternate: nouveau,nvidia_drm non-free: 535.xx+
    status: current (as of 2023-07) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s ports: active: none empty: DP-1,
    DP-2, DP-3, HDMI-A-1 bus-ID: 01:00.0 chip-ID: 10de:2204 class-ID: 0300
  Device-2: AMD Raphael vendor: Gigabyte driver: amdgpu v: kernel
    arch: RDNA-2 code: Navi-2x process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4
    speed: 16 GT/s lanes: 16 ports: active: HDMI-A-2 empty: DP-4,DP-5,DP-6
    bus-ID: 15:00.0 chip-ID: 1002:164e class-ID: 0300 temp: 50.0 C
  Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.2
    compositor: kwin_x11 driver: X: loaded: amdgpu,nvidia
    unloaded: modesetting,nouveau alternate: fbdev,nv,vesa dri: radeonsi
    gpu: amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: HDMI-A-2 mapped: HDMI-A-1 model: Asus VX279 serial: <filter>
    built: 2015 res: 1920x1080 hz: 60 dpi: 79 gamma: 1.2
    size: 621x341mm (24.45x13.43") diag: 690mm (27.2") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  API: OpenGL v: 4.6 Mesa 23.1.4 renderer: AMD Radeon Graphics
    (raphael_mendocino LLVM 15.0.7 DRM 3.52 6.4.6-1-MANJARO) direct-render: Yes
Audio:
  Device-1: NVIDIA GA102 High Definition Audio vendor: eVga.com.
    driver: snd_hda_intel v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s bus-ID: 01:00.1 chip-ID: 10de:1aef
    class-ID: 0403
  Device-2: AMD Rembrandt Radeon High Definition Audio driver: snd_hda_intel
    v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 15:00.1
    chip-ID: 1002:1640 class-ID: 0403
  Device-3: AMD Family 17h/19h HD Audio vendor: Gigabyte
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 15:00.6 chip-ID: 1022:15e3 class-ID: 0403
  API: ALSA v: k6.4.6-1-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: 0.3.75 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8125 2.5GbE vendor: Gigabyte driver: r8169 v: kernel
    pcie: gen: 2 speed: 5 GT/s lanes: 1 port: e000 bus-ID: 0e:00.0
    chip-ID: 10ec:8125 class-ID: 0200
  IF: enp14s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: MEDIATEK MT7922 802.11ax PCI Express Wireless Network Adapter
    driver: mt7921e v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1 bus-ID: 0f:00.0
    chip-ID: 14c3:0616 class-ID: 0280
  IF: wlp15s0 state: down mac: <filter>
Bluetooth:
  Device-1: MediaTek Wireless_Device driver: btusb v: 0.8 type: USB rev: 2.1
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-7:5 chip-ID: 0e8d:0616
    class-ID: e001 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: see --recommends
Drives:
  Local Storage: total: 4.09 TiB used: 1.56 TiB (38.1%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 980 PRO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 5B2QGXA7 temp: 47.9 C
    scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 500GB
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 4B6Q scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 vendor: Western Digital
    model: WD30EFRX-68EUZN0 size: 2.73 TiB block-size: physical: 4096 B
    logical: 512 B speed: 6.0 Gb/s tech: HDD rpm: 5400 serial: <filter>
    fw-rev: 0A80 scheme: GPT
Partition:
  ID-1: / raw-size: 122 GiB size: 122 GiB (100.00%) used: 79.37 GiB (65.1%)
    fs: btrfs dev: /dev/sda7 maj-min: 8:7
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
    used: 292 KiB (0.1%) fs: vfat dev: /dev/sda5 maj-min: 8:5
  ID-3: /home raw-size: 104.53 GiB size: 104.53 GiB (100.00%)
    used: 46.09 GiB (44.1%) fs: btrfs dev: /dev/sda8 maj-min: 8:8
  ID-4: /var/log raw-size: 122 GiB size: 122 GiB (100.00%)
    used: 79.37 GiB (65.1%) fs: btrfs dev: /dev/sda7 maj-min: 8:7
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 38 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/sda6 maj-min: 8:6
Sensors:
  System Temperatures: cpu: 55.8 C mobo: N/A gpu: amdgpu temp: 51.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 489 Uptime: 6h 57m wakeups: 0 Memory: total: 32 GiB note: est.
  available: 30.5 GiB used: 6.8 GiB (22.3%) Init: systemd v: 253
  default: graphical tool: systemctl Compilers: gcc: 13.1.1 clang: 15.0.7
  Packages: pm: pacman pkgs: 1531 libs: 423 tools: pamac,yay pm: flatpak
  pkgs: 0 Shell: Zsh v: 5.9 default: Bash v: 5.1.16 running-in: yakuake
  inxi: 3.3.28

And why not:

mhwd -li                                                                                                                                                                                             ✔ 
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI
video-hybrid-amd-nvidia-prime            2023.03.23               false            PCI


Warning: No installed USB configs!

Looks like its using the amd by default.
But … you know … run the things …

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

I know, you can read the output in OP. But it is working in REVERSE, that is the problem.
Ie, I have my monitor connected to the iGPU, not the eGpu… :joy:

I remember when people were making fun of windows users for having a super expensive GPU and connecting the hdmi to the motherboard hence never getting access to the power of the gpu. That’s how I am using my computer now, and I CAN get access to my nvidia, I know, because I just played Control in with full fledged raytracing in 120fps,
Apparently that is how I am SUPPOSED to do it on linux… (Joking)

But I won’t give up, I will come back with a clean “instruction” on how to do it, If it actually works since I rely on the closed source drivers.

But this isnt the original post … this is later when you have undone changes … shown a new inxi … where, for example …

dri: radeonsi
    gpu: amdgpu display-ID: :0 screens: 1

Which seems to show it not working in reverse …

So I want to see glxinfo with and without prime-run.

It does, everything runs on my amd igpu unless I call prime-run.

…then … how … is that reverse ?
Thats regular, expected, normal …

Is it? Is it “normal” to have to connect to my igpu to be able to switch tty?
Is it “normal” to have to connect to igpu hdmi to trasfer egpu on a desktop computer? xD

That means it’s “normal” to never be able to connect more than one monitor. xD

It thinks it should be installed by default, that’s why it’s removing it.

Well, one way is installing the profile and seeing what gets installed. Of course, you’ll have to remove it first:

sudo mhwd -r pci video-nvidia
sudo mhwd -i pci video-nvidia

EDIT: Corrected MHWD commands

… sorta … yes.

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

What do you mean? I had video-nvidia installed, If I tried to install prime it told me to remove them, so I did and THEN installed video-hybrid-amd-nvidia-prime

Are you saying I have to remove video-nvidia, install prime, remove prime and then reinstall?

I was going by your mhwd -li output above. Looking closer, I see this is a desktop, not a laptop. You do not need the hybrid profile.

EDIT: Forgot to mention I edited the MHWD commands above.

Ooooh, now I see what you mean. Are you saying that I can use video-nvidia and still get the prime thing working? Are you sure.
This driver is listed with mhwd -l

mhwd -l                                                                                                                                                                                              ✔ 
> 0000:01:00.0 (0300:10de:2204) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-amd-nvidia-prime            2023.03.23               false            PCI
video-hybrid-amd-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
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> 0000:15:00.0 (0300:1002:164e) Display controller ATI Technologies Inc:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-amd-nvidia-prime            2023.03.23               false            PCI
video-hybrid-amd-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

That assumes there is actually anything in that file, witch there is not.
Look, I have things I will try before jumping to any conclusions. But to me it seems obvious this behavior is not the “normal” one.
I will make sure reverse prime is set correctly f.ex, as of this moment I do not think it is.

I will report back after doing what I was adviced doing, but I want to be perfectly prepared for when I do it.
Just give me until tomorrow or the day after, it is working stable now, I don’t want to rush into anything.

No. I was only chiming in because you said you noticed nvidia-settings wasn’t being installed by default using MHWD. I suggested removing then installing whatever MHWD profile you have installed so that you could see if nvidia-settings was installed in the process. None of this is related to your topic subject.