Tainted Mesa DRI drivers for Mageia 9

Here you'll find a place for solutions and hints.

Please use one of the support subforums below for questions or if you have any issues and need support.

Tainted Mesa DRI drivers for Mageia 9

Postby gilou » Jul 24th, '23, 22:24

Hi,

I've made a procedure to enable Mesa support for optional video codecs to lower CPU usage and save battery life while video encoding and decoding.
This procedure is for those who want to do it on their own.
This is to work around this pending issue: https://bugs.mageia.org/show_bug.cgi?id=32060

Edit: Inaccuracies have been corrected in the procedure.
Edit2: Simplified installation (and update).
Edit3: Fixed "sudo" bug in the building script
Edit4: Fixed "sudo" bug in the installation script; Fixed issues when trying to install 23.1.7 update.
Attachments
Tainted_Mesa_DRI_drivers_for_Mageia_9.zip
(3.87 KiB) Downloaded 497 times
Last edited by gilou on Oct 2nd, '23, 07:56, edited 4 times in total.
gilou
 
Posts: 6
Joined: May 12th, '11, 17:53

Re: Tainted Mesa DRI drivers for Mageia 9

Postby morgano » Jul 25th, '23, 10:34

At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1484
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Tainted Mesa DRI drivers for Mageia 9

Postby danlion » Sep 16th, '23, 20:10

Thank you, gilou and morgano. I'm beginning to look at hardware accel for video and this was really useful.

This is a Radeon 7 APU with amdgpu driver, and the scripts worked perfectly as root after removing the quotes from "${SUDO}" (otherwise it complained "command not found"). The output of vainfo includes now entrypoints for VC1, H264 and HEVC, and I'm happy about the performance improvement.

I also noticed the previous VAProfileVP9Profile0, VAProfileVP9Profile2 and VAProfileAV1Profile0 are missing now.

Output of vainfo before:
Code: Select all
    Trying display: x11
    libva info: VA-API version 1.16.0
    libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
    libva info: Found init function __vaDriverInit_1_16
    libva info: va_openDriver() returns 0
    vainfo: VA-API version: 1.16 (libva 2.16.0)
    vainfo: Driver version: Mesa Gallium driver 23.1.3 for AMD Radeon RX 6600 (navi23, LLVM 15.0.6, DRM 3.52, 6.3.9-desktop-2.mga9)
    vainfo: Supported profile and entrypoints
        VAProfileMPEG2Simple            : VAEntrypointVLD
        VAProfileMPEG2Main              : VAEntrypointVLD
        VAProfileJPEGBaseline           : VAEntrypointVLD
        VAProfileVP9Profile0            : VAEntrypointVLD       <---
        VAProfileVP9Profile2            : VAEntrypointVLD       <---
        VAProfileAV1Profile0            : VAEntrypointVLD       <---
        VAProfileNone                   : VAEntrypointVideoProc


and after:
Code: Select all
vainfo: Driver version: Mesa Gallium driver 23.1.5 for AMD Radeon R7 Graphics (carrizo, LLVM 15.0.6, DRM 3.52, 6.4.7-desktop-3.mga9)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD                     
      VAProfileVC1Main                : VAEntrypointVLD                     
      VAProfileVC1Advanced            : VAEntrypointVLD                     
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD                     
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice               
      VAProfileH264Main               : VAEntrypointVLD                     
      VAProfileH264Main               : VAEntrypointEncSlice               
      VAProfileH264High               : VAEntrypointVLD                     
      VAProfileH264High               : VAEntrypointEncSlice               
      VAProfileHEVCMain               : VAEntrypointVLD                     
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc


It would be good to have those missing entries too, wouldn't it? Is is possible to add them?
[signature unclear]
danlion
 
Posts: 3
Joined: Sep 16th, '23, 19:30

Re: Tainted Mesa DRI drivers for Mageia 9

Postby gilou » Sep 22nd, '23, 21:55

Thanks for the bug fix: I've updated the script accordingly.

Regarding your issue about missing codecs, note that the vainfo outputs come from different graphic cards: RX6600 vs Carrizo.
Carrizo APUs do not support VP9 codec, so it's perfectly normal if vainfo do not report support for VP9 codec.
gilou
 
Posts: 6
Joined: May 12th, '11, 17:53

Re: Tainted Mesa DRI drivers for Mageia 9

Postby danlion » Sep 23rd, '23, 03:51

You're right; I assumed those capabilities were available previously and they were not. lspci says this GPU is a "Wani", though I had also seen it called "Carrizo" by software or websites previously; and yes, its Unified Video Decoder 6.0 doesn't have support for VP9 or AV1.

Since this thread is linked from the wiki, some other users of AMD graphics may want to check the list shown here: https://en.wikipedia.org/wiki/Unified_Video_Decoder
-
Thanks again, gilou. And a petit détail I had forgotten: at first, the compilation stopped with an error message about disk full. I don't know whether the /tmp directory had too much data or the tmpfs partition was too small; I just tinkered a bit build.sh to use another partition for WORKDIR. If that happens to someone else and gets stuck, maybe a reboot will help, to have /tmp cleaned.
[signature unclear]
danlion
 
Posts: 3
Joined: Sep 16th, '23, 19:30

Re: Tainted Mesa DRI drivers for Mageia 9

Postby gilou » Sep 23rd, '23, 22:22

The building script creates a working directory using command mktemp, which defaults creating working directory relative to /tmp.
If space is a problem in tmpfs, setting environment variable TMPDIR before running the building script can help:
Code: Select all
export TMPDIR="${PWD}"
.
gilou
 
Posts: 6
Joined: May 12th, '11, 17:53

Re: Tainted Mesa DRI drivers for Mageia 9

Postby danlion » Sep 24th, '23, 11:03

Nice one. It has been assimilated.
[signature unclear]
danlion
 
Posts: 3
Joined: Sep 16th, '23, 19:30

Re: Tainted Mesa DRI drivers for Mageia 9

Postby gilou » Oct 2nd, '23, 07:58

I've just fixed the scripts because there was an issue when updating to mesa 23.1.7.
gilou
 
Posts: 6
Joined: May 12th, '11, 17:53


Return to The magician suggests...

Who is online

Users browsing this forum: No registered users and 1 guest

cron