Mailing List Archive

Can't start mythfrontend with TV off since moving to Intel graphics
I've recently moved from nvidia to Intel graphics for my frontend. With
nvidia, I could specify CustomEDID and ConnectedMonitor options in my
xorg.conf so that mythfrontend would start up before the TV was turned
on, but Intel graphics doesn't support the ConnectedMonitor option and I
so far can't find an alternative.

When mythfrontend starts it reports failure to find a screen and
attempts to set a mode with 0fps, although xrandr correctly reports the
modes specified via CustomEDID.

I've tried various alterations to no avail.

* Specifying custom edid and an enabled output via KMS, but that seemed
to have no effect.

* Setting the primary output with xrandr before starting mythfrontend

* Specifying monitor definitions in the x config with the Ignore option
set to True for all outputs other than HDMI1.

Nothing has worked, although the system has fooled me into thinking it
is working several times.

Hope someone has some more suggestions. Here are various logs:



mythfrontend.log: https://pastebin.pl/view/7f7e9805



Xorg.0.log: https://pastebin.pl/view/96d06f27



xorg.conf:

Section "Monitor"
Identifier "Monitor0"
Option "Enable" "True"
EndSection

Section "Device"
Identifier "Device0"
Driver "intel"
VendorName "Intel Corporation"
Option "CustomEDID" "HDMI1:/etc/X11/edid.bin
Option "monitor-HDMI1" "Monitor0"
EndSection



xrandr output:

Screen 0: minimum 8 x 8, current 1024 x 768, maximum 32767 x 32767
DP1 disconnected primary (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
1920x1080 50.00 + 60.00 24.00
1920x1080i 50.00 60.00
1280x1024 60.02
1280x720 50.00 60.00
1440x576i 50.00
1024x768 60.00
1440x480i 59.94
800x600 60.32
720x576 50.00
720x480 59.94
640x480 59.94
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
Paul

OK - I see what is happening (the root cause is that the display is
not connected)

Firstly, Qt isn't sure what display it is connected to which leads to
this line in the logs (I'd have to check but presumably Qt ignores
displays that are reported as disconnected):-

mythdisplay.cpp:376 (GetDesiredScreen) - Display: Screen 'HDMI1' not
found, defaulting to primary screen (:0.0)

The mythtv code then tries to match :0.0 to a known display, and fails
with this line:-

platforms/mythdisplayx11.cpp:125 (GetVideoModes) - DisplayX11: Failed
to find an output that matches ':0.0'

and actually even if it tried searching for HDMI1 instead, it would
still fail as it will definitely ignore disconnected displays:-

https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythui/platforms/mythdisplayx11.cpp#L254

It's easy enough to add workarounds to the MythTV side (i.e. fallback
to a disconnected display that has some valid modes) - but not so sure
about the Qt side; we rely on QScreen being valid.

I'll have a dig around.

Regards
Mark

On Tue, 27 Oct 2020 at 19:42, Paul Gardiner <lists@glidos.net> wrote:
>
> I've recently moved from nvidia to Intel graphics for my frontend. With
> nvidia, I could specify CustomEDID and ConnectedMonitor options in my
> xorg.conf so that mythfrontend would start up before the TV was turned
> on, but Intel graphics doesn't support the ConnectedMonitor option and I
> so far can't find an alternative.
>
> When mythfrontend starts it reports failure to find a screen and
> attempts to set a mode with 0fps, although xrandr correctly reports the
> modes specified via CustomEDID.
>
> I've tried various alterations to no avail.
>
> * Specifying custom edid and an enabled output via KMS, but that seemed
> to have no effect.
>
> * Setting the primary output with xrandr before starting mythfrontend
>
> * Specifying monitor definitions in the x config with the Ignore option
> set to True for all outputs other than HDMI1.
>
> Nothing has worked, although the system has fooled me into thinking it
> is working several times.
>
> Hope someone has some more suggestions. Here are various logs:
>
>
>
> mythfrontend.log: https://pastebin.pl/view/7f7e9805
>
>
>
> Xorg.0.log: https://pastebin.pl/view/96d06f27
>
>
>
> xorg.conf:
>
> Section "Monitor"
> Identifier "Monitor0"
> Option "Enable" "True"
> EndSection
>
> Section "Device"
> Identifier "Device0"
> Driver "intel"
> VendorName "Intel Corporation"
> Option "CustomEDID" "HDMI1:/etc/X11/edid.bin
> Option "monitor-HDMI1" "Monitor0"
> EndSection
>
>
>
> xrandr output:
>
> Screen 0: minimum 8 x 8, current 1024 x 768, maximum 32767 x 32767
> DP1 disconnected primary (normal left inverted right x axis y axis)
> HDMI1 disconnected (normal left inverted right x axis y axis)
> 1920x1080 50.00 + 60.00 24.00
> 1920x1080i 50.00 60.00
> 1280x1024 60.02
> 1280x720 50.00 60.00
> 1440x576i 50.00
> 1024x768 60.00
> 1440x480i 59.94
> 800x600 60.32
> 720x576 50.00
> 720x480 59.94
> 640x480 59.94
> HDMI2 disconnected (normal left inverted right x axis y axis)
> VIRTUAL1 disconnected (normal left inverted right x axis y axis)
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
On 10/27/20 4:53 PM, Mark Kendall wrote:
> Paul
>
> OK - I see what is happening (the root cause is that the display is
> not connected)
>
> Firstly, Qt isn't sure what display it is connected to which leads to
> this line in the logs (I'd have to check but presumably Qt ignores
> displays that are reported as disconnected):-
>
> mythdisplay.cpp:376 (GetDesiredScreen) - Display: Screen 'HDMI1' not
> found, defaulting to primary screen (:0.0)
>
> The mythtv code then tries to match :0.0 to a known display, and fails
> with this line:-
>
> platforms/mythdisplayx11.cpp:125 (GetVideoModes) - DisplayX11: Failed
> to find an output that matches ':0.0' .........
Paul,

  I have a intel NUC and I am able to start mythfrontend without TV on.
