• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 11
[LINUX] HOW-TO use VAAPI HW Acceleration on new Intel Sandy Bridge platform
#1
This guide is outdated ! Please use my new guide: http://forum.xbmc.org/showthread.php?tid=114368

Please note that this guide is very experimental. As the hardware and drivers are brand new, not everything is rock stable yet.

For this hardware we really need to use the newest available linux components we can get. Yes even the xorg edgers ppa is not up to date yet (specially the libva package is very outdated)

Of course this guide will be coming less and less complicated as the git changes get into the Ubuntu packages. I will update this guide all the time when there is a change which makes it less complicated.

What works:
Smooth VAAPI acceleration for mpeg2, h264, VC1 (not all files at the moment)
Auto refresh rate and smoothvideo function (with a small patch)
ProjectM with > 60fps (with recent patch in Intel driver)
Shader based HQ upscalers
Multichannel LPCM sound (with a workaround)
Suspend - resume

What is not working yet:
VAAPI deinterlacing (work is in progress)

So let's get to the steps:

1. Install OS

Get the netboot image for Ubuntu Natty 11.04 from here.

Burn, choose Command-line-install and use xbmc for username.

2. Install basic packages

After reboot, install ssh so you can continue work with Putty (for win) or with the "ssh -l xbmc your.IP.address" from a linux terminal. Also we install py-properties to easy add ppas. But before you ca do it remotely you need to install these packages. So get a terminal with crtl+alt+f1, than
Code:
sudo apt-get update
sudo apt-get upgrade
sudo reboot
sudo apt-get install ssh python-software-properties

Let's add the xorg edgers ppa right away.
Code:
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get upgrade

Let's install some basic packages:
Code:
sudo apt-get install udisks upower xorg alsa-utils mesa-utils git-core fontconfig liblcms1 libmng1 libqt3-mt librtmp0 libvdpau1 python-qt3 python-sip ttf-liberation libgtk2.0-bin libmad0

Let's add xbmc user to important groups than reboot
Code:
sudo adduser xbmc video
sudo adduser xbmc audio
sudo reboot

Now we will set the system that we can run Xorg without root privilages.

Code:
sudo dpkg-reconfigure x11-common

Let's get a working xorg.conf for Intel Sandy bridge. Note that this file is for one display system and it includes custom modelines which only work on HDTV-s. If you have a lower resolution monitor, you have to adjust the settings with "sudo nano /etc/X11/xorg.conf"

Code:
sudo wget http://paste.kde.org/6966/raw/ -O /etc/X11/xorg.conf

3. Compile LIBVA and MESA

For Sandy Bridge VAAPI to work we need the latest possible Libva package. At the xorg edgers ppa it is an old one at the moment. We need to build libva from git. Also to make it compatible we need to build a new MESA package. Here is how to do it. Note that we need a patch for libva for make to run without a missing include file.

Code:
cd ~
mkdir Builds
cd Builds
git clone git://anongit.freedesktop.org/git/libva
cd libva*
sudo apt-get build-dep libva1
wget http://paste.kde.org/6967/raw/ -O Libva_testdir_makefile.patch
patch -p1 < Libva_testdir_makefile.patch
./autogen.sh --enable-i965-driver --prefix=/usr
make
sudo make install

For MESA

Code:
cd ~/Builds
sudo apt-get build-dep mesa-common-dev
git clone git://git.freedesktop.org/git/mesa/mesa
cd mesa
./autogen.sh --prefix=/usr --with-driver=dri --disable-glut
make -j4
sudo make install

After this you can start Xorg with startx and with vainfo you should see something like this:

Code:
vainfo: VA API version: 0.32
vainfo: Driver version: i965 Driver 0.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Baseline           : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

Note that when you run startx on a minimal system only an xterm terminal shows on your top-left corner of screen. You have to make it active with a mouse click. If you can't see it, you can try to adjust your TV's overscan settings.

Please verify that your output is HDMI2 (like at my case) because i created the xorg.conf file for that. To check, run xorg and than run:

Code:
xrandr -q

If it is not HDMI2 at your system, you have to edit the downloaded xorg.conf with

Code:
sudo nano /etc/X11/xorg.conf

4. Compile XBMC

We get some needed build packages first:
Code:
sudo apt-get install git-core make g++ gcc gawk pmount libtool nasm yasm automake cmake gperf zip unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl3 libcurl4-gnutls-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbisenc2 libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libenca-dev libxt-dev libxtst-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmms-dev libmpeg3-dev libfaad-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libwavpack-dev libmpeg2-4-dev libmicrohttpd-dev libmodplug-dev libssh-dev gettext cvs autopoint dh-autoreconf ccache libyajl-dev libbluetooth-dev python-dev libboost-thread-dev

We compile libbluray to get bluray folder support for xbmc:
Code:
cd ~/Builds
git clone git://git.videolan.org/libbluray.git
cd libbluray
./bootstrap
./configure --prefix=/usr
make
sudo make install

Now we compile a fresh xbmc version. Note that we need a small patch for auto refresh rate to work with smoothvideo enabled.

Code:
cd ~/Builds
git clone git://github.com/xbmc/xbmc.git
cd xbmc
./bootstrap
./configure --prefix=/usr --enable-vaapi --enable-libbluray
wget http://paste.kde.org/7020/raw/ -O ./ReferenceClockHang.patch
patch -p1 < ./ReferenceClockHang.patch
make -j4
sudo make install

5. Various settings, autostart xbmc

For autostart xbmc we create an upstart init script:

Code:
sudo wget http://paste.kde.org/7158/raw/ -O /etc/init/xbmc.conf
sudo ln -s /lib/init/upstart-job /etc/init.d/xbmc
sudo wget http://paste.kde.org/7022/raw/ -O /usr/bin/runXBMC
sudo chmod a+x /usr/bin/runXBMC

In alsamixer unmute the spdif devices. Than we store this setting.

Code:
alsamixer
sudo alsactl store

Let's install lirc. Note that for kernel 2.6.38 there is a key event support for MCE remotes. This results a double event for cursor keys. To disable this i added the needed line in the upstart script (we already installed in the previous point). Also we enable the remote to wakeup the system. For this you will need to adjust the /etc/udev/rules.d/90-mcewakeup.rules file after we download it. For that you can check the Device ID of your remote with lsusb. My output was:

Code:
Bus 001 Device 003: ID 1784:0008 TopSeed Technology Corp. eHome Infrared Transceiver

Code:
sudo apt-get install lirc
sudo wget http://paste.kde.org/7159/raw/ -O /etc/udev/rules.d/90-mcewakeup.rules
sudo reboot

Note that for MCE remote you have to choose "Windows Media Center Transceivers" after choose none, when install lirc.

For suspend to have it working we need to enable an inactive session to use upower. We do it this way:

Code:
wget http://paste.kde.org/94699/raw/ -O /etc/polkit-1/localauthority/50-local.d/xbmc_rule.pkla

After reboot you will be able to use xbmc.

6. Some remarks and experiences

For suspend to work you might need a BIOS upgrade. I had problems with some boards, some worked out of the box.

You can always start (and stop) xbmc even remotely with
Code:
sudo start xbmc
sudo stop xbmc

Multichannel lpcm only works with a workaround. It is some kind of EDID parsing problem with alsa. You can check the modes detected by the kernel with
Code:
dmesg |grep HDMI

And check EDID detection with

Code:
cat /proc/asound/card0/eld#3.0

Mine looks like this: http://pastebin.com/QQ91D5ih

and should have looked like this: http://pastebin.com/SeJfY18A

There is a workaround until automatic eld parsing works that triggers the available soundmodes manually. Just insert this into the /etc/init/xbmc.conf upstart script at the end of the "pre-start script" section (you might have to tune the values to your available configuration):

Code:
echo sad0_rates 0x1ee0  > /proc/asound/card0/eld#3.0
    echo speakers 0x4f  > /proc/asound/card0/eld#3.0
    echo sad0_channels 8  > /proc/asound/card0/eld#3.0
    echo sad0_bits 0xe0000  > /proc/asound/card0/eld#3.0

