Setting resolution on dual screen config

  • Hi!

    I use LibreElec/Kodi on a Intel NUC, which has 2 hdmi outputs.

    The first HDMI output is connected to my HT amplifier, to decode audio, and the output of the amplifier is connected to a monitor (resolution 1440x900).

    The second HDMI output is connected to a projector (resolution 1280x720).

    I have issues when I boot Kodi with or without projector/monitor on: resolution are not always correct.

    Is there a way to force resolutions on each output, to match the screen/projector, even if I switch them on after booting Kodi?

    Thanks,

    Frédéric

  • Normally the "getedid" command will detect the connected device and capture the EDID from it, then configure Xorg to use the captured .bin file to permanently force the detection. However that only works for a single output. If you want to swap between outputs you'll just have to remember to have the screen turned on before the box; or use the AVR to switch outputs without splitting audio/video.

  • I checked with XRANDR: the monitor supports 1280x720 mode (it stretches the image, but I don't care, it's only for configurations).

    So if I can force this mode on both outputs, I'm OK.

  • I found this interesting documentation:

    custom_edid [LibreELEC]

    I would like to do that, so I can turn on devices in any order, and use only the resolution I want.

    But how do I manage both inputs at the same time? In the Intel example, it seems to be HMDI1 or HDMI2, but not both.

    Any idea?

    Thanks.

  • Ok, I finally made it work!

    I followed what is written here:

    custom_edid [LibreELEC]

    In my case, I used the monitor edid datas, but projector datas would have been ok too, as the common resolution I want to use (1280x720) has exactly the same values for both. It is just that the projector was off when I did it.

    But I changed the additional parameters given to the kernel. I used:

    Code
      initrd=/edid.cpio drm_kms_helper.edid_firmware=edid/edid.bin video=HDMI-A-1:1280x720D video=HDMI-A-2:1280x720D

    First, for drm_kms_helper.edid_firmware, I didn't give the output, so it applies to all.

    Then, you can see that the video param can occurs several times. It is there possible to force the resolution (and other stuff), and the final D is to force the output even if there is no monitor/projector connected (or switched on).

    And all works great :)

    BTW, it is possible that using a single video= param, without the output name, also works; I let you check if needed, I'm tired to edit/reboot/edit/reboot (I may have done it 65 times!).

    Sources that helped me:

    custom_edid [LibreELEC]

    Kernel mode setting - ArchWiki

    Kernel Mode Setting (KMS) is great, but may not work as expected: OSADL - Open Source Automation Development Lab eG

  • Sorry for digging this old thread...

    I just upgraded my kodi install to Leia (9.0.1), and the above hack does not work anymore :o(

    I only get the image on the monitor, nothing on the projector. And the monitor uses resolution 1440x900 instead of 1280x720, as asked in kernel command line.

    Old files where still there after upgrade, but I re-did the entire procedure, without success.

    Any idea what has changed? It seems that the kernel does not take into account the additional params. Is there another way to do that, now?

    Thanks,

  • Ok, I found the solution!

    First, drm_kms_helper.edid_firmware becomes drm.edid_firmware.

    Second, the syntax of the video param is now video=HDMI-A-1:1280x720@60D instead of video=HDMI-A-1:1280x720@60:D. No more : before D. Grrr!

    Then, I had to generate 2 edid.bin files, one for the monitor, one for the projector. When using the monitor edid.bin file for the projector, the projector timings where wrong (it worked fine previously). So, the entire solution is:

    # mkdir -p /storage/.config/firmware/edid

    # cat /sys/class/drm/card0-HDMI-A-1/edid > /storage/.config/firmware/edid/projo_edid.bin

    # cat /sys/class/drm/card0-HDMI-A-2/edid > /storage/.config/firmware/edid/monitor_edid.bin

    # cd ~

    # mkdir -p cpio/lib/firmware/edid

    # cp .config/firmware/edid/* cpio/lib/firmware/edid/

    # cd cpio/

    # find . -print | cpio -ov -H newc > ../edid.cpio

    # mount -o remount,rw /flash

    # mv ../edid.cpio /flash/

    # nano /flash/extlinux.conf

    on the kernel command line, add:

    initrd=/edid.cpio drm.edid_firmware=HDMI-A-1:edid/projo_edid.bin,HDMI-A-2:edid/monitor_edid.bin video=HDMI-A-1:1280x720@60D video=HDMI-A-2:1280x720@60D

    And finally:

    # cd /lib/firmware/edid/

    # ln -s /storage/.config/firmware/edid/monitor_edid.bin monitor_edid.bin

    # ln -s /storage/.config/firmware/edid/projo_edid.bin projo_edid.bin

    # reboot

    Hope this helps!

  • Quote

    Ok, I found the solution!

    Thanks fmafma, I have the same setting (one receiver connects to nothing, only decoding sound, and one projector)

    I will follow your steps and hopefully this will output surround sound to my system + pictures to my projector.