Problems getting NVidia driver to work

I am on the unstable branch. Could that be a reason?

Nothing about nvidia was updated btw

well it could be, maybe manjaro didnt rebuild yet the nvidia/kernels …
so there was something updated? was linux61 and linux61-nvidia packages updated?

No nothing about nvidia was updated. Anyway, it works now

❯ inxi -G
Graphics:
  Device-1: Intel Alder Lake-P Integrated Graphics driver: i915 v: kernel
  Device-2: NVIDIA GA107GLM [RTX A1000 Laptop GPU] driver: nvidia
    v: 525.89.02
  Device-3: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo
  Display: x11 server: X.Org v: 21.1.7 driver: X: loaded: modesetting,nvidia
    dri: iris gpu: i915 resolution: 1: 1920x1080~60Hz 2: 1920x1080~60Hz
    3: 1920x1080~60Hz 4: N/A
  API: OpenGL v: 4.6 Mesa 22.3.6 renderer: Mesa Intel Graphics (ADL GT2)

very good, now you can use your nvidia, either by running the prime-run with specific programs, for example:
prime-run firefox
or just switching between gpus using optimus-manager - follow the instructions on the github page on how to modify the sddm.conf, then install optimus:

sudo pacman -S optimus-manager optimus-manager-plasma

reboot and switch via the optimus tray

Great, so can I fully use the NVidia GPU with the Optimus manager or do I have to use the Reverse Prime method from the Arch wiki?

yes you can use nvidia if you switch to it via optimus:

Getting a black screen as described after rebooting unfortunately

did you edited the sddm conf?

Yes

❯ cat /etc/sddm.conf
[General]
InputMethod=
Numlock=none

[Theme]
CursorTheme=breeze_cursors
DisableAvatarsThreshold=7
EnableAvatars=true
FacesDir=/usr/share/sddm/faces
ThemeDir=/usr/share/sddm/themes

[Users]
DefaultPath=/usr/local/sbin:/usr/local/bin:/usr/bin
HideShells=
HideUsers=
RememberLastSession=true
RememberLastUser=true
ReuseSession=false

[Wayland]
EnableHiDPI=false
SessionCommand=/usr/share/sddm/scripts/wayland-session
SessionDir=/usr/share/wayland-sessions
SessionLogFile=.local/share/sddm/wayland-session.log

[X11]
# DisplayCommand=/usr/share/sddm/scripts/Xsetup
# DisplayStopCommand=/usr/share/sddm/scripts/Xstop
EnableHiDPI=false
MinimumVT=1
ServerArguments=-nolisten tcp
ServerPath=/usr/bin/X
SessionCommand=/usr/share/sddm/scripts/Xsession
SessionDir=/usr/share/xsessions
SessionLogFile=.local/share/sddm/xorg-session.log
UserAuthFile=.Xauthority
XauthPath=/usr/bin/xauth
XephyrPath=/usr/bin/Xephyr

post again output from:
find /etc/X11/ -name "*.conf"

and use prime-run with firefox:
prime-run firefox
and check with:
nvidia-smi
if its running on nvidia

❯  find /etc/X11/ -name "*.conf"
/etc/X11/xorg.conf.d/30-touchpad.conf
/etc/X11/xorg.conf.d/00-keyboard.conf
/etc/X11/mhwd.d/nvidia.conf

Tried running Firefox, but seems to not be working

❯ nvidia-smi
Tue Mar  7 11:51:20 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02    Driver Version: 525.89.02    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| 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 RTX A100...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   49C    P8     3W /  35W |      4MiB /  4096MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

Works with glxgears though

❯ nvidia-smi
Tue Mar  7 11:52:24 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02    Driver Version: 525.89.02    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| 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 RTX A100...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   48C    P8     3W /  35W |     12MiB /  4096MiB |      5%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      8100      G   glxgears                            7MiB |
+-----------------------------------------------------------------------------+

should be working also with firefox…
post output from:
cat /etc/X11/mhwd.d/nvidia.conf

Yeah, I already had another Firefox window open. After closing that it also works with Firefox

❯ nvidia-smi
Tue Mar  7 11:55:50 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02    Driver Version: 525.89.02    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| 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 RTX A100...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   50C    P8     6W /  35W |      6MiB /  4096MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      8713      G   ...-browser-integration-host        1MiB |
+-----------------------------------------------------------------------------+
❯  cat /etc/X11/mhwd.d/nvidia.conf
##
## Generated by mhwd - Manjaro Hardware Detection
##

so have no idea why you had a black screen after installing optimus, that shouldnt happened; did you installed only optimus manager and optimus plasma as you should? and no other optional dependencies?

Yeah, there were no other dependencies. Reverse Prime also doesn’t work. I guess I will have to stick to offloading heavier applications the the NVidia GPU

you could try with envycontrol:
pamac build envycontrol
switch to nvidia:
sudo envycontrol -s nvidia
it will prompt you for reboot, so do it, and see if it worked… if not, enter into TTY, and remove it:
sudo pacman -Rs envycontrol
reboot

I tried envycontrol, but it also results in a black screen unfortunately.

then there is something wrong with your system/ nvidia drivers… could be because of you being on unstable… or there is still something messed up from the update … check with:
sudo ldconfig
it should return nothing

Yeah it returns nothing

sddm doesn’t seem to find the monitors

● sddm.service - Simple Desktop Display Manager
     Loaded: loaded (/usr/lib/systemd/system/sddm.service; enabled; preset: disabled)
     Active: active (running) since Tue 2023-03-07 12:55:33 CET; 56s ago
       Docs: man:sddm(1)
             man:sddm.conf(5)
   Main PID: 1225 (sddm)
      Tasks: 2 (limit: 37956)
     Memory: 4.1M
        CPU: 123ms
     CGroup: /system.slice/sddm.service
             └─1225 /usr/bin/sddm

Mär 07 12:55:35 precision5570 sddm[1225]: Failed to read display number from pipe
Mär 07 12:55:35 precision5570 sddm[1225]: Display server stopping...
Mär 07 12:55:35 precision5570 sddm[1225]: Attempt 2 starting the Display server on vt 1 failed
Mär 07 12:55:37 precision5570 sddm[1225]: Display server starting...
Mär 07 12:55:37 precision5570 sddm[1225]: Adding cookie to "/var/run/sddm/{d15b490f-97c4-4901-a8e2-3e74c4889514}"
Mär 07 12:55:37 precision5570 sddm[1225]: Running: /usr/bin/X -nolisten tcp -background none -seat seat0 vt1 -auth /var/run/sddm/{d15b490f-97c4-4901-a8e2-3e74c4889514} -noreset -displayfd 17
Mär 07 12:55:37 precision5570 sddm[1225]: Failed to read display number from pipe
Mär 07 12:55:37 precision5570 sddm[1225]: Display server stopping...
Mär 07 12:55:37 precision5570 sddm[1225]: Attempt 3 starting the Display server on vt 1 failed
Mär 07 12:55:37 precision5570 sddm[1225]: Could not start Display server on vt 1

there is something messed up in your system… but have no idea what…
try reinstalling the video drivers, so remove them:
sudo mhwd -r pci video-hybrid-intel-nvidia-prime
now install them again:
sudo mhwd -a pci nonfree 0300
reboot;
install again optimus as instructed above and see if it helped