Pine64 / RPi: Force Specific Screen Resolution

  • Hello there,

    i have a specific problem.

    We are currently turning a Pine64 to a video kiosk of some kind and for that i need that LibreElec/Kodi only uses the resolution of 3840x1080@30.

    I tried using my Autoexec Service with the specific xrandr command but everytime i change the resolution to something else and reboot afterwards it stays on the resolution picked by hand. The Service executes my xrandr command without failure.

    The screen that is later used is a 32:9 Display and the EDID gives 3840x2560@60/30 and 3840x1080@30/60 (and some other even higher resolutions that i don't need) and LibreElec chooses (correctly) the higher resolution but i need to force 3840x1080 because otherwise the played media has bars or is streched.

    Can you please help my with this problem?


    P.S. i don't have SSH access because on the Pine the Ethernet port wont work.

  • Use a kernel parameter. For RPi the file for kernel parameters is /flash/cmdline.txt. Editing steps on SSH session:

    1. mount -o remount,rw /flash
    2. nano /flash/cmdline.txt
    3. mount -o remount,ro /flash
    4. reboot

    Append the needed resolution as kernel parameter (syntax here). All kernel parameters have to be on the same line.

    Do you also have a cmdline.txt at your Pine64 file system?

  • P.S. i don't have SSH access because on the Pine the Ethernet port wont work.

    currently i'm using this image:

    LibreELEC-A64.arm-11.0-nightly-20220413-5dcdedf-pine64

    Unrelated to your reported issue, but this sounds like you have wrong image. Most probably you want pine64-plus image. Basically the only difference between these two images are ethernet port settings.

    Back to your issue:

    Do you have a cmdline.txt in your Pine64 file system?

    cmdline.txt is RPi specific. U-Boot based images have extlinux/extlinux.conf, where kernel arguments can be added.

    then you can append the needed resolution (syntax here).

    While I did not try it, it should work IMO.

  • Thank you for your help, i will try using the Plus Image for Ethernet support and the kernel arguments for forcing the resolution.
    As soon as i have results i will tell you if it worked or not.

  • but is it possible, that xrandr isnt a command anymore?

    xrandr has never been supported on LE ARM images, at least to my knowledge. xrandr implies X11, which is not used here and it's on its way out even for Generic. Here Kodi directly interacts with DRM drivers, without any window manager in between (GBM mode).

  • I still need help here

    I tried to use different kernel parameters, i tried using different kernel parameters with custom edid and i tried kernel parameters with a real edid.

    Everytime i get a blank screen when i try this kernel parameter:

    initrd=/edid.cpio drm_kms_helper.edid_firmware=edid/edid.bin video=card0-HDMI-A-1:3840x1080D

    I just want to force 1 Resolution on every screen, this cant be this difficult to achieve.

    Other way around: The used display gives 2 Resolutions, 3840x2560 and 3840x1080, as far as i understand this, Kodi takes the higher one. Can i force kodi without interaction (using some kind of setting) to use 3840x1080?

    Or can someone give me a custom edid with only 3840x1080@30 and tells me how to tell LE to use this edid, because i dont get it?

    Thank you in advance

    Edited once, last by kevink (May 12, 2022 at 2:57 PM).

  • Everytime i get a blank screen when i try this kernel parameter:

    initrd=/edid.cpio drm_kms_helper.edid_firmware=edid/edid.bin video=card0-HDMI-A-1:3840x1080D

    edid/edid.bin doesn't exist, so yeah, kernel gets confused. Note, loading custom edid is not really supported as of now in some LE images (including AW), because kernel tries to load file before filesystems are even mounted.

  • Thanks for the help, i finally found the solution.

    It was really as simple as adding some kernel parameters to the append line in the extlinux.conf.

    My looks now like this:

    Code
    LABEL LibreELEC
      LINUX /KERNEL
      FDT /sun50i-a64-pine64.dtb
      APPEND boot=UUID=1304-1642 disk=UUID=fd58b039-6b5a-45b3-9576-325b932d81fa quiet console=ttyS0,115200 console=tty1 video=HDMI-A-1:3840x1080@30e    

    This topic can be closed, thank you again.

  • Sorry to reopen an existing thread but....

    Man, I wish I found this a few months ago (ironic it was on this forum) I have been running libreelec for a while and have ambilight using hyperhdr. Unfortunately kodi wouldn't take the HDMI source as the primary display all the time and tried to output through the USB grabber, it thought was a display and would display a black screen. This resulted in me running libreelec on one NUC and hyperhdr/ubuntu on another...This was obviously less than desirable.

    I tried all the above which was recommended by others on other forums but nothing worked until just appending a video parameters to grub solved it. (Using an edid file did work but it broke HDR capabilities.)

    Thank you kevink

    Also I had a similar issue a year ago where I had a DP -> HDMI cable going from libreelec NUC to a receiver. This was in place as the receiver only supported 7.1 channel TrueHD etc audio on specific HDMI ports (due to the limitations of ARC). I ended up settling for 5.1 audio due to this.

    I'm 99% sure when I plug the dp cable back in and send audio over that from kodi this will solve that issue too. Winning.

    Hopefully that helps others and mods may consider this post as sticky. If not delete it.

    Here is the explanation of grub video(and others) parameters: http://distro.ibiblio.org/fatdog/web/faqs/boot-options.html

    Edited once, last by libreAU (January 25, 2023 at 4:40 AM).