Rascas
Posts: 386
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: [Guide] Kodi on Raspbian Stretch

Tue Nov 28, 2017 2:10 pm

tom3f wrote:
Sun Nov 26, 2017 2:09 pm
Hello i installed rasbian stretch lite from noobs. Then installed latest Kodi by apt-get update; apt-get install kodi. I created new user named tomas. Added these groups : adm, tty, disk, dialout, cdrom, sudo, audio, video, plugdev, games, users, input, netdev, spi, i2c, gpio.

Added Kodi.service for systemctl as you suggested in first post and used group and user named tomas.

After reboot Kodi works. But I can only exit. Missing shutdown and reboot from menu. And other most important problem. Kodi doesn't mount/display USB drive when I connect it. When i remove USB drive from USB, I see notification about removal in kodi. But I don't see content of USB drive or usb drive at all in menu. How can I achieve that? On Ubuntu there is no problem with Kodi and mounting USB. After plug in I see new drive in movies and music section. Thank you.
Kodi uses udisks instead of udisks2 used by the Pixel desktop to mount disks. So for Kodi to mount/automount disks, without the desktop loaded, you have to install udisks first:

Code: Select all

sudo apt-get install udisks
You also need to use "kodi-standalone" instead of "kodi" in the systemd script, replace the respective line by this:

Code: Select all

ExecStart = /usr/bin/kodi-standalone
For the missing shutdown/reboot options you have to create a polkit rule allowing a user not logged in (with the systemd script Kodi starts before a user logs in) to have control over that. Create a file, for example, /etc/polkit-1/localauthority/50-local.d/power.pkla with the following content:

Code: Select all

[Allow login1]
Identity=unix-group:plugdev
Action=org.freedesktop.login1*
ResultAny=yes
ResultInactive=yes
ResultActive=yes
Reboot after that, and you should be allowed to mount/unmount/access/etc disks and also reboot and shutdown directly in Kodi.

Rascas
Posts: 386
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: [Guide] Kodi on Raspbian Stretch

Wed Nov 29, 2017 12:38 pm

xean wrote:
Wed Nov 15, 2017 11:18 pm
Hi,

I've followed your guide, and it works great, but I'd like to execute kodi only if HDMI cable is connected at boot. This way, I can power RPi and use it like a headless server, and only execute kodi if I want to plug it into the tv.

How can I do that? I've searched about tvservice but I don't really know how to relate it with the boot service.

Thank you
Something like this should work for what you want. Create a bash script that checks if HDMI TV is conneted and if so, launch kodi. For example /usr/bin/kodi_hdmi_check, with the following content:

Code: Select all

#!/bin/bash
if /usr/bin/tvservice -n | /bin/grep -q device_name; then
  /usr/bin/kodi
fi
Don't forget to give it execute permission with chmod +x.
Then replace the respective line in the systemd script with:

Code: Select all

ExecStart = /usr/bin/kodi_hdmi_check
Then reboot to test.

tom3f
Posts: 11
Joined: Thu Apr 26, 2012 6:26 pm

Re: [Guide] Kodi on Raspbian Stretch

Thu Nov 30, 2017 2:08 pm

Thank you for answer, I will try all suggested by you. But unfortunately I will be without rPi for three weeks so I will test it at end of December.

scotty87
Posts: 2
Joined: Fri Jan 04, 2013 3:05 pm

Re: [Guide] Kodi on Raspbian Stretch

Thu Nov 30, 2017 2:43 pm

Hi there I have installed Kodi on a new raspbian stretch install. Im sure I installed kodi via package manager initially then followed your directions to autostart at boot with no desktop just cli. My only issue Im having is the screen goes blank after 15-30 min. Only way I get it running is by typing kodi into terminal or sudo startx to start desktop. I have searched all over net using previous methods for stopping sleep and power saving with no avail. Also installed xscreensaver adjusted that. I think all these methods stop it from sleeping etc while desktop is running in backround but not when its just cli. Can someone please help me out and tell me were Im going wrong or what I need to do. Any help is much appreciated. Thanks

scotty87
Posts: 2
Joined: Fri Jan 04, 2013 3:05 pm

Re: [Guide] Kodi on Raspbian Stretch

Thu Nov 30, 2017 2:56 pm

raspbian stretch install autoboot cli method working keep getting bankscreen need to type kodi or startx to get screen going again. Think this is specific to cli. Hope someone can help as other than that its working great. thanks

Rascas
Posts: 386
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: [Guide] Kodi on Raspbian Stretch

Fri Dec 01, 2017 2:35 am

You set raspbian to boot into cli, and made a systemd script to autostart Kodi like explained in option 1 of the tutorial right? Does Kodi crash, or is just the screen that goes blank with Kodi still running? Please post a debug log like explained here: http://kodi.wiki/view/Log_file

Rascas
Posts: 386
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: [Guide] Kodi on Raspbian Stretch

Mon Dec 04, 2017 9:53 pm

Kodi 17.6 is now available for update. Changes available here:
https://kodi.tv/article/kodi-v176-final-very-last

GGEZ
Posts: 8
Joined: Mon May 15, 2017 10:54 pm

Re: [Guide] Kodi on Raspbian Stretch

Tue Dec 05, 2017 1:30 am

My kodi on stretch starts playing a file, but only audio plays. The menu still shows and I can hear things, but can't see anything.

Here is my log:
https://pastebin.com/6AS0rF84
I tried playing the walking dead near the end of the log.

GPU memory has been set to 256/512 and I still get insufficient resources. Tried with both decoders, and both on at the same time. Rendering is set to legacy.

cjan
Posts: 554
Joined: Sun May 06, 2012 12:00 am

Re: [Guide] Kodi on Raspbian Stretch

Tue Dec 05, 2017 1:34 am

Rascas wrote:
Mon Dec 04, 2017 9:53 pm
Kodi 17.6 is now available for update.
some went wrong, youtube.. movie everything slow motion, anyone ?

tom3f
Posts: 11
Joined: Thu Apr 26, 2012 6:26 pm

Re: [Guide] Kodi on Raspbian Stretch

Tue Dec 05, 2017 6:58 am

Rascas wrote:
Tue Nov 28, 2017 2:10 pm
Kodi uses udisks instead of udisks2 used by the Pixel desktop to mount disks. So for Kodi to mount/automount disks, without the desktop loaded, you have to install udisks first:

Code: Select all

sudo apt-get install udisks
You also need to use "kodi-standalone" instead of "kodi" in the systemd script, replace the respective line by this:

Code: Select all

ExecStart = /usr/bin/kodi-standalone
For the missing shutdown/reboot options you have to create a polkit rule allowing a user not logged in (with the systemd script Kodi starts before a user logs in) to have control over that. Create a file, for example, /etc/polkit-1/localauthority/50-local.d/power.pkla with the following content:

Code: Select all

[Allow login1]
Identity=unix-group:plugdev
Action=org.freedesktop.login1*
ResultAny=yes
ResultInactive=yes
ResultActive=yes
Reboot after that, and you should be allowed to mount/unmount/access/etc disks and also reboot and shutdown directly in Kodi.

Hello, so I get to my raspberry again sooner than I thing. I tried to change startup to kodi-standelone, I installed udisks and created power.pkla. Now after boot kodi starts and I can shutdown, reboot, exit etc. But still when I connect usb disk it does nothing. BUT when I exit from kodi, then log in and start it again using kodi-standelone under my profile. It can handle any usb disk without problem. It's possible to make kodi automount even when is started by systemctl on startup ? Thank you.

P.S. Is there possibility to install Kodi 18 on raspbian ? Because of netflix working only on Kodi 18.
Last edited by tom3f on Wed Dec 06, 2017 1:09 pm, edited 1 time in total.

Rascas
Posts: 386
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: [Guide] Kodi on Raspbian Stretch

Wed Dec 06, 2017 11:08 am

