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

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Wed Apr 27, 2016 2:00 pm

gkreidl wrote:It should be
start_file=start_x.elf
fixup_file=fixup_x.dat
(or fixup_file=fixup_x.elf formerly, not sure if it has been renamed - I'm still using the old version and it is working)
to enable the additional codecs. They work for me.
Yes. That is exactly the same as start_x=1. ;)

User avatar
AikonCWD
Posts: 180
Joined: Mon Jun 09, 2014 3:50 pm
Location: Barcelona

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Wed Apr 27, 2016 8:08 pm

Thanks @Rascas, I never heard about that "software decoding" command, If I set start_x=1 I will get better playback from Kodi?
My e-mail = aikon.bcn@gmail.com

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

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Wed Apr 27, 2016 9:32 pm

AikonCWD wrote:Thanks @Rascas, I never heard about that "software decoding" command, If I set start_x=1 I will get better playback from Kodi?
No, it will be exactly the same. You will have the ability to play some video formats, that otherwise you cannot, like the ones mentioned earlier, using software decoding.
Last edited by Rascas on Thu Apr 28, 2016 12:32 am, edited 1 time in total.

gkreidl
Posts: 6351
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Wed Apr 27, 2016 9:39 pm

AikonCWD wrote:Thanks @Rascas, I never heard about that "software decoding" command, If I set start_x=1 I will get better playback from Kodi?
It's decoding by software running on the GPU for certain codecs: VP6, VP8, MJPEG, OGG video
H263/4 and VC1/MPEG (codecs required) are decoded by special hardware.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

wedgehog
Posts: 5
Joined: Thu Apr 28, 2016 8:33 pm

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Thu Apr 28, 2016 8:39 pm

After upgrading to 16.1 kodi always asks for the root password on start up with both kodi and kodi-standalone from the command line. This never was a requirement before the upgrade, ie with 16.0 also from the piplware repo.

I've tried running all the above mentioned commands for adding my user account to the different user groups, and also creating above mentioned text files regarding various types of permissions.

No one else experiencing this since the 16.1 upgrade??

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

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Fri Apr 29, 2016 11:27 am

wedgehog wrote:After upgrading to 16.1 kodi always asks for the root password on start up with both kodi and kodi-standalone from the command line. This never was a requirement before the upgrade, ie with 16.0 also from the piplware repo.

I've tried running all the above mentioned commands for adding my user account to the different user groups, and also creating above mentioned text files regarding various types of permissions.

No one else experiencing this since the 16.1 upgrade??
Kodi should not be run as root or ask for root password. I think that on Raspbian the root account is even deactivated by default and switching user to sudo (sudo su) doens't ask for password by default either.
So there should be some kind of "misconfiguration" on your system, but only with that kind of information I cannot guess what. It also should not be be something Kodi specific.

wedgehog
Posts: 5
Joined: Thu Apr 28, 2016 8:33 pm

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Fri Apr 29, 2016 12:00 pm

As I tried to state - kodi asks for the root password when running kodi or kodi-standalone as an unpriviliged user (but which have the privileges listed above in this thread by rascas). After the root password is typed, kodi starts and runs as the unpriviliged user. This behavior started after upgrading to 16.1. And disappears again when downgrading to 16.0. Stock raspbian jessie, installed from minimal image. Only differences from stock install is rename of the 1000 user, from pi to my own user name.

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

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Fri Apr 29, 2016 12:15 pm

wedgehog wrote:As I tried to state - kodi asks for the root password when running kodi or kodi-standalone as an unpriviliged user (but which have the privileges listed above in this thread by rascas). After the root password is typed, kodi starts and runs as the unpriviliged user. This behavior started after upgrading to 16.1. And disappears again when downgrading to 16.0. Stock raspbian jessie, installed from minimal image. Only differences from stock install is rename of the 1000 user, from pi to my own user name.
This Kodi packages are part of PiPplware's distribution and now also available for installation on RetroPie, so it is used by alot of people. Both are based on Raspbian, and also some people use this packages on stock Raspbian. So if something like that happened, it would be easily detected and reported already. Nothing has changed related to permissions in this version compared to 16.0. It has to be something on your Raspbian installation. Also, stock Raspbian doesn't have root password, so you must have done something else or not configured the permissions correctly.

wedgehog
Posts: 5
Joined: Thu Apr 28, 2016 8:33 pm

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Fri Apr 29, 2016 2:55 pm

Really strange then. This is a clean month old jessie install from minimal image, with only difference from stock, apt upgrade, pipplware repo added, 16.0 then 16.1 installed, and name of default user and password changed. Nothing else modified.

Even when trying creating a new user it asks for root password. Downgrade to 16.0 and it just starts right away

sudo useradd test
sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input,tty test
sudo mkdir /home/test
sudo chown test /home/test
sudo su test

test@raspberrypi:~$ kodi
[sudo] password for test:

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

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Fri Apr 29, 2016 3:18 pm

wedgehog wrote:Really strange then. This is a clean month old jessie install from minimal image, with only difference from stock, apt upgrade, pipplware repo added, 16.0 then 16.1 installed, and name of default user and password changed. Nothing else modified.

Even when trying creating a new user it asks for root password. Downgrade to 16.0 and it just starts right away

sudo useradd test
sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input,tty test
sudo mkdir /home/test
sudo chown test /home/test
sudo su test

test@raspberrypi:~$ kodi
[sudo] password for test:

You shouldn't be changing user with "sudo su username" just "su username", otherwise, everything run by user "test" will be run as super user. You also didn't add the user test to the sudo group and configured it, thats why it asks for password.
If you are having issues with that, it is better to create another post because it has nothing to do with kodi.

wedgehog
Posts: 5
Joined: Thu Apr 28, 2016 8:33 pm

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Fri Apr 29, 2016 4:22 pm

Rascas wrote:
wedgehog wrote:Really strange then. This is a clean month old jessie install from minimal image, with only difference from stock, apt upgrade, pipplware repo added, 16.0 then 16.1 installed, and name of default user and password changed. Nothing else modified.

Even when trying creating a new user it asks for root password. Downgrade to 16.0 and it just starts right away

sudo useradd test
sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input,tty test
sudo mkdir /home/test
sudo chown test /home/test
sudo su test

test@raspberrypi:~$ kodi
[sudo] password for test:

You shouldn't be changing user with "sudo su username" just "su username", otherwise, everything run by user "test" will be run as super user. You also didn't add the user test to the sudo group and configured it, thats why it asks for password.
If you are having issues with that, it is better to create another post because it has nothing to do with kodi.
logging in as another user using sudo su username, and then running a command, runs it as that user, just as just su username would have done (i.e. the command doesn't run as the root user account). adding "test" also to the sudo group doesn't change anything for me, still asks for root password under 16.1 (and only under 16.1, not 16.0).

Clearly, a permission for something in kodi have changed for 16.1 in the pippleware repos. Adding

Code: Select all

test ALL=(ALL) NOPASSWD: ALL
To /etc/sudoers allows the above mentioned user account test to launch kodi 16.1 without supplying the passwd on startup of kodi.

Code: Select all

pi ALL=(ALL) NOPASSWD: ALL
is default in the raspbian /etc/sudoers , so running kodi 16.1 with the default pi user, not changeing the name of the default 1000 user account, would not make this problem show up.

A more elegant solution, is adding the following to the /etc/sudoers file.

Code: Select all

nameofuseraccountrunningkodi ALL=(ALL) NOPASSWD:/usr/bin/kodi,/usr/lib/kodi,/usr/share/kodi,/usr/bin/kodi-standalone,/usr/lib/kodi/kodi.bin,/usr/bin/killall
Without the above mentioned killall command in sudoers it doesn't work.

I saw through a ps aux constantly running, that on starting up kodi, a command 'sudo killall fbi' automatically tries to get run as the root user (maybe that's what asks for root priviliges). This last thing looks quite strange if you ask me..

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

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Fri Apr 29, 2016 4:48 pm

I had already explained that in a previous post. The fbi program is a program to display images in the framebuffer. It is used in PiPplware and RetroPie to display a splashscreen at system startup. The problem is that there is a bug somewere in between fbi - framebuffer - kodi, and if fbi isn't stopped before Kodi starts, you will see the terminal in the background, when you play some video. And that was already in Kodi 16.0 and also in my previous Kodi builds also. That code is in /usr/bin/kodi you can check that in all my Kodi versions. And yes, in your case, that's what makes it ask you the sudo password. If you don't like that, remove it from that file, it is not needed in stock Raspbian. No need to change /etc/sudoers. If you find a better solution to that, please say so, I would gladly include it in my Kodi packages.

EDIT: Well, I can easily change that LOL. I will do that in the next version.
Last edited by Rascas on Fri Apr 29, 2016 4:54 pm, edited 1 time in total.

exobuzz
Posts: 137
Joined: Mon Nov 26, 2012 6:58 pm

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Fri Apr 29, 2016 4:54 pm

one option Instead of killing it, you could just wait for FBI to exit (on RetroPie at least, the splashscreen displays for 20s only)

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

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Fri Apr 29, 2016 4:56 pm

exobuzz wrote:one option Instead of killing it, you could just wait for FBI to exit (on RetroPie at least, the splashscreen displays for 20s only)
I will just add a condition to check if fbi is running, and if it is, kill it. That should solve it, in both distributions.

exobuzz
Posts: 137
Joined: Mon Nov 26, 2012 6:58 pm

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Fri Apr 29, 2016 5:00 pm

Killing FBI isn't always safe btw - I have noticed this when experimenting with using FBI on game launching in RetroPie

https://github.com/RetroPie/RetroPie-Se ... 202e45c80f

(I can't remember exactly, but I think on occasion it could leave the FB in a bad state or something)

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

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Fri Apr 29, 2016 5:10 pm

Thanks for the advice. There is no problem in this case, because Kodi has code to manage the framebuffer itself and I think it has some "conflict" with the fbi and that's what causes the problem. But I will definitely add a check for it, or something better if I find it in the meantime. And it is better to talk about that in another post or something because it is getting offtopic, this should be only about Kodi itself.

wedgehog
Posts: 5
Joined: Thu Apr 28, 2016 8:33 pm

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Fri Apr 29, 2016 8:05 pm

Rascas wrote:Thanks for the advice. There is no problem in this case, because Kodi has code to manage the framebuffer itself and I think it has some "conflict" with the fbi and that's what causes the problem. But I will definitely add a check for it, or something better if I find it in the meantime. And it is better to talk about that in another post or something because it is getting offtopic, this should be only about Kodi itself.
Okok, this probably explains both my symptoms and why it's solved now. Strange though, that if this kill command was there also in 16.0, that somehow it isn't seen in the terminal, and that the killall command after 16.1 stops kodi from running before the passwd is typed (to allow the sudo command).

Didn't realize that you Rascas actually where the maintainer of the repo. Thought it was some random anonymous non English speaking maintainer, and got a bit carried away regarding this strange "fbi process" which didn't even seemed to be installed. Sorry about that.

Anyway, I don't think kodi should be dependent on any unnecessary privileged commands to run. Having it to rely on a carte blanche sudoers file for the user account calling kodi seems a bit unsafe. (and the default sudoers file for the pi user account on raspbian got me really surprised - pi is by default by all standards really a root account, really strange security model)

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

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Sun May 01, 2016 12:19 am

wedgehog wrote: Anyway, I don't think kodi should be dependent on any unnecessary privileged commands to run. Having it to rely on a carte blanche sudoers file for the user account calling kodi seems a bit unsafe. (and the default sudoers file for the pi user account on raspbian got me really surprised - pi is by default by all standards really a root account, really strange security model)
I agree with the first part, but that will always be needed, if you want Kodi to work fine, with all features.
You always need to change udev rules, add the user to many groups to do something, etc. It doesn't matter which Kodi version you use. This is also true for other Linux OSs and platforms. Either you or the package maintainer.
Also, If you take a look at /usr/bin/kodi-standalone of the Kodi 15.2 from the Raspberry Pi Foundation repo, it also uses sudo, to "fix the black screen on exit" bug. This Kodi version (PiPplware's) uses the same debian package scripts from the one on RPi Foundation repo, which are this http://michael.gorven.za.net/bzr/debian ... d:/debian/ that are based on Ubuntu ones, only slightly changed for the Raspberry Pi. I changed /usr/bin/kodi, to fix also that bug and other ones and they also need sudo.

Other options would be editing the sudoers file, changing the permissions of the respective binaries to be possible to run them as "normal user", or run it as root. All that options seem worse in my opinion.

The user "pi" is not a root account, it is different. If I remember correctly, the major diference to, for example, Ubuntu, is that user "pi", compared to a default user, it has the "ask for password" for running something with sudo disabled. There are things you cannot do with the user pi, as is. But if you know how, you can always do everything, of course ;) And yeah, it is a bad decision in my opinion.

So if you want to run Kodi as another user, with all features and working fine, I recommend adding it to the sudo group and disable the password asking for the programs that are needed, until a better way is found.
Last edited by Rascas on Sun May 01, 2016 4:37 am, edited 5 times in total.

gkreidl
Posts: 6351
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Sun May 01, 2016 2:02 am

removed
Last edited by gkreidl on Sun May 01, 2016 2:52 am, edited 1 time in total.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

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

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Sun May 01, 2016 2:28 am

removed
Last edited by Rascas on Sun May 01, 2016 3:00 am, edited 1 time in total.

gkreidl
Posts: 6351
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Sun May 01, 2016 2:48 am

You*re right. Posting at night is obviously a bad idea. I should go back to sleep :-)
But the problem remains. Using sudo is a bad idea, and my solution is as bad as yours.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

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

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Sun May 01, 2016 2:58 am

LoL, no problem. I agree that this solution is bad but unfortunately I don't see an alternative. The alternatives that I see and mentioned are also bad or worse. But if someone comes with a better idea I will gladly change it.

gkreidl
Posts: 6351
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Sun May 01, 2016 3:13 am

Rascas wrote:LoL, no problem. I agree that this solution is bad but unfortunately I don't see an alternative. The alternatives that I see and mentioned are also bad or worse. But if someone comes with a better idea I will gladly change it.
I just tried my "startkodi" script with the last part, which requires "sudo", commented out (that was copied from the original kodi-standalone script for the RPi). No black screen, even after repeated calls. It's basically the same as the omxplayer start script. So here it is again for testing purposes:

Code: Select all

#!/bin/bash
fbset_bin=`which fbset`
xset_bin=`which xset`
xrefresh_bin=`which xrefresh`
if [ ! -z $fbset_bin ]; then
  DEPTH2=`$fbset_bin | head -3 | tail -1 | cut -d " " -f 10`
fi
kodi "$@"
if [ ! -z $fbset_bin ]; then
  if [ "$DEPTH2" == "8" ]; then
    DEPTH1=16
  else
    DEPTH1=8
  fi
  $fbset_bin -depth $DEPTH1 > /dev/null 2>&1
  $fbset_bin -depth $DEPTH2 > /dev/null 2>&1
fi
if [ ! -z $xset_bin ] && [ ! -z $xrefresh_bin ]; then
  if [ -z $DISPLAY ]; then
    DISPLAY=":0"
  fi

  $xset_bin -display $DISPLAY -q > /dev/null 2>&1
    if [ "$?" == "0" ]; then
      $xrefresh_bin -display $DISPLAY > /dev/null 2>&1
    fi
fi
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

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

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Sun May 01, 2016 3:39 am

I will try something like that. If it works I will change it in my packages.

hawkeyexp
Posts: 6
Joined: Fri May 06, 2016 1:04 pm

Re: Kodi 15 Packages for Raspbian Wheezy & Jessie for RPi2

Fri May 06, 2016 1:09 pm

Hi @ all, since 16.0 i'm using it for a carpc project and all works fine. With upgrade to 16.1 the skin causes kodi to crash on load. The used skin is https://github.com/idorel77/skin.CarPC-touch_carbon from idorel77. With confluence all works fine. Also working fine with kodi 16.1 on win. The Logs dosn't give any hint what goes wrong :-( Used Resolution is 800x480 - Has anybody an idea ?
PS: skin-dev has also no idea what goes wrong...

Return to “Raspberry Pi OS”