Nvidia driver 435.17 worked, 435.21 gives black screen [solved]

Hi all -

Using nvidia-drivers on gentoo, 5.2.10 kernel. Everything worked great on 435.17 using the following xorg config on my HP Envy laptop:

Section “ServerLayout”
Identifier “layout”
Screen 0 “nvidia”
Inactive “intel”

Section “Device”
Identifier “nvidia”
Driver “nvidia”
BusID “2:0:0”

Section “Screen”
Identifier “nvidia”
Device “nvidia”
Option “AllowEmptyInitialConfiguration”

Section “Device”
Identifier “intel”
Driver “modesetting”

Section “Screen”
Identifier “intel”
Device “intel”

Section “Module”
Load “dbe”

This should be the correct configuration. I know this isn’t all the info needed, just let me know what else to post. I am just interested in rendering with the dGPU. Not concerned about batteries, whatnot.


Which DM/DE? How do you run the necessary xrandr commands?
Please run nvidia-bug-report.sh as root and attach the resulting .gz file to your post. Hovering the mouse over an existing post of yours will reveal a paperclip icon.

I use i3 and run from startx - here is my .xinitrc:

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

#exec /usr/bin/startfluxbox
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources

exec i3

The bug report is attached.

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

For what it is worth, here is the log generated from my system with everything seemingly working…
nvidia-bug-report-435.17.log.gz (1.12 MB)

The kernel driver is incorrectly installed:

[   56.414078] nvidia-modeset: Version mismatch: nvidia.ko(435.21) nvidia-modeset.ko(435.17)
[   56.965812] nvidia-modeset: Version mismatch: nvidia.ko(435.21) nvidia-modeset.ko(435.17)

So you’re running half 435.17 and half 435.21.
Please post the output of
emerge -pv nvidia-drivers

Ahhh - that was it - I accidentally disabled kms but never uninstalled - so when it rebuilt later, it kept the old modeset module. I got them all synced up and everything works fine now. Nice catch - thanks!