[LINUX] HOW-TO use VAAPI HW Acceleration in Intel Core i3 / i5 / i7 integrated GPU

  Thread Rating:
  • 4 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
alanwww1 Offline
Team-XBMC Member
Posts: 1,299
Joined: Nov 2008
Reputation: 31
Location: Hungary
Post: #11
typhoe Wrote:I get only:
Code:
typhoe@ns10:~/gpu_accel$ vainfo
libva: libva version 0.31.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/i965_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA API version: 0.31
vainfo: Driver version: i965 Driver 0.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :    VAEntrypointVLD
      VAProfileMPEG2Main              :    VAEntrypointVLD
So now I'm looking for a ppa providing the libva package too, that will add the h264 support...

Your problem is not the version of the libva library. It is that your intel drivers are outdated. Just use the xorg edgers ppa, the way i did it in the guide.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
alanwww1 Offline
Team-XBMC Member
Posts: 1,299
Joined: Nov 2008
Reputation: 31
Location: Hungary
Post: #12
BoBeRzE Wrote:@ alanwww1
is it necessarily to add ppa:team-xbmc-svn/ppa an a few stps later ppa:lars-opdenkamp/xbmc-pvr? Or need we ppa:team-xbmc-svn/ppa to install libva1 libva-driver-i965?
bye BoBeRzE

I reworked the complete guide and tested it on a minimal Maverick install. Sorry for the fist one. That had some things missing or confusing. SHould be ok now.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
alanwww1 Offline
Team-XBMC Member
Posts: 1,299
Joined: Nov 2008
Reputation: 31
Location: Hungary
Post: #13
George Wrote:I got it working like this a couple of days ago. But what's not working for my setup is my television switching modes, I mean: when I play a 23.something movie my tv used to switch to 24p mode. And when playing a DVD my tv used to switch to 50Hz mode. That was with a Nvidia card. But I cannot get that to work on my new computer. Could you please let me know whether you got that working?

Yeah i have the same problem. I added this to the "not working" list.
I found out that the problem is not in xbmc. It is already there when X starts. I checked the xorg.log and there is only one refresh rate read out from the EDID data. I think this is closely related to the hdmi multichannel lpcm problem. The available screen and audio modes don"t get properly read.

The annyoing is that i can not set fixed modelines to use here. I tried it in a way we did it with nvidia cards, but nothingg happens. You can check the available refresh rates if you run xbmc in standalone mode with the --standalone switch. This way at video settings you can "choose" from the available one rate. This is the xorg.conf i tried. But i think this is useless:

Code:
Section "Device"
  Identifier  "Device0"
  Driver      "intel"
  VendorName  "INTEL Corporation"
EndSection

Section "Screen"
  Identifier  "Screen0"
  Device      "Device0"
  Monitor     "Monitor0"

  DefaultDepth  24
  SubSection "Display"
    Depth       24
    Modes     "1920x1080@50p" "1920x1080@59.94p" "1920x1080@24p" "1920x1080@60p"
  EndSubSection
EndSection

Section "Monitor"
  Identifier  "Monitor0"

  HorizSync   14.0 - 70.0
  VertRefresh 24.0 - 62.0
  Option "DPI" "110 x 110"

  Modeline    "1920x1080@24p"     74.230 1920 2560 2604 2752 1080 1084 1089 1125 +hsync +vsync
  Modeline    "1920x1080@50p"    148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
  Modeline    "1920x1080@59.94p" 148.352 1920 1960 2016 2200 1080 1082 1088 1125 +hsync +vsync
  Modeline    "1920x1080@60p"    148.500 1920 2008 2056 2200 1080 1084 1089 1125 +hsync +vsync
EndSection

Section "Extensions"
  Option      "Composite"           "Disable"
EndSection

I will report this problem to the Intel developers, but i want to collect more confirmation.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
(This post was last modified: 2010-12-03 10:59 by alanwww1.)
find quote
George Offline
Senior Member
Posts: 109
Joined: Feb 2010
Reputation: 0
Location: The Netherlands
Post: #14
alanwww1 Wrote:Yeah i have the same problem. I added this to the "not working" list.
I found out that the problem is not in xbmc. It is already there when X starts. I checked the xorg.log and there is only one refresh rate read out from the EDID data. I think this is closely related to the hdmi multichannel lpcm problem. The available screen and audio modes don"t get properly read.

I will report this problem to the Intel developers, but i want to collect more confirmation.

Yes, I know. I tried the same but I couldn't get the modelines to work. Hope you get some response from the Intel developers.
find quote
typhoe Offline
Member+
Posts: 41
Joined: Jun 2008
Reputation: 0
Post: #15
alanwww1 Wrote:Your problem is not the version of the libva library. It is that your intel drivers are outdated. Just use the xorg edgers ppa, the way i did it in the guide.

