Modesetting(G0) didn't appear since 415.xx NVIDIA driver version

I have a notebook CLEVO W150ER with a two GPUs: Intel HD 3000 and NVIDIA GeForce 650M. I’m using NVIDIA PRIME technology since it was appear in 2013 year. I have a lot of operation systems installed on my notebook: Ubuntu 12.04.5, openSUSE 12.3, Gentoo and SteamOS. In all of that systems I’m using this xorg.conf. It was perfectly works before 415.xx driver release. Starting 415.xx, modesetting(G0) device isn’t appearing anymore.

Remember, starting from driver 364.xx, nvidia-drm.ko driver appears. Starting from 364.xx driver version, PRIME configurations needs this driver, else we will not get the “source output” for NVIDIA-O device. So we can’t make a link between GPU’s in this case. We must load nvidia.drm.ko if we’re using PRIME.

This is a Xorg.0.log fragment with 352.xx driver:

(II) config/udev: Adding drm device (/dev/dri/card1)
(II) xfree86: Adding drm device (/dev/dri/card1)
setversion 1.4 failed
(II) config/udev: Adding drm device (/dev/dri/card0)
(II) xfree86: Adding drm device (/dev/dri/card0)
(II) LoadModule: "modesetting"
(II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so
(II) Module modesetting: vendor="X.Org Foundation"
     compiled for 1.14.4, module version = 0.8.0
     Module class: X.Org Video Driver
     ABI class: X.Org Video Driver, version 14.1
(II) UnloadModule: "modesetting"
(II) Unloading modesetting
(II) Failed to load module "modesetting" (already loaded, 0)
(II) modesetting(G0): using drv /dev/dri/card0
(**) modesetting(G0): Depth 24, (--) framebuffer bpp 32
(==) modesetting(G0): RGB weight 888
(==) modesetting(G0): Default visual is TrueColor

And this is a Xorg.0.log fragment with 364.xx driver:

(II) modesetting(1): using drv /dev/dri/card0
(II) modesetting(G0): using drv /dev/dri/card0
(EE) Screen 1 deleted because of no matching config section.
(II) UnloadModule: "modesetting"
...
(II) modesetting(G0): EDID for output LVDS-0
(II) modesetting(G0): Manufacturer: LGD  Model: 365  Serial#: 0
(II) modesetting(G0): Year: 2011  Week: 0
(II) modesetting(G0): EDID Version: 1.4

Starting from 415.xx driver, there is no modesetting(G0) device appears when X-Server starting. I still seeing VT. In xrandr --listproviders there is no “modesetting” device. I’d retest it with 430.xx and 460.xx drivers, and there are no changes.

It’s interesting, but if I unload nvidia-drm.ko driver using “modprobe -r nvidia-drm”, now “modesetting(G0)” appears. xrandr --listproviders shows:

Providers: number : 2
Provider 0: id: 0x2b1 cap: 0x0 crtcs: 0 outputs: 0 associated providers: 0 name:NVIDIA-0
Provider 1: id: 0x46 cap: 0x2, Sink Output crtcs: 3 outputs: 4 associated providers: 0 name:modesetting

I can’t make a link between GPU’s (because nvidia-drm.ko unloaded), but modesetting(G0) appears, and I didn’t see VT, I see blank screen without a backlight.

If I load nvidia-drm.ko, modesetting(G0) didn’t spawning again. The last drivers working for me is 410.xx.

Conclusion

It seems that there is a regression in 415.xx driver. It could be with an old Linux kernels < 4.4.

Please try rearranging your xorg.conf to

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia" 0 0
    Inactive "intel"
EndSection

Section "Monitor"
    Identifier "Monitor0"
    VendorName "Unknown"
    ModelName "Unknown"
    Option "DPMS"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0:2:0"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
EndSection
 
Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Monitor "Monitor0"
    DefaultDepth 24
EndSection

Edit: ironed out some BusID issues.

I’d tried your xorg.conf. Same thing, it doesn’t work. After X-Server starts, I still see virtual terminal.

(II) modesetting(1): using drv /dev/dri/card0
(EE) Screen 1 deleted because of no matching config section.
(II) UnloadModule: "modesetting"

Full log
I need to get something like that:

(II) modesetting(1): using drv /dev/dri/card0
(II) modesetting(G0): using drv /dev/dri/card0
(EE) Screen 1 deleted because of no matching config section.
(II) UnloadModule: "modesetting"
...
(II) modesetting(G0): EDID for output LVDS-0
(II) modesetting(G0): Manufacturer: LGD  Model: 365  Serial#: 0
(II) modesetting(G0): Year: 2011  Week: 0
(II) modesetting(G0): EDID Version: 1.4

Xorg 1.14 is quite ancient,.
Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

Xorg 1.14 is quite ancient,.

PRIME works on Linux ≥ 3.13, X-Server ≥ 1.13, xrandr ≥ 1.4

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

nvidia-bug-report.log.gz (1.1 MB)

Must be a bug in the driver’s support for legacy Xservers. On a current Xserver, the same config is still working.

I’d made a huge upgrade of my X-Server from 1.14.4 to 1.18.4. Now it works. But it works only if NVIDIA config section is below of the Intel section.

Also I see something strange. This is an X-Server 1.16.4 Xorg.0.log:

[   174.028] (II) modesetting(1): using drv /dev/dri/card0
[   174.028] (II) modesetting(G0): using drv /dev/dri/card0
[   174.028] (EE) Screen 1 deleted because of no matching config section.
...
[   174.189] (**) modesetting(G0): Depth 24, (--) framebuffer bpp 32
[   174.189] (==) modesetting(G0): RGB weight 888
[   174.189] (==) modesetting(G0): Default visual is TrueColor

And this is 1.18.4 Xorg.0.log:

[  4519.117] (**) modeset(G0): Depth 24, (--) framebuffer bpp 32
[  4519.117] (**) modeset(G0): Option "AccelMethod" "none"
[  4519.117] (==) modeset(G0): RGB weight 888
[  4519.117] (==) modeset(G0): Default visual is TrueColor
[  4519.117] (**) modeset(G0): glamor disabled

You see? Now it’s called modeset(G0), not modesetting(G0)

I hope than you’ll fix a new driver versions for a legacy X-Server versions.

The dependency of function on section ordering is a bug in the xserver 1.18, this is why I asked you to change the config. Between 1.14 and 1.18, the modesetting driver’s development was changed from standalone to xorg integrated and the log name was shortened.