My NUC goes through Marantz receiver and I suspect you also have it in a
similar way.

 However, I do have another issue that I cannot start it from rexec
which runs without a tty. It simply hangs and does nothing.
So, I usually vnc to the machine with monitor/TV off and simply start it
on the X screen. I do not have issues starting this way.

I also have very similar situation with another frontend box that has
core i3-2100. My issue has been X starts in 4K each time I turn on the
TV and I had to xrandr to 1920x1080.120Hz.

Regards
Ramesh

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
On Tue, Oct 27, 2020 at 7:41 PM Paul Gardiner <lists@glidos.net> wrote:

> Hope someone has some more suggestions. Here are various logs:

Realistically, given that many newer PCs
support multiple video outputs, it is hard
for an app to know what to do when there
are none active. Ideally an app will
automatically adjust to new displays as
they are added, or existing displays are
removed, and resolutions are modified
but even that gets "complicated".

Before there was the ability for many video
drivers to add EDID values, and for TVs
and AVRs without override capabilities, it
was common practice for those in the higher
end video world to use an EDID emulator,
which dealt with the reality of both missing,
late, or just plain wrong EDID values. They
are still sold because sometimes they are
necessary in the real world with real
hardware.

Sometimes the old ways are the best and
fastest ways to reduce the pulling out of
the hair (and as I recall the prices for the
knockoffs are now not totally unreasonable).
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
Thanks for looking. I can see that it might not be feasible to
workaround it cleanly if there is no way to create a valid QScreen for a
disconnected display.

Given that the intel driver is open source, I'm wondering about adding
to it support for the ConnectedMonitor option, but I imagine the source
may frighten the hell out of me.

