[Intel-gfx] Problems with inserting HDMI after system boot

Anthony Desmarais anthony at tunguydesmarais.com
Sat Apr 23 09:03:30 UTC 2016


Hi Can anyone possibly help me - I initially posted on the intel 
graphics forums but I see that the mailing list is the preferred method 
for asking for such things so below is the copy and paste of my messages 
from the forum:

I have a situation that I need to resolve and cant seem to get it right.

My situation is this: I have a MythTV PVR system running in my house and 
the main backend/frontend is running on an old AMD board with built in 
Nvidia graphics, problem is that this board is starting to pack up.

I ordered a new Skylake board (B150 chipset) with a Skylake processor 
with the intnetion of replacing the AMD board with this.

My problem is tht the system connects to the TV via a Home Theater AMP 
which has built in HDMI switching. This means that the HDMI is 
essentially hot plugged every time we switch sources as well as that the 
PC does not necessarily start with a HDMI connection active.

With regard to the hot plugging, this seems to be working out the box 
with Fedora 23 and the latest Intel Drivers (MythBuntu 16.04 cant say 
that unfortunatly), however the problem of the system starting without 
HDMI and then later having HDMI connected does not work.

With the nvidia driver I resolved this with a line in xorg.conf Option 
"ConnectedMonitor" "DFP" as well as passing in the EDID of the TV that I 
extracted earlier. I tried this with the intel driver but I see in the 
Xorg log that the Intel driver does not use the ConnectedMonitor line.

Is there any way to resolve this?? Either by forcing video out of the 
HDMI always like I used to do or getting the dynamic detection to work 
correctly??

Update to this question - it looks like the window manager could be part 
of my solution.

I noticed that in XFCE hotplugging the monitor always left me with a 
blank screen, but if I switch to GNOME then the hotplug does not loose 
video which is good.

Problem is that still the bootup without a screen results in nothing 
(user is set to autologin in gnome) and the only way to resolve this is 
to login via a remote session and restart GDM (or issue an init 3 && 
init 5 which I suppose restarts GDM). It is worth noting that in this 
remote ssh terminal if I run xrandr -d :0 it lists the monitor as 
detected, so the driver seems to detect it, it is just that GDM never 
sets it up.

I suppose a total hack would be to try to get a script to run when the 
monitor is detected for the first time after and perform a restart of 
GDM, just need to figure out how to do this, perhaps UDEV is the answer?

Ok so further debugging while I talk to myself here :)

I tried my hack of writing a udev rule which will run a script with a 
series of flag files in /tmp to ensure that this only happens once and 
not on startup and this works only sometimes.

Other times when the HDMI plug is inserted there is no activity in udev 
so my script doesnt even get run.

I dug a but deeper and looked 
in /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-2

When the udev commands do not get generated then I see that the file 
enabled contants the text "disabled" and the file status containt the 
text "disconnected" this despite the fact that the monitor is now 
plugged into the HDMI port.

Further if I now restart GDM then these two files indicate that the 
monitor is now connected and I see my desktop on the screen.

I am no unsure if this is a driver issue or something to do with GDM or 
what.

Who is responsible for populating the values 
in /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-2 - I 
would think that this is the driver, but I am not clued up enough on 
linux driver to say for sure.





More information about the Intel-gfx mailing list