cjan wrote:
Tue Dec 05, 2017 1:34 am
Rascas wrote:
Mon Dec 04, 2017 9:53 pm
Kodi 17.6 is now available for update.
some went wrong, youtube.. movie everything slow motion, anyone ?
Youtube, movies from NAS, etc still works fine after update here. From 17.5 to 17.6, changes are minimal.
Last edited by Rascas on Wed Dec 06, 2017 5:14 pm, edited 1 time in total.

Rascas
Posts: 386
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: [Guide] Kodi on Raspbian Stretch

Wed Dec 06, 2017 11:10 am

tom3f wrote:
Tue Dec 05, 2017 6:58 am
Hello, so I get to my raspberry again sooner than I thing. I tried to change startup to kodi-standelone, I installed udisks and created power.pkla. Now after boot kodi starts and I can shutdown, reboot, exit etc. But still when I connect usb disk it does nothing. BUT when I exit from kodi, then log in and start it again using kodi-standelone under my profile. It can handle any usb disk without problem. It's possible to make kodi automount even when is started by systemctl on startup ? Thank you.
Tested on a clean Raspbian Stretch install and the instructions that I gave you worked fine, it automounts and I am also able to unmount disks. Please double check your config.

Rascas
Posts: 386
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: [Guide] Kodi on Raspbian Stretch

Wed Dec 06, 2017 2:27 pm

GGEZ wrote:
Tue Dec 05, 2017 1:30 am
My kodi on stretch starts playing a file, but only audio plays. The menu still shows and I can hear things, but can't see anything.

Here is my log:
https://pastebin.com/6AS0rF84
I tried playing the walking dead near the end of the log.

GPU memory has been set to 256/512 and I still get insufficient resources. Tried with both decoders, and both on at the same time. Rendering is set to legacy.
You only have 76MB of GPU memory, that's why. When you change the GPU RAM amount you have to reboot for changes to take effect.

Code: Select all

19:28:53.890 T:1911087104  NOTICE: ARM mem: 948MB GPU mem: 76MB MPG2:0 WVC1:0
I also recommend leaving video settings on defaults. Follow the instructions on first post again.

rulet
Posts: 2
Joined: Mon Sep 17, 2012 7:48 pm

Re: [Guide] Kodi on Raspbian Stretch

Wed Dec 06, 2017 9:51 pm

Hello. I did as said in the first poat about autostart kodi(with cli and systemd service enabled). It boots in cli until "starting hostname service" or something like this and nothing else happens. What can be wrong?

cjan
Posts: 554
Joined: Sun May 06, 2012 12:00 am

Re: [Guide] Kodi on Raspbian Stretch

Wed Dec 06, 2017 10:42 pm

Rascas wrote:
Wed Dec 06, 2017 11:08 am
cjan wrote:
Tue Dec 05, 2017 1:34 am
Rascas wrote:
Mon Dec 04, 2017 9:53 pm
Kodi 17.6 is now available for update.
some went wrong, youtube.. movie everything slow motion, anyone ?
Youtube, movies from NAS, etc still works fine after update here. From 17.5 to 17.6, changes are minimal.
sorry, my bad.
reboot after update everything back to normal, anyone confirm(need reboot)?

Rascas
Posts: 386
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: [Guide] Kodi on Raspbian Stretch

Thu Dec 07, 2017 12:18 am

cjan wrote:
Wed Dec 06, 2017 10:42 pm
Rascas wrote:
Wed Dec 06, 2017 11:08 am
cjan wrote:
Tue Dec 05, 2017 1:34 am


some went wrong, youtube.. movie everything slow motion, anyone ?
Youtube, movies from NAS, etc still works fine after update here. From 17.5 to 17.6, changes are minimal.
sorry, my bad.
reboot after update everything back to normal, anyone confirm(need reboot)?
You don't need to reboot when updating Kodi, but it is recommend that you aren't running it when you update it, if so you need to restart Kodi for changes to take effect.
Last edited by Rascas on Fri Dec 08, 2017 4:46 am, edited 1 time in total.

