Xorg.conf on red hat VM with passtrough Nvidia GPU

Hi,

I have a Red Hat 8.9 VM that has a virtual graphic card and a Nvidia GPU, passtrough by the ESXi server.
My goal would be, that as a first step, I can open the VM with my VMware Workstation and the GUI is powered by the Nvidia GPU. E.g., when I start the nvidia-settings I see the X tab and can configure displays.

After a lot of experimentation, I think I am close.
Maybe somebody can give me a hint, if I have somewhere a misconception.

Experiment 1: Good, but nvidia-settings not working

Deleted /etc/X11/xorg.conf
Keep /etc/X11/xorg.conf.d/10-nvidia.conf

Section “OutputClass”
Identifier “nvidia”
MatchDriver “nvidia-drm”
Driver “nvidia”
Option “AllowEmptyInitialConfiguration”
ModulePath “/usr/lib/nvidia/xorg”
ModulePath “/usr/lib/xorg/modules”
Option “SLI” “Auto”
Option “BaseMosaic” “on”
EndSection

Section “OutputClass”
Identifier “intel”
MatchDriver “i915”
Driver “modesetting”
EndSection

Result:

OK: I can login.

OK: nvidia-smi outputs that xorg is started

OK: I can start firefox and assign it to GPU
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia firefox

NOT OK: nvidia-settings doesn’t show the X-Window configuration

NOT OK:
I would expect the Nvidia GPU to be used for “Grafik”. Not llvmipipe
redhat_system_overview

Experiment 2: Result of nvidia-xconfig => Total strange behaviour

I created with nvidia-xconfig a xorg.conf file.

Result:

(same as in experiment 1)
OK: I can login.
OK: nvidia-smi outputs that xorg is started
NOT OK:
I would expect the Nvidia GPU to be used for “Grafik”. Not llvmipipe.

(new behaviour)
OK: nvidia-settings shows me the X-Window part

NOT OK:
The mouse is acting completely strange. When I click, then there is a big offset.
Like… I click in the left upper corner, and the context menu is shown.
If I move the cursor into the second half of the monitor, the cursor is vanishing.

Here the /etc/X11/xorg.conf

nvidia-xconfig: X configuration file generated by nvidia-xconfig
nvidia-xconfig: version 535.154.05

Section “ServerLayout”
Identifier “Layout0”
Screen 0 “Screen0”
InputDevice “Keyboard0” “CoreKeyboard”
InputDevice “Mouse0” “CorePointer”
EndSection

Section “Files”
EndSection

Section “InputDevice”
# generated from default
Identifier “Mouse0”
Driver “mouse”
Option “Protocol” “auto”
Option “Device” “/dev/input/mice”
Option “Emulate3Buttons” “no”
Option “ZAxisMapping” “4 5”
EndSection

Section “InputDevice”
# generated from default
Identifier “Keyboard0”
Driver “kbd”
EndSection

Section “Monitor”
Identifier “Monitor0”
VendorName “Unknown”
ModelName “Unknown”
Option “DPMS”
EndSection

Section “Device”
Identifier “Device0”
Driver “nvidia”
VendorName “NVIDIA Corporation”
BusID “PCI:3:0:0”
Option “ModeDebug” “True”
Option “SidebandSocketPath” “/nvidia-xdriver”
EndSection

Section “Screen”
Identifier “Screen0”
Device “Device0”
Monitor “Monitor0”
DefaultDepth 24
SubSection “Display”
Depth 24
EndSubSection
EndSection

For Experiment 2 I added the output of the nvidia-bug-report.sh

nvidia-bug-report.log.gz (247.1 KB)