Thanks, indeed, that does the trick!

An other question: You have remove from your how to the use of the ppa "pvr" for xbmc ? You now suggest to compile from svn? Why exactly if I may ask?

XBMC Openelec Eden
Xtreamer Ultra + USB-CEC -> HDMI output to Onkyo TX-NR3008 and Sony KDL-52W5500
find quote
George Offline
Senior Member
Posts: 109
Joined: Feb 2010
Reputation: 0
Location: The Netherlands
Post: #16
Regarding the refresh problem: I begin to suspect that the Intel chipset just does not support 24p mode. When I read the EDID values I get the following result on my Panasonic 42G20:

Code:
xbmc@deathstar:~$ sudo get-edid | parse-edid
parse-edid: parse-edid version 2.0.0
get-edid: get-edid version 2.0.0

    Performing real mode VBE call
    Interrupt 0x10 ax=0x4f00 bx=0x0 cx=0x0
    Function supported
    Call successful

    VBE version 300
    VBE string at 0x11100 "Intel(R)Ironlake Desktop Graphics Chipset Accelerated VGA BIOS"

VBE/DDC service about to be called
    Report DDC capabilities

    Performing real mode VBE call
    Interrupt 0x10 ax=0x4f15 bx=0x0 cx=0x0
    Function supported
    Call successful

    Monitor and video card combination does not support DDC1 transfers
    Monitor and video card combination supports DDC2 transfers
    0 seconds per 128 byte EDID block transfer
    Screen is not blanked during DDC transfer

Reading next EDID block

VBE/DDC service about to be called
    Read EDID

    Performing real mode VBE call
    Interrupt 0x10 ax=0x4f15 bx=0x1 cx=0x0
    Function supported
    Call successful

EDID claims 1 more blocks left


*********** Something special has happened!
Please contact the author, Matthew Kern
E-mail: pyrophobicman@gmail.com
Please include full output from this program (especially that to stderr)



Reading next EDID block

VBE/DDC service about to be called
    Read EDID

    Performing real mode VBE call
    Interrupt 0x10 ax=0x4f15 bx=0x1 cx=0x0
    Function supported
    Call successful

EDID claims 1 more blocks left
EDID blocks left is wrong.
Your EDID is probably invalid.
parse-edid: EDID checksum passed.

    # EDID version 1 revision 3
Section "Monitor"
    # Block type: 2:0 3:fc
    Identifier "Panasonic-TV"
    VendorName "MEI"
    ModelName "Panasonic-TV"
    # Block type: 2:0 3:fc
    # Block type: 2:0 3:fd
    HorizSync 15-68
    VertRefresh 23-61
    # Max dot clock (video bandwidth) 150 MHz
    # DPMS capabilities: Active off:no  Suspend:no  Standby:no

    Mode     "1920x1080"    # vfreq 50.000Hz, hfreq 56.250kHz
        DotClock    148.500000
        HTimings    1920 1968 2012 2640
        VTimings    1080 1084 1089 1125
        Flags    "+HSync" "+VSync"
    EndMode
    Mode     "1920x1080"    # vfreq 60.000Hz, hfreq 67.500kHz
        DotClock    148.500000
        HTimings    1920 2008 2052 2200
        VTimings    1080 1084 1089 1125
        Flags    "+HSync" "+VSync"
    EndMode
    # Block type: 2:0 3:fc
    # Block type: 2:0 3:fd
EndSection

I know my tv has more valid modes, last week I tried an Nvidia card and it gave me the following results:

Code:
--- Modes in ModePool for Panasonic-TV (DFP-1) ---
"nvidia-auto-select" : 1920 x 1080 @  50.0 Hz  (from: EDID)
"1920x1080"          : 1920 x 1080 @  50.0 Hz  (from: EDID)
"1920x1080_50"       : 1920 x 1080 @  50.0 Hz  (from: EDID)
"1920x1080_60"       : 1920 x 1080 @  60.0 Hz  (from: EDID)
"1920x1080_60_0"     : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 16) (from: EDID)
"1920x1080_24"       : 1920 x 1080 @ 23.97/24 Hz (CEA-861B Format 32) (from: EDID)
"1920x1080_60i"      : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 5) (from: EDID)
"1920x1080_50i"      : 1920 x 1080 @ 50 Hz Interlace (CEA-861B Format 20) (from: EDID)
"1280x720"           : 1280 x  720 @  60.0 Hz  (from: EDID)
"1280x720_60"        : 1280 x  720 @  60.0 Hz  (from: EDID)
"1280x720_60_0"      : 1280 x  720 @ 59.94/60 Hz (CEA-861B Format 4) (from: EDID)
"1280x720_50"        : 1280 x  720 @  50.0 Hz  (from: EDID)
"720x576"            :  720 x  576 @ 50 Hz (CEA-861B Format 18) (from: EDID)
"720x576_50"         :  720 x  576 @ 50 Hz (CEA-861B Format 18) (from: EDID)
"720x576_50i"        : (1440)x 576 @ 50 Hz Interlace (CEA-861B Format 22) (from: EDID)
"720x480"            :  720 x  480 @ 59.94/60 Hz (CEA-861B Format 3) (from: EDID)
"720x480_60"         :  720 x  480 @ 59.94/60 Hz (CEA-861B Format 3) (from: EDID)
"720x480_60i"        : (1440)x 480 @ 59.94/60 Hz Interlace (CEA-861B Format 7) (from: EDID)
"640x480"            :  640 x  480 @ 59.94/60 Hz Interlace (CEA-861B Format 1) (from: EDID)
"640x480_60"         :  640 x  480 @ 59.94/60 Hz Interlace (CEA-861B Format 1) (from: EDID)
--- End of ModePool for Panasonic-TV (DFP-1): ---