GGEZ
Posts: 8
Joined: Mon May 15, 2017 10:54 pm

Re: [Guide] Kodi on Raspbian Stretch

Fri Dec 08, 2017 1:25 am

Rascas wrote:
Wed Dec 06, 2017 2:27 pm
GGEZ wrote:
Tue Dec 05, 2017 1:30 am
My kodi on stretch starts playing a file, but only audio plays. The menu still shows and I can hear things, but can't see anything.

Here is my log:
https://pastebin.com/6AS0rF84
I tried playing the walking dead near the end of the log.

GPU memory has been set to 256/512 and I still get insufficient resources. Tried with both decoders, and both on at the same time. Rendering is set to legacy.
You only have 76MB of GPU memory, that's why. When you change the GPU RAM amount you have to reboot for changes to take effect.

Code: Select all

19:28:53.890 T:1911087104  NOTICE: ARM mem: 948MB GPU mem: 76MB MPG2:0 WVC1:0
I also recommend leaving video settings on defaults. Follow the instructions on first post again.
Thanks for spotting that in the log file. I had previously set the memory in raspi-config and I guess it isn't sticking. Not sure why.

my /boot/config.txt says:
gpu_mem=256

and my kodi logfile still says:
20:13:55.282 T:1910927360 NOTICE: ARM mem: 948MB GPU mem: 76MB MPG2:0 WVC1:0

Any idea why it isnt getting full access? Video settings are on defaults.

Rascas
Posts: 386
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: [Guide] Kodi on Raspbian Stretch

Fri Dec 08, 2017 12:21 pm

GGEZ wrote:
Fri Dec 08, 2017 1:25 am

Thanks for spotting that in the log file. I had previously set the memory in raspi-config and I guess it isn't sticking. Not sure why.

my /boot/config.txt says:
gpu_mem=256

and my kodi logfile still says:
20:13:55.282 T:1910927360 NOTICE: ARM mem: 948MB GPU mem: 76MB MPG2:0 WVC1:0

Any idea why it isnt getting full access? Video settings are on defaults.
Maybe editing the file manually ? Note that if you have something like gpu_mem_1024=X it takes precedence over gpu_mem=X.

xSunshin3x
Posts: 5
Joined: Fri Dec 08, 2017 12:35 pm

Re: [Guide] Kodi on Raspbian Stretch

Fri Dec 08, 2017 12:42 pm

hey guys,

Kodi doesn't start on my RPi 0 W after upgrading from 17.4 to 17.6 via apt upgrade.

Error log is on pastebin: https://pastebin.com/airB17ks

Already uninstalled and reinstalled kodi via apt, still doesn't work.

No modifications were made while/after the upgrade to 17.6


Can you help me pls?


Greetings

Rascas
Posts: 386
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: [Guide] Kodi on Raspbian Stretch

Fri Dec 08, 2017 11:13 pm

xSunshin3x wrote:
Fri Dec 08, 2017 12:42 pm
hey guys,

Kodi doesn't start on my RPi 0 W after upgrading from 17.4 to 17.6 via apt upgrade.

Error log is on pastebin: https://pastebin.com/airB17ks

Already uninstalled and reinstalled kodi via apt, still doesn't work.

No modifications were made while/after the upgrade to 17.6


Can you help me pls?


Greetings
That log doesn't contain much info, one with debug enabled would be better, but with that info it seems that it is either an incompatible addon with 17.6 that you had previously installed or a corrupted addons database. Can you move your ~/.kodi folder and start Kodi so it starts with clean/default settings to see if it works? You can move that folder again later into place.

xSunshin3x
Posts: 5
Joined: Fri Dec 08, 2017 12:35 pm

Re: [Guide] Kodi on Raspbian Stretch

Fri Dec 08, 2017 11:59 pm

Rascas wrote:
Fri Dec 08, 2017 11:13 pm

