Best way to get h264 accelerated again?

may be putting arch repos inside pacman.conf and putting some more config that the same but… automatically only for some packages??

Hi, I’m affected by this issue looking for help. After the upgrade I’ve lost HW acc. From the instructions here to build mesa locally from the repos Upstream mesa removal of AVC/HEVC/VC-1 hardware acceleration (AMD GPUs) - #31 by Leo

#!/bin/bash

cd /tmp/
git clone https://gitlab.manjaro.org/packages/extra/mesa.git
cd /tmp/mesa/
sed -i '/-D microsoft-clc=disabled \\/a \    -D video-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc \\' PKGBUILD
makepkg -si
cd /tmp/
rm -Rf mesa

It builds and installs but when trying to play a video via mpv or vlc or trying to run vdpauinfo I get this error:

mpv: ../mesa-22.3.1/src/compiler/glsl_types.cpp:1245: static const glsl_type* glsl_type::get_array_instance(const glsl_type*, unsigned int, unsigned int): Assertion `glsl_type_users > 0' failed.
Aborted (core dumped)

Downgrading to the previous version with pacman -U /var/cache/pacman/pkg/mesa-22.2.3-1.1-x86_64.pkg.tar.zst /var/cache/pacman/pkg/mesa-vdpau-22.2.3-1-x86_64.pkg.tar.zst gives HW acc back but I also lost realtime privileges (laptop used as a DAW) - continuous xruns when playing video/audio

From lshw:
ATI Radeon HD 5650M(obile) graphics card

*-display
                description: VGA compatible controller
                product: Madison [Mobility Radeon HD 5650/5750 / 6530M/6550M]
                vendor: Advanced Micro Devices, Inc. [AMD/ATI]

From cat /proc/cpuinfo
Intel Core i5 M 450 2.40GHz (Arrandale) circa 2008

model name	: Intel(R) Core(TM) i5 CPU       M 450  @ 2.40GHz

mhwd-kernel -li

Currently running: 5.15.79-1-rt54-MANJARO (linux515)
The following kernels are installed in your system:
   * linux419
   * linux515-rt

Any help to get HW acc back would be greatly appreciated --thanks

A TU shared with us his own personal mesa fork earlier on this very thread here.

He has edited it so now it’s only a script that build it, no more repo is linked here. :woozy_face:

This change came from nowhere… If this legal thing is now a concern after many years, what will happen when Vulkan came out next year with h264/265 and other coding-decoding capability?

The AV1 video codec is completely license-free and will become the standard video codec in the future.
Today, Intel Arc GPU and Nvidia RX 4000 series or new GPU already supported AV1 encoding and decoding.

You can forget about H264 and H265 from year 2025.

For most existing hardware, AV1 is atrociously slow at encoding. It’s almost comical how slow it is. :dizzy_face:

To be clear, it’s promising for the future (quality, performance, hardware decoding and encoding, “open”), but for today, and for users who want to exploit hardware decoding and encoding, they’re mainly looking at AVC and HEVC. One obvious exception being YouTube, which is mostly VP9 now.

This is why it’s crucial for AMD GPU users to continue benefiting from hardware decoding of AVC and HEVC video streams.

1 Like

I guess there are different settings for AV1 in ffmpeg.

A low setting would speed up AV1 encoding when its compression ratio is worse or like HEVC. :thinking:
I will test and compare 3 codecs for my CPU without hardware acceleration tomorrow.

You don’t have AV1 with pre NAVI (RX5000 series) Radeons… And all of our downloaded movies are encoded with x264 or x265.

I know, streaming is a thing and youtube uses AV1, but this situation it still sucks. Especially for people with older Radeons…

1 Like

Muy GPU doesnt have either vp9 or av1 so Im alone here. Do you think that all the people can afford new hardware? Srly?

I have a doubt. Do you promote a mini pc with manjaro pre-installed and no have GPU acceleration?
https://www.bee-link.com/beelink-ser5-5600h-manjaro-os-minipc

2 Likes

You’re not alone here, I don’t have VP9 and AV1 on my laptop Intel HD 530. Useless, I do not notice it has the issue with Youtube VP9 decoding.

The decoding should regularly have a lower effort than the encoding without hardware acceleration. Useless, you can’t watch any video stream with 10x speed decoding.

Edit:
Netflix or YouTube forces you to decode VP9 at 1080p or higher resolution when you want to watch videos. You can not change or force YouTube or Netflix to use H265.


A counter question:

Do you think all people use Adobe Flash Player and H.263 and can afford their used old GPUs for 30 years and daily use without damage?

That depends on time and change by many big companies e.g. Apple and Google … etc.
That is about the evolution of media streaming and GPU.

  • Adobe Flash Player was killed by many big companies to change the world.

  • Each GPU has a lifespan limit for daily use. People would buy a new GPU that gets a AV1 codec when their old GPU is broken.

Time will tell what will change media streaming in the future by companies’s decision (Alliance for Open Media) and hardware manufacturers.

That is off-topic

Cool, i will wait!
No, I will not!
I’ll watch the nonsense here for a while, and if they don’t come to their senses, I’ll change distro.
Fedora, Suse, Debian do it more skillfully, Arch also gives a sh… on it, but I try to avoid the daily Archlinux madness, because there is also a life away from pc and notebook.
We can debate forth and back, this move made manjaro unusable for the average user with amd hardware.

3 Likes

I think so too, I’m already looking for Manjaro’s successor.

If they had at least kept mesa with codecs in a manually installable form, I would stay.

you forget about energy use on laptop. it’s not the same decoding something on GPU that is the job done efficiently than toding in the cpu…

1 Like

exactly, without any type of fix I see here

I dont think you have an idea what the “average” user is. Is it a power user, or 66 year old grandma? The truth is someplace in between. I have a amd 570 8gb GPU. Honestly I havent noticed any difference since h264 was disabled. I play a few games, do a lot of surfing and video watching just like I did before.
Getting back to the “average” user. If a great many people (average users) noticed a difference there would be hundreds if not thousands of users posting. Instead we have a handful of niche users who cant seem to understand how to get the functionality they want back after getting multiple options to do so. That doesnt sound like a Manjaro problem, but a pebkac one.

3 Likes

Shure, of course you can become personal in defense, but I don’t care what you think. This is not about personal, this is about general.

I’ve created a script that replaces the mesa packages with the ones from arch:

#!/bin/bash
#Problems: Couldn't figure out a way to download package with wget with correct version name.

libdomain="https://archlinux.org/packages/extra/x86_64/"
multilibdomain="https://archlinux.org/packages/multilib/x86_64/"
packagelist="lib32-libva-mesa-driver
lib32-mesa
lib32-mesa-vdpau
libva-mesa-driver
mesa
mesa-utils
mesa-vdpau
lib32-vulkan-icd-loader
lib32-vulkan-radeon
vulkan-headers
vulkan-icd-loader
vulkan-radeon
vulkan-tools"
#Excluded Packages:
#   lib32-mesa-demos
#   mesa-demos
#   lib32-vulkan-intel
#   vulkan-intel
#   lib32-opencl-mesa
#   opencl-mesa


echo "Warning: This script installs unsupported packages from another linux distribution (Arch Linux) there are many things that could go wrong!
Are you sure you want to continue? [Y/n]"

read REPLY
if [ "$REPLY" = "Y" ] || [ "$REPLY" = "y" ]; then
    echo
else
    echo "Would you instead like to reinstall manjaro's original mesa pacakges? [Y/n]"
    read REPLY
    if [ "$REPLY" = "Y" ] || [ "$REPLY" = "y" ]; then
        sudo pacman -S --noconfirm $packagelist
    fi
    exit
fi

mkdir /home/$USER/.cache/mesa_update
cd /home/$USER/.cache/mesa_update

for package in $packagelist;do
    if echo $package | grep lib32; then
        wget --show-progress -qO $package.pkg.tar.zst "$multilibdomain$package/download"
    else
        wget --show-progress -qO $package.pkg.tar.zst "$libdomain$package/download"
    fi
    sudo pacman -U --noconfirm $package.pkg.tar.zst
done

cd -
rm -rf /home/$USER/.cache/mesa_update

I don’t know if it’s the ‘best’ way, there’s a lot of things that can go wrong by installing packages meant for another distro that could be of a different version than the ones manjaro is meant to be using, and you’d have to re-run the script everytime there’s a system update and manjaro overwrites the packages.

But it seems like currently it works completely.

Best way is definitely not how I would describe it, but a way for sure.

3 Likes

Over the past few days I were trying almost all the solutions ( besides changing distro) in order to keep my system fully functional.
Or at least how it was some weeks ago…

Nonetheless : I just want to add that in order to put it work I had to switch to the Unstable branch and followed the mesa-git path …

Both Stable and Testing branch did compile mesa-git but the functionality were not functional …
So for the record perhaps would be better to indicate that one of the “possible solutions” would be to change to the Unstable branch and then recompile mesa-git …
Just my personal opinion though …