Rpi4 nightly builds and 7" touchscreen

  • Hello,


    I'm using the Rpi4 with the official 7" touchscreen (both attached to a SmartiPi case so it can be used as a kiosk-style media player), and I've noticed that with the nightly builds, when starting up Libreelec, no display comes up on the touchscreen (unlike with the 9.2.x releases of Libreelec utilizing Kodi 18). I've verified this issue with both the 9.80 and 10.0 nightly builds. Is there any special setup that needs to be done for the 7" touchscreen to be enabled in the nightly build, or does support for the touchscreen need to be added to the build?


    Thanks.

  • I think adding dtoverlay=vc4-kms-dsi-7inch to /flash/config.txt should do the trick.


    /flash/overlays/README says:

    Code
    Name:   vc4-kms-dsi-7inch
    Info:   Enable the Raspberry Pi DSI 7" screen.
            Use edt-ft5406 for the touchscreen element.
            Requires vc4-kms-v3d to be loaded.
    Load:   dtoverlay=vc4-kms-dsi-7inch
    Params: <None>


    vc4-kms-v3d is what LE10 on RPi is using (loaded via distroconfig.txt)


    so long,


    Hias

  • Thank you for the info.


    I made that change in config.txt, and unfortunately that change alone didn't enable the 7" touchscreen. However, I did find another change that also needed to be made in order for it to work.


    I looked at /flash/overlays/README. In addition to the mention of vc4-kms-v3d, it also mentioned another version of this...


    vc4-kms-v3d-pi4


    In the distroconfig.txt file within the /flash directory, I replaced vc4-kms-v3d with vc4-kms-v3d-pi4 in the dtoverlay command shown in there. That change, along with the change you mentioned in config.txt, enabled the 7" touchscreen.


    Thank you for your help.

  • Having been fiddling around with the March 1 nightly build, with the above changes made, I have noticed that audio is disabled within the setup of Libreelec and that the "Audio output device" option within /Settings/System is greyed out. Because I'm not using a HDMI connection for both video and audio (instead intending to use the 3.5mm audio jack due to using the touchscreen), I'm guessing that this might have something to do with it. In the 9.2.x releases, I can change the "Audio output device" setting, but it's greyed out in the March 1 build with my setup.

  • Now this is really odd. vc4-kms-v3d will load vc4-kms-v3d-pi4 on RPi4 (due to some magic trickery of the firmware using overlay-map.dtb) so the result should be exactly the same.


    Can you post your config.txt file?


    so long,


    Hias

  • Here is the config.txt file...


    # SPDX-License-Identifier: GPL-2.0-or-later

    # Copyright (C) 2009-2014 Stephan Raue ([email protected])

    # Copyright (C) 2016-present Team LibreELEC (LibreELEC – Just enough OS for KODI)

    ################################################################################

    # Bootloader configuration

    # config.txt version v1 (do not remove or change this line!)

    ################################################################################

    # For more options and information see

    # config.txt - Raspberry Pi Documentation

    ################################################################################


    # Default GPU memory split, 76MB are needed for H264 decoder

    gpu_mem=76


    # Don't send initial active source message.

    # Avoids bringing CEC (enabled TV) out of standby and channel switch when

    # rebooting.

    hdmi_ignore_cec_init=1


    ################################################################################

    # Include distribution specific config file if it exists.

    ################################################################################

    [all]

    include distroconfig.txt


    # uncomment to enable infrared remote recevier connected to GPIO 18

    #dtoverlay=gpio-ir,gpio_pin=18


    dtoverlay=vc4-kms-dsi-7inch

    # test



    Here is also the distroconfig.txt file with the change I referred to...


    # SPDX-License-Identifier: GPL-2.0-or-later

    # Copyright (C) 2019-present Team LibreELEC (LibreELEC – Just enough OS for KODI)


    # WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!

    dtoverlay=vc4-kms-v3d-pi4,cma-512

    dtoverlay=rpivid-v4l2

    disable_overscan=1

    disable_fw_kms_setup=1



    Also from doing further testing, I'm noticing that the touchscreen showing a display in the test build is intermittent. Sometimes on startup, it works fine. Sometimes on startup, the display looks pixelated when the test build has reached the screen with the options for music, pictures, video, etc. And sometimes on startup, there is no display. I haven't been able to find a pattern to any of it that I can replicate.

  • I noticed there's an open issue about the 7" display on RPi kernel github: Full KMS does not work with pi4 and official touchscreen on kernel 5.10.1 · Issue #4020 · raspberrypi/linux · GitHub


    That issue and 6by9's post on the RPi forum also mention that "ignore_lcd=1" should be added to config.txt How does the official Raspberry Pi 7" Touch Screen work? - Raspberry Pi Forums


    There's also a WIP PR to update the 7" driver WIP: KMS DSI panel config by 6by9 · Pull Request #3985 · raspberrypi/linux · GitHub - when this makes it into the RPi kernel we'll also include it in LE.


    so long,


    Hias

  • That makes sense regarding the need of updating the 7" touchscreen driver in the kernel.


    Also, FYI, in distroconfig.txt, I changed the dtoverlay setting back to vc4-kms-v3d instead of continuing to use vc4-kms-v3d-pi4. Having done further testing, and now being aware of the 7" touchscreen driver issue in the current kernel, it indeed appears that vc4-kms-v3d-pi4 does not need to be put in there (the intermittent display issues are exactly the same either way). I'll also add ignore_lcd=1 to config.txt as suggested.


    Thank you so much for your help.