0

I have a Ubuntu Server 16.04.02 LTS configured as a Kiosk (see my question here) but it works only if a Monitor is connected when I'm booting the computer.

When I boot the computer without a Monitor connected and connect one later, nothing is shown on the monitor.

I have no control on what will be connected on the computer or when it will be connected. Also, rebooting is not a good solution because the system must stay online.

Wrong status with xrandr

I tried xrandr -q to diagnose and the status is disconnected even I connected my monitor after booting. Same if I disconnect the monitor later, xrand -q return connected.

export DISPLAY=:0
export XAUTHORITY=/home/kiosk/.Xauthority
sudo xrand -q 
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 480mm x 270mm
 1920x1080     60.00*+  50.00    59.94
 1920x1080i    60.00    50.00    59.94
 1680x1050     59.88
 1400x1050     59.95
 1600x900      60.00
 1280x1024     75.02    60.02
 1440x900      59.90
 1280x800      59.91
 1152x864      75.00
 1280x720      60.00    50.00    59.94
 1024x768      75.03    60.00
 800x600       75.00    60.32
 720x576       50.00
 720x480       60.00    59.94
 640x480       75.00    60.00    59.94
 720x400       70.08
DP2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

What is the proper way to detect monitors and display correctly with good resolution? Must be autocratically configuring the display.

Thanks!

0

1 Answer 1

0

To Detect the monitor do Install edid sudo apt install read-edid. Then run it by sudo get-edid | parse-edid. This will give you monitor information

5
  • Thanks but it's only a part of the answer, this will give me connected monitors edid informations but I need something that configure everything automatically.
    – JPelletier
    Jun 16, 2017 at 20:02
  • Alright, sorry. I think your best bet is to make a bash script that can take the edid information about the monitors and scan through the information with grep. Then taking that information and applying it to your needs.
    – NerdOfCode
    Jun 16, 2017 at 20:07
  • Yeah in fact that's what I wanted to do but using xrandr instead to detect the connected monitor. My problem is that xrandr keep telling me my monitor is connected even if I disconnect it! I updated my question with that information. Will probably have to mix edid / xrandr :S
    – JPelletier
    Jun 16, 2017 at 20:13
  • True. Maybe xrandr has a cache somewhere?
    – NerdOfCode
    Jun 16, 2017 at 20:17
  • I accepted your answer since read-edid seems to be more reliable than xrandr. in fact xrandr is working correctly now and I have no idea why. Thanks!
    – JPelletier
    Jun 28, 2017 at 12:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .