I've read the answers to this question but I don't have ACPI, the /sys/class/drm/card0-socket/status
method does not work and the xrandr
method chokes my CPU. udevadm monitor
shows nothing when (un)plugging the monitor.
I've got a circa 2013 Lenovo ThinkPad w530 with nVidia quadro something. I'm running Lubuntu 18.04 with the nouveau
driver. The monitor is a 27" Philips 271S. I'm using a VGA cable.
How do I do detect monitor (un)plugging?
nvidia
ornouveau
? Depending on that, you may also get "files" with EDID entries under/sys
or/proc
. Also, it's interesting thatxrandr
"chokes your CPU', whileread-edid
, which calls the BIOS and has to do some extremely complicated things to do that, does not.xrandr
really should just call the X server, which should already have this information. Unless nvidia/nouveau decides that's a good time to test for connected monitors again, with all the time-outs that usually involves. – dirkt Nov 15 '18 at 08:06nouveau
. I have the EDID in/sys/class/drm/card0-VGA-1/edid
butcat /path/edid
gives the same result both with the monitor plugged and unplugged. Maybe the chocking could be avoided with somenice
trick, I didn't try that route. About "just calling the X server", maybe that's what srandr does, but I'm not at ease with compiling C. – White_Rabbit Nov 15 '18 at 08:49xrandr -q
? If this results in monitor probing with long timeouts each time it's called (check/var/log/Xorg.0.log
for hints if it really does that), I'd consider a bugreport with the nouveau developers. Possibly there's also a way to set shorter timeouts or to just probe card0-VGA-1, so I'd ask them. It seems to work viaget-edid
, after all. – dirkt Nov 15 '18 at 09:07xrandr --display :0 --query
. I can't interpret the log.#Last line before call [ 15674.053] (II) event7 - ThinkPad Extra Buttons: device is a keyboard
I call xrandr
[ 17548.848] (II) NOUVEAU(0): EDID vendor "PHL", prod id 2314
[ many lines ]
[ last line of
/var/log/Xorg.0.log
][ 17548.849] (II) NOUVEAU(0): Modeline "1280x720"x60.0 74.48 1280 1336 1472 1664 720 721 724 746 -hsync +vsync (44.8 kHz e)
– White_Rabbit Nov 15 '18 at 09:15