Talk:Hardware video acceleration

From ArchWiki
Revision as of 12:29, 8 June 2016 by DoctorJellyface (talk | contribs) (re)
Jump to navigation Jump to search


This variable may need to be set when using older AMD cards even with open source drivers. I fixed this by adding a simlink in /usr/lib/dri/ --> but this may have been able to be fixed with this environmental variable. It seems to work alright and doesn't break anything with my old backup laptop but this is probably not a preferred solution.

VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV515/M52 [Mobility Radeon X1300]
pacman -Qqs vdpau && pacman -Qqs mesa

TheChickenMan (talk) 02:39, 26 May 2016 (UTC)

The Hardware_video_acceleration#Configuring_VDPAU section says:
"For the open source AMD/ATI driver set it to the proper driver version depending on your GPU (see below)."
So yes, you should have set the VDPAU_DRIVER variable instead of creating the symlink.
-- Lahwaacz (talk) 10:04, 28 May 2016 (UTC)
Yes, I probably should change it but I had that as a solution before finding that info in the wiki. I bring this up because it seemed to be indicated that that information may be unnecessary for open source AMD drivers. Maybe it isn't needed for newer AMD cards? The above example is from a laptop which is at least 11 years old this summer. Anyway, I still think that information is useful to keep in the wiki.
TheChickenMan (talk) 22:07, 28 May 2016 (UTC)
I've been thinking about swapping Configuring and Verifying for exactly this reason, but the problem is that I don't know when it is needed to set the the variable, it seems to very from system to system.
-- DoctorJellyface (talk) 15:31, 29 May 2016 (UTC)
I have an idea. If you look at the third line of the output of vainfo, it lists a file in the directory /usr/lib/dri/ As far as I am aware, all drivers which do not need to have the variable set will have the file asked for provided somewhere in a package. NOTE: I ran out this example on my workstation which uses the nvidia driver which is why it is asking for /usr/lib/dri/ below.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/
libva info: Found init function __vaDriverInit_0_35
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.39 (libva 1.7.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileMPEG4Simple            :	VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    :	VAEntrypointVLD
      VAProfileH264Baseline           :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
Then you can use pkgfile -d /usr/lib/dri to list all packages in Arch which contain the listed directory.
Finally, you can use pkgfile -l on each listed package and put together a list of what would be supported by each package. If someone runs vainfo and gets a /usr/lib/dri/ in that third line which is not listed, then they would need to set the variable or possibly vaapi might just not be supported by anything.
extra/libva			/usr/lib/dri/
extra/libva-intel-driver	/usr/lib/dri/
extra/libva-mesa-driver		/usr/lib/dri/
extra/libva-vdpau-driver	/usr/lib/dri/
extra/libva-vdpau-driver	/usr/lib/dri/
extra/libva-vdpau-driver	/usr/lib/dri/
Example: Running vainfo on my old HP laptop which I cited above asks for a file name /usr/lib/dri/ which is not included on the above list and therefore requires the environmental variable be set. Apologies for the length of this discussion but I couldn't really think of a better way of working through this. Not sure how to best represent this on the wiki, perhaps a table of some kind?
Just taking a second to look at the results of that list, it seems that anyone with an AMD card which does not use /usr/lib/dri/ from the libva-mesa-driver package or anyone using AMD and installing libva-vdpau-driver will need to set the variable. There may be additional situations but I think that would cover the most common ones.
TheChickenMan (talk) 21:20, 29 May 2016 (UTC)
Now you're talking about VA-API, not VDPAU, i.e. you'd need to set LIBVA_DRIVER_NAME instead of VDPAU_DRIVER. -- Lahwaacz (talk) 07:33, 30 May 2016 (UTC)
I was always talking about that. Perhaps a bit misled because the package libva-vdpau-driver. Like I said, I'm no great expert in video acceleration. Just had some time to research that a bit and try to put some stuff together. It is still part of the same (type) of issue though. Perhaps a similar procedure could be used to determine which conditions would require the other variable be set as well? I'm guessing that would be on Intel chips mostly as they tend to be what uses native VAAPI to get VDPAU.
TheChickenMan (talk) 09:58, 30 May 2016 (UTC)
Check the wiki page now, should explain it all better.
-- DoctorJellyface (talk) 16:58, 7 June 2016 (UTC)
Yeah that seems a lot less confusing now.
TheChickenMan (talk) 00:53, 8 June 2016 (UTC)
Well it seems like Lahwaacz reverted the changes. Lahwaacz: why did you do this? The changes were carefully thought out and removed a ton a useless misleading mess. The changes were too complex to change in several commits though. I mean I basically put together this page and already spent more than 6 hours on it and this was the final change making it complete in my eyes (disregarding a few small details).
-- DoctorJellyface (talk) 12:29, 8 June 2016 (UTC)