Kodi crashlog, Permission denied export dumb buffer, create scanout resource
#1
Hello, the Raspbian 10 buster (4.19.93-v7l+) on RPi4, i recently ran "sudo apt-get purge kodi;find ~/.kodi -delete;sudo apt-get install kodi".

Kodi fails to launch:
Quote:pi@raspberrypi:~ $ kodi --debug
failed to export dumb buffer: Permission denied
Failed to create scanout resource
failed to export dumb buffer: Permission denied
Failed to create scanout resource
terminate called after throwing an instance of 'std::runtime_error'
  what():  eglSwapBuffers failed
Aborted (core dumped)
find: '/home/pi/.dbus': Permission denied
Crash report available at /home/pi/kodi_crashlog-20200128_150934.log
[E] Invalid arguments ' '
I posted mentioned crashlog here (p@$$ w0rd: kodi)

Please which commands do you suggest to run in order to fix Kodi permissions?
Reply
#2
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
Reply
#3
Quote: $ groups pi
pi : pi adm dialout cdrom audio video plugdev games users input netdev spi i2c gpio
Command "locate kodi" returns only files owned by "root" user
Reply
#4
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...
Reply
#5
I tried to launch it various ways:
1. via desktop interface, click Terminal icon, execute (as user "pi") command "kodi". (i tried with and without sudo permissions being assigned to user - adduser pi sudo)
2. via SSH as pi user
3. via SSH as a root user (sudo su)
4. via SSH as a root user (sudo su) and using sudo command (sudo kodi --debug)

when i type the command without sudo:
Quote:pi@raspberrypi:~ $ kodi --debug
open /dev/fb0: No such file or directory
ERROR: Unable to Initialize. Exiting
Segmentation fault (core dumped)
find: '/home/pi/.dbus': Permission denied
Crash report available at /home/pi/kodi_crashlog-20200128_183925.log
[E] Invalid arguments ' '
when i type with sudo or as user root (sudo su):
Quote:pi@raspberrypi:~ $ sudo kodi --debug
[sudo] password for pi:
open /dev/fb0: No such file or directory
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
^C^C^CSegmentation fault (core dumped)
Reply
#6
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.
Reply
#7
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.
Reply
#8
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.
Reply
#9
Thanks for the feedback rascas. if you mind telling, what you mean by "VT"?

I fixed the "Access denied" issue of the Kodi tvheadend HTSP client addon. The reason why it was denied were likely missing tvheadend login credentials in kodi htsp addon configuration due to Kodi used root's config file instead of pi's one due to launching kodi using sudo (sudo kodi).
/home/pi/.kodi/userdata/addon_data/pvr.hts/settings.xml
vs
/root/.kodi/userdata/addon_data/pvr.hts/settings.xml

Still kodi fails to run without sudo - this thing is only one missing to be fixed.
Maybe i can continue running it on sudo, but i am facing following issues:
when i set command "sudo kodi --debug" to my desktop Kodi shortcut, the kodi does not launch. It launch only when i execute sudo kodi via command line and provide password. My aim is to mainly run Kodi automaticaly after dektop interface is lunched. I tried to prepend new line "@kodi" and "@sudo kodi" to /etc/xdg/lxsession/LXDE-pi/autostart but it does not start autostart kodi at boot as previously before this issue.

UPDATE: it can be launched without sud0, but the desktop interface must not be running.
Reply
#10
VT = virtual terminal
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi crashlog, Permission denied export dumb buffer, create scanout resource0