occasionally it also happens to me that it restarts itself but I don't know if the cause and the high temperature
Have you tried with another power supply ?!
Regarding temperature, I renewed the thermal paste of the heat sink and the CPU is fresher
occasionally it also happens to me that it restarts itself but I don't know if the cause and the high temperature
Have you tried with another power supply ?!
Regarding temperature, I renewed the thermal paste of the heat sink and the CPU is fresher
Thank you. I followed these steps and everything looked to be ok, but when I tried to start the system I got an error message "failed to start login service". The system starts but a lot of services are no running (ssh, etc). I think I will have to back to the original image.
It's strange because
- I'm using an image with this patch
- the two files are used only with software decoded streams(during my experiments, eventually broken shaders cause only black screen during playback)
I forgot to say that the whole procedure must be performed as super user, because otherwise there is the risk that the resulting filesystem may have wrong permissions.
In any case, the correct procedure would be to recompile the image with the patch. I'll try to send it to the project maintainer.
Can you please elaborate how to apply this patch? I would like to be able to play hevc files without system reboot,
Thank you
Assuming that you have a linux distribution:
- flash image as usual on a SD card
- mount first partition of sd card on your linux machine
- explode libreelec filesystem with squashfs tools
at this point under squashfs-root you can find the exploded filesystem of libreelec.
- replace file squashfs-root/usr/share/kodi/system/shaders/GLES/2.0/gles_yuv2rgb_basic.frag
/*
* Copyright (C) 2010-2013 Team XBMC
* http://xbmc.org
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This Program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XBMC; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
*
*/
#version 100
precision mediump float;
uniform sampler2D m_sampY;
uniform sampler2D m_sampU;
uniform sampler2D m_sampV;
varying vec2 m_cordY;
varying vec2 m_cordU;
varying vec2 m_cordV;
uniform vec2 m_step;
uniform mat4 m_yuvmat;
uniform mat3 m_primMat;
uniform float m_gammaDstInv;
uniform float m_gammaSrc;
uniform float m_toneP1;
uniform vec3 m_coefsDst;
uniform float m_alpha;
void main()
{
vec4 rgb;
vec4 yuv;
#if defined(XBMC_YV12) || defined(XBMC_NV12)
yuv = vec4(texture2D(m_sampY, m_cordY).r,
texture2D(m_sampU, m_cordU).g,
texture2D(m_sampV, m_cordV).a,
1.0);
#elif defined(XBMC_NV12_RRG)
yuv = vec4(texture2D(m_sampY, m_cordY).r,
texture2D(m_sampU, m_cordU).r,
texture2D(m_sampV, m_cordV).g,
1.0);
#endif
/* START PATCH: DISABLE BT.709 colorspace conversion
rgb = m_yuvmat * yuv;
rgb.a = m_alpha;
#if defined(XBMC_COL_CONVERSION)
rgb.rgb = pow(max(vec3(0), rgb.rgb), vec3(m_gammaSrc));
rgb.rgb = max(vec3(0), m_primMat * rgb.rgb);
rgb.rgb = pow(rgb.rgb, vec3(m_gammaDstInv));
#if defined(XBMC_TONE_MAPPING)
float luma = dot(rgb.rgb, m_coefsDst);
rgb.rgb *= tonemap(luma) / luma;
#endif
#endif
END PATCH: DISABLE BT.709 colorspace conversion */
gl_FragColor = vec4(vec3(m_yuvmat * yuv),m_alpha);
}
Display More
- replace file squashfs-root/usr/share/kodi/system/shaders/GLES/2.0/gles_yuv2rgb_bob.frag
/*
* Copyright (C) 2010-2013 Team XBMC
* http://xbmc.org
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This Program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XBMC; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
*
*/
#version 100
precision highp float;
uniform sampler2D m_sampY;
uniform sampler2D m_sampU;
uniform sampler2D m_sampV;
varying vec2 m_cordY;
varying vec2 m_cordU;
varying vec2 m_cordV;
uniform float m_alpha;
uniform mat4 m_yuvmat;
uniform float m_stepX;
uniform float m_stepY;
uniform int m_field;
uniform mat3 m_primMat;
uniform float m_gammaDstInv;
uniform float m_gammaSrc;
uniform float m_toneP1;
uniform vec3 m_coefsDst;
void main()
{
vec4 rgb;
vec2 offsetY;
vec2 offsetU;
vec2 offsetV;
float temp1 = mod(m_cordY.y, 2.0 * m_stepY);
offsetY = m_cordY;
offsetU = m_cordU;
offsetV = m_cordV;
offsetY.y -= (temp1 - m_stepY / 2.0 + float(m_field) * m_stepY);
offsetU.y -= (temp1 - m_stepY / 2.0 + float(m_field) * m_stepY) / 2.0;
offsetV.y -= (temp1 - m_stepY / 2.0 + float(m_field) * m_stepY) / 2.0;
float bstep = step(m_stepY, temp1);
// Blend missing line
vec2 belowY, belowU, belowV;
belowY.x = offsetY.x;
belowY.y = offsetY.y + (2.0 * m_stepY * bstep);
belowU.x = offsetU.x;
belowU.y = offsetU.y + (m_stepY * bstep);
belowV.x = offsetV.x;
belowV.y = offsetV.y + (m_stepY * bstep);
vec4 rgbAbove;
vec4 rgbBelow;
vec4 yuvAbove;
vec4 yuvBelow;
yuvAbove = vec4(texture2D(m_sampY, offsetY).r, texture2D(m_sampU, offsetU).g, texture2D(m_sampV, offsetV).a, 1.0);
rgbAbove = m_yuvmat * yuvAbove;
rgbAbove.a = m_alpha;
yuvBelow = vec4(texture2D(m_sampY, belowY).r, texture2D(m_sampU, belowU).g, texture2D(m_sampV, belowV).a, 1.0);
rgbBelow = m_yuvmat * yuvBelow;
rgbBelow.a = m_alpha;
rgb = mix(rgb, rgbBelow, 0.5);
/* START PATCH: DISABLE BT.709 COLOR CONVERSION
#if defined(XBMC_COL_CONVERSION)
rgb.rgb = pow(max(vec3(0), rgb.rgb), vec3(m_gammaSrc));
rgb.rgb = max(vec3(0), m_primMat * rgb.rgb);
rgb.rgb = pow(rgb.rgb, vec3(m_gammaDstInv));
#if defined(XBMC_TONE_MAPPING)
float luma = dot(rgb.rgb, m_coefsDst);
rgb.rgb *= tonemap(luma) / luma;
#endif
#endif
END PATCH: DISABLE BT.709 COLOR CONVERSION */
gl_FragColor = rgb;
}
Display More
- repackage squash filesystem, copy to sd card and umount
# mksquashfs squashfs-root/ SYSTEM -comp gzip
# cp SYSTEM /some_mountpoints/SYSTEM
# umount /dev/mmcblk0p1
that's all.
NB: this patch disable BT.709 color conversion that is slow on my mali 400 because it's use the pow math function.
Searching on kodi official github I've found
- Kodi PR#15286 improved rendering performance: · wrxtasy/CoreELEC@8f98ed7 · GitHub CoreELEC patch that is basically what I've done with my box
- [GLES] memcpy instead multi glTexSubImage2D for planes with pitch by peak3d · Pull Request #15286 · xbmc/xbmc · GitHub discussion of what is the problem
- Kodi 18.0 stutters when playing DVD files (VIDEO_TS) on Fire TV · Issue #15405 · xbmc/xbmc · GitHub discussion (now closed) that let me thinking kodi devs will never accept this kind of patch (that is, obviusly, more like a workaround than a solution)
At this point let me know knaerzche if you think reasonable to patch only this libreelec port.
Just for share my experience:
- I've switched back to stable (only because I don't need an external wifi usb adapter)
- patched kodi (no overclock.. no governor... only shaders)
and now, I'm able to play well also netflix/prime tv shows with the appropriate kodi addon (assuming sd quality that is the max available resolution with the DRM addon usable with libreelec).
Overclocking does not worth it, the GPU and memory subsystems (2 core GPU + 64 bit memory bus) are simply not tough enough on the rk322x.
You are right... this kind of box is not suitable for cpu/gpu intensive tasks, but, in my opinion, it's powerful enough for libreelec usage.
Looking into kodi source I've discovered that for software decoded streams, gpu is used for upscaling and color conversions (opengles vertex/fragment shaders).
With a mpeg4 stream (that in mainline libreelec is not hardware decoded) playing with scaler(nearest vs bilinear) and resolutions (fullhd vs hd), make video looks worse/better.
So after some experiments with shaders I've finally found this trick.
To reduce gpu load I've substantially reverted this commit (by removing sections into shaders)
[GLES] VideoPlayer: rewrite yuv - rgb conversion · xbmc/xbmc@0aadf5d · GitHub
that introduces other colorspace conversions.
I know it's not a clean solution, considering I'm not a color space expert, but now the box is almost perfect
Hi all,
I've discovered that changing the gpu governor from 'simple_ondemand' (that seems to be hardcoded at startup into lima driver) to 'performance', set the gpu clock stable to maximum rate, improving overall gui experience.
I've also experimented that
- the gpu is overclockable at 700Mhz (higher clock rate cause hard reset)
- CPU can be overclockable at 1,500Ghz
However, the above clocks settings don't seem to make miracles (at least with kodi).
Display MoreHi guys,
I tried to plug my V88-4K (rk3229) box to a monitor (supports touch but whatever) that is capable of:
640 x 480 at 60Hz
800 x 600 at 60Hz
1024 x 768 at 60Hz
1280 x 800 at 60, 60RB Hz
1280 x 960 at 60Hz
1280 x 1024 at 60Hz
1360 x 768 at 60Hz
1366 x 768 at 60, 60RB Hz
I couldn't manage to make it sync so, no image at all... it tries to auto sync to the box with no result.
Do I need to change anything in the SYSTEM image, add some file to my SD card root or folders?
Thanks!!!
Hi,
try to open file on sdcard first partition extlinux/extlinux.conf and remove/adjust the resolution inside kernel parameter 'video'
Hello friend can you tell me how you did it? thanks
With latest builds it shouldn't be needed anymore. If the ddr3 version not works for you try the ddr2 (alfawise a8 for rk3228 or v88mars for rk3229).
QuoteIf you could share your trick the let UHS mode work would be greatly appreciated!
I don't have a fix for UHS.. I've disabled it so my card works slower, but works.
knaerzche has explained this better in older post
Regarding sd card you are right, my fault. But i've started playing with this box a weeks ago, so if you tell me "double check"
Quote
BTW: Would be great if you relase source / write an howto for your slackware attempt like jock2 did it for armbian.
Maybe in my spare time, but substantially starting from your image (for the uboot/trust parts) I've only recompiled kernel (disabling initramfs that load libreelec squashfs filesystem) and followed the README
Quote
Hhhm, the card showed on your pics is a UHS1-Card.
you are right, sorry.
However my aim is to share with other peoples my tests and some coding in order to help development.. But thanks to your hard works, my box with some tricks works even with uhs1 (I've also rebuilt kernel and installed Slackware for fun). Discover what exactly was wrong with your images or what model exactly I've buyed is only for that. If you think are useless I stop spaming
Trust me guys, all rk3229 images not works for me. Now I've tried rk3229 - V88mars but it won't boot (only red led).
Then I've flashed trust.img for rk3228x and boot with blu led but hangs (no sdcard).
Finally I've replaced the dtb with mine (without uhs support for sd card controller) and all works.
Sadly I'm not able to debug via uart (not visible pins on my board) to see why my rk3229 box seems to be another thing.
EDIT: I'm not using uhs cards because I've discovered that my sd controller does not support uhs at all (this is why the controller crash on boot, kernel try to send some commands for uhs supports, but controller never responds) so the only fix is to disabling it.
Hi jock2, I'm a bit confused about what is my real model, but i think it's normal with this chinese boxes.
I've only tried almost all images (also the one for rk3229) and the only that boots is the one for the mx4 4k pro with my modified dtb.
for knaerzche , I've finally discovered what not works on my box with your images. This is my dts coded on top of an rk3228b box dts.
/*
* Copyright (C) 2020 knaerzche <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
#include "rk3228b-box.dtsi"
/ {
model = "RK3228b V88 (mx4vr-v01 board)";
leds {
compatible = "gpio-leds";
led_blue {
gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_red {
gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_LOW>;
default-state = "off";
linux,default-trigger = "rc-feedback";
};
};
};
&dmc {
status = "disabled";
};
&sdmmc {
/delete-property/ sd-uhs-sdr50;
/delete-property/ sd-uhs-sdr104;
};
Display More
I've disabled dmc and some sdmmc commands that hangs the sd controller.
I've a similar board (mine is mx4vr-v01). The image that works for me is the one for "MXQ 4K Pro, RK3228A, DDR3".
Probably you need to replace kernel dtb because in my case the image boots, turn on blue led but freeze with blank screen.
So I've extracted the dtb from my android firmware and used that.
Thanks for the explanation. If I understand correctly Netflix and others, legally allow viewing HD contents on linux. So I lowered the resolution, (to avoid useless upscaling), and the frame dropping disappear.
For me it's better than nothings
After several days of tests and experiments, considering the architecture and the price of the box, the hardware features are excellent.
Some emulators and local streaming are fine.
Paid streaming addons work, but unfortunately, hardware acceleration for DRM content seems to be impossible.(h264 Hardware decoding? · Issue #207 · peak3d/inputstream.adaptive · GitHub)
Hi knaerzche thanks for your hard work. I've finally run some sort of linux in my box
I'm not sure what is my model but seems to be a Shishion V88 plus with rockchip 3228, 1Gb ram 8Gb rom and ssv6501p wifi card.
Your images for rk3228 works for me only with the dtb extracted from my android firmware, so I'll share the decompiled dtb in case you what to add this device.
I have one question, and some tips
Do you have the source code of trust images for rk3228, or you have found it somewhere!?
Next the tips, with "noop" scheduler and "performance" cpufreq scaling governor (now is interactive by default that is good for smartphones) the box run better.
Thanks
Michele