Kodi Community Forum
Linux VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Linux VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 (/showthread.php?tid=165707)



RE: VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 - fritsch - 2015-04-25

15.04 needs wsnipex ppa to get libva-driver-intel 1.5.1 - besides that, it runs fine.


RE: VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 - fritsch - 2015-04-26

Suspend modes not working? Read: http://forum.kodi.tv/showthread.php?tid=165707&pid=1990182#pid1990182 carefully


RE: VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 - mattlach - 2015-04-26

(2015-04-26, 00:04)fritsch Wrote: Suspend modes not working? Read: http://forum.kodi.tv/showthread.php?tid=165707&pid=1990182#pid1990182 carefully

Good to know! Thank you!


(2015-04-25, 23:37)fritsch Wrote: 15.04 needs wsnipex ppa to get libva-driver-intel 1.5.1 - besides that, it runs fine.

Ahh. Odd.

I had wsnipex ppa added, but still I was having the same vainfo output as a base install, but the version said 1.5.1pre1 or something like that (I have already zapped the partition.

Either way, I prefer being on an LTS. They tend to be more solid, and I won't be forced to do this all over again in 9 months :p

So I have restarted a 14.04 install. I went with the 4.0.0 vanilla kernel, hoping it will turn out OK.

Thank you very much for all your help, btw. You are quite possibly the most helpful developer in user forums I have ever come across! Smile

Thanks for putting up with mine (and everyone else's) sometimes stupid questions Smile


RE: VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 - mattlach - 2015-04-26

(2015-04-26, 00:50)mattlach Wrote:
(2015-04-25, 23:37)fritsch Wrote: 15.04 needs wsnipex ppa to get libva-driver-intel 1.5.1 - besides that, it runs fine.

Ahh. Odd.

I had wsnipex ppa added, but still I was having the same vainfo output as a base install, but the version said 1.5.1pre1 or something like that (I have already zapped the partition.

Either way, I prefer being on an LTS. They tend to be more solid, and I won't be forced to do this all over again in 9 months :p

So I have restarted a 14.04 install. I went with the 4.0.0 vanilla kernel, hoping it will turn out OK.

Thank you very much for all your help, btw. You are quite possibly the most helpful developer in user forums I have ever come across! Smile

Thanks for putting up with mine (and everyone else's) sometimes stupid questions Smile

Hmm. I'm in 14.04 now, and I'm having the same problem I had in 15.04

I have wsnipex ppa added. all VAAPI packages installed as in post on page 1 of this thread. Have done dist-upgrade, still, my vainfo looks like this:

Code:
$ vainfo
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_37
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.37 (libva 1.5.1.pre1)
vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.5.1.pre1 (1.5.1.pre1)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :    VAEntrypointVLD
      VAProfileMPEG2Main              :    VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointVLD
      VAProfileH264High               :    VAEntrypointVLD
      VAProfileH264MultiviewHigh      :    VAEntrypointVLD
      VAProfileH264StereoHigh         :    VAEntrypointVLD
      VAProfileVC1Simple              :    VAEntrypointVLD
      VAProfileVC1Main                :    VAEntrypointVLD
      VAProfileVC1Advanced            :    VAEntrypointVLD
      VAProfileNone                   :    VAEntrypointVideoProc
      VAProfileJPEGBaseline           :    VAEntrypointVLD

Not like your example:
(2014-08-24, 14:53)fritsch Wrote:
Code:
fritsch@t440s:~$ vainfo
libva info: VA-API version 0.35.2
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_35
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.35 (libva 1.3.2.pre1)
vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 1.3.3.pre1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :    VAEntrypointVLD
      VAProfileMPEG2Simple            :    VAEntrypointEncSlice
      VAProfileMPEG2Main              :    VAEntrypointVLD
      VAProfileMPEG2Main              :    VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:    VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:    VAEntrypointEncSlice
      VAProfileH264Main               :    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointEncSlice
      VAProfileH264High               :    VAEntrypointVLD
      VAProfileH264High               :    VAEntrypointEncSlice
      VAProfileH264MultiviewHigh      :    VAEntrypointVLD
      VAProfileH264MultiviewHigh      :    VAEntrypointEncSlice
      VAProfileH264StereoHigh         :    VAEntrypointVLD
      VAProfileH264StereoHigh         :    VAEntrypointEncSlice
      VAProfileVC1Simple              :    VAEntrypointVLD
      VAProfileVC1Main                :    VAEntrypointVLD
      VAProfileVC1Advanced            :    VAEntrypointVLD
      VAProfileNone                   :    VAEntrypointVideoProc
      VAProfileJPEGBaseline           :    VAEntrypointVLD
      VAProfileH264MultiviewHigh      :    VAEntrypointVLD
      VAProfileH264MultiviewHigh      :    VAEntrypointEncSlice
      VAProfileH264StereoHigh         :    VAEntrypointVLD
      VAProfileH264StereoHigh         :    VAEntrypointEncSlice

I thought it might be that the i965 driver wasn't updated, but it is:

Code:
sudo apt-get install i965-va-driver
Reading package lists... Done
Building dependency tree      
Reading state information... Done
i965-va-driver is already the newest version.
i965-va-driver set to manually installed.

This is all on a Celeron 2955u.

I'd appreciate any suggestions!


RE: VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 - mattlach - 2015-04-26

(2015-04-25, 09:21)fritsch Wrote: If you upgrade, you need to remove consolekit, pm-utils, upower

A little bit of a warning here.

Removing upower resulted in the following:

Code:
$ sudo apt-get remove upower
[sudo] password for htpc:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following extra packages will be installed:
  gnome-control-center gnome-control-center-data gnome-icon-theme gnome-icon-theme-symbolic gnome-settings-daemon libcolord-gtk1 libgoa-backend-1.0-1
The following packages will be REMOVED:
  gnome-power-manager gnome-session-bin indicator-power nautilus-share powerd ubuntu-session unity-control-center upower
The following NEW packages will be installed:
  gnome-control-center gnome-control-center-data gnome-icon-theme gnome-icon-theme-symbolic gnome-settings-daemon libcolord-gtk1 libgoa-backend-1.0-1
0 upgraded, 7 newly installed, 8 to remove and 0 not upgraded.
Need to get 3,633 kB of archives.
After this operation, 10.6 MB of additional disk space will be used.
Do you want to continue? [Y/n]

which in its turn makes it impossible to start a Unity session on my 15.04 install.

For those of you who want to run Kodi on top of a full session, rather than as a session, this may be of importance.

There does not appear to be a straight forward way to make Unity work again after this either. Luckily I made a dd image of the install before reverting to 14.04 earlier today, so I could easily restore it.


RE: VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 - fritsch - 2015-04-26

This thread is fully _not_ about Unity. It is about a minimal howto. If you want to start kodi from lightdm - every manual package installation hints does _not_ apply. Just install vaapi drivers and apt-get install kodi, then select it from lightdm.


RE: VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 - mattlach - 2015-04-26

(2015-04-26, 09:17)fritsch Wrote: This thread is fully _not_ about Unity. It is about a minimal howto. If you want to start kodi from lightdm - every manual package installation hints does _not_ apply. Just install vaapi drivers and apt-get install kodi, then select it from lightdm.

Fair enough.

Just thought it was relevant to know if this install breaks something else.

Personally I prefer to not run kodi as a session, but run it as a program ontop of another desktop, because running it as a session breaks a lot of plugins that launch external programs that expect to run ontop of a functioning desktop.

...and if I break Netflix, the significant other breaks me :p

I don't much care for Unity (in fact that was why I switched away from Ubuntu years ago) but the interface isn't terrible on the TV, and it is what comes with the distribution, so it seemed like a reasonable place to start for a desktop to run behind Kodi.

Anyway, would still appreciate your take on why my "Supported Profile and Entrypoints" look like what you get with the drivers included with the distribution, and not like your example, even though I have wsnipex PPA installed, and my driver reports itself as 1.51.pre1.

Also, I heeded your warning about triple buffering, so I removed the tearing "fix" from the Chromebox wiki from my setup. After this I wound up with tearing in Kodi, regardless of which kodi vsync setting I use ("let driver choose", or "always"). Do you have any suggestions here?

Appreciate the help as always!

--Matt


RE: VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 - fritsch - 2015-04-26

No. This thread is about my howto I gave on the very first thread, which is about running standalone kodi. I basically don't care about DRM broken by design content, which netflix is.

Vaapi 1.5.0 has a bug when stopping playback which was fixed in 1.5.1.


RE: VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 - mattlach - 2015-04-26

(2015-04-26, 21:17)fritsch Wrote: No. This thread is about my howto I gave on the very first thread, which is about running standalone kodi. I basically don't care about DRM broken by design content, which netflix is.

Vaapi 1.5.0 has a bug when stopping playback which was fixed in 1.5.1.

So, just so we are clear are you opposed running Kodi ontop of a fully configured desktop instead of as a session, or are you just angry that I had the audacity to mention Netflix? :p

I don't like DRM either, but you consume media in the market that exists, not in the one that you wish existed, especially when you share a house with others, you have to be open to their desires too, you can't dictate how the household watches content.

To me the whole reason of having a HTPC instead of one of those stupid little proprietary embedded entertainment boxes is that the PC base offers the flexibility to do EVERYTHING in one box rather than a closed down embedded consumer product that wants you to do it their way and their way only.

Now, I may have made the wrong choice with Unity, but it is the first one I tried that actually worked. Lxde had some compatibility problems. Haven't tried Xfce yet. I use Cinnamon on my desktop, but I'm not convinced it would be appropriate for this task.

Do you have any thoughts on what a good desktop to run Kodi on top of might be, or are you only willing to discuss running it as a session?


RE: VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 - mattlach - 2015-04-27

(2015-04-25, 09:21)fritsch Wrote: Some changes, that are needed for Ubuntu 15.04, I did with daniel3 on irc yesterday:

Basic Software:
Code:
sudo apt-get update
sudo apt-get install ssh python-software-properties software-properties-common udisks xorg alsa-utils mesa-utils git-core librtmp1 lirc libmad0 lm-sensors libmpeg2-4 avahi-daemon libnfs4 libva1 vainfo libva-intel-vaapi-driver linux-firmware dbus-x11
sudo apt-get dist-upgrade

Changes:
Removed consolekit, pm-utils, upower
Name changed: libnfs4 librtmp1
New: dbus-x11

Wsnipex vaapi ppa is still needed(!), cause Vivid only ships libva 1.5.0

Policykit change (/etc/polkit-1/localauthority/50-local.d/custom-actions.pkla):
Code:
[Actions for kodi user]
Identity=unix-user:kodi
Action=org.freedesktop.udisks.*;org.freedesktop.login1.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Untrusted Upgrade]
Identity=unix-user:kodi
Action=org.debian.apt.upgrade-packages;org.debian.apt.update-cache
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Changes: only freedesktop.login1 and udisks permissions are left. If you upgrade, you need to remove consolekit, pm-utils, upower

Now, we need a simple systemd upstart script (this one actively waits on network connection, see: network-online.target remove that if you don't need to wait)
Put it to: /etc/systemd/system/kodi.service
Code:
[Unit]
Description = kodi-standalone using xinit
After = systemd-user-sessions.service network.target sound.target network-online.target

[Service]
User = kodi
Group = kodi
Type = simple
PAMName=login
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-standalone -- :0 -nolisten tcp vt7
Restart = on-abort

[Install]
WantedBy = multi-user.target

Fake display-manager.service to not make plymouth or something else complain.

Code:
sudo ln -s /etc/systemd/system/kodi.service /etc/systemd/system/display-manager.service

Something else: if you plan to install a 4.0 kernel - the network interface name changes again, back from e.g. p3p1 to eth0 - the boot will timeout after 2 minutes. You can have a look in /sys/class/net to find the new device name. This is no issue on Vivid as it ships 3.19.5

For standard users no kernel upgrade is needed anymore

Edit: Because of the /etc/security/limits.conf and cause of the fact systemd is modpam aware, no nice level needs to be specified.

Do you have any recommendations for issuing the colorpsace fix now without upstart?

I tried adding the following line before ExecStart in your example, but it resulted in an unsuccessful black screen on bootup:

ExecStartPre=/usr/bin/xrandr -d :0 --output HDMI1 --set "Broadcast RGB" "Full"

My first theory was that it wasn't exiting cleanly, so I tried adding a "-" to make it ignore errors, but that didn't work either:

ExecStartPre=-/usr/bin/xrandr -d :0 --output HDMI1 --set "Broadcast RGB" "Full"

Again, stuck on a black screen.

Any ideas on how to execute xrandr at startup when using systemd as in 15.04?


RE: VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 - wsnipex - 2015-04-27

you can't run xrandr prior to starting X. Try ExecStartPost or use an autoexec.py from kodi.


RE: VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 - mattlach - 2015-04-27

(2015-04-27, 09:44)wsnipex Wrote: you can't run xrandr prior to starting X. Try ExecStartPost or use an autoexec.py from kodi.

Doh. Yes, that makes sense. Nod Will try that. Thank you!

Still doesn't make sense why it would prevent X from loading though, especially since I used the "-" which is supposed to prevent it from halting on errors.


RE: VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 - CrazyCoder - 2015-04-27

Still no way to get PVR addons like kodi-pvr-iptvsimple to work with kodi from this repo? Thanks.


RE: VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 - DaVu - 2015-04-27

Quote:Do you have any thoughts on what a good desktop to run Kodi on top of might be, or are you only willing to discuss running it as a session?

I bet fritsch will discuss (nearly) everything, if it is related to the topic. Running Kodi on top of a desktop is not the topic of this thread, as you can read at the first posting Wink.


RE: VAAPI: Nuc, Chromebox, HSW, IVB, Baytrail with Ubuntu 14.04 - fritsch - 2015-04-27

I personally run openbox-session and start kodi from its autostart :-) - as long as it does no compositing - all fine.