On 27/10/2020 21:53, Mark Kendall wrote:
> Paul
>
> OK - I see what is happening (the root cause is that the display is
> not connected)
>
> Firstly, Qt isn't sure what display it is connected to which leads to
> this line in the logs (I'd have to check but presumably Qt ignores
> displays that are reported as disconnected):-
>
> mythdisplay.cpp:376 (GetDesiredScreen) - Display: Screen 'HDMI1' not
> found, defaulting to primary screen (:0.0)
>
> The mythtv code then tries to match :0.0 to a known display, and fails
> with this line:-
>
> platforms/mythdisplayx11.cpp:125 (GetVideoModes) - DisplayX11: Failed
> to find an output that matches ':0.0'
>
> and actually even if it tried searching for HDMI1 instead, it would
> still fail as it will definitely ignore disconnected displays:-
>
> https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythui/platforms/mythdisplayx11.cpp#L254
>
> It's easy enough to add workarounds to the MythTV side (i.e. fallback
> to a disconnected display that has some valid modes) - but not so sure
> about the Qt side; we rely on QScreen being valid.
>
> I'll have a dig around.
>
> Regards
> Mark
>
> On Tue, 27 Oct 2020 at 19:42, Paul Gardiner <lists@glidos.net> wrote:
>>
>> I've recently moved from nvidia to Intel graphics for my frontend. With
>> nvidia, I could specify CustomEDID and ConnectedMonitor options in my
>> xorg.conf so that mythfrontend would start up before the TV was turned
>> on, but Intel graphics doesn't support the ConnectedMonitor option and I
>> so far can't find an alternative.
>>
>> When mythfrontend starts it reports failure to find a screen and
>> attempts to set a mode with 0fps, although xrandr correctly reports the
>> modes specified via CustomEDID.
>>
>> I've tried various alterations to no avail.
>>
>> * Specifying custom edid and an enabled output via KMS, but that seemed
>> to have no effect.
>>
>> * Setting the primary output with xrandr before starting mythfrontend
>>
>> * Specifying monitor definitions in the x config with the Ignore option
>> set to True for all outputs other than HDMI1.
>>
>> Nothing has worked, although the system has fooled me into thinking it
>> is working several times.
>>
>> Hope someone has some more suggestions. Here are various logs:
>>
>>
>>
>> mythfrontend.log: https://pastebin.pl/view/7f7e9805
>>
>>
>>
>> Xorg.0.log: https://pastebin.pl/view/96d06f27
>>
>>
>>
>> xorg.conf:
>>
>> Section "Monitor"
>> Identifier "Monitor0"
>> Option "Enable" "True"
>> EndSection
>>
>> Section "Device"
>> Identifier "Device0"
>> Driver "intel"
>> VendorName "Intel Corporation"
>> Option "CustomEDID" "HDMI1:/etc/X11/edid.bin
>> Option "monitor-HDMI1" "Monitor0"
>> EndSection
>>
>>
>>
>> xrandr output:
>>
>> Screen 0: minimum 8 x 8, current 1024 x 768, maximum 32767 x 32767
>> DP1 disconnected primary (normal left inverted right x axis y axis)
>> HDMI1 disconnected (normal left inverted right x axis y axis)
>> 1920x1080 50.00 + 60.00 24.00
>> 1920x1080i 50.00 60.00
>> 1280x1024 60.02
>> 1280x720 50.00 60.00
>> 1440x576i 50.00
>> 1024x768 60.00
>> 1440x480i 59.94
>> 800x600 60.32
>> 720x576 50.00
>> 720x480 59.94
>> 640x480 59.94
>> HDMI2 disconnected (normal left inverted right x axis y axis)
>> VIRTUAL1 disconnected (normal left inverted right x axis y axis)
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users@mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
Paul, late wade in, so excuse any rubbish, and top post because THIS is thee meat, below may be of interest.

All my custom and EDID overide was of no avail to my headless backend.
xrandr dis sort out the display issues. IIRC I setup a systemd task to do it after boot
James

