[UNOFFICIAL][RK3228/RK3229][box]Libreelec builds

  • hi Wyk72 and RuBeN16v ,

    from what I remember, the problem is a corrupt/incompatible edid (edid is the descriptor stored in the tv that tell kernel wich resoultions are supported).

    When the kernel fails to parse it, sets the resolution fixed (1024x768) with no audio.

    I am trying to find a solution, even if it is difficult to replicate.

    In any case I advise you to check if is possible to update firmware of TV.

    Wyk72, believe me, these boxes when they work are great with libreelec.

    The latest versions of mesa (the opensource graphics driver) significantly increase graphics performance. And compared to having a more recent board, with kodi and our boxes the differences are clearly seen.

  • I kinda "solved" it by getting the EDID with an el-cheapo HDMI->VGA adapter that sends the EDID in a format the box understands. I extracted it, put it into the LibreELEC overlay, modified kernel line parameters accordingly and finally works. See my previous post.

  • hi Wyk72,

    try this build

    testing – Google Drive

    Inspired by the legacy rockchip kernel, I've elaborated a simple patch that set some hd & fullhd resolutions when edid is broken/fails to load.

    Please note that it's a working progress, with updates that I still have to test thoroughly.

    Cheers

    Michele

  • ilmich : tried the new build and it works, my monitor is limited to 1280x720 and 720x480, but that's EXACTLY the right resolution to work with the box.

    HDMI audio works, too.

    Thanks a million.


    P.S.

    Maybe there's a "one-size-fits-all" EDID somewhere to inject in the kernel line as I did, to get some "forced" resolutions ?

  • hi Wyk72,

    retry with

    testing – Google Drive

    due to a typing error, fullhd resolutions are not injected.

    Maybe there's a "one-size-fits-all" EDID somewhere to inject in the kernel line as I did, to get some "forced" resolutions ?

    But what resolutions does your monitor support!?!?

    In any case I don't know, I never had to. I think you have to be careful not to overdo the resolutions, because you could ruin the monitor (edid also exists for this).

    Anyway if you tell me it works, maybe without fullhd resolutions (which might not be ok for old monitors) but I'll put the patch in the next build.

    A thousand thanks

    Michele

  • Thank you very much ilmich and thanks for your work Wyk72

    I have just tried the last testing version you have uploaded and the box is working perfect now

    Resolutions up to 1080 (in a 4k monitor) and audio working perfect trought HDMI

    I have to say with that build Wifi and bluetooth are working too.

    Thank you very very very much, you have just converted a piece of trash into a very smooth kodi player,

  • hi RuBeN16v

    thank you very much for test. I try my best to make this port the best it can be for these boxes.

    I ask you two courtesies

    1) can you send me the edid of your monitor !? it seems strange to me that it is not detected correctly also because the box supports 4k (I don't have a 4k tv unfortunately)

    2) can you give me the name of your board !? Definitely with libreelec 11, but already now I want to start register boards and creating the appropriate dts. Doing it by model does not work, because often what is indicated in the case does not correspond to the board contained in it.

  • ilmich : your latest build works fine and I can select 480p (720x480) hd (1280x720) and fullhd (1920x1080) resolutions on my monitor, sound working correctly.

    The problem shows up with some monitors: for example, my Samsung 32" TVs is correctly identified, my Samsung 27" PC monitor is not. Both on the HDMI port, of course.

    You latest patch corrects the problem.

    But what resolutions does your monitor support!?!?

    I agree, it's a stupid idea :)

  • hi RuBeN16v

    thank you very much for test. I try my best to make this port the best it can be for these boxes.

    I ask you two courtesies

    1) can you send me the edid of your monitor !? it seems strange to me that it is not detected correctly also because the box supports 4k (I don't have a 4k tv unfortunately)

    2) can you give me the name of your board !? Definitely with libreelec 11, but already now I want to start censoring the boxes and creating the appropriate dts. Doing it by model does not work, because often what is indicated in the case does not correspond to the board contained in it.

    Of course, but I don't know how to get the edid, if someone has a "how to", or let me know how to do it I'll be glad to help

    Anyways the pics I uploaded are on my QHD BenQ EX3203R

    For the name of the board here you have a pic, I suppose it is MX4V

  • Mich thank you for all the work you give us. Last March I tried your libreelec on my mxqpro rk 3229 box but it didn't go at all well, while now I tried the latest version and it has improved a lot but I noticed two problems the first is the Samba that does not work in fact the wifi works but even if apparently enabled the samba does not work. Another problem is that every now and then it restarts by itself and does it while I use the pvr

  • MIKMXIII

    does the Samba problem appear onto wifi or ethernet cable too ?
    If on wifi , have a look at post 83 and 85

    If in any situation , well let's wait ilmich answer

    And is not true that all mxq pro are 3229, we catched some 3228 ( not even 3228a ) :dodgy:

  • Hi RuBeN16v,

    Of course, but I don't know how to get the edid, if someone has a "how to", or let me know how to do it I'll be glad to help

    Anyways the pics I uploaded are on my QHD BenQ EX3203R

    from an ssh session launch

    Code
    tvchiptryp:~ # dump-active-edids
    found active connector(s) HDMI-A-1

    that outputs edid in /storage/.config/firmware/edid/

    Code
    tvchiptryp:~ # ls /storage/.config/firmware/edid/
    edid-HDMI-A-1.bin

    MIKMXIII, can you kindly send the model of the board (not the box) and some logs!?

    In any case, if you have a 6051p wireless chip, unfortunately the current driver does not work very well (it is a re-adaptation of the legacy driver that in some cases gives problems).

    In fact, there are problems with arp requests and therefore the device is basically not detected on the network. It also depends on the wifi router (with mine, for example, it just can't connect, with another router it does)

    Unfortunately I have not been able to stabilize the driver yet and I have solved it with a usb wifi adapter.

  • Maybe OT, but still:

    I have a question for ilmich : I have ported the latest Alpine Linux (3.16) on this device, kernel modules & firmware from Armbian (kernel 5.16.11), using the "overclock" DTB you kindly provided for this LibreELEC.

    It works pretty well for everything , but I have troubles with video drivers/mesa anything video related.

    I'd like to get some info about how to get "skeletal" video hardware acceleration with a player i.e. mpv , from the terminal.
    All the bits&pieces from hantro/rvdec seem to be there i.e. v4l2, and the "lima" driver too. But using them on this platform is still sort of a "black art", afaik I need patches from various sources to ffmeg/mpv/ something else ?

    Can you point me somewhere, give me some hints, if you can ?

    As usual, thanks 100000

  • hi Wyk72,

    hardware decoding, as you have noticed, is a work in progress.

    I've never tried with mpv, but you need to make sure you have the kernel patches (hantro / rkvdec) and also those for ffmpeg to enhance the v4lrequest layer to work with the kernel.

    If you want to use libreelec's patches for ffmpeg 4.3 you can find them here

    LibreELEC.tv/ffmpeg-001-v4l2-request.patch at libreelec-10.0 · LibreELEC/LibreELEC.tv
    Just enough OS for KODI. Contribute to LibreELEC/LibreELEC.tv development by creating an account on GitHub.
    github.com

    Regarding the gpu, the latest versions of the userspace mesa driver greatly optimize the performance of our mali400.

    So check that your system has at least version 22.0.x.

    As a bonus you can use these patches (taken from some official merge requests in the approval phase) which, if you still use my libreelec port, make a difference in terms of system fluidity.

    LibreELEC.tv/packages/graphics/mesa/patches at libreelec-10.0 · ilmich/LibreELEC.tv
    Just enough OS for KODI. Contribute to ilmich/LibreELEC.tv development by creating an account on GitHub.
    github.com

    As for the kernel, I don't tell you, because they should already be present in the armbian port and in any case you are using a different kernel than the one my port uses.

  • Thanks ilmich .

    After a long and deep research, I've noticed that everything is way too .. "fluid" at the moment for mpv w/hwdec to work reliably with rockchip cpus.

    There was a step in the right direction here:

    https://github.com/bootlin/libva-v4l2-request

    It was a wrapper lib that allowed to use the v4l2-request with more or less standard VAAPI infrastructure, but it's in abandoned state, and a lot of changes/patches are still ongoing in the mainline kernel. It's the Linux standard way to use video hardware decoders since Sandy Bridge (2011, more than ten years ago), but for some reason all the SoC stuff has to be hardcoded/specially built.

    The only solution "simple enough" I can think of is using your LibreELEC (kernel 5.10 based) as a framework, and modify it to compile an mpv binary, and avoid launching kodi at startup. It should be simple enough for my purposes: what I need is kernel with wireguard support (that libreelec already has) and a video player that launches automatically a video in fullscreen mode.

    It seems rather difficult, because of the way LibreELEC is built.

    Way too many moving parts: I'll use .py scripts with your LibreELEC build.


    Thanks again.

  • Hi all,

    new build available with:

    - linux 5.10.120

    - mesa 21.0.5

    - fix cpu thermal throttling

    - fix 8723cs bluetooth

    - minor fixes and improvements

    RuBeN16v, Wyk72 the patch that forces the resolutions in case of wrong edid was not included because it's risky.

    To solve, the best way is to use the edid compiled at this url (for example)

    GitHub - akatrevorjay/edid-generator: Hackerswork to generate an EDID blob from given Xorg Modelines, complete with valid checksum.
    Hackerswork to generate an EDID blob from given Xorg Modelines, complete with valid checksum. - GitHub - akatrevorjay/edid-generator: Hackerswork to generate…
    github.com

    based on the capabilities of the monitor.

    cheers

    Michele

  • Another time THANKS

    I have done what you said but it generates a 0kb .bin file so i don´t know if something is wrong, anyways here you have the edid file.

    Hope it helps

    edid-HDMI-A-1.txt

    I have renamed it to txt so I can upload it