Search code examples
screenx11detection

Detection screen disconnection in linux


We have a nasty little problem. In short we can detect if a screen is connect when x11 boots (we do this by looking at the log - Xorg.0.log), but we are having trouble detect when are screen is disconnected while the machine is running (ie post x11 boot)

Any one have any ideas?

Cheers


Solution

  • xrandr prints the status of a screen ("connected", "disabled", "disconnected").

    Edit: But at least on my binary-nvidia-driver machine it always reports "connected". I suspect a better driver (e.g. intel, radeon) could work though.