Nvidia 440 doesn't load at boot on Linux Mint 20 with GeForce 940MX

Hi there,

I run Linux Mint 20 with the recommended Nvidia driver v440 on a dual boot ThinkPad T570 with an external display attached. Half the time the Nvidia driver loads properly at boot, but every second or third time it doesn’t. I cannot tell when it would fail, it seems completely random when it loads and when it can’t. Whenever it fails to load, I either send the kernel a Ctrl+Alt+SysReq,K to restart the display manager, or I log in and sudo systemctl restart display-manager. This fixes it, but logs me out of course. I could trace back the problem to this:

  • when it fails to load:
    $ xrandr --listproviders
    Providers: number : 2
    Provider 0: id: 0x4a cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 8 associated providers: 0 name:modesetting
    Provider 1: id: 0x640 cap: 0x0 crtcs: 0 outputs: 0 associated providers: 0 name:modesetting
  • and otherwise:
    $ 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: 0x1e0 cap: 0x6, Sink Output, Source Offload crtcs: 3 outputs: 5 associated providers: 1 name:modesetting

So basically, on unpredictable occasions, my Nvidia driver seems to be unavailable at boot time, but restarting the display manager always finds it later.
Secure boot is not enabled of course.
I created nvidia-bug-report.log.gz after the last boot when the driver couldn’t load, but before I restarted lightdm.

Thank you for your help in advance.

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