Deinterlacing is not yet implemented for vaapi in xbmc. Not even in libva yet. But it is being worked on. There are a few important commits already for the i965 libva driver for implementing hq upscaling and hw deinterlacing.

The guide was tested on a H67 motherboard and a core i5-2500K CPU.

Happy testing, Alan
Reply
#2
Change log:

12.03.2011 Initial version
15.06.2011 Added workaround for multichannel lpcm sound
22.06.2011 Added "libyajl-dev, libbluetooth-dev, python-dev" to the needed packages as recent git versions need them
12.07.2011 Added "libboost-thread-dev" to the needed packages, as recent git versions need it
12.07.2011 Added missing lines for suspend-resume working
25.07.2011 Added libgtk2.0-bin to needed packages, Thanks to RedCat for the info !
10.09.2011 Added libmad0 to needed packages
10.11.2011 This guide is outdated ! Use my new guide here.
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
#3
I stuck some packages on my sandy bridge ppa with new libva and xbmc with vaapi support for those that want it up and running nice and easy on ubuntu maverick. its the bleeding edge git xbmc not the dharma 10.1 though.

Once you have xorg-edgers ppa added and kernel 2.6.37 (from somewhere - i might put one on my ppa also) (.38 seems to be buggy on sandy bridge still - at least for me)

sudo apt-add-repository ppa:jools/sandybridge
sudo apt-get install xbmc i965-va-driver vainfo

(I probably should have made a dependency from xbmc to the i965-va-driver - next time).

I've only just stuck this up, so I've only given it a quick test but it seems to be ok.

[edit] xbmc doesnt have the patch mentioned in the first post, i should test/add that too.

thanks for the guide.
Reply
#4
Thanks!

I'll report back "live" as I'm installing:
  • Can't install the mini.iso to USB with onboard tools from my 10.04.02 server (yes, no CD burner here). So I'm using Natty Alpha 3 server (32 bit) for the moment.
  • I've always used apt-get -y install... saves me some keypresses. Smile
  • On my distribution, no compilers etc. are installed. I thus moved the "apt-get install git-core make ..." command from step 4 up to the beginning of step 3.
Reply
#5
Ok, I managed to install it this way. Thanks again for the guide! I'm just copying an HD h264 movie to the machine (will take a while, slow powerline connection) to see how it works.

However, what I tried already was inserting an audio CD into the CD drive. This made the machine lock up rather frequently...? Not sure if this is related to the Bluray drive, the kernel version (Natty Alpha 3 comes with 2.6.38-5), the XBMC build from git, ...

I'll report back how the movie goes once I've had a try.

Is there a chance to compile the same git drivers for maverick with a 2.6.37 mainline kernel? Or is there any specific reason for why you chose Natty, i.e. won't it work with Maverick and the 37 kernel?
Reply
#6
Hammi Wrote:Is there a chance to compile the same git drivers for maverick with a 2.6.37 mainline kernel? Or is there any specific reason for why you chose Natty, i.e. won't it work with Maverick and the 37 kernel?

I have not tried the 2.6.37 kernel. Maybe i will make a test. The only thing seems to be not possible to update is the DRM kernel modules. Which are part of the kernel. There is alsao a userspace libdrm library, which you can compile separately, but not the kernel module.

http://git.kernel.org/?p=linux/kernel/gi...;a=summary

I wonder how we could just compile the kernel modules and not the whole kernel (like we do it with alsa). Whenever i trired that, i always had the complete menuconfig for kernel compile.
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
#7
sandy bridge works fine on vanilla 2.6.37 kernel (I just roll my own with make-kpkg). + xorg-edgers mesa/xorg updates. I use it here with maverick.
Reply
#8
exobuzz Wrote:sandy bridge works fine on vanilla 2.6.37 kernel (I just roll my own with make-kpkg). + xorg-edgers mesa/xorg updates. I use it here with maverick.
Thanks for the info. I will try your packages.

One question: What Compiz package do you have 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
#9
alanwww1 Wrote:One question: What Compiz package do you have there ?

