XBMC (now Kodi) has always had a tendency of leaking memory, so that it will eventually thrash and crash. My simple solution to this is to run xbmc inside a for loop instead of directly (just run the script from .xinitrc):
#!/bin/bash while [ 1 ]; do xbmc nohup sleep 10 done
…And add the following to the local XBMC user’s crontab:
0 4 * * * killall xbmc.bin
This will kill XBMC every night at 4 o’clock. And give you a fresh XBMC every day!
My Netgear ReadyNAS RN102 keeps constantly writing to a file /var/readynasd I don’t want to hold my breath waiting for Netgear to fix this so I took matters into my own hands and implemented a TMPFS fix for my NAS. What it does is mount /var/readynasd as a tmpfs of 2MB, and copy files to here from /etc/readynas-db on every boot, and copy back every hour, and on shutdown.
systemctl stop readynasd mkdir /etc/readynasd-db cp -a /var/readynasd /etc/readynasd-db/
[Unit] Description=Mount RAMFS for SQLITE DB file Before=readynasd.service
[Service] Type=oneshot ExecStart=/bin/sh -c "mount -t tmpfs -o size=2m tmpfs /var/readynasd && cp -a /etc/readynasd-db/readynasd /var/" #ExecStop=/bin/sh -c "cp -a /var/readynasd /etc/readynasd-db/" # TODO not working RemainAfterExit=yes
#!/bin/bash cp -a /var/readynasd /etc/readynasd-db/
I needed to add some startup command to run as root on my Netgear ReadyNAS (RN102). Turns out you don’t have any /etc/rc.local, so I added a new boot script /etc/init.d/local:
#! /bin/sh ### BEGIN INIT INFO # Provides: local # Required-Start: $all # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: Local scripts # Description: Local scripts ### END INIT INFO
Since iOS 7 broke Airplay for XBMC, a guy figured out how to get it working again. It involves sending extra Bonjour publishes.
When building ffmpeg make sure to enable gnutls support (required for HTTP Live Streaming over HTTPS) Make sure that you have enabled airplay and avahi support (in gentoo, use flags airplay, avahi), and that you have libshairplay installed when building XBMC. https://github.com/juhovh/shairplay (gentoo ebuild here)
So the trick is to publish an extra airplay service with a different name after XBMC has published. For instance after 60 seconds:
For some reason, w_scan isn’t working for my Terratec Cinergy C HD PCI. I had some trouble finding initial scan data. But finally I found a list that gives me all channels for Canal Digital cable in Trondheim.
# no-trondheim-CanalDigital (cable) C 290000000 6950000 NONE QAM256 C 298000000 6950000 NONE QAM256 C 306000000 6950000 NONE QAM64 C 314000000 6950000 NONE QAM64 C 322000000 6950000 NONE QAM64 C 346000000 6950000 NONE QAM64 C 354000000 6950000 NONE QAM64 C 362000000 6950000 NONE QAM64 C 370000000 6950000 NONE QAM64 C 378000000 6950000 NONE QAM64 C 386000000 6950000 NONE QAM64 C 394000000 6950000 NONE QAM64 C 402000000 6950000 NONE QAM64 C 410000000 6950000 NONE QAM256 C 418000000 6950000 NONE QAM64 C 426000000 6950000 NONE QAM64 C 434000000 6950000 NONE QAM64 C 450000000 6950000 NONE QAM64 C 458000000 6950000 NONE QAM64 C 474000000 6950000 NONE QAM64 C 490000000 6950000 NONE QAM256 C 610000000 6950000 NONE QAM64