That log doesn't contain much info, one with debug enabled would be better, but with that info it seems that it is either an incompatible addon with 17.6 that you had previously installed or a corrupted addons database. Can you move your ~/.kodi folder and start Kodi so it starts with clean/default settings to see if it works? You can move that folder again later into place.
Thanks for your fast response.
Moved my ~/.kodi folder to kodi_old; upon first start, kodi created the default ~/.kodi folder - error still persists. kodi doesn't start.

Errorlog with normal debugging (step 1.2.1 from http://kodi.wiki/view/Log_file/Advanced): https://pastebin.com/ydh3w86S

Rascas
Posts: 386
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: [Guide] Kodi on Raspbian Stretch

Sat Dec 09, 2017 2:52 am

xSunshin3x wrote:
Fri Dec 08, 2017 11:59 pm
Rascas wrote:
Fri Dec 08, 2017 11:13 pm

That log doesn't contain much info, one with debug enabled would be better, but with that info it seems that it is either an incompatible addon with 17.6 that you had previously installed or a corrupted addons database. Can you move your ~/.kodi folder and start Kodi so it starts with clean/default settings to see if it works? You can move that folder again later into place.
Thanks for your fast response.
Moved my ~/.kodi folder to kodi_old; upon first start, kodi created the default ~/.kodi folder - error still persists. kodi doesn't start.

Errorlog with normal debugging (step 1.2.1 from http://kodi.wiki/view/Log_file/Advanced): https://pastebin.com/ydh3w86S
Ok, I think I have found the problem for the armv6 version, thanks for the feedback. But for a fix you will have to wait for the next week days or so. Downgrading to 17.5 should fix your problem in the meanwhile if you really need it.

xSunshin3x
Posts: 5
Joined: Fri Dec 08, 2017 12:35 pm

Re: [Guide] Kodi on Raspbian Stretch

Sat Dec 09, 2017 2:01 pm

Rascas wrote:
Sat Dec 09, 2017 2:52 am

Ok, I think I have found the problem for the armv6 version, thanks for the feedback. But for a fix you will have to wait for the next week days or so. Downgrading to 17.5 should fix your problem in the meanwhile if you really need it.
Sure, i don't mind waiting a little bit. I rolled back to 17.4, it's running stable and with a great performance, so i don't mind waiting a couple of days ;)

Thanks again for your fast help. (:

titou43
Posts: 3
Joined: Mon Dec 11, 2017 10:10 pm

Re: [Guide] Kodi on Raspbian Stretch

Mon Dec 11, 2017 10:26 pm

Hello at all

I'm new here and junior user of raspbian and Kodi

I have install raspbian strech (2017-11-29-raspbian-stretch.img) with kodi 17.6 on my raspberry pi 2

I would like to autostart Kodi at the boot of Raspbian like the part 2 here (post of Rascas) :

Option 2:
If you want autostart Kodi at boot but also keep the Desktop Environment on the background, just edit the file ~/.config/lxsession/LXDE-pi/autostart and add a line in the end with:

Code: Select all

@kodi

This option is a bit more resource intensive because the DE is loaded on the background.


But it not function...
I have modified the file autostart and after I have reboot...

But Kodi not start...
I have try @kodi fullscreen

Not result more, Kodi not start ....

Have you an idea ?

xSunshin3x
Posts: 5
Joined: Fri Dec 08, 2017 12:35 pm

Re: [Guide] Kodi on Raspbian Stretch

Tue Dec 12, 2017 8:47 pm

titou43 wrote:
Mon Dec 11, 2017 10:26 pm

@kodi

This option is a bit more resource intensive because the DE is loaded on the background.[/i]

But it not function...
I have modified the file autostart and after I have reboot...

But Kodi not start...
I have try @kodi fullscreen

Not result more, Kodi not start ....

Have you an idea ?
you can edit you crontab with 'crontab -e' and write in a new line:

Code: Select all

@reboot kodi &
wich will run kodi in a background process after every reboot ;)

Return to “Raspbian”

Who is online

Users browsing this forum: No registered users and 19 guests