maverick compiz without the sandy bridge blacklisted ids so compositing works.
Reply
#10
Ok, not so easy to play a movie. XBMC crashes when trying to generate a thumb for the movie I want to play:

Code:
14:52:44 T:2898262896 M:1820172288   DEBUG: DoWork - trying to extract thumb from video file /mnt/server/Frost_Nixon.mpg
14:52:44 T:2898262896 M:1820172288   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/avutil-50-i486-linux.so)
14:52:44 T:2898262896 M:1820172288   DEBUG: Loading: /usr/lib/xbmc/system/players/dvdplayer/avutil-50-i486-linux.so
14:52:44 T:2898262896 M:1820045312   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/avcore-0-i486-linux.so)
14:52:44 T:2898262896 M:1820045312   DEBUG: Loading: /usr/lib/xbmc/system/players/dvdplayer/avcore-0-i486-linux.so
14:52:44 T:2898262896 M:1820045312   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/avcodec-52-i486-linux.so)
14:52:44 T:2898262896 M:1820045312   DEBUG: Loading: /usr/lib/xbmc/system/players/dvdplayer/avcodec-52-i486-linux.so
14:52:44 T:2898262896 M:1816870912   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/avformat-52-i486-linux.so)
14:52:44 T:2898262896 M:1816870912   DEBUG: Loading: /usr/lib/xbmc/system/players/dvdplayer/avformat-52-i486-linux.so
14:52:44 T:2898262896 M:1816109056   DEBUG: Open - probing detected format [mpegts]
14:52:44 T:2898262896 M:1816109056   DEBUG: Open - av_find_stream_info starting
14:52:45 T:2861652848 M:1790078976   DEBUG: Thread 2861652848 terminating
14:52:45 T:2898262896 M:1809760256   DEBUG: ffmpeg[ACBFFB70]: [NULL] start time is not set in av_estimate_timings_from_pts
14:52:45 T:2898262896 M:1815982080   DEBUG: Open - av_find_stream_info finished
14:52:45 T:2898262896 M:1815982080    INFO: ffmpeg[ACBFFB70]: Input #0, mpegts, from '/mnt/server/Frost_Nixon.mpg':
14:52:45 T:2898262896 M:1815982080    INFO: ffmpeg[ACBFFB70]:   Duration: 01:56:49.03, start: 21543.553756, bitrate: 14183 kb/s
14:52:45 T:2898262896 M:1815982080    INFO: ffmpeg[ACBFFB70]:   Program 1
14:52:45 T:2898262896 M:1815982080    INFO: ffmpeg[ACBFFB70]:     Stream #0.0[0x20](deu): Subtitle: [6][0][0][0] / 0x0006
14:52:45 T:2898262896 M:1815982080    INFO: ffmpeg[ACBFFB70]:     Stream #0.1[0x2ff]: Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 46.33 fps, 25 tbr, 90k tbn, 50 tbc
14:52:45 T:2898262896 M:1815982080    INFO: ffmpeg[ACBFFB70]:     Stream #0.2[0x303](deu): Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
14:52:45 T:2898262896 M:1815982080    INFO: ffmpeg[ACBFFB70]:     Stream #0.3[0x304](eng): Audio: ac3, 48000 Hz, stereo, s16, 384 kb/s
14:52:45 T:2898262896 M:1815982080   DEBUG: CDVDFactoryCodec: compiled in hardware support: CrystalHD:no OpenMax:no VDPAU:no VAAPI:yes
14:52:45 T:2898262896 M:1815982080   DEBUG: FactoryCodec - Video:  - Opening
14:52:45 T:2898262896 M:1815982080   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/swscale-0-i486-linux.so)
14:52:45 T:2898262896 M:1815982080   DEBUG: Loading: /usr/lib/xbmc/system/players/dvdplayer/swscale-0-i486-linux.so
14:52:45 T:2898262896 M:1815982080  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
14:52:45 T:2898262896 M:1815982080   DEBUG: FactoryCodec - Video: ff-h264 - Opened
14:52:45 T:2898262896 M:1815982080   DEBUG: ExtractThumb - seeking to pos 2336345ms (total: 7009037ms) in /mnt/server/Frost_Nixon.mpg
14:52:45 T:2898262896 M:1815982080   DEBUG: SeekTime - seek ended up on time 2336324
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] Missing reference picture
14:52:45 T:2898262896 M:1793761280   ERROR: Previous line repeats 6 times.
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] top block unavailable for requested intra4x4 mode -1 at 8 1
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] error while decoding MB 8 1, bytestream (30031)
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] number of reference frames exceeds max (probably corrupt input), discarding one
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] cabac_init_idc overflow
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] decode_slice_header error
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] illegal short term buffer state detected
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] top block unavailable for requested intra mode at 16 1
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] error while decoding MB 16 1, bytestream (10285)
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] illegal short term buffer state detected
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] reference picture missing during reorder
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] reference count overflow
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] decode_slice_header error
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] reference picture missing during reorder
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] reference count overflow
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] decode_slice_header error
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] top block unavailable for requested intra4x4 mode -1 at 15 1
14:52:45 T:2898262896 M:1793761280   ERROR: ffmpeg[ACBFFB70]: [h264] error while decoding MB 15 1, bytestream (18859)
14:52:45 T:2898262896 M:1793634304   ERROR: ffmpeg[ACBFFB70]: [h264] Missing reference picture
14:52:45 T:2898262896 M:1793634304   ERROR: Previous line repeats 2 times.
14:52:45 T:2898262896 M:1793634304   ERROR: ffmpeg[ACBFFB70]: [h264] cabac_init_idc overflow
14:52:45 T:2898262896 M:1793634304   ERROR: ffmpeg[ACBFFB70]: [h264] decode_slice_header error
14:52:45 T:2898262896 M:1793634304   ERROR: ffmpeg[ACBFFB70]: [h264] illegal short term buffer state detected
14:52:45 T:2898262896 M:1793634304   ERROR: ffmpeg[ACBFFB70]: [h264] reference picture missing during reorder
14:52:45 T:2898262896 M:1793634304   ERROR: Previous line repeats 1 times.
14:52:45 T:2898262896 M:1793634304   ERROR: ffmpeg[ACBFFB70]: [h264] Missing reference picture
14:52:45 T:2898262896 M:1793634304   ERROR: Previous line repeats 4 times.
14:52:45 T:2898262896 M:1793634304   ERROR: ffmpeg[ACBFFB70]: [h264] Reference 10 >= 6
14:52:45 T:2898262896 M:1793634304   ERROR: ffmpeg[ACBFFB70]: [h264] error while decoding MB 23 1, bytestream (40021)
14:52:45 T:2898262896 M:1793634304   ERROR: ffmpeg[ACBFFB70]: [h264] illegal short term buffer state detected
[...]
14:52:45 T:2898262896 M:1788637184    INFO: ffmpeg[ACBFFB70]: [h264] concealing 8160 DC, 8160 AC, 8160 MV errors
14:52:45 T:2898262896 M:1788637184   ERROR: ffmpeg[ACBFFB70]: [h264] reference overflow
14:52:45 T:2898262896 M:1788637184   ERROR: ffmpeg[ACBFFB70]: [h264] decode_slice_header error
14:52:45 T:2898262896 M:1788637184   ERROR: ffmpeg[ACBFFB70]: [h264] illegal short term buffer state detected
14:52:45 T:2898262896 M:1788637184    INFO: ffmpeg[ACBFFB70]: [h264] concealing 8160 DC, 8160 AC, 8160 MV errors
14:52:45 T:2898262896 M:1788637184   ERROR: ffmpeg[ACBFFB70]: [h264] Missing reference picture
14:52:45 T:2898262896 M:1788637184   ERROR: Previous line repeats 25 times.
14:52:45 T:2898262896 M:1788637184   ERROR: ffmpeg[ACBFFB70]: [h264] illegal memory management control operation 16
14:52:45 T:2898262896 M:1788637184   ERROR: ffmpeg[ACBFFB70]: [h264] cabac_init_idc overflow
14:52:45 T:2898262896 M:1788637184   ERROR: ffmpeg[ACBFFB70]: [h264] decode_slice_header error