So I know the EDID information can be read from the Panasonic but it looks like the I3 IGP doesn't support it or something.
find quote
alanwww1 Offline
Team-XBMC Member
Posts: 1,299
Joined: Nov 2008
Reputation: 31
Location: Hungary
Post: #17
typhoe Wrote:An other question: You have remove from your how to the use of the ppa "pvr" for xbmc ? You now suggest to compile from svn? Why exactly if I may ask?

Yes i suggest compiling. It has two major reasons:

- This ppa contains a modified source for the needs of LiveTV watching.
These modifications could distort results. Would be better to have reproducible results.

- This ppa has packages that interfere with the Ubuntu Xorg update packages.

So i ask if you could use the manual compile we could have consistent results.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
alanwww1 Offline
Team-XBMC Member
Posts: 1,299
Joined: Nov 2008
Reputation: 31
Location: Hungary
Post: #18
George Wrote:Regarding the refresh problem: I begin to suspect that the Intel chipset just does not support 24p mode.
So I know the EDID information can be read from the Panasonic but it looks like the I3 IGP doesn't support it or something.

I am pretty sure it supports it because on Win7, with xbmc it works. So it is a Linux only problem.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
George Offline
Senior Member
Posts: 109
Joined: Feb 2010
Reputation: 0
Location: The Netherlands
Post: #19
alanwww1 Wrote:I am pretty sure it supports it because on Win7, with xbmc it works. So it is a Linux only problem.

Ok, I've never tried Win7 so I didn't know that.

I just installed the latest DRM Intel Next kernel om 10.01 to see if that helps. It helps in several other areas (alsamixer for example gives a lot more options) but not on the refresh side of things. EDID output is still the same, unfortunately.
find quote
typhoe Offline
Member+
Posts: 41
Joined: Jun 2008
Reputation: 0
Sad    Post: #20
alanwww1 Wrote:So i ask if you could use the manual compile we could have consistent results.

Hi,

ok, I compile my xbmc (rev 35584) today.

Trying to decode videos with the vaapi is indeed not really usable for now... I get a lot of stuttering and freezing.
Even in 720p (these were ok using only the cpu i330)...

I tried to use mplayer to see if the problem was only using xbmc, but I can't manage to get the vaapi output to work Confused ...

Code:
typhoe@ns10:~/gpu_accel/mplayer/mplayer-vaapi-20100713/mplayer-vaapi$ vainfo
libva: libva version 0.31.1
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/i965_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA API version: 0.31
vainfo: Driver version: i965 Driver 0.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :    VAEntrypointVLD
      VAProfileMPEG2Main              :    VAEntrypointVLD
      VAProfileH264Baseline           :    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointVLD
      VAProfileH264High               :    VAEntrypointVLD

Code:
which mplayer
/usr/local/bin/mplayer
typhoe@ns10:~/gpu_accel/mplayer/mplayer-vaapi-20100713/mplayer-vaapi$ mplayer -vo vaapi /media/USB_HD_1To/tv_sample_720p.mkv
MPlayer SVN-r31722-4.4.5 (C) 2000-2010 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing /media/USB_HD_1To/tv_sample_720p.mkv.
libavformat file format detected.
[matroska @ 0x2ef73f0] Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: audio (ac3), -aid 0
[lavf] stream 1: video (h264), -vid 0
VIDEO:  [H264]  1280x720  0bpp  24.000 fps    0.0 kbps ( 0.0 kbyte/s)
Error opening/initializing the selected video_out (-vo) device.

I get the sound, but no video (as stated in the terminal output).
The vaapi doesn't seem to be known by mplayer... ?

any idea what I missed?

Thank you.
Typhoe

XBMC Openelec Eden
Xtreamer Ultra + USB-CEC -> HDMI output to Onkyo TX-NR3008 and Sony KDL-52W5500
find quote
Post Reply