Video playback not possible on A20 ?

Started by Chris, May 25, 2022, 01:33:02 PM

Previous topic - Next topic

Chris

I have A20-Micro Rev. C with latest image (A20-OLinuXino-bullseye-base-20220413-094751.img) and HD monitor on HDMI. Unfortunately no reasonable video playback is possible, even at low bitrates and simple codecs. I tried several player (mpv, ffplay, etc.), file formats (mp4, mpeg1/2, avi) and even low bitrates (< 200 kbit), but I get maximum frame rates about 2 fps for a simple 720p25 video.
Is the A20 not able to playback videos at all?
Any help is welcome, thanks in advance.

Chris

LubOlimex

The videoplay back is not the best due to lack of hardware acceleration in latest Olimage images. If you wish video playback consider older images or even the LibreELEC/KODI image:

1. LibreELEC/KODI image: https://ftp.olimex.com/Allwinner_Images/A20-OLinuXino/4.LibreELEC_KODI_images/A20-OLinuXino-MICRO/ with info here: https://ftp.olimex.com/Allwinner_Images/A20-OLinuXino/4.LibreELEC_KODI_images/README.txt

2. Sunxi image with hardware acceleration: https://ftp.olimex.com/Allwinner_Images/A20-OLinuXino-MICRO/Debian/sd/A20_OLinuxino_Micro_debian_Jessie_34_103_2G_eMMC_release_18.zip
Technical support and documentation manager at Olimex

Chris

#2
Thanks for your kind and quick response.
I tested these 2 images:

Quote from: LubOlimex on May 25, 2022, 02:05:15 PM1. LibreELEC/KODI image: https://ftp.olimex.com/Allwinner_Images/A20-OLinuXino/4.LibreELEC_KODI_images/A20-OLinuXino-MICRO/
Plays all HD content smoothly, however, I don't need an interactive media center, but will build an automated video player hardware that can be fully controlled via network (including picture settings like brightness control, hue shift etc.). Not sure if LibreELEC is designed for this demand.