############### END LOG FILE ################

############ END XBMC CRASH LOG #############
Reply
#11
Hammi Wrote:Ok, not so easy to play a movie. XBMC crashes when trying to generate a thumb for the movie I want to play:

I never had such problem with any of the files i tried. Well this does not even have anything to do with vaapi as it was tried to decode it in software. It is some sort of other ffmpeg 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
#12
Yes, ran some additional tests. Dharma has the same issues.

Anyhow, I was able to work around this, and XBMC played the first few mins of the movie with <10% CPU load. EXCELLENT!

Keyboard layout configuration did not work for the Natty install. I ran "dpkg-reconfigure console-data", but this did not have any effect on the layout in XBMC... I will have to look into this.

And then... shutting down via the menu doesn't work, either. XBMC exists to X and then restarts. Not sure if this is an issues of Ubuntu or the startup skript.

I will run some more test, try to fix the above issues (and watch an entire movie Smile ) before I will put the SSD from my current machine into the new one and reinstall for a "productive family machine".
Reply
#13
Hammi Wrote:Anyhow, I was able to work around this, and XBMC played the first few mins of the movie with <10% CPU load. EXCELLENT!

And then... shutting down via the menu doesn't work, either. XBMC exists to X and then restarts. Not sure if this is an issues of Ubuntu or the startup skript.

