Quadro 1000M modeset=1, Xserver crashes

On a test install of xubuntu 17.10, my Thinkpad W520 when booted in discrete mode won’t start if I have modeset=1 (followed by update-initramfs -u)

By swapping to intel graphics, I can boot. I will attach the log.

Xorg.0.log.old.log (79.6 KB)

[ 32.486] (EE) [drm] Failed to open DRM device for (null): -22

The dmesg output would more of interest to see why it fails.

So I can’t get to a shell when this happens. However, the machine is dual boot, so I can mount the drive and access the logs. I can also boot if I change the BIOS setting to Optimus or Integrated. Does that help? EDIT: it seems the kern.log is probably the same thing as dmesg

kern_log.txt (105 KB)

That looks a bit odd. I’m not really sure about this, but it looks like the nvidia drm gets initialized too early, i.e. before the intel. So the nvidia gets the dev node /dev/dri/card0 and the intel /dev/dri/card1. Shouldn’t be a problem, though.
When X starts, the modesetting driver grabs the /dev/dri/card0 node because it thinks it belongs to the intel and everything goes awry. Would be a bug in the modesetting driver, then.
To check if this is true, can you please post the output of

ls -l /dev/dri/by-path


dmesg | grep drm

You should be able to ssh into the laptop when it crashes or disable the display-manager (systemctl disable display-manager) to boot to text console.

BTW, all logs are from hybrid, not discrete mode.

It dies before the ssh server starts. Ubuntu has a “recovery mode” but it only gets as far as this message "ACPI: Video Device [VID1] (mulit-head: yes rom: yes post:no).

I guess this is because my machine crashes before X starts so those logs are useless. Even kern.log is not actually from a failed start. I didn’t notice, sorry. There is nothing in /var/log with a timestamp matching a boot with Nvidia discrete. How can I log what is happening?

Ok, then that’s messy.
Do you get to a boot prompt if you disable the display manager?
For the hybrid mode problem: the modesetting driver doesn’t have a bug, it’s just stupid. From the man page:
Option “kmsdev” “string”
The framebuffer device to use. Default: /dev/dri/card0.

Try disable vt-d

I don’t think it getting even to the point which / is mounted read/write. I don’t get to the recovery menu (which is while / is still read only, I think).

(The fan runs pretty hard and won’t stop until I force it off, if that’s a useful clue).

With this, it boots and works (in Discrete mode). Thanks.