Xrandr --listproviders lists two times modesetting, NVIDIA-0 missing

Dear Forum,

I am using an Nvidia Optimus card on Ubuntu 20.04.
The integrated GPU (intel) seems to work fine. Drivers for the nvidia card (GeForce GTX 950M) also seem to load.

$ cat /sys/module/nvidia_drm/parameters/modeset
Y

But I can’t get the system in a state to actually use the Nvidia card. (My goal is to use it Nvidia only / performance mode).

inxi -G
Graphics:
Device-1: Intel 4th Gen Core Processor Integrated Graphics driver: i915
v: kernel
Device-2: NVIDIA GM107M [GeForce GTX 950M] driver: nvidia v: 455.45.01
Display: server: X.Org 1.20.8 driver: modesetting
unloaded: fbdev,nouveau,nvidia,vesa
resolution: 1920x1080~60Hz, 1920x1080~60Hz
OpenGL: renderer: Mesa DRI Intel HD Graphics 4600 (HSW GT2)
v: 4.5 Mesa 20.0.8

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x45 cap: 0x0 crtcs: 3 outputs: 3 associated providers: 0 name:modesetting
Provider 1: id: 0xda cap: 0x0 crtcs: 0 outputs: 0 associated providers: 0 name:modesetting

xrandr lists two modesetting providers, which seems odd. According to the forum here, a proper output would be on Nvidia-0 provider and one modesetting.

/var/log/Xorg.0.log
shows one Error:
(EE) Failed to load module “glxservernvidia” (module does not exist, 0)

which again is odd, since the module is called glxserver_nvidia with _

Finally my xorg.conf only works, when I mask the actual nvidia device section.
With nvidia device section, X doesn’t start and I only see a blinking underscore on a black screen.

Here is the full bug report: nvidia-bug-report.log.gz (745.1 KB)

Thanks to generix I was able to get the Performance Mode (NVIDIA-only) working.

The final step was to have no xorg.conf at all and let ubuntu prime-select handle all xorg configuration via files it autogenerates in /usr/share/X11/xorg.conf.d/
After deleting xorg.conf (and a lot of additional steps I’ve already done up to this point) - NVIDIA drivers are working fine now.

For comparison:

$ inxi -G
Graphics:
Device-1: Intel 4th Gen Core Processor Integrated Graphics driver: i915
v: kernel
Device-2: NVIDIA GM107M [GeForce GTX 950M] driver: nvidia v: 455.45.01
Display: server: X.Org 1.20.8 driver: modesetting
unloaded: fbdev,nouveau,nvidia,vesa resolution: 1920x1200~60Hz
OpenGL: renderer: GeForce GTX 950M/PCIe/SSE2 v: 4.6.0 NVIDIA 455.45.01

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x1b8 cap: 0x1, Source Output crtcs: 0 outputs: 0 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x1de cap: 0x6, Sink Output, Source Offload crtcs: 3 outputs: 3 associated providers: 1 name:modesetting

hope this helps others also stumbling at this point!

Cheers and happy winter solstice!

Michael

Could you please elaborate on how you solved this (i.e. list some of the “a lot of additional steps”)? I have a similar issue after an update to Fedora 33.

$ 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: 1 name:modesetting
Provider 1: id: 0xfe cap: 0x2, Sink Output crtcs: 4 outputs: 2 associated providers: 1 name:modesetting

Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

How do I get nvidia-bug-report.sh if I installed through the RPMFusion repo? I can’t seem to find it on my system.

The script should be included in the rpmfusion packages as well. If it’s missing, sounds like some packages went awol on updating. Did you already try to remove/reinstall the driver?
To acquire the script, you can download the runfile installer but only unpack it using the -x option.
https://http.download.nvidia.com/XFree86/Linux-x86_64/465.24.02/

Ok, that was an adventure.

I did not have nvidia-bug-report.sh:

sudo find / -name "nvidia-bug-report.sh" -type f

returned nothing. Something fishy sure happened during the upgrade.

I had already uninstalled, rebooted, and reinstalled several times, from both the rpmfusion and the negavito repos. I downloaded and unpacked the installer, and ran sudo ./nvidia-bug-report.sh, and it hung my system. Thereafter, if I did not remove all nouveau and nvidia related arguments from my boot prompt, my computer would hang at boot time. So I just bit the bullet and installed Fedora 34 fresh, and the driver is working perfectly now.

$ 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: 1 name:modesetting
Provider 1: id: 0x271 cap: 0x2, Sink Output crtcs: 4 outputs: 3 associated providers: 1 name:NVIDIA-G0