Kodi Community Forum

Full Version: Failure to launch - mesa?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I did a fresh install over an i3-4150 CPU (in an Asrock ITX board) and a passive-cooled GTX750 card (so I could accelerate x264 decoding via vdpau).
Wired to TV via HDMI, to AV receiver via SPDIF.
I wish to run this as an appliance: boot into Kodi directly and power off when Kodi exits.

First, I installed Ubuntu Server 18.04 (+SSH +Samba) - because I want a minimalist build based on an LTS release.
Then, I installed Kodi install like so:
bash:
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get install kodi
sudo apt-get install xauth xorg xinit xserver-xorg-core xserver-xorg xserver-common
sudo apt-get install lightdm
sudo adduser kodi
sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input kodi
sudo dpkg-reconfigure xserver-xorg-legacy
-> Selected 'Anybody'

bash:
sudo nano /etc/X11/Xwrapper.config
Added to the file:
txt:
needs_root_rights=yes

Added Service:
txt:
[Unit]
Description = Kodi-standalone using xinit
After = remote-fs.target systemd-user-sessions.service sound.target network-online.target
[Service]
User = kodi
Group = kodi
Type = simple
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch /usr/bin/kodi-standalone -- :0 -nolisten tcp
Restart = on-abort
[Install]
WantedBy = multi-user.target

Then enabled service:
bash:
sudo systemctl enable kodi.service
Then edited /etc/security/limits.conf and added :
txt:
kodi - nice -1

When the system boots up, this can be found in the log:
Quote:kodi-x11: ../src/gallium/drivers/nouveau/nouveau_vp3_video.c:91: nouveau_vp3_video_buffer_create: Assertion `templat->interlaced' failed.

I posted the same thing at launchpad but no response there yet.
As I am looking at the useless box I wonder: can perhaps the Kodi folk come up with some sort of a workaround while we wait for an official fix?
It's weekend, I'd have time to mess with it but it seems I'm sitting duck - as you can imagine, it's quite aggravating.

For example, does Ubuntu 19.04 have this problem? It's not LTS, but I would not mind until the bug gets fixed for 18.x.
Anything else you could think of?

Thank you!
Noveau is not supported - it won't work.
why don't you just use the igpu in your Intel CPU with vaapi? The old nvidia gfx doesn't offer any benefit
(2019-09-21, 21:54)fritsch Wrote: [ -> ]Noveau is not supported - it won't work.

I did not set that up, this is how Ubuntu and Kodi is installed out of the box, following the Wiki and fritsch's thread (loosely).
So, what should I and what can I do? Is it just a matter of sudo apt-get install nvidia-driver ?
I did not touch Kodi since the XBMC days (6-8 year ago?), so I am clueless as to where to go from here, please throw me a bone I can chew.
That thread I linked from 2015 may be old, but that's pretty much the only place I found that tells me how to set it up.
I'd love to document the current setup process on a wiki page or a thread, but it seems I can't find a good base to build on.
Thank you!
 
(2019-09-22, 08:10)wsnipex Wrote: [ -> ]why don't you just use the igpu in your Intel CPU with vaapi? The old nvidia gfx doesn't offer any benefit

Because from my experience NVidia is 'snappy' and ISG is 'laggy'.
I would not mind if you proved that theory wrong.
Either way, the first thing is getting it running so I would see what's what.
Thank you!

-----

In the meantime, I went for graysky's github page.
I deleted the kodi user and followed instructions there.
kodi.service now looks like:
txt:

# Source:
# https://github.com/graysky2/kodi-standalone-service
#   + After=remote-fs.target
[Unit]
Description=Kodi standalone (X11)
After=remote-fs.target systemd-user-sessions.service network-online.target sound.target
Requires=network-online.target
[email protected]

[Service]
User=kodi
Group=kodi
PAMName=login
TTYPath=/dev/tty1
ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -nolisten tcp vt1
Restart=on-abort
StandardInput=tty

[Install]
WantedBy=graphical.target

I don't get the error mentioned earlier, but kodi just exists without saying as much as boo:
txt:
Sep 22 11:11:00 kodibox systemd[1]: kodi.service: Main process exited, code=exited, status=1/FAILURE
Sep 22 11:11:00 kodibox systemd[1]: kodi.service: Failed with result 'exit-code'.

sudo systemctl status kodi
bash:
● kodi.service - Kodi standalone (X11)
   Loaded: loaded (/etc/systemd/system/kodi.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2019-09-22 11:34:34 UTC; 3min 9s ago
  Process: 888 ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -nolisten tcp vt1 (code=exited, status=1/FAILURE)
 Main PID: 888 (code=exited, status=1/FAILURE)

Sep 22 11:34:18 kodibox systemd[1]: Started Kodi standalone (X11).
Sep 22 11:34:18 kodibox systemd[888]: pam_unix(loginConfusedession): session opened for user kodi by (uid=0)
Sep 22 11:34:34 kodibox systemd[1]: kodi.service: Main process exited, code=exited, status=1/FAILURE
Sep 22 11:34:34 kodibox systemd[1]: kodi.service: Failed with result 'exit-code'.



I tried LibreELEC and that works out of the box, but there's generally zero OS customization available.
Their hardcoded SSH is terrible and the fact Samba can't be customized, simply kills it as a viable alternative.
So, I'd really prefer getting Kodi running on Ubuntu LTS.
(2019-09-22, 09:55)Csimbi Wrote: [ -> ]So, what should I and what can I do? Is it just a matter of sudo apt-get install nvidia-driver ?

Probably better is sudo ubuntu-drivers devices.  See which package it recommends and if it looks right, sudo ubuntu-drivers autoinstall.  If you want a different driver to the recommended one, sudo apt install nvidia-driver-xxx where xxx is some version number listed by the first command.

Don't forget to reboot afterwards.
again, simply pop out the nvidia gfx and follow fritsch' vaapi guide
(2019-09-23, 13:34)wsnipex Wrote: [ -> ]again, simply pop out the nvidia gfx and follow fritsch' vaapi guide

Hearing that a second time, I thought I would start with that and try black_eagle's recommendation later.
So:
- popped card.
- attached to mobo HDMI (side note: I also ditched SPDIF as a whole when LibreELEC would not pass DTS core of the DTS-HD MA audio).
- reinstalled per your recommendation.
- added Confluence skin.

Works as advertised.
AMP even picked up HDMI audio automatically, without messing around this time.

CPU is at 10% during x264 playback (1920x1080).
That, in retrospective, makes me feel stupid about wanting to accelerate that any further.
Seems you've come a long way since the XBMC days.
Well done and thanks!

@black_eagle
Thank you for your input, but it seems no point going the NVidia way anymore.
(2019-09-23, 20:57)Csimbi Wrote: [ -> ]@black_eagle
Thank you for your input, but it seems no point going the NVidia way anymore.  

 No worries. I guess I have nVidia for mainly historical reasons now, but I see no need to upgrade anything whilst it still does what I need it to - Wallet stays firmly in pocket !!