GPU and hardware video support

My first experience with Linux on the VIM is very disapointing. The lack of hardware support makes me wonder what is the point of having chosen such a nice chip if the driver support is non-existing.

Can someone help me understand how to get things in place :

  • GPU acceleration (LibMali ? Wayland ?)
  • enabling hardware video decoding in web browser (vaapi anyone ?)

Amlogic is known for managing upstream contributions to the kernel, I’m not sure I see any of it in the Debian build I made following the documentation.

2 Likes

^ kernel driver

^ mali blobs supporting Wayland, GBM, and I guess X stuff (never tried X myself tho)

3 Likes

Thanks for the pointers, they do provide some answers. I still don’t understand that Khadas can’t be bothered to make the changes themselves and/or document the process.

I find the linux build environment rather opaque, limited and lacking flexibility. I hope I can find the time to hack my way through this. I expected better support in the first place.

2 Likes

Hi, it wasn’t obvious from the comments, but do those github links mean that hardware acceleration is possible?

Like, would installing those libraries allow desktop environments to use the GPU?

I’ve never used a desktop environment, but should be possible.

Hi, I’m still not sure what to do with these. Where exactly should I copy the binaries?

On github a person mentioned that I need to put the libMali.so file in the same place as libEGL.so, but I don’t have that installed anywhere on my khadas.

I’m using the “Ubuntu server” image so it’s pretty bare with regards to installed packages.

Any update on this?
I cannot understand how to achieve it on arch linux as arch arm linux already have
Video driver

  1. xf86-video-fbturbo-git
  2. odroid-c2-libgl-x11

But I cannot find anything for KVim1, I tried the oc2 driver but that didnt work.
Any suggestion?

This is for the ancient core 3.14, for the new core look for information about Lima.

Yes have been searching for it, but not getting how to make it work.
I tested your armbian 5.77 built to check if they have va but looks like the video is processed by the cpu.

Can you advice me how to implement Lima on 5.0kernel?

Looking into these libs, I assume mesa, libva and libvdpau should be able to help with Video Acceleration?
I need to understand how did it work fine with kodi on your archlinux built? I will try to run your arch linux built and check

Hello Dear,
Any guidance on how to achieve Hardware acceleration ? I have been reading about lima but not getting any accurate details on how to make it work with Linux 5.0

You need to patch the kernel with lima patches.

And you also need to build and install mesa-lima to work on userspace.

Some instructions I ever used to compile mesa-lima:

sudo apt-get build-dep libgl1-mesa-dri

sudo apt-get install \
    automake libtool \
    bison flex \
    gettext \
    libdrm-dev \
    libexpat1-dev \
    libudev-dev \
    libx11-xcb-dev \
    libxcb-dri3-dev \
    libxcb-dri2-0-dev \
    libxcb-glx0-dev \
    libxcb-xfixes0-dev \
    libxcb-present-dev \
    libxcb-sync-dev \
    libxshmfence-dev \
    libxdamage-dev \
    libxext-dev \
    libxfixes-dev \
    python-mako \
    x11proto-present-dev \
    x11proto-dri3-dev \
    x11proto-dri2-dev \
    x11proto-gl-dev \
	libxrandr-dev

cd mesa-lima

git pull

./configure --with-gallium-drivers=exynos,sun4i,meson,rockchip,lima --with-dri-drivers= --with-platforms=drm,x11 --disable-xvmc --disable-vdpau --enable-debug

./autogen.sh \
     --with-dri-drivers= \
     --with-egl-platforms=x11,drm \
     --disable-xvmc --disable-vdpau \
     --with-gallium-drivers=exynos,sun4i,meson,rockchip,lima

make -j4
make install
1 Like

The patch is not needed for kernel that he uses (there is already a patch). You just need to enable the option in the kernel config. :slight_smile:

1 Like

Which option ? So I have to re-compile the kernel again :grimacing:
10hrs for me haha

What 10 hours ? Building the kernel on VIM1 takes less than 2 hours. If your PC build system is so slow, use your VIM to build the kernel and other packages.

1 Like

Yes this will be much better.
But which options do I have to enable in the kernel config file?

Lima graphics driver.

I am looking at config of Linux 5.0 but there is not lima mentioned. :frowning:

Where you look ? It’s in my kernel.

I checked in the config file, But now i went to your repo and I see there is LIMA in display interface.

CONFIG_DRM_LIMA is not set
This is commented

Edit:
Should I make it CONFIG_DRM_LIMA=y

and build the kernel?

probably !