Funtoo Plex Media Server Overlay

Both Gentoo and Funtoo provide Plex Media Server within their portage repositories via the plex-media-server ebuild. However, lately, Funtoo’s plex-media-server ebuild within media-kit has fallen behind Plex releases. The quick solution is to use Ghent’s funtoo-plex overlay. With Funtoo moving to kits, local overlays are quite easy to use.

Assuming an install setup per the Funtoo default kits instructions, start by creating a directory for your overlays. Then, clone Ghent’s funtoo-plex overlay:

mkdir /var/git/overlay
cd /var/git/overlay
git clone

At the time of writing, Ghent’s overlay is still configured for a pre-kits setup. Fortunately, migrating to a kits compatible setup is straight forward: open up /var/git/overlay/funtoo-plex/metadata/layout.conf and replace masters = gentoo with masters = core-kit.

The last step is to create /etc/portage/repos.conf/funtoo-plex.conf. Place the following into /etc/portage/repos.conf/funtoo-plex.conf:

main-repo = core-kit

location = /var/git/overlay/funtoo-plex
auto-sync = no
priority = 10

Now, running emerge -av plex-media-server should grab the newer ebuilds from Ghent’s funtoo-plex overlay. Note that you will need to occasionally pull the latest master branch in the repo using git pull origin master from within /var/git/overlay/funtoo-plex/.

-John Havlik

[end of transmission, stay tuned]

Raspberry Pi Zero W and Funtoo

After finding the PaPiRus ePaper panel, I picked up a Raspberry Pi Zero W to drive it. To be perfectly honest, the early Raspberry Pis never really excited me. However, the Raspberry Pi Zero’s small footprint caught my attention. Add in WiFi and Bluetooth, as found on the Zero W, and you have a solid IoT starter board.

Thanks to the popularity of the Raspberry Pi, both Funtoo and Gentoo have guides on setting up Funtoo/Gentoo on a Raspberry Pi. Getting a base system up and running is straightforward. Though, if you have to compile anything it will take a while.


Getting WiFi to work requires some compiling. Funtoo’s guide for setting up WiFi on the Raspberry Pi 3 works for the Zero W for the driver side. On the userland side, you will probably want something like NetworkManager and wpa_supplicant. Unfortunately, neither package come installed in the base install for Funtoo/Gentoo.

Normally, chrooting in from a liveCD with working networking, installing the requisite package, and rebooting is sufficient. However, in this case, you’ll need to setup Qemu on your workstation and then use it to chroot into the ARM environment to compile and install NetworkManager. This will take quite some time.

Playing with PaPiRus

PaPiRus is a ePaper pHAT for the Raspberry Pi Zero. It contains an I2C LM75 temperature sensor, a few push button switches, a SPI NOR flash, and a ePaper panel. Unfortunately, it does not have an I2C memory device to store the device tree overlay information needed for auto-configuration of the SoC.

Since the installer for PaPiRus’ driver, and the manual instructions for that matter, assume a Debian based system, they do not work with Funtoo. Instead, follow the “Install Driver – Option 2” instructions, and rather than apt-get, use the following:

emerge -av sys-fs/fuse dev-python/pillow media-fonts/freefonts

After running make rpi-install the last few steps diverge from the “Install Driver – Option 2” instructions. Since Funtoo by default uses OpenRC rather than Systemd, the epd-fuse.service isn’t going to work. Instead, the OpenRC script below can be used (save as /etc/init.d/epd-fuse).

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2


depend() {
        need localmount

start() {
        EPD_OPTS="-o allow_other -o default_permissions"
        ebegin "Starting epd-fuse"
        mkdir -p $EPD_MOUNTPOINT
        if ! grep -qw fuse /proc/filesystems; then
                modprobe fuse >/dev/null 2>&1 || eerror $? "Error loading fuse module"
        if ! grep -qw $EPD_MOUNTPOINT /proc/mounts; then
                /usr/sbin/epd_fuse --panel=$EPD_SIZE $EPD_OPTS $EPD_MOUNTPOINT >/dev/null 2>&1 || \
                        eerror $? "Error mounting control filesystem"
        eend ${?}

stop() {

        ebegin "Stopping epd-fuse"
        if grep -qw $EPD_MOUNTPOINT /proc/mounts; then
                umount $EPD_MOUNTPOINT >/dev/null 2>&1 || \
                        eerror $? "Error unmounting control filesystem"
        eend ${?}

After saving the epd-fuse script, rc-service epd-fuse start can be used to start the driver. Of course, installing Systemd and uninstalling OpenRC is an option. However, that is quite a bit of effort for something that is overkill for a Raspberry Pi.

Other things to consider, while Funtoo places fonts under /usr/share/fonts, the font packages and directory structure of /usr/share/fonts differs from what PaPiRus expects. The easy way to resolve this is to modify the examples with the correct font location.


Rather than the older module blacklist/modprobe method for enabling various SOC features, the Raspberry Pi kernel has moved to Device Tree Blobs. Which is not entirely bad. However, they can be difficult to get working.

For short-term testing, to get the PaPiRus to work, I ended up using dtoverlay to enable the SPI and I2C buses, and then had to use modprobe to remove the LM75 driver so that the I2C bus was available to the epd-fuse driver.

-John Havlik

[end of transmission, stay tuned]

Plex Home Theater + Funtoo on Intel’s NUC DN2820FYKH

Plex is really awesome. It has a server component that I’ve had running on my home server for over a year now. There are apps for Roku, Windows 8 and Android (I have all three) which automatically find my local server and can stream from it. The Android Plex app can even act as a remote for other Android, Roku, Windows 8, and the Plex Home Theater client. Rather than dive in a try to get Plex Home Theater running on raspberrypi, I went with the new NUC DN2820FYKH.

Continue reading