Quote from: LubOlimex on May 25, 2022, 02:05:15 PM2. Sunxi image with hardware acceleration: https://ftp.olimex.com/Allwinner_Images/A20-OLinuXino-MICRO/Debian/sd/A20_OLinuxino_Micro_debian_Jessie_34_103_2G_eMMC_release_18.zip
Does not display any desktop on HDMI at all. Screen shows some garbage on boot, then goes black. And Jessie is quite a big step back into medieval. :-(

So there is no somewhat actual debian image with accelerated video output available? Very sad...  :'(

LubOlimex

#3
> Does not display any desktop on HDMI at all. Screen shows some garbage on boot, then goes black. And Jessie is quite a big step back into medieval.

You might need to run the script in the image: ./change_display.sh or refer to this wiki article:

https://www.olimex.com/wiki/How_to_connect_display_to_a_Lime_board

> So there is no somewhat actual debian image with accelerated video output available? Very sad...

It is mentioned multiple times in the official Olimage documentation, this is due to closed source nature of the graphics chip, the official Olimage guide can be found here:

https://github.com/OLIMEX/OLINUXINO/blob/master/DOCUMENTS/OLIMAGE/Olimage-guide.pdf
Technical support and documentation manager at Olimex

Chris

#4
Quote from: LubOlimex on May 26, 2022, 09:38:34 AMYou might need to run the script in the image:
./change_display.sh
Thanks for your kind answer, but I know this script and tried several HDMI settings (/boot/script.bin was successfully modified each time), but all of them with no effect: Always some garbage on HDMI output during boot, then black screen.
Is there any other magic trick to make it display any desktop?

Quote from: LubOlimex on May 26, 2022, 09:38:34 AMIt is mentioned multiple times in the official Olimage documentation, this is due to closed source nature of the graphics chip
Is there a way to take an accelerated closed source graphics driver from an older image and implement it into an actual Olimage?

LubOlimex

I tested the old image with few A20-OLinuXino-MICRO boards and a HDMI display and it works fine, I reach and see the desktop without issues. Here is what I see:



So I don't think that the problem is in the Linux image. You also had HDMI working with the other image so the hardware should be alright too. It is something else.

1. Which option do you select from the list in ./change_display?

2. How do you access the board? How do you execute ./change_display? Is it possible that you are executing it as non-admin user so it can't apply the changes?

3. Is it native HDMI monitor or you use convertor or adapter?

If the problem remains can you record a video showing the hardware setup and what happens with the display when you power the board. Upload it somewhere (youtube) and share the link here.

> Is there a way to take an accelerated closed source graphics driver from an older image and implement it into an actual Olimage?

I don't think that would be easy to do. We haven't done it for sure.
Technical support and documentation manager at Olimex

Chris

#6
Thanks again for your kind and detailed answer.
In the meantime I browsed through this forum and found other users having similar problems.

Sure is:

1. The attached monitor is a BENQ G2420HDB that makes 1920x1080@60Hz. It also works perfectly at other input resolutions and can adapt to them.

2. Images like LibreElec and Olimage work out of the box without any modification or configuration.

3. A20_OLinuxino_Micro_debian_Jessie_34_103_2G_eMMC_release_18 boots without errors (serial cable attached), shows the first boot messages on HDMI, then garbage, then black screen only. I can make a video if required.

4. I ran /usr/bin/change_display.sh (there is no ./change_display) at root with every HDMI option, /boot/script.bin is successfully modified each time, but all of them with no effect.

5. I read in other forum posts that users had similar problems with HDMI monitors that have no sound. They attached "extraargs=disp.screen0_output_mode=EDID:1920x1080p60 hdmi.audio=EDID:0" to /boot/uEnv.txt to make it work. I tried the same and other variations (e.g. optargs) - no effect.

6. As the monitor only has DVI input I have to use an adapter cable. This would be the last reasonable source of possible errors, but - as mentioned above - no other image has any problems with this.

I wish I could take the kernel from LibreElec (that works almost perfect, including hardware acceleration!) and load it into any debian image...

LubOlimex

1. Adapter can absolutely cause issues when using that specific Linux image. If possible test with native HDMI monitor. The HDMI cable itself might be the culprit.

2. How do you access the board? Via USB-serial cable? The reason I ask is because here absolutely is change_display.sh available directly after logging:



3. This is also possibility: https://olimex.wordpress.com/2014/01/22/bevare-non-grounded-tv-monitors-can-damage-your-olinuxino/

4. A video would help checking if there is something majorly wrong.
Technical support and documentation manager at Olimex

Chris

Quote from: LubOlimex on June 01, 2022, 01:05:54 PM1. Adapter can absolutely cause issues when using that specific Linux image. If possible test with native HDMI monitor. The HDMI cable itself might be the culprit.
I own none, but will test at the weekend with a third party device.

Quote from: LubOlimex on June 01, 2022, 01:05:54 PM2. How do you access the board? Via USB-serial cable? The reason I ask is because here absolutely is change_display.sh available directly after logging:
USB serial cable and ethernet. In both cases I ran change_display.sh directly after logging in as root. It looks exactly the same as on your screenshot.

Quote from: LubOlimex on June 01, 2022, 01:05:54 PM3. This is also possibility: https://olimex.wordpress.com/2014/01/22/bevare-non-grounded-tv-monitors-can-damage-your-olinuxino/
This is crazy, but my monitor has protective earth and I just measured a voltage difference between board ground and monitor ground of exactly zero volt.

Thanks again for your detailed help!

Chris

#9
UPDATE: I found an old 1280x1024 DVI monitor in my stock and - SURPRISE! - it shows a (very low resolution) desktop with the same HDMI-DVI-adaptor when setting change_display.sh to 576p.

When connecting the system console shows these messages:
<6>ParseEDID
<6>EDID version: 1.3
<6>PCLK=108000000 X 1280 1328 1440 1688 Y 1024 1025 1028 1066 fr 60 NN
<6>Using above mode as preferred EDID mode
<4>disp_clk: Could not find a matching pll-freq for 78800000 pclk
<4>disp_clk: Could not find a matching pll-freq for 53450000 pclk
<4>disp_clk: Could not find a matching pll-freq for 27100000 pclk
<4>disp_clk: Could not find a matching pll-freq for 26150000 pclk

How can I fix this to find a matching pll-freq?