• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 19
[LINUX] HOW-TO use VAAPI HW Acceleration in Intel Core i3 / i5 / i7 integrated GPU
#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: [email protected]
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.
Reply
#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.
Reply
#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.
Reply
#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.
Reply
#20
Sad 
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 Huh ...

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
Intel Nuc + Intel NUC HDMI-CEC Adapter -> HDMI output to Onkyo TX-NR3008 and Sony KDL-52W5500
Reply
#21
[quote=typhoe]
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

any idea what I missed?
[/quote]

I think you miss a few things :-)
First of all, be sure to use the vaapi enabled mplayer. If you executed sudo make install, you can normally use simply mplayer. But if you are in the build directory, be sure to use ./mplayer.

Also it is not enough to use -vo vaapi. You should use it like this (use the -va switch as well)

[CODE]./mplayer -vo vaapi -va vaapi moviename.mkv

I am really curious the results you have with mplayer. On my machine the files which are stuttering in xbmc, play well in mplayer.
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.
Reply
#22
alanwww1 Wrote:I think you miss a few things :-)
First of all, be sure to use the vaapi enabled mplayer. If you executed sudo make install, you can normally use simply mplayer. But if you are in the build directory, be sure to use ./mplayer.

Also it is not enough to use -vo vaapi. You should use it like this (use the -va switch as well)

Code:
./mplayer -vo vaapi -va vaapi moviename.mkv

I am really curious the results you have with mplayer. On my machine the files which are stuttering in xbmc, play well in mplayer.

Well, I used mplayer directly because I previously remove the ubuntu packaged mplayer (sudo apt-get remove mplayer) and installed the compiled mplayer using checkinstall (sudo checkinstall -D make install).
So trying to prefixe mplayer to launch the binary from the compilation directory does the same.
I tried the -va option too, no more results...

Code:
typhoe@ns10:~/gpu_accel/mplayer/mplayer-vaapi-20100713/mplayer-vaapi$ ./mplayer -vo vaapi -va vaapi -ao pulse /media/USB_HD_1To/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/sample_720p.mkv.
libavformat file format detected.
[matroska @ 0x2056570] 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.
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)
Selected audio codec: [ffac3] afm: ffmpeg (FFmpeg AC-3)
==========================================================================
AO: [pulse] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:  20.2 (20.2) of 2464.2 (41:04.2) 27.0%


MPlayer interrupted by signal 2 in module: play_audio
A:  20.3 (20.2) of 2464.2 (41:04.2) 26.9%

Exiting... (Quit)
typhoe@ns10:~/gpu_accel/mplayer/mplayer-vaapi-20100713/mplayer-vaapi$

So... I really don't know...
XBMC Openelec
Intel Nuc + Intel NUC HDMI-CEC Adapter -> HDMI output to Onkyo TX-NR3008 and Sony KDL-52W5500
Reply
#23
typhoe Wrote:So... I really don't know...

I will go through my guide again regarding the mplayer part as well to check what i not included at the mplayer part.
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.
Reply
#24
Hi Alan,

I tried your instructions on a FitPC Intel Atom processor with Intel GM500 graphic chip. I am very interested trying XBMC with vaapi, so your instructions are came in very handy... Especially considering I am new to Linux world Smile

Anyways, everything seemed to work smooth until bootstrap, where it complained like "configure: error: == Could not find libva. VAAPI support disabled. =="
I am attaching my terminal output. I had to cut some part out for the post to fit here.

Can you please check what might have gone wrong? What can I check to understand what is going on?
Thanks


.....
A xbmc/LICENSE.GPL
A xbmc/.dummy.am
A xbmc/.gitignore
A xbmc/xbmc-xrandr.c
A xbmc/README.ubuntu
U xbmc
Checked out revision 35636.
ahmet@fitpc:~$ cd xbmc
ahmet@fitpc:~/xbmc$ ./bootstrap
autoreconf: Entering directory `.'
autoreconf: configure.in: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.in: tracing
autoreconf: running: libtoolize --install --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/config.guess'
libtoolize: copying file `build-aux/config.sub'
libtoolize: copying file `build-aux/install-sh'
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.in:10: installing `build-aux/missing'
autoreconf: Leaving directory `.'
autoreconf: Entering directory `lib/cpluff'
autoreconf: running: autopoint --force
Copying file ABOUT-NLS
.....
.....
configure: == GOOM disabled. ==
checking librtmp/log.h usability... no
checking librtmp/log.h presence... no
checking for librtmp/log.h... no
configure: == Could not find libRTMP. RTMP support disabled. ==
checking librtmp/amf.h usability... no
checking librtmp/amf.h presence... no
checking for librtmp/amf.h... no
checking librtmp/rtmp.h usability... no
checking librtmp/rtmp.h presence... no
checking for librtmp/rtmp.h... no
configure: == Use of external ffmpeg disabled. ==
configure: == Use of external liba52 disabled. ==
configure: == Use of external libdts disabled. ==
configure: == Use of external python disabled. ==
checking vdpau/vdpau.h usability... no
checking vdpau/vdpau.h presence... no
checking for vdpau/vdpau.h... no
== Could not find libvdpau. VDPAU support disabled. ==
checking for main in -lva... no
configure: error: == Could not find libva. VAAPI support disabled. ==
ahmet@fitpc:~/xbmc$ make
make: *** No targets specified and no makefile found. Stop.
ahmet@fitpc:~/xbmc$ sudo make install
[sudo] password for ahmet:
make: *** No rule to make target `install'. Stop.
ahmet@fitpc:~/xbmc$ sudo ln -s /usr/lib/libva.so.1 /usr/lib/libva-0.31.1.1.so.1
ln: creating symbolic link `/usr/lib/libva-0.31.1.1.so.1': File exists
ahmet@fitpc:~/xbmc$ sudo ln -s /usr/lib/libva-glx.so.1 /usr/lib/libva-glx-0.31.1.1.so.1
ln: creating symbolic link `/usr/lib/libva-glx-0.31.1.1.so.1': File exists
ahmet@fitpc:~/xbmc$ xbmc
No command 'xbmc' found, did you mean:
Command 'xsmc' from package 'xsmc-calc' (universe)
xbmc: command not found
...
Reply
#25
Dogan Wrote:Anyways, everything seemed to work smooth until bootstrap, where it complained like "configure: error: == Could not find libva. VAAPI support disabled. =="

Have you ran this line ?
Code:
sudo apt-get install libva1 vainfo i965-va-driver libva-glx1 libva-dev

Make sure you installed libva-dev !
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.
Reply
#26
I filled in a bug report about Intel Linux drivers describing the problematic working of shader based HW upscaling on Linux drivers compared to the windows OpenGL drivers.

https://bugs.freedesktop.org/show_bug.cgi?id=32358

If anyone has any more info to add, please make it there.
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.
Reply
#27
Great to see all your efforts Alan! I also found the ticket related to VAAPI: http://trac.xbmc.org/ticket/10865

Hopefullyu soon this will run Linux as smooth as Win so we have an extra and more powerfull alternative to ION.
Reply
#28
I have similar problems...On XBMC I get a green screen with h264 files using VAAPI enable and on mplayer-vaapi I have:
Error opening/initializing the selected video_out (-vo) device.

Vainfo seems ok

mediacenter@mediacenter-desktop:~/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

I didn't notice any error on both compiles (XBMC and Mplayer).
Reply
#29
Smile 
Hello Core i Owner Big Grin

with

xrandr --newmode "1920x1080_23.976" 74.175 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
xrandr --addmode HDMI1 1920x1080_23.976
xrandr --output HDMI1 --mode 1920x1080_23.976

i can activate 24p Mode for my TV. Auto Framerate switching is now working for me. Nod

But VAAPI HW Acceleration for VC-1 Codec is not working. It shows only dc:ff-vc-1 if i press o on my keyboard.

Sorry for my poor english Blush
Reply
#30
BoBeRzE Wrote:xrandr --newmode "1920x1080_23.976" 74.175 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
xrandr --addmode HDMI1 1920x1080_23.976
xrandr --output HDMI1 --mode 1920x1080_23.976

i can activate 24p Mode for my TV. Auto Framerate switching is now working for me. Nod

But VAAPI HW Acceleration for VC-1 Codec is not working. It shows only dc:ff-vc-1 if i press o on my keyboard.

Sorry for my poor english Blush

Hi BoBeRzE !

That is a great find. WOuld be good to find the xorg.conf equivalent of the above commands. What i don't understand is why manual modelines are not working in the xorg.conf. Maybe we have to specify those differently.

As i know vc-1 decode is not enabled in the Intel driver yet. I'd even be happy if x264 would work properly.
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.
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 19

Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO use VAAPI HW Acceleration in Intel Core i3 / i5 / i7 integrated GPU4