Any way to override/change vsync settings for DRM apps?
I've tried running kmscube/glmark2/kodi with vblank_mode=0, output is still capped at monitor 60fps, or fraction of it (30,15,12,10...) for slower renders.
Any way to override/change vsync settings for DRM apps?
I've tried running kmscube/glmark2/kodi with vblank_mode=0, output is still capped at monitor 60fps, or fraction of it (30,15,12,10...) for slower renders.
I'm not even sure what it does. Something with 3D mode? If so, that's completely untested and unlikely it will get better anytime soon. I have no 3D display nor do I plan to obtain it.
Monoscopic mode consists of displaying a video that is originally in 3D in 2D.
The only difference between my test image and nightly from that day are just two lines of debug output. You can treat them same. Clean install is recommended every now and then, when bootloader is updated.
OK, thanks, Jernej! I have one more question. I see there are settings for buttons repeat time in CEC adaptor. Should they be set to the corresponding brand's TV remote model, or not? I am just trying to figure out why I have problems with CEC on my old Pioneer Kuro plasma TV. I've got multiple CEC100 errors when CEC adaptor (in Kodi) and HDMI control (in TV) are enabled (see the attachment).
The only way to eliminate these errors is to disable CEC adaptor in Kodi. But I've got a black screen (no image) if Kodi was started while the TV has been set to any other input before. And the Kodi is workable at this moments (hear GUI control sounds). The reboot from Kodi remote app makes the board to start showing image again after such issue...
Strange problem, playing 23.976 FPS video outputing to 23.976 Hz TV on Beelink GS1 is rather jerky, micro stutters twice a second or so.
Switching CPU governor from default schedutil to ondemand makes things even worse. Changing governor to fixed frequency like performance or powersave helps, most of stutters are gone, but not all. Tested on two different TVs, same result.
Making Kodi draw any OSD during playback completely solves this issue, no matter what governor is active.
Can send a short video sample with pan movement, if needed.
Hello to everyone and thanks to jernej for his great effort with these builds. I own an OPi PC, I'm currently using the 20210421 image and I'm experiencing something similar (or maybe it hasn't anything to do with it) to what was being described here by levitsky86.
First of all, there is a BIG difference between my scenario and his. I'm not talking about iptv so connection bandwidth isn't an issue for sure. I'm talking about DVB-T broadcasted contents. To view them using my OPi PC I use tvheadend server downloaded here along with an Xbox One Tuner (Panasonic MN88472). I'd like to underline that I've already ruled out issues with the tuner itself having tested another tuner (still an Xbox One) with the same results, the both of them going perfectly fine both with an RPi 3 and a Wetek Core, still on Libreelec.
If I play SD contents, everything is absolutely fine and smooth while if I play HD contents (I've checked and they're H.264) it goes fine for a while (sometimes just a couple of minutes, sometimes even thirty minutes but sooner or later the same happens) then the image 'pixelates' and it never recovers. The more the scene is fast, the more the pixelation is worse while the audio remains perfect and smooth.
The only way to stop it from happening is to change the channel to an SD one then back to the HD one and everything recovers till the next time it starts acting up again.
Maybe it's just a coincidence but, prior to switching to the tvheadend server version linked above, I was using an older version from the 4.2 branch and the problem seemed even worse but probably the cause wasn't the different tvheadend server version but the fact that I was on an older image too.
A nice day to everyone!
Hello, I bought two q + (Tanix Tx6 clone) in amazon, one has 4gb ram and 32gb emmc (this one does not work) the other with 2Gb and 16gb I think it is nand, if it works but (obviously) I cannot install in emmc.
Do I need to open the box to physically see the components or can it be done without disassembling? I have ssh access in both.
I've tried yesterday's nigthy and the official
Thanks
I have one more question. I see there are settings for buttons repeat time in CEC adaptor. Should they be set to the corresponding brand's TV remote model, or not? I am just trying to figure out why I have problems with CEC on my old Pioneer Kuro plasma TV. I've got multiple CEC100 errors when CEC adaptor (in Kodi) and HDMI control (in TV) are enabled (see the attachment).
It's first time I see this kind of error. But then again, CEC behaves differently on different devices. I have experience only with my LG B8 TV, where CEC behaves normal. Just experiment...
offbeat Reason why OSD helps is probably because EGL provides vsync... I don't know. Maybe windowing/gbm: Add display clock by popcornmix · Pull Request #19601 · xbmc/xbmc · GitHub will help. IDK.
First of all, there is a BIG difference between my scenario and his. I'm not talking about iptv so connection bandwidth isn't an issue for sure. I'm talking about DVB-T broadcasted contents.
That difference is not really important. Check test image I posted and see if dmesg is flooded with same type of lines levitsky86 reported. If it is, stream gets corrupted and decoder for some reason can't cope with such corrupted stream.
Do I need to open the box to physically see the components or can it be done without disassembling? I have ssh access in both.
Opening the box is the easiest way. dmesg output from Android would probably tell what storage is used.
It's first time I see this kind of error. But then again, CEC behaves differently on different devices. I have experience only with my LG B8 TV, where CEC behaves normal. Just experiment...
Yes, Jernej, it's sad 😞, because I have Pioneer Blu-ray player that works perfectly with my Pioneer plasma TV. HDMI CEC (KURO link) works as it should: Blu-ray player powers up TV and TV turns off player.
But I have to disable HDMI control in TV now, because I've got problems with Orange Pi then (start up with no image as I said above) even though it's on 3rd input, while Blu-ray player is on 4th...
Reason why OSD helps is probably because EGL provides vsync... I don't know. Maybe windowing/gbm: Add display clock by popcornmix · Pull Request #19601 · xbmc/xbmc · GitHub will help. IDK.
I've rebuild LE with patches from this PR and enabled "Sync playback to display", no visible changes at all.
23.976 FPS on 23.976 Hz is still stuttering, drawing something with EGL still fixes it.
Did some further tests on Beelink GS1: configured Kodi to always draw (algorithmdirtyregions=0), enabled GALLIUM_HUD, launched Kodi mainscreen and tried switching CPU governors.
Basicly lowering CPU clock frequency affects Kodi GUI rendering speed, quite visibly.
Panfrost performance is inadequate enough already, 30 FPS only, but default schedutil clocks down CPU (as it should, since load is low) and it pushes rendering speed even lower, to 20FPS. Frametime on schedutil is bouncy and erratic as well.
Loading even one CPU core to 100% with something like 'openssl speed' instantly improves Kodi GUI rendering 20->30FPS
Also, locking CPU frequency to max also gives like +20% performance to hardware video decoding.
P.S. Testing it was a pain, the way ffmpeg is packaged in LibreElec is sooo confusing, binary programs aren't included in base build at all and ffmpeg-tools addon uses completely different build options, without any hardware decoding patches...
# echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# ffmpeg -hwaccel drm -hwaccel_output_format drm_prime -i 03-h264-1080-30p-100mbps.mp4 -f null -
frame= 452 fps= 89 q=-0.0 Lsize=N/A time=00:00:15.06 bitrate=N/A speed=2.96x
# echo schedutil > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# ffmpeg -hwaccel drm -hwaccel_output_format drm_prime -i 03-h264-1080-30p-100mbps.mp4 -f null -
frame= 452 fps= 76 q=-0.0 Lsize=N/A time=00:00:15.06 bitrate=N/A speed=2.54x
# echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# ffmpeg -hwaccel drm -hwaccel_output_format drm_prime -i 03-h264-1080-30p-100mbps.mp4 -f null -
frame= 452 fps= 74 q=-0.0 Lsize=N/A time=00:00:15.06 bitrate=N/A speed=2.48x
Display More
Perhaps there are some issues with hardware clocks, lowering CPU frequency also downclocks some other parts of H6, no idea if it's memory controller or GPU/VE/GE whatever else.
IMHO for now the only sane workaround is to use performance governor instead of default schedutil, forcing CPU to max 1.8GHz.
offbeat Thanks for detailed analysis. Enabling performance governor on H6 is not a good idea because H6 generates a lot of heat even on lower frequencies (many are not happy with that). You can of course enable it locally.
There is a reason why Allwinner port is marked as "stable beta" in LE10 release announcements. There is plenty of corner cases which needs to be fixed, but I'm actually quiet happy that it works as well as it does. Decoding using request API in ffmpeg is known to be suboptimal. We didn't rewrite it just yet, because kernel will in near future receive some uAPI updates which would allow even more efficient decoding. As mentioned before, GPU frequency switching doesn't work on H6 for some unknown reason, which nobody can figure out. However, maybe default frequency can be raised same way it is done for A64 (via DT)? This would be acceptable until dynamic switching is figured out.
Note that I don't know for any peripheral which would rely on CPU clock directly. You can always check how clocks are related and configured in /sys/kernel/debug/clk/clk_summary. VPU, DRAM and GPU have their own, dedicated PLLs, which makes them independent from rest of the system.
P.S. Testing it was a pain, the way ffmpeg is packaged in LibreElec is sooo confusing, binary programs aren't included in base build at all and ffmpeg-tools addon uses completely different build options, without any hardware decoding patches...
I actually use separate distro (Arch for ARM) when developing ffmpeg/Cedrus or other, mostly display related features. I apply all relevant LE patches to kernel and then netboot it. This allows much quicker turnaround time. However, I test Kodi only with LE.
levitsky86 -=guybrush=- Please test this update: LibreELEC-H3.arm-10.0-devel-20210425125640-5701db2-h264-fix.tar
I think you should not see corruption anymore.
Hi Jernej! I have just tested your update few times!
Now here is no image corruption, but the images freezes (with running sound). Stop and play channel solves it. The second time I had frozen not only image but the whole Kodi that had self rebooted after a while.
Now here is no image corruption, but the images freezes. Stop and play channel solves it.
How often freeze happens? Same amount as image corruptions before?
The second time I had frozen not only image but the whole Kodi that had self rebooted after a while.
Please enable debug logs in options and when crash happens, upload crashlog(s) from /storage/.kodi/temp and provide link
I've just read all the follow-ups and downloaded the new image. Now I would install it (putting it in /storage/.update Please tell me should I need to write it using the sdcard tool as a brand new setup) and I would report the results (though I fear the outcome would be the same as levitsky86's) and eventually post a log. Thanks for your work as always!
No, just put it in /storage/.update and reboot - it will be updated during next boot.
Fine. That's the way I always update but I wanted to be sure a 'clean flash' wasn't necessary. I would come back as soon as I had done a thorough testing.
However, maybe default frequency can be raised same way it is done for A64 (via DT)?
Thank you for suggestions!
I've upped Beelink GS1 GPU to 756MHz and 980mV.
950mV had a few panfrost freezes/errors, 980mV runs Kodi and glmark2 without any problems.
diff --git a/projects/Allwinner/patches/linux/0000-Beelink-GS1-GPU-756Mhz.patch b/projects/Allwinner/patches/linux/0000-Beelink-GS1-GPU-756Mhz.patch
new file mode 100644
index 0000000000..83895abb00
--- /dev/null
+++ b/projects/Allwinner/patches/linux/0000-Beelink-GS1-GPU-756Mhz.patch
@@ -0,0 +1,22 @@
+diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
+index b5808047d6e4..0978e186c8f7 100644
+--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
+@@ -105,6 +105,8 @@ &emac {
+
+ &gpu {
+ mali-supply = <®_dcdcc>;
++ assigned-clocks = <&ccu CLK_GPU>;
++ assigned-clock-rates = <756000000>;
+ status = "okay";
+ };
+
+@@ -246,7 +248,7 @@ reg_dcdca: dcdca {
+
+ reg_dcdcc: dcdcc {
+ regulator-enable-ramp-delay = <32000>;
+- regulator-min-microvolt = <810000>;
++ regulator-min-microvolt = <980000>;
+ regulator-max-microvolt = <1080000>;
+ regulator-ramp-delay = <2500>;
+ regulator-name = "vdd-gpu";
Display More
This board has 800MHz LPDDR3 module (AWL3A1632), at least my revision does.
So I've also upped RAM frequency, pll-ddr0 is now reported to be running at 1.584GHz
diff --git a/projects/Allwinner/patches/u-boot/0000-Beelink-GS1-DRAM-800MHz.patch b/projects/Allwinner/patches/u-boot/0000-Beelink-GS1-DRAM-800MHz.patch
new file mode 100644
index 0000000000..fdbea7d4cb
--- /dev/null
+++ b/projects/Allwinner/patches/u-boot/0000-Beelink-GS1-DRAM-800MHz.patch
@@ -0,0 +1,12 @@
+diff --git a/configs/beelink_gs1_defconfig b/configs/beelink_gs1_defconfig
+index 9f5265512b..794ea399c5 100644
+--- a/configs/beelink_gs1_defconfig
++++ b/configs/beelink_gs1_defconfig
+@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
+ CONFIG_SPL=y
+ CONFIG_MACH_SUN50I_H6=y
+ CONFIG_SUNXI_DRAM_H6_LPDDR3=y
++CONFIG_DRAM_CLK=800
+ CONFIG_MMC0_CD_PIN="PF6"
+ CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+ # CONFIG_PSCI_RESET is not set
Display More
With these changes and performance governor Kodi GUI is now able to reach 60FPS, except in some graphics heavy screens.
Thermal wise, thats 50C to 60C while idle, this box has suprisingly adequate heatsink.
Power consumption difference between schedutil and performance is 0.3 Watts or so, insignificant.
How often freeze happens? Same amount as image corruptions before?
Hi Jernej! I have found out that today a problem with my IPTV provider appeared. I have changed to another CDN server and now there is no buffering on my Kodi and Samsung smart TV.
Now, how does Kodi behave after your update. It has almost no image corruption. It appears only when I scroll channels list fast (while video play back is at the background) and for very long time (````approximately one minute) and there is very little corruption that disappears as soon as I stop scrolling. Also the sound started to lag a little during scroll. It is much-much better then it was before!!!
But when I close menu the image sometimes stops, or sometimes starts to lag. Stop and play channel solves this but not always and not for all channels! And another strange problem occurs after this. When I press to play any other channel there is a very big delay (about 30-40 seconds) before it turns on. The reboot solves that. I can say I should definitely reboot after this issue, otherwise there are present issues mentioned above (video lag, and/or long time channel switch). I would provide you a link with log files soon. Just want to replicate it some more times to give you true description.
Many thanks for your kind support!!!