Good to hear it works. What CPU do you have ? Could you please try projectM and what framerate do you have there ? I am just curious that can the 2000 series GPUS handle projectm the way the 3000 series ("K" letter in the product code) what i currently have. ?

Also can you try suspend. It probably won't work form xbmc but from terminal you can try sudo pm-suspend.

The shutdown behavior is expected and comes from the startup script i use. you can change that. I did it in case xbmc quits for some reason that it can start again.

Do you have the ocasional boot to black screen problem i have ?

Is Multichannel lpcm working for you with
Code:
speaker-test -Dhdmi -c6

I made a test with windows. Well dxva2 is NOT working properly at the moment with the newest drivers. So now linux support is actually ahead one step at the moment :-)

Suspend is working though.
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
#14
alanwww1 Wrote:What CPU do you have ?

I have an i3-2100T.

alanwww1 Wrote:Could you please try projectM and what framerate do you have there?

Sorry, can't tell you. 2 secs after I start playing an MP3 (which plays fine with Dharma on my other machine) the screen locks up. The song continues playing, but I cannot locally control xbmc anymore. Logging in remotely via ssh also failed.

According to the log, there was no error in XBMC, so I guess it's some part of the display driver:

Code:
21:01:42 T:3047446336 M:1829220352   DEBUG: CFileCache::Open - opening </srv/netstore/Musik/Alben/Eros Ramazzotti - Live/01 - Io Amerò.mp3> using cache
21:01:42 T:3047446336 M:1829220352   DEBUG: DllLibApeTag: Using libapetag library
21:01:42 T:2884791152 M:1829347328   DEBUG: thread start, auto delete: 0
21:01:42 T:3047446336 M:1829347328   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/libid3tag-i486-linux.so)
21:01:42 T:3047446336 M:1829244928   DEBUG: Loading: /usr/lib/xbmc/system/libid3tag-i486-linux.so
21:01:42 T:3047446336 M:1829142528   DEBUG: DllLibApeTag: Using libapetag library
21:01:42 T:3047446336 M:1829142528    INFO: PAPlayer: Playing /srv/netstore/Musik/Alben/Eros Ramazzotti - Live/01 - Io Amerò.mp3
21:01:42 T:3047446336 M:1829142528   DEBUG: PAPlayer: Creating new audio renderer
21:01:42 T:3047446336 M:1829142528    INFO: AudioRendererFactory:  not a explicit device, trying to autodetect.
21:01:42 T:3047446336 M:1829142528   DEBUG: RemoveActiveDevice - Removing device 1
21:01:42 T:3047446336 M:1829142528   DEBUG: CGUIAudioManager::DeInitialize
21:01:42 T:2884791152 M:1825800192    INFO: CFileCache::Process - Hit eof.
21:01:42 T:3047446336 M:1825800192   DEBUG: SetActiveDevice - SetActiveDevice from 0 to 2
21:01:42 T:3047446336 M:1825800192   DEBUG: RemoveActiveDevice - Removing device 0
21:01:42 T:3047446336 M:1825800192   DEBUG: PulseAudio: Context failed
21:01:42 T:3047446336 M:1825800192   ERROR: PulseAudio: Waited for the Context but it failed
21:01:42 T:3047446336 M:1825800192   ERROR: PulseAudio: Failed to create context
21:01:42 T:3047446336 M:1825800192   DEBUG: SetActiveDevice - SetActiveDevice from 2 to 1
21:01:42 T:3047446336 M:1825800192   DEBUG: RemoveActiveDevice - Removing device 2
21:01:42 T:3047446336 M:1825800192   DEBUG: CGUIAudioManager::Initialize
21:01:42 T:3047446336 M:1825738752   DEBUG: RemoveActiveDevice - Removing device 1
21:01:42 T:3047446336 M:1825738752   DEBUG: CGUIAudioManager::DeInitialize
21:01:42 T:3047446336 M:1825738752   DEBUG: SetActiveDevice - SetActiveDevice from 0 to 2
21:01:42 T:3047446336 M:1825738752   DEBUG: RemoveActiveDevice - Removing device 0
21:01:42 T:3047446336 M:1825738752   DEBUG: Initialize - using alsa device default
21:01:42 T:3047446336 M:1825738752   DEBUG: CALSADirectSound::Initialize - frame count:940, packet count:16, buffer size:15052
21:01:42 T:3047446336 M:1825738752   DEBUG: CALSADirectSound::Initialize - Channels: 2 - SampleRate: 44100 - SampleBit: 16 - Resample false - IsMusic true - IsPassthrough false - audioDevice: default
21:01:42 T:3047446336 M:1825738752   DEBUG: CAnnouncementManager - Announcement: PlaybackStarted from xbmc
21:01:42 T:2950601584 M:1825738752   DEBUG: thread start, auto delete: 0
21:01:42 T:2950601584 M:1825738752   DEBUG: PAPlayer: Thread started
21:01:42 T:3047446336 M:1825484800   DEBUG: ADDON: Dll Initializing - projectM
21:01:42 T:3047446336 M:1825484800   DEBUG: SECTION:LoadDLL(/usr/lib/xbmc/addons/visualization.projectm/projectM.vis)
21:01:42 T:3047446336 M:1825484800   DEBUG: Loading: /usr/lib/xbmc/addons/visualization.projectm/projectM.vis
21:01:42 T:2950601584 M:1825103872    INFO: AudioDecoder: File is queued
21:01:42 T:3047446336 M:1825075200   DEBUG: Calling TransferSettings for: projectM
21:01:43 T:3047446336 M:1823563776   DEBUG: GetZipList - Processing zip://special%3a%2f%2fxbmc%2faddons%2fvisualization%2eprojectm%2fresources%2fpresets%2ezip/
21:01:43 T:3047446336 M:1822752768   DEBUG: Visualisation::Start()
21:01:43 T:3047446336 M:1822752768   DEBUG: OnInitialize() started
21:01:43 T:3047446336 M:1822752768   DEBUG: OnInitialize() done
21:01:43 T:3047446336 M:1821429760   DEBUG: CGUIInfoManager::SetCurrentSong(/srv/netstore/Musik/Alben/Eros Ramazzotti - Live/01 - Io Amerò.mp3)
21:01:43 T:3047446336 M:1821429760   DEBUG: Loading additional tag info for file /srv/netstore/Musik/Alben/Eros Ramazzotti - Live/01 - Io Amerò.mp3
21:01:43 T:3047446336 M:1821429760   DEBUG: Updating visualisation albumart: /home/xbmc/.xbmc/userdata/Thumbnails/Music/f/f3d4e815.tbn
21:02:10 T:2905246576 M:1815236608   DEBUG: Thread 2905246576 terminating (autodelete)
21:02:10 T:2840169328 M:1815130112   DEBUG: Thread 2840169328 terminating (autodelete)
21:04:20 T:2950601584 M:1782669312   DEBUG: CAnnouncementManager - Announcement: QueueNextItem from xbmc
21:04:25 T:2950601584 M:1781391360    INFO: CAudioDecoder::GetData() ending track - only have 3048 samples left
21:04:25 T:2950601584 M:1781391360    INFO: PAPlayer: End of playback reached
21:04:25 T:2950601584 M:1781391360   DEBUG: CAnnouncementManager - Announcement: PlaybackEnded from xbmc
21:04:25 T:2950601584 M:1781391360   DEBUG: PAPlayer: Thread end
21:04:25 T:2950601584 M:1781391360   DEBUG: Thread 2950601584 terminating

