TL;DR: I have a Raspberry Pi 3 with an external WD hard drive.
Problem: I removed the external HD and reconnected it again, then the sad face loop started.
Solution: add osmc
to the video
group.
Since there was no post with “/dev/fb0 permission denied” here in the forum, I’m documenting this, so maybe it helps someone else in the future.
If anyone has experimented this before, or has an explanation of why the problem appeared in the first place, I’m curious to know why.
Thanks!
Cause: unknown
I still don’t know what caused the problem, and how it started.
I had the .kodi
directory on the external hard drive, then symlinked to OSMC’s home dir with ln -s /mnt/hd/.kodi /home/osmc/.kodi
.
Restarting the Pi without the hard drive connected would show the sad face loop.
Using ssh, I removed the symlink and moved the .kodi
dir permanently from the HD to the home dir.
But the sad face persisted.
Steps to identify the problem
Connection via ssh worked, so I ran sudo systemctl status mediacenter
and also sudo journalctl -f
.
The message open /dev/fb0: Permission denied
appeared in both.
(...)
Nov 08 18:00:43 styx mediacenter[4943]: open /dev/fb0: Permission denied
Nov 08 18:00:49 styx sudo[5011]: pam_unix(sudo:session): session closed for user osmc
Nov 08 18:00:49 styx mediacenter[4943]: /usr/bin/mediacenter: line 142: 5011 Segmentation fault sudo -u osmc LIRC_SOCKET_PATH=/var/run/lirc/lircd $KODI --standalone -fs
Nov 08 18:00:49 styx mediacenter[4943]: Kodi exited with return code 139 after 0 hours, 0 minutes and 6 seconds
(...)
My logs collected with sudo grab-logs -a
: https://paste.osmc.tv/cemuwopabe
Solution
I discovered this “frame buffer” when I stumbled upon this this post: How to turn on/off Raspberry Pi display? (permission errors) - Setup, Configuration and Use / Scripts & Rules - openHAB Community.
Then I ran these commands and Kodi started without errors:
$ sudo systemctl stop mediacenter
$ ls -al /dev/fb0
crw-rw---- 1 root video 29, 0 Nov 8 17:29 /dev/fb0
$ sudo usermod -a -G video osmc
$ groups osmc
osmc : osmc video docker
$ sudo systemctl start mediacenter
What didn’t work
- Renaming/removing the
~/.kodi
directory and let Kodi recreate it - Removing packages I had installed recently:
sudo apt-get purge manpages manpages-dev manpages-posix manpages-posix-dev
- Upgrading the system:
sudo apt-get update && sudo apt-get dist-upgrade