Difference between revisions of "Talk:Hardware video acceleration"

From ArchWiki
Jump to navigation Jump to search
m (→‎VDPAU_DRIVER Variable: remove closed discussion)
Line 1: Line 1:
== <s>VDPAU_DRIVER Variable</s> ==
 
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 {{ic|/usr/lib/dri/r300_drv_video.so --> vdapu_video.so}} 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.
 
{{bc|VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV515/M52 [Mobility Radeon X1300]}}
 
{{hc|pacman -Qqs vdpau && pacman -Qqs mesa|
 
libva-vdpau-driver
 
libvdpau
 
mesa
 
mesa-libgl
 
mesa-vdpau}}
 
[[User:TheChickenMan|TheChickenMan]] ([[User talk: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.
 
:-- [[User:Lahwaacz|Lahwaacz]] ([[User talk: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.
 
::[[User:TheChickenMan|TheChickenMan]] ([[User talk: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.
 
:::-- [[User:DoctorJellyface|DoctorJellyface]] ([[User talk:DoctorJellyface|talk]]) 15:31, 29 May 2016 (UTC)
 
:::: I have an idea. If you look at the third line of the output of {{ic|vainfo}}, it lists a file in the directory {{ic|/usr/lib/dri/foo.so}}. 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 {{ic|/usr/lib/dri/nvidia_drv_video.so}} below.
 
::::{{bc|<nowiki>libva info: VA-API version 0.39.0
 
libva info: va_getDriverName() returns 0
 
libva info: Trying to open /usr/lib/dri/nvidia_drv_video.so
 
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</nowiki>}}
 
::::Then you can use {{ic|pkgfile -d /usr/lib/dri}} to list all packages in Arch which contain the listed directory.
 
::::{{bc|<nowiki>extra/libva
 
extra/libva-intel-driver
 
extra/libva-mesa-driver
 
extra/libva-vdpau-driver</nowiki>}}
 
::::Finally, you can use {{ic|pkgfile -l | grep /usr/lib/dri}} on each listed package and put together a list of what would be supported by each package. If someone runs {{ic|vainfo}} and gets a {{ic|/usr/lib/dri/foo.so}} in that third line which is not listed, then they would need to set the variable or possibly {{ic|vaapi}} might just not be supported by anything.
 
::::{{bc|<nowiki>extra/libva /usr/lib/dri/dummy_drv_video.so
 
extra/libva-intel-driver /usr/lib/dri/i965_drv_video.so
 
extra/libva-mesa-driver /usr/lib/dri/gallium_drv_video.so
 
extra/libva-vdpau-driver /usr/lib/dri/nvidia_drv_video.so
 
extra/libva-vdpau-driver /usr/lib/dri/s3g_drv_video.so
 
extra/libva-vdpau-driver /usr/lib/dri/vdpau_drv_video.so</nowiki>}}
 
::::Example: Running {{ic|vainfo}} on my old HP laptop which I cited above asks for a file name {{ic|/usr/lib/dri/r300_drv_video.so}} 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 {{ic|/usr/lib/dri/gallium_drv_video.so}} from the {{ic|libva-mesa-driver}} package or anyone using AMD and installing {{ic|libva-vdpau-driver}} will need to set the variable. There may be additional situations but I think that would cover the most common ones.
 
::::[[User:TheChickenMan|TheChickenMan]] ([[User talk:TheChickenMan|talk]]) 21:20, 29 May 2016 (UTC)
 
 
:::::Now you're talking about VA-API, not VDPAU, i.e. you'd need to set {{ic|LIBVA_DRIVER_NAME}} instead of {{ic|VDPAU_DRIVER}}. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:33, 30 May 2016 (UTC)
 
 
::::::I was always talking about that. Perhaps a bit misled because the package {{ic|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.
 
::::::[[User:TheChickenMan|TheChickenMan]] ([[User talk:TheChickenMan|talk]]) 09:58, 30 May 2016 (UTC)
 
:::::::Check the wiki page now, should explain it all better.
 
:::::::-- [[User:DoctorJellyface|DoctorJellyface]] ([[User talk:DoctorJellyface|talk]]) 16:58, 7 June 2016 (UTC)
 
::::::::Yeah that seems a lot less confusing now.
 
::::::::[[User:TheChickenMan|TheChickenMan]] ([[User talk: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).
 
:::::::::-- [[User:DoctorJellyface|DoctorJellyface]] ([[User talk:DoctorJellyface|talk]]) 12:29, 8 June 2016 (UTC)
 
 
::::::::::Changes are never too complex to split in multiple edits -- bulking them together makes them complex, splitting makes them simpler. In this case, you should have first swapped the order of the sections, then deal with the content, e.g. one section after another. Among other benefits, you would have had much more space in edit summaries to describe the complexity.
 
::::::::::As for the "useless misleading mess", why have you removed the link to [http://www.freedesktop.org/wiki/Software/vaapi/#driversback-endsthatimplementva-api] and the explicit suggestions of VA-API and VDPAU drivers? Your changes don't indicate that at all and considering the AMD case, I somewhat doubt that the details are as useless as you suggest.
 
::::::::::And the original authors are shown [https://wiki.archlinux.org/index.php?title=VA-API&action=history here] and [https://wiki.archlinux.org/index.php?title=VDPAU&action=history here]. You have merged the two pages and reduced duplication, for which we are very grateful, but now we're past that. The pages are a [[Help:Style#Non-pertinent_content|community effort]].
 
::::::::::-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 13:14, 8 June 2016 (UTC)
 
 
:::::::::::Wait, don't take me wrong, I am '''not''' taking authorship for this page, but I am taking (at least some) responsibility for it. I'm sorry if I sounded like another bigheaded idiot and I assure you I'm not (at least I try to, heh). I just (for the first and probably the last time) mentioned the time it took to do it all to prove that I'm not a vandal, that I'm trying my best to make the wiki better, and that I hope it earned me at least a teeny bit of trust in making edits like this. As for the edits, I know it is important and I take care to lay them out usually, but this one edit took at least an hour to make which is a '''lot''' of time for me unfortunately, and since I was going away for a few days I wanted to get it done and I just put the final state to a higher priority than making the edits slightly clearer.
 
:::::::::::As for the 'useless misleading mess', let me clarify it: VDPAU and VA-API are actually really good at guessing the driver and it only fails if the driver doesn't exist; it's still guessed correctly though. Therefore the user should not manually configure the driver if everything works. The current layout suggests that not only the drivers have to (or should) be configured manually, but also that different cards need different drivers - if you look at the checksums of them you can see that many of the drivers are just copies with a different name (all the libraries in {{pkg|mesa-vdpau}} (r300, r600, radeonsi, nouveau) or {{pkg|libva-mesa-driver}} (nvidia, s3g and vpdau) are identical), the names are there just for compatibility reasons or something. And also the line about overriding the driver based on what VDPAU guessed itself is just nonsense. I tried to a) explain how the variable actually works, b) teach the user to '''test''' and try instead of relying on an (obselete/incomplete) table and c) make it at least a bit more future-proof while hopefully getting better results at the same time.
 
:::::::::::As for the link - I looked at it a bit more carefully I see it's not a list of supported cards as I thought earlier, but it's still just a subsection of an already mentioned link and doesn't say much useful. It should be under installation though anyway, but I admit I shouldn't've removed it.
 
:::::::::::With you permission I'd like to apply the changes again, this time in seperate commits though. Sorry for the trouble.
 
:::::::::::-- [[User:DoctorJellyface|DoctorJellyface]] ([[User talk:DoctorJellyface|talk]]) 13:17, 11 June 2016 (UTC)
 
 
::::::::::::I apologize for the delay, unfortunately I was rather busy back then and somewhat forgot about this...
 
::::::::::::Now where were we... OK, the mess is pretty much useless and misleading, except for the AMD case, which I think deserves at least some hand-holding. The installation section sounds as if {{pkg|libva-mesa-driver}} and {{pkg|libva-vdpau-driver}} were equivalent alternatives for all cards, but that is not the case since there is no {{ic|r300}} VAAPI driver in {{pkg|libva-mesa-driver}}, not to mention that [[AMDGPU]] is not mentioned at all on the page. Further, the {{ic|vdpau}} and {{ic|va_gl}} drivers are never automatically detected (for NVIDIA it's only thanks to the {{ic|nvidia_drv_video.so}} -> {{ic|vdpau_drv_video.so}} symlink), so in this case it's not "only proceed if something fails", but "unless you do this, something fails" (i.e. normal configuration). Your approach to the introduction of the section of course works generally, but I'm afraid that mixing these cases will always cause some confusion on one side or the other.
 
::::::::::::So of course please feel free to continue improving the page, e.g. by combining your changes with my comments above ;)
 
::::::::::::-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 10:32, 4 August 2016 (UTC)
 

Revision as of 20:09, 10 December 2016