Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When playing high definition video (720p and 1080p) the CPU reaches 100% and freezes the image at regular intervals.

According to the manufacturer this accelerator is capable of hardware acceleration for HD video.

Clearly something is not right.

This is the output of vainfo:

ivan@ivan-NT-A2400-NT-A3500:~$ vainfo
libva: libva version 0.32.0
Xlib:  extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/fglrx_drv_video.so
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

Thanks for the help.

Here you have the information of vainfo:

ivan@ivan-NT-A2400-NT-A3500:~$ vainfo
libva: libva version 0.32.0
Xlib:  extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/fglrx_drv_video.so
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

I have not yet installed / uninstalled anything in the system. This PC came with the system preinstalled. ATI drivers are installed.

Here I have picture with info on X:

enter image description here


Sorry:

This image shows vainfo information and drivers of my system.

enter image description here

share|improve this question
    
I have changed the title of your post to support a more broad range of cards, the answers should apply to all ATI cards running the binary drivers. –  Bruno Pereira Dec 13 '11 at 11:50
    
sorry, but this is wrong. AFAIK, only ati cards supporting UVD2 and later support xvba, meaning cards radeon hd 4000 and later. see wiki-entry xvba –  severin Dec 13 '11 at 12:39
    
@severin thx absolutly correct. answer changed. –  Bruno Pereira Dec 13 '11 at 13:11
    
As said on the post bellow, hardware video decoiding is only enable on the ATI binaries, you need to install them correctly before being able to use it. Follow this post to install the drivers for you card and dont forget to check is you card is supported first (link for that is also on the post). –  Bruno Pereira Dec 14 '11 at 11:13

3 Answers 3

Tested for Ubuntu 11.10 and any supported card ATI card using binary driver (only cards that support UDV2, radeon hd 4000 or higher)

Hardware video acceleration is only enabled if you are using the binaries from ATI, either install them using the Additional Driver tool or manually from the ATI site, the last method is preferred since the current package in the Additional Driver tool is quite buggy.

This post contains all the information needed to install/switch/remove drivers for ATI cards.

After this is done you still need a way to connect the media player to the hardware acceleration feature present in your new drivers.

To do that by installing xvba-va-driver, libva-glx1 and vainfo. Open a terminal and use this command, or look for the packages using the Ubuntu Software Center

sudo apt-get install xvba-va-driver libva-glx1 vainfo

After the packages are installed open a terminal (if not using it) and type vainfo, you should get an output like the following

 libva: libva version 0.32.0
 Xlib:  extension "XFree86-DRI" missing on display ":0.0".
 libva: va_getDriverName() returns 0
 libva: Trying to open /usr/lib/dri/fglrx_drv_video.so
 libva: va_openDriver() returns 0
 vainfo: VA API version: 0.32
 vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.7.8
 vainfo: Supported profile and entrypoints
 VAProfileH264High               :  VAEntrypointVLD
 VAProfileVC1Advanced            :  VAEntrypointVLD

If not something is wrong (drop a comment for more help).

If you get a similar output your drivers are installed and any video player with hardware decoding capabilities should pick it up automatically or allow you to enable this in the player's settings.

For a list of player capable of using hardware video decoding have a look here, the list is not as complete as I wanted but its a good starting point for information.

share|improve this answer
1  
Nice instructions; got a followup question here. Also wondering why/whether libva-glx1 is necessary. –  l0b0 Apr 26 '12 at 19:02
    
@l0b0: That depends on the media player you're using. For example, mplayer-vaapi requires libva-glx1. You don't have to specify it though, as it gets installed automatically. –  Dennis Aug 21 '12 at 13:06

On top of Bruno's suggestion (which worked for me) you may also need to do the following:

  1. Add the following lines to your /etc/environment (and reboot):

    LIBVA_DRIVER_NAME=xvba LIBVA_DRIVERS_PATH=/usr/lib/va/drivers

  2. Then to test, run vlc from the command line as follows:

    vlc --ffmpeg-hw

  3. Also 'Preferences -> Show Settings ALL -> Input / Codecs -> Video Codecs -> FFmpeg -> Hardware Decoding' TICK! (same as the above, but permanent - can be set from .config/vlc as well).

See: http://wiki.videolan.org/VLC_VAAPI

share|improve this answer
    
First half seems to be invalid. There is no /usr/lib/va/drivers on my system even if I installed the above packages. –  user12164 Sep 13 '13 at 17:10

I can only help, if you have an ATI/ADM card. In this case:

Do you use the ATI-Driver? You can install it using the System-Settings. There should be an icon called "Additional Drivers". After a reboot, you should be able to use all your graphics-power.

I have an HD5770 and first was not able to install this driver on my 11.10. The auto-updater showed me some updates, and after installing them, it worked well. Maybe this information is relevant for you, too.

If it doesn't work, then try this: http://mrrichard.hubpages.com/hub/2-Ways-to-Install-FGLRX-in-Ubuntu-1110-Oneric

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.