So i’ve been configuring my Arch with Nvidia REVERSE PRIME on my Nvidia Optimus Laptop, it has Geforce MX150. I have been following the setup from here and i modified it a little bit, also added a display setup script for lightdm for nvidia output sink. I realized to utilize the Nvidia Prime-run while using REVERSE PRIME setup is actually to have a “virtual screen” running on Nvidia or having an Xorg running on Nvidia.
So here’s the problem, when the computer first boot there’s only one provider that’s available which is the modesetting and there is no Nvidia GPU Screen 0 or NVIDIA-G0 provider and i ran xrandr to check listproviders and there’s only one provider, but everytime i restart lightdm.service that provider or Nvidia GPU Screen 0/NVIDIA-G0 miraculously shows up. So how do i start the computer at the first boot with NVidia GPU Screen 0/NVIDIA-GO shows up on xrandr or there’s xorg running on Nvidia? Is there any extra steps that i need to take like loading a module or someting? Any Solution?
lspci
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
01:00.0 3D controller: NVIDIA Corporation GP108M [GeForce MX150] (rev a1)
First Boot
xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x45 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 3 associated providers: 0 name:modesetting
Nvidia-smi
Wed Dec 9 11:58:26 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 455.45.01 Driver Version: 455.45.01 CUDA Version: 11.1 |
|-------------------------------+----------------------+----------------------+
| 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 GeForce MX150 Off | 00000000:01:00.0 Off | N/A |
| N/A 44C P0 N/A / N/A | 0MiB / 2002MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
Lightdm Restarted after the first boot
xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x45 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 3 associated providers: 0 name:modesetting
Provider 1: id: 0x241 cap: 0x0 crtcs: 0 outputs: 0 associated providers: 0 name:NVIDIA-G0
Nvidia-smi
Wed Dec 9 12:16:20 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 455.45.01 Driver Version: 455.45.01 CUDA Version: 11.1 |
|-------------------------------+----------------------+----------------------+
| 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 GeForce MX150 Off | 00000000:01:00.0 Off | N/A |
| N/A 46C P8 N/A / N/A | 4MiB / 2002MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 5045 G /usr/lib/Xorg 4MiB |
+-----------------------------------------------------------------------------+
Here’s my config
xorg.conf
Section "ServerLayout"
Identifier "layout"
Screen 0 "intel"
Inactive "nvidia"
Option "AllowNVIDIAGPUScreens"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:3:0:0"
Option "AllowEmptyInitialConfiguration"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "AllowEmptyInitialConfiguration"
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
10-nvidia-drm-outputclass.conf
Section "OutputClass"
Identifier "intel"
MatchDriver "i915"
Driver "modesetting"
EndSection
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
Option "PrimaryGPU" "yes"
ModulePath "/usr/lib/nvidia/xorg"
EndSection
lightdm display setup script
#!/bin/sh
xrandr --setprovideroutputsource NVIDIA-G0 modesetting
xrandr --auto
Logs
nvidia-bug-report.log (669.9 KB)