... Yes, according to Xorg.0.log.old, the GPU was hanging:

Code:
[    17.943] (II) intel(0): Modeline "1920x1080"x0.0   74.25  1920 2448 2492 2640  1080 1084 1089 1125 +hsync +vsync (28.1 kHz)
[    17.943] (II) intel(0): Modeline "720x480"x0.0   27.00  720 736 798 858  480 489 495 525 -hsync -vsync (31.5 kHz)
[    17.943] (II) intel(0): Modeline "1440x288"x0.0   27.00  1440 1464 1590 1728  288 290 293 312 -hsync -vsync (15.6 kHz)
[    17.943] (II) intel(0): Modeline "1440x240"x0.0   27.00  1440 1478 1602 1716  240 244 247 262 -hsync -vsync (15.7 kHz)
[   394.660] (EE) intel(0): Failed to submit batch buffer, expect rendering corruption or even a frozen display: Device or resource busy.
[   397.668] (EE) intel(0): Failed to submit batch buffer, expect rendering corruption or even a frozen display: Device or resource busy.
[   400.676] (EE) intel(0): Failed to submit batch buffer, expect rendering corruption or even a frozen display: Device or resource busy.
[   400.692] (EE) intel(0): Detected a hung GPU, disabling acceleration.

alanwww1 Wrote:Also can you try suspend. It probably won't work form xbmc but from terminal you can try sudo pm-suspend.

pm-suspend sends the machine to sleep. But it took me 3 attempts, including 2 times cutting power, to get the machine come back up again - of course, as a new boot. So all in all, I would still consider this "not working".

alanwww1 Wrote:The shutdown behavior is expected and comes from the startup script i use. you can change that. I did it in case xbmc quits for some reason that it can start again.

Where would I need to look for this? /usr/bin/runXBMC looks as if it would create an .xsession which should create a '/tmp/noRestartXBMC' in case no restart is wanted... All I'm looking for is the behavior controlled from XBMC's menus. If it's crashing, well... then it's crashing. Smile

alanwww1 Wrote:Do you have the ocasional boot to black screen problem i have ?

Not sure... I may have just had that, but it may also have been simply because the HDMI cable was not plugged in when I started the machine.

alanwww1 Wrote:Is Multichannel lpcm working for you with
Code:
speaker-test -Dhdmi -c6

I'm not using sound via HDMI, but via SPDIF. That seems(!) to be working ok.
Reply
#15
Just a quick update: I watched a movie, and saw (after the initial frame drops when starting the move) no framedrops. Although I had deinterlacing turned on ("Auto"), CPU load was still around 10%. There was also no crash or anything (noticeable) wrong with the video driver.

The only exception is: Crushed blacks. There is no conversion or anything comparable in XBMC or the driver to compensate for this, like there is for nVidia? Does anybody know if there are any plans to implement this?

Because of the GPU freeze with projectM (mentioned in my post above) and the hanging system when playing audio CDs (which, I think, also occurred when I did not have projectM activated), I'll try the 10.10 + 2.6.37 kernel from mainline + xorg-edgers + jools-ppa approach for Sandy Bridge as well (once I find the time to).

Will report back how that goes.
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 11

Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO use VAAPI HW Acceleration on new Intel Sandy Bridge platform3