> Thanks for looking. I can see that it might not be feasible to workaround it cleanly if there is no way to create a valid QScreen for a disconnected display.
>
> Given that the intel driver is open source, I'm wondering about adding to it support for the ConnectedMonitor option, but I imagine the source may frighten the hell out of me.
>
> On 27/10/2020 21:53, Mark Kendall wrote:
>> Paul
>> OK - I see what is happening (the root cause is that the display is
>> not connected)
>> Firstly, Qt isn't sure what display it is connected to which leads to
>> this line in the logs (I'd have to check but presumably Qt ignores
>> displays that are reported as disconnected):-
>> mythdisplay.cpp:376 (GetDesiredScreen) - Display: Screen 'HDMI1' not
>> found, defaulting to primary screen (:0.0)
>> The mythtv code then tries to match :0.0 to a known display, and fails
>> with this line:-
>> platforms/mythdisplayx11.cpp:125 (GetVideoModes) - DisplayX11: Failed
>> to find an output that matches ':0.0'
>> and actually even if it tried searching for HDMI1 instead, it would
>> still fail as it will definitely ignore disconnected displays:-
>> https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythui/platforms/mythdisplayx11.cpp#L254
>> It's easy enough to add workarounds to the MythTV side (i.e. fallback
>> to a disconnected display that has some valid modes) - but not so sure
>> about the Qt side; we rely on QScreen being valid.
>> I'll have a dig around.
>> Regards
>> Mark
>> On Tue, 27 Oct 2020 at 19:42, Paul Gardiner <lists@glidos.net> wrote:
>>>
>>> I've recently moved from nvidia to Intel graphics for my frontend. With
>>> nvidia, I could specify CustomEDID and ConnectedMonitor options in my
>>> xorg.conf so that mythfrontend would start up before the TV was turned
>>> on, but Intel graphics doesn't support the ConnectedMonitor option and I
>>> so far can't find an alternative.
>>>
>>> When mythfrontend starts it reports failure to find a screen and
>>> attempts to set a mode with 0fps, although xrandr correctly reports the
>>> modes specified via CustomEDID.
>>>
>>> I've tried various alterations to no avail.
>>>
>>> * Specifying custom edid and an enabled output via KMS, but that seemed
>>> to have no effect.
>>>
>>> * Setting the primary output with xrandr before starting mythfrontend
>>>
>>> * Specifying monitor definitions in the x config with the Ignore option
>>> set to True for all outputs other than HDMI1.
>>>
>>> Nothing has worked, although the system has fooled me into thinking it
>>> is working several times.
>>>
>>> Hope someone has some more suggestions. Here are various logs:
>>>
>>>
>>>
>>> mythfrontend.log: https://pastebin.pl/view/7f7e9805
>>>
>>>
>>>
>>> Xorg.0.log: https://pastebin.pl/view/96d06f27
>>>
>>>
>>>
>>> xorg.conf:
>>>
>>> Section "Monitor"
>>> Identifier "Monitor0"
>>> Option "Enable" "True"
>>> EndSection
>>>
>>> Section "Device"
>>> Identifier "Device0"
>>> Driver "intel"
>>> VendorName "Intel Corporation"
>>> Option "CustomEDID" "HDMI1:/etc/X11/edid.bin
>>> Option "monitor-HDMI1" "Monitor0"
>>> EndSection
>>>
>>>
>>>
>>> xrandr output:
>>>
>>> Screen 0: minimum 8 x 8, current 1024 x 768, maximum 32767 x 32767
>>> DP1 disconnected primary (normal left inverted right x axis y axis)
>>> HDMI1 disconnected (normal left inverted right x axis y axis)
>>> 1920x1080 50.00 + 60.00 24.00
>>> 1920x1080i 50.00 60.00
>>> 1280x1024 60.02
>>> 1280x720 50.00 60.00
>>> 1440x576i 50.00
>>> 1024x768 60.00
>>> 1440x480i 59.94
>>> 800x600 60.32
>>> 720x576 50.00
>>> 720x480 59.94
>>> 640x480 59.94
>>> HDMI2 disconnected (normal left inverted right x axis y axis)
>>> VIRTUAL1 disconnected (normal left inverted right x axis y axis)
>>> _______________________________________________
>>> mythtv-users mailing list
>>> mythtv-users@mythtv.org
>>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>>> http://wiki.mythtv.org/Mailing_List_etiquette
>>> MythTV Forums: https://forum.mythtv.org
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users@mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
On 27/10/2020 22:04, Ram Ramesh wrote:
> On 10/27/20 4:53 PM, Mark Kendall wrote:
>> Paul
>>
>> OK - I see what is happening (the root cause is that the display is
>> not connected)
>>
>> Firstly, Qt isn't sure what display it is connected to which leads to
>> this line in the logs (I'd have to check but presumably Qt ignores
>> displays that are reported as disconnected):-
>>
>> mythdisplay.cpp:376 (GetDesiredScreen) - Display: Screen 'HDMI1' not
>> found, defaulting to primary screen (:0.0)
>>
>> The mythtv code then tries to match :0.0 to a known display, and fails
>> with this line:-
>>
>> platforms/mythdisplayx11.cpp:125 (GetVideoModes) - DisplayX11: Failed
>> to find an output that matches ':0.0' .........
> Paul,
>
>   I have a intel NUC and I am able to start mythfrontend without TV on.
> My NUC goes through Marantz receiver and I suspect you also have it in a
> similar way.

Yes, a Marantz 1501, one of my better choices of purchase. Do you know
how it is managing to boot? Any special config?

>  However, I do have another issue that I cannot start it from rexec
> which runs without a tty. It simply hangs and does nothing.
> So, I usually vnc to the machine with monitor/TV off and simply start it
> on the X screen. I do not have issues starting this way.

I can ssh in to mine and kill mythfrontend so that it restarts
correctly, but I'd rather not seeing as there was no need with my
previous nvidia-based machine.

> I also have very similar situation with another frontend box that has
> core i3-2100. My issue has been X starts in 4K each time I turn on the
> TV and I had to xrandr to 1920x1080.120Hz.

I hoped to find a solution for mine with xrandr, but there seems nothing
to fake a connected monitor.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
On 27/10/2020 23:38, Gary Buhrmaster wrote:
> On Tue, Oct 27, 2020 at 7:41 PM Paul Gardiner <lists@glidos.net> wrote:
>
>> Hope someone has some more suggestions. Here are various logs:
>
> Realistically, given that many newer PCs
> support multiple video outputs, it is hard
> for an app to know what to do when there
> are none active. Ideally an app will
> automatically adjust to new displays as
> they are added, or existing displays are
> removed, and resolutions are modified
> but even that gets "complicated".
>
> Before there was the ability for many video
> drivers to add EDID values, and for TVs
> and AVRs without override capabilities, it
> was common practice for those in the higher
> end video world to use an EDID emulator,
> which dealt with the reality of both missing,
> late, or just plain wrong EDID values. They
> are still sold because sometimes they are
> necessary in the real world with real
> hardware.
>
> Sometimes the old ways are the best and
> fastest ways to reduce the pulling out of
> the hair (and as I recall the prices for the
> knockoffs are now not totally unreasonable).

Hmmm! That's tempting. I may well do that. £18 apparently. Well worth
it. It's just tantalising to know that it clearly can be achieved in
software and config, given experiences with nvidia. Certainly it's nice
to know there is a solution that will definitely work.

... although, having said that, experiences so far suggest an EDID
emulator alone wont do it. Before I ran into this latest problem, I was
intermittently having problems even with the TV turned on. There were
two fixes: either I could put a delay in .xinitrc before starting
mythfrontend, or I could specify CustomEDID in my X config.

That's just made me realise another potential solution. I could perhaps
add a loop to .xinitrc alternately sleeping and testing for a connection
by grepping the output of xrandr. The only downside is I'd have a delay
when turing the TV on waiting for mythfrontend to start up.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
Paul

My gut feeling is that this is probably fixable (and indeed needs
fixing) in the MythTV code.

The Qt code will use a default/dummy screen if nothing is connected at
startup. It then detects when the new screen is connected (or powered
on in this case).

There are various signals that we listen for in the MythTV code to
identify when screens have been added/removed etc. See:-

https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythui/mythdisplay.h#L52

The mythfrontend logs should show activity when any of the
ScreenAdded, ScreenRemoved or PrimaryScreenChanged slots are
triggered. The ScreenChanged slot may show activity - but only if the
actual QScreen object has changed (this was written to handle moving
the mythfrontend window from one screen to another - either
programmatically or manually). If nothing else there should be a
signal that the available geometry has changed when the monitor is
connected.

I suggest gathering some logs with additional Qt logging to see what
might be happening.

QT_LOGGING_RULES=qt.qpa.screen=true mythfrontend

I would try that with and without the custom EDID and leave it until
the display has definitely turned on (i.e. to see if any Qt screen
code is triggered)

Regards
Mark
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
On 28/10/2020 11:16, Mark Kendall wrote:
> Paul
>
> My gut feeling is that this is probably fixable (and indeed needs
> fixing) in the MythTV code.
>
> The Qt code will use a default/dummy screen if nothing is connected at
> startup. It then detects when the new screen is connected (or powered
> on in this case).
>
> There are various signals that we listen for in the MythTV code to
> identify when screens have been added/removed etc. See:-
>
> https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythui/mythdisplay.h#L52
>
> The mythfrontend logs should show activity when any of the
> ScreenAdded, ScreenRemoved or PrimaryScreenChanged slots are
> triggered. The ScreenChanged slot may show activity - but only if the
> actual QScreen object has changed (this was written to handle moving
> the mythfrontend window from one screen to another - either
> programmatically or manually). If nothing else there should be a
> signal that the available geometry has changed when the monitor is
> connected.
>
> I suggest gathering some logs with additional Qt logging to see what
> might be happening.
>
> QT_LOGGING_RULES=qt.qpa.screen=true mythfrontend
>
> I would try that with and without the custom EDID and leave it until
> the display has definitely turned on (i.e. to see if any Qt screen
> code is triggered)

It's great to hear that: means I don't have to even think about taking a
look at the intel driver source. :-)

Any other arguments to specify to mythfrontend, or is that one addition
for what you need logged?

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
On Tue, 2020-10-27 at 19:40 +0000, Paul Gardiner wrote:
> I've recently moved from nvidia to Intel graphics for my frontend.
> With nvidia, I could specify CustomEDID and ConnectedMonitor
> options in my xorg.conf so that mythfrontend would start up before
> the TV was turned on, but Intel graphics doesn't support the
> ConnectedMonitor option and I so far can't find an alternative.
>
> When mythfrontend starts it reports failure to find a screen and
> attempts to set a mode with 0fps, although xrandr correctly reports
> the modes specified via CustomEDID.

I think my Intel NUC frontend still boots properly without a screen
connected, but its been a while since I spent time fighting it. Last
time I worked on this stuff I had installed an HDMI pass-though audio
extractor and was trying to make surround sound work again.

Here are the steps I took:

1) Connect the receiver directly to the frontend.

2) Boot and copy the receiver EDID with monitor-get-edid (I think).

3) Install the EDID file into /lib/firmware/edid/sony-receiver.edid

4) Tell dracut to include the EDID file in the initramfs by putting the
following into /etc/dracut.conf.d/load-edid.conf:

install_items=/lib/firmware/edid/sony-receiver.edid

5) Rebuild initramfs with 'dracut -f'

6) Update the kernel command line arguments to read the EDID file:

grubby \
--args="drm.edid_firmware=edid/sony-receiver.edid" \
--update-kernel `grubby --default-kernel`

7) Put the following into /etc/X11/xorg.conf.d/50-xorg-tweaks-
intel.conf:

Section "Device"
Identifier "Default Device"
Driver "intel"
Option "Monitor-DP1" "DP1 Monitor"
Option "TearFree" "true"
EndSection

Section "Monitor"
Identifier "DP1 Monitor"
Option "Primary" "true"
Option "HotPlug" "false"
EndSection

8) Reconnect the HDMI audio extractor.

9) Reboot.

This is several hours of trial and error (and swearing) summarized into
bullet points. I think I got everything in there. The "Hotplug"
xorg.conf option might be the specific solution to your problem.

I hope this helps.

David


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
On 28/10/2020 12:02, David Hampton wrote:
> On Tue, 2020-10-27 at 19:40 +0000, Paul Gardiner wrote:
>> I've recently moved from nvidia to Intel graphics for my frontend.
>> With nvidia, I could specify CustomEDID and ConnectedMonitor
>> options in my xorg.conf so that mythfrontend would start up before
>> the TV was turned on, but Intel graphics doesn't support the
>> ConnectedMonitor option and I so far can't find an alternative.
>>
>> When mythfrontend starts it reports failure to find a screen and
>> attempts to set a mode with 0fps, although xrandr correctly reports
>> the modes specified via CustomEDID.
>
> I think my Intel NUC frontend still boots properly without a screen
> connected, but its been a while since I spent time fighting it. Last
> time I worked on this stuff I had installed an HDMI pass-though audio
> extractor and was trying to make surround sound work again.
>
> Here are the steps I took:
>
> 1) Connect the receiver directly to the frontend.
>
> 2) Boot and copy the receiver EDID with monitor-get-edid (I think).
>
> 3) Install the EDID file into /lib/firmware/edid/sony-receiver.edid
>
> 4) Tell dracut to include the EDID file in the initramfs by putting the
> following into /etc/dracut.conf.d/load-edid.conf:
>
> install_items=/lib/firmware/edid/sony-receiver.edid
>
> 5) Rebuild initramfs with 'dracut -f'
>
> 6) Update the kernel command line arguments to read the EDID file:
>
> grubby \
> --args="drm.edid_firmware=edid/sony-receiver.edid" \
> --update-kernel `grubby --default-kernel`
>
> 7) Put the following into /etc/X11/xorg.conf.d/50-xorg-tweaks-
> intel.conf:
>
> Section "Device"
> Identifier "Default Device"
> Driver "intel"
> Option "Monitor-DP1" "DP1 Monitor"
> Option "TearFree" "true"
> EndSection
>
> Section "Monitor"
> Identifier "DP1 Monitor"
> Option "Primary" "true"
> Option "HotPlug" "false"
> EndSection
>
> 8) Reconnect the HDMI audio extractor.
>
> 9) Reboot.
>
> This is several hours of trial and error (and swearing) summarized into
> bullet points. I think I got everything in there. The "Hotplug"
> xorg.conf option might be the specific solution to your problem.
>
> I hope this helps.

Interesting. There are two steps there I haven't tried. I neglected to
tell dracut about the EDID file. And I didn't try the HotPlug option.
Both worth a go, although dmesg didn't report a failure to find the the
edid file.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
On 28/10/2020 11:16, Mark Kendall wrote:
> I suggest gathering some logs with additional Qt logging to see what
> might be happening.
>
> QT_LOGGING_RULES=qt.qpa.screen=true mythfrontend
>
> I would try that with and without the custom EDID and leave it until
> the display has definitely turned on (i.e. to see if any Qt screen
> code is triggered)

I think I've missed some subtlety somewhere. I'm seeing nothing new in
the logs. I wasn't quite sure where I should expect to see extra info,
but there seems to be noting new in the logs, stdout or stderr.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
> Message: 8
> Date: Tue, 27 Oct 2020 19:40:40 +0000
> From: Paul Gardiner <lists@glidos.net>
> To: Discussion about MythTV <mythtv-users@mythtv.org>
> Subject: [mythtv-users] Can't start mythfrontend with TV off since
> moving to Intel graphics
> Message-ID: <358e96cf-9241-da0c-e5b6-9ea919022fbc@glidos.net>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> I've recently moved from nvidia to Intel graphics for my frontend. With
> nvidia, I could specify CustomEDID and ConnectedMonitor options in my
> xorg.conf so that mythfrontend would start up before the TV was turned
> on, but Intel graphics doesn't support the ConnectedMonitor option and I
> so far can't find an alternative.
>
> When mythfrontend starts it reports failure to find a screen and
> attempts to set a mode with 0fps, although xrandr correctly reports the
> modes specified via CustomEDID.
>
> I've tried various alterations to no avail.
>
> * Specifying custom edid and an enabled output via KMS, but that seemed
> to have no effect.
>
> * Setting the primary output with xrandr before starting mythfrontend
>
> * Specifying monitor definitions in the x config with the Ignore option
> set to True for all outputs other than HDMI1.
>
> Nothing has worked, although the system has fooled me into thinking it
> is working several times.
>
> Hope someone has some more suggestions. Here are various logs:
>
>
>
> mythfrontend.log: https://pastebin.pl/view/7f7e9805
>
>
>
> Xorg.0.log: https://pastebin.pl/view/96d06f27
>
>
>
> xorg.conf:
>
> Section "Monitor"
> Identifier "Monitor0"
> Option "Enable" "True"
> EndSection
>
> Section "Device"
> Identifier "Device0"
> Driver "intel"
> VendorName "Intel Corporation"
> Option "CustomEDID" "HDMI1:/etc/X11/edid.bin
> Option "monitor-HDMI1" "Monitor0"
> EndSection
>
>
>
> xrandr output:
>
> Screen 0: minimum 8 x 8, current 1024 x 768, maximum 32767 x 32767
> DP1 disconnected primary (normal left inverted right x axis y axis)
> HDMI1 disconnected (normal left inverted right x axis y axis)
> 1920x1080 50.00 + 60.00 24.00
> 1920x1080i 50.00 60.00
> 1280x1024 60.02
> 1280x720 50.00 60.00
> 1440x576i 50.00
> 1024x768 60.00
> 1440x480i 59.94
> 800x600 60.32
> 720x576 50.00
> 720x480 59.94
> 640x480 59.94
> HDMI2 disconnected (normal left inverted right x axis y axis)
> VIRTUAL1 disconnected (normal left inverted right x axis y axis)

Looks like there a “ missing from the end of your edid line in your xorg.conf
Option "CustomEDID" "HDMI1:/etc/X11/edid.bin
Not sure if that’s the case in the actual file or not,
Lester
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
On 28/10/2020 09:06, James Linder wrote:
> Paul, late wade in, so excuse any rubbish, and top post because THIS is thee meat, below may be of interest.
>
> All my custom and EDID overide was of no avail to my headless backend.
> xrandr dis sort out the display issues. IIRC I setup a systemd task to do it after boot
> James

Do you remember anything more of this? I tried various uses of xrandr in
my .xinitrc file, just before it starts mythfrontend. I'm not sure how
to involve systemd: I didn't think xrandr could do anything until the X
server is up.

I have a workaround for now: on Gary's advice, I bought an EDID
emulator. The EDID it fakes is pretty useless, not even having a 24fps
mode, but it does fool the system into thinking a monitor is connected,
and I can use the CustomEDID option to get the correct modes.

I'm still interested in other solutions, particularly Mark's thoughts on
having mythfrontend handle monitor changes.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
On 10/31/20 5:39 AM, Paul Gardiner wrote:
> On 28/10/2020 09:06, James Linder wrote:
>> Paul, late wade in, so excuse any rubbish, and top post because THIS
>> is thee meat, below may be of interest.
>>
>> All my custom and EDID overide was of no avail to my headless backend.
>> xrandr dis sort out the display issues. IIRC I setup a systemd task
>> to do it after boot
>> James
>
> Do you remember anything more of this? I tried various uses of xrandr
> in my .xinitrc file, just before it starts mythfrontend. I'm not sure
> how to involve systemd: I didn't think xrandr could do anything until
> the X server is up.
>
> I have a workaround for now: on Gary's advice, I bought an EDID
> emulator. The EDID it fakes is pretty useless, not even having a 24fps
> mode, but it does fool the system into thinking a monitor is
> connected, and I can use the CustomEDID option to get the correct modes.
>
> I'm still interested in other solutions, particularly Mark's thoughts
> on having mythfrontend handle monitor changes.
>

While I'm not using Intel GFX, I had this issue yesterday. I had not
tested powering up the system with the TV off and when I did, no
display. Had to ssh in and reboot with TV on.  So my solution which now
works is:

1. With TV and computer on and working. I captured the current X11
information and put it into /etc/X11/xorg.conf. In my case Nvidia has a
tool for this but so does Xorg.

2. Capture EDID to /etc/X11/hdmi0.edid. I used Nvidia tool, there are
others.

3. Modify [Device]  section of xorg.conf to include:

    Option         "ConnectedMonitor" "HDMI-0"
    Option         "CustomEDID" "HDMI-0:/etc/X11/hdmi0.edid"
    Option         "IgnoreEDID" "false"
    Option         "UseEDID"    "true"

4. My test that it worked was to issue reboot command and immediately
turn off TV with TV remote. I check computer with ssh and when it was
complete up, I turned on TV. I still have to play with input from mouse
of keyboard to get the display to come alive, but I think that'd because
I have an 5x1 HDMI switch that will switch away from a port if it's
powered off and another port is displaying output.

Jim A


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
>
> 3. Modify [Device] section of xorg.conf to include:
>
> Option "ConnectedMonitor" "HDMI-0"
> Option "CustomEDID" "HDMI-0:/etc/X11/hdmi0.edid"
> Option "IgnoreEDID" "false"
> Option "UseEDID" "true"


That won't work for intel graphics. Here's my output from Xorg trying the
settings:

[ 11.993] (WW) intel(0): Option "ConnectedMonitor" is not used

[ 11.993] (WW) intel(0): Option "IgnoreEDID" is not used
[ 11.993] (WW) intel(0): Option "UseEDID" is not used
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
> On 31 Oct 2020, at 5:39 pm, Paul Gardiner <lists@glidos.net> wrote:
>
> On 28/10/2020 09:06, James Linder wrote:
>> Paul, late wade in, so excuse any rubbish, and top post because THIS is thee meat, below may be of interest.
>> All my custom and EDID overide was of no avail to my headless backend.
>> xrandr dis sort out the display issues. IIRC I setup a systemd task to do it after boot
>> James
>
> Do you remember anything more of this? I tried various uses of xrandr in my .xinitrc file, just before it starts mythfrontend. I'm not sure how to involve systemd: I didn't think xrandr could do anything until the X server is up.
>
> I have a workaround for now: on Gary's advice, I bought an EDID emulator. The EDID it fakes is pretty useless, not even having a 24fps mode, but it does fool the system into thinking a monitor is connected, and I can use the CustomEDID option to get the correct modes.
>
> I'm still interested in other solutions, particularly Mark's thoughts on having mythfrontend handle monitor changes.

I just spent 1/2 hour looking WHERE I put it. It must be WM specific.
Where .. where .. where

My nuc now boots headless with a decent resolution because of this

xrandr --fb 1600x1050

James

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Can't start mythfrontend with TV off since moving to Intel graphics [ In reply to ]
On 27/10/2020 19:40, Paul Gardiner wrote:
> I've recently moved from nvidia to Intel graphics for my frontend. With
> nvidia, I could specify CustomEDID and ConnectedMonitor options in my
> xorg.conf so that mythfrontend would start up before the TV was turned
> on, but Intel graphics doesn't support the ConnectedMonitor option and I
> so far can't find an alternative.
>
> When mythfrontend starts it reports failure to find a screen and
> attempts to set a mode with 0fps, although xrandr correctly reports the
> modes specified via CustomEDID.

I've just finally resolved this without the need for an EDID emulator.
The solution was, along the lines of some replies I received here, to
add kernel boot parameters. It seems that the exact syntax has changed
in recent kernels. The extra parameters I'm now using are:

drm.edid_firmware=HDMI-A-1:edid/marantz_edid.bin video=HDMI-A-1:D

It took a while to discover that HDMI-A-1 was the drm system's name for
the connection. I discovered that by adding the kernel command
drm.debug=14 and looking at the output of dmesg. I also have to ensure
that the edid file is in my initramfs.

Thanks again to everyone who chipped in.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org