Posts: 688
Joined: Feb 2015
Reputation:
21
Looks like you don't have the correct permissions on your system or user "pi", at least not the default ones, for example in gpu/video part.
What is the output of: groups pi
Posts: 688
Joined: Feb 2015
Reputation:
21
2020-01-28, 19:06
(This post was last modified: 2020-01-28, 19:07 by rascas.)
How are you lauching Kodi ? From a VT, from a Desktop Environment, from a terminal inside a DE, etc... If you are running from a Desktop Environment (in a Xorg session) your user must be in the "sudo" group. Yeah, thanks to GBM/libdrm...
Posts: 688
Joined: Feb 2015
Reputation:
21
Well your Raspbian installation is broken/corrupted or missing critical parts. I recommend that you format your sd card and try with a clean install as it is confirmed to be working just fine.
Posts: 22
Joined: Apr 2016
Reputation:
0
postcd
Junior Member
Posts: 22
Thank you.
i think it is about permissions. maybe somehow related to desktop environment that i previously reinstalled.
i found that now when i run "sudo kodi" under "pi" user (being in desktop environment), then Kodi starts. Via SSH, it does not.
Without sudo it does not start in either case and shows errors "open /dev/fb0: No such file or directory ... Cannot connect to server socket err = No such file or directory"
Kodi launched from Raspbian menu entry, does not start (does not use sudo) so ends in errors (mentioned above). Any idea why Kodi demand sudo now and how i can make it working without sudo?
Moreover in Kodi tvheadend HTSP client module can not connect local tvheadend server (which is running and accessible via localhost:9981) saying "Access denied". So i am wondering what kind of permission is wrong and where.
/home/pi/.kodi contents has all rights of "pi" user.
Posts: 688
Joined: Feb 2015
Reputation:
21
2020-01-28, 23:13
(This post was last modified: 2020-01-28, 23:31 by rascas.)
Kodi packages on Raspbian requires that the user which launches Kodi belongs the sudo group only if you launch it from a VT that has Xorg running, and only on the Raspberry 4. That is because Kodi, on the Raspberry Pi 4 is compiled with GBM support and not X11 as it is normally done on Linux. You cannot get two programs running on the same VT with X11 and GBM. Kodi launch script has code to check if the hardware is a RPi4, and if true, to change VT. And to change VT on Linux, super user is required. You can check the code im Kodi launch script at /usr/bin/kodi. By now, GBM is the only way to get hardware accelerated video decoding on the Pi 4.
Don't launch kodi with sudo, it is not required nor recommended.
Knowing this, about your case, I believe it is something that you did on your installation that messed up permissions. About TVheadend server, I an not much familiar with it, but if it gives you the same "permission denied" it is another sign that something is wrong with your system permissions. It is something hard to debug, so I recommend that you back up your data, format your system and install Raspbian again.