Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getedid: added the active HDMI/DP port to new kernel parameters #3064

Merged
merged 1 commit into from
Aug 18, 2019

Conversation

kutmasterk
Copy link
Contributor

Added the active HDMI/DP port to kernel parameters.

Without it, fixed EDID does not work on Intel Haswell and possibly others.

Added the active HDMI/DP port to kernel parameters. 

Without it, fixed EDID does not work on Intel Haswell and possibly others.
@DaVukovic
Copy link
Contributor

Thanks for your PR.

AFAIK, we can't use video=$hdmi:D for drm.edid_firmware on anything with newer hardware. Your Haswell might work with it.

But before we are acting too fast, I'll do another research and will also test on my haswell I have. So thanks for the heads up and I'll keep you noted.

@kutmasterk
Copy link
Contributor Author

Thanks for looking into it!

@5schatten
Copy link
Contributor

Worked for me on my SKL i3-6100 + GA-B150N Wifi

phoenix:~ # dmesg |grep edid
[ 0.000000] Kernel command line: root=/dev/ram0 rdinit=/init usbcore.autosuspend=-1 BOOT_IMAGE=/KERNEL boot=UUID=5BCA-2C2F disk=UUID=921055bd-701b-44db-8b13-81e926d61283 quiet initrd=/edid.cpio drm.edid_firmware=edid/edid.bin video=HDMI-A-1:D

@DaVukovic
Copy link
Contributor

@5schatten as said, it should also work without it.

@pizzaboy75
Referring to: https://bugs.freedesktop.org/show_bug.cgi?id=104615#c6 it should.

We have to use drm.edid_firmware because we are using a kernel >4.15. Everything older than that kernel is able to use drm_kms_helper.edid_firmware where you could easily force the output. Unfortunately we can't use an older kernel with newer releases because newer hardware won't be supported.

I ran multiple tests over here with my Intel Haswell Celeron 1820T and I couldn't find any issue if video=$hmdi:D is missing.

My chain looks as follows:

HTPC -> HDMI -> AVR -> HDMI -> TV

What I've tried after getedid create:

  • started the devices (every), turned off the TV and rebooted LE

result was, that after the reboot I could hear the menu sound while navigating. If I turn on the TV at this state, I get the GUI in normal 1080p (no, I don't own a 4k TV yet ;) ).

next test:

  • turn off every device, turn on the HTPC at first, wait a moment, turn on the AVR after that and then later turn on the TV

result was, that I see at the AVR display that even if the HTPC was turned on first, a HDMI handshake happens and I'm able to hear menu sounds while navigating. After I turned on the TV, again I saw the exoected GUI using the expected resolution.

So yeah, I'm curious at which of the tests above it will fail for you.

I have to admit that I'm not using the MH builds currently. So I'm still on 4.18.xx. Will do further tests with 4.19 soon to see if anything changes in that regard.

@kutmasterk
Copy link
Contributor Author

I also did these tests and they were failing for me without video=HDMI-A-2:D.

With it, everything works like you described.

@DaVukovic
Copy link
Contributor

DaVukovic commented Oct 29, 2018

@pizzaboy75

I've updated to latest Milhouse build:

LibreELEC (Milhouse): devel-20181028210242-#1028-g01f20a4 (Generic.x86_64)
LibreELEC-MH:~ # uname -a
Linux LibreELEC-MH 4.19.0 #1 SMP Sun Oct 28 21:04:28 GMT 2018 x86_64 GNU/Linux
LibreELEC-MH:~ # 

turned off every device, turned on HTPC, SSHd in to see that it has booted up fine, turn on the AVR, seeing after a few seconds that the HDMI handshake worked fine, hearing the menu sounds while navigating, turning on the TV then and I get the GUI as expected.

So for me it works fine the way it is, using similar hardware and the same kernel as you do.

I'll try to add video=$hdmi:D now to see if it will break something on my side. If not, I'm fine merging it. But I would like to let @MilhouseVH add it in his builds first to see if others are complaining.

Be aware, that for my tests, I never unplugged the HDMI cable!!!

@kutmasterk
Copy link
Contributor Author

Do you also use video=HDMI-A-2:D or video=HDMI-A-1:D?
Maybe this could be the cause we have such different results.

@DaVukovic
Copy link
Contributor

If it's HDMI-A-2 or HDMI-A-1 shouldn't matter at all. As that's fetched here:

https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/sysutils/busybox/scripts/getedid#L145-L150

In my case it's that for the moment now:

LibreELEC (Milhouse): devel-20181028210242-#1028-g01f20a4 (Generic.x86_64)
LibreELEC-MH:~ # cat /flash/extlinux.conf
DEFAULT linux
PROMPT 0
 
LABEL linux
 KERNEL /KERNEL
 APPEND boot=LABEL=System disk=LABEL=Storage  quiet initrd=/edid.cpio drm.edid_firmware=edid/edid.bin video=HDMI-A-2:D
LibreELEC-MH:~ # 

and I don't see an issue yet. So generally I would be fine with adding it. But I would still like Milhouse to test that in his builds first, to see if others are complaining.

Thanks much for your patience, btw. Much appreciated. 👍

@kutmasterk
Copy link
Contributor Author

I am still puzzled that this works for you and not for me.

I guess it probably comes down to my ASROCK H81M board, which has it's own little quirks in other departments too. (cannot UEFI Boot headless, switches to CSM when booting with AVR off, etc.)

I also never unplug the HDMI Cable and am using an AVR too.

@a1rwulf
Copy link
Contributor

a1rwulf commented Oct 29, 2018

This broke display on LSPCON chipsets like kaby lake in the past.
Need to check if this is still the case.

@DaVukovic
Copy link
Contributor

@pizzaboy75

might be, yes. I'm using a H87 ITX board in my case.

thx @a1rwulf for testing.

@a1rwulf
Copy link
Contributor

a1rwulf commented Oct 29, 2018

@DaVukovic @pizzaboy75 do you have hdmi passthrough enabled on your AVR's?

@DaVukovic
Copy link
Contributor

The EDID I get is from my AVR and not from the connected TV.

I have a Rotel amp and I can't set anything in that regard. Not sure what the amp does internally. But I would say, it's not the EDID from the TV.

@kutmasterk
Copy link
Contributor Author

At the moment Passthrough is disabled because i use BT Headphones a lot and always forget disabling passthrough in kodi while using it.

As this now seems to be a more isolated issue, i am perfectly fine with not merging the commit.

I can add the Parameter on my own to make it work.

@a1rwulf
Copy link
Contributor

a1rwulf commented Oct 29, 2018

If hdmi passthrough is disabled, AVR's (at least the 3 I tested with) disconnect HDMI when on standby.
If enabled, they will send wether the TV's EDID or their own.

If @DaVukovic uses a different passthrough setting or his AVR does sth else, you may get different results.

@kutmasterk
Copy link
Contributor Author

kutmasterk commented Oct 29, 2018

Not sure what my Pioneer AVR does exactly.

In my testings the approach without video=$hdmi:D only works if the PC ist booting with the AVR already ON and the TV OFF.

If the AVR is off and the TV is off at boot, the screen only comes to life when i use video=$hdmi:D regardless of what i switch on first.

@5schatten
Copy link
Contributor

@pizzaboy75
that's basically the same behavior I experienced once video=$hdmi:D is missing.

@kutmasterk
Copy link
Contributor Author

Could this be a better option: xbmc/xbmc#14612 ?

@DaVukovic
Copy link
Contributor

Well, as for the reason that's already merged 9 days ago and if I understand that PR correctly, we should be able to drop that script completely if one does the specific changes fernet mentions.

I'll see if I can test that on LibreELEC.

I was also thinking of adding an additional option like getedid create force or similar where I could use $2 to decide if video=$hdmi:D will be added or not.

@a1rwulf
Copy link
Contributor

a1rwulf commented Oct 30, 2018

That's right.
The mentioned PR fixes exactly this problem.

@5schatten
Copy link
Contributor

5schatten commented Oct 30, 2018

Well about xbmc/xbmc#14612 since it's merged in beta 4 it should work now? I've tested it on my systems and I still need the edid to get video output.

@a1rwulf
Copy link
Contributor

a1rwulf commented Nov 5, 2018

@5schatten did you add the custom xorg.conf etc. like described in the PR?

@5schatten
Copy link
Contributor

@a1rwulf no I thought it was used for tests only. The custom xorg.conf is mandatory?

@a1rwulf
Copy link
Contributor

a1rwulf commented Nov 5, 2018

At least that's what I understood, but I haven't tried it yet.

@mglae
Copy link
Contributor

mglae commented Aug 18, 2019

Please merge this PR, getedid is useless without.

See Kodi/LE crashing when left alone

@DaVukovic DaVukovic merged commit 2c0288b into LibreELEC:master Aug 18, 2019
@DaVukovic
Copy link
Contributor

DaVukovic commented Aug 18, 2019

@pizzaboy75

I would also suggest that this might need a backport to the LE 9.2 branch. Would you like to PR that as well?

Edit:

And thanks for being that patient

@MilhouseVH
Copy link
Contributor

MilhouseVH commented Aug 19, 2019

@DaVukovic / @pizzaboy75 - I've added the backport to #3734

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants