Proxmox, Jellyfin LXC, and GPU passthrough for hardware acceleration

A few years ago, I started my self-hosted services journey. I was researching media playback solutions to replace the Kodi-based one I was running on a Raspberry Pi 3 connected directly to my TV. I landed on Jellyfin, running in an LXC container on Proxmox. If that sounds like word salad to you, there are a bunch of tutorials, videos, and opinions available online if you want to dive in. It was a fun nerdy project for me.

The community-scripts website has an installer for Jellyfin that already handles all the details of setting up GPU passthrough from the host to the container:
https://community-scripts.org/scripts/jellyfin

I thought that meant I was all set and the GPU would be used for hardware acceleration of any necessary transcoding (Jellyfin will automatically transcode your library files based on which client you are streaming to). Unfortunately, I was still seeing errors in my logs when trying to play certain files:

No VA display found for device /dev/dri/renderD128.
Device creation failed: -22.
Failed to set value 'vaapi=va:/dev/dri/renderD128,driver=iHD' for option 'init_hw_device': Invalid argument
Error parsing global options: Invalid argument

I tried a bunch of different things and followed a number of different instructions in blog posts and forum posts but the solution for me ended up being super simple.

  1. From inside the Jellyfin LXC container, run the following command in the console: cat /etc/group
  2. Look for the group called render and take note of the id number. Mine happened to be 993.
  3. Click on the Resources tab of your Jellyfin container, then double-click on the /dev/dri/renderD128 entry to edit it.
  4. Enter the render group id in the form field “GID in CT” and hit OK.

After updating that one setting, my interlaced home video file played successfully on my phone and there were no errors in the transcode logs.

Easily fix problem with Facetime log in

Recently, Facetime on my work laptop stopped working properly. Even with the correct ID and password, the app would “verify” my account but then refuse to activate Facetime. Instead I would get this error:

The registering device does not have appropriate credentials

Thanks to this post:

http://porkrind.org/missives/imessage-on-mac-os-x-not-working/

I learned that a simple “killall imagent” command in the terminal would restore Facetime functionality!

Yay, internet.

Google Reader Beautification: Helvetireader

helvetireaderSo crisp and clean!

I have been a Google Reader for a good while now and I think it is a very fine web application. It does what I expect it to do and it does it well. It is utilitarian. It is useful. I use it daily.

But now, I find it even more enjoyable to use. Two greasemonkey scripts have turned my standard Reader interface into something beautiful and even more useable (imho).

Behold:
Helvetireader
+
Favicons for Google Reader

There are even instructions for using the scripts with Fluid. If you are not familiar with Fluid, it is a utility for creating site-specific browsers based on Safari (WebKit). Get familiar. You’ll like it.

So go, make your Reader prettier (and subscribe to this blog’s feed).

AA meltdown

battery leakage
Let this be a lesson to you. Do not store electronics with the battery inside.

My minidisc recorder had a battery leak and now it is broken.

If you plan on storing something for a while, remove the battery before placing in storage.

RTFM, my friends. RTFM. And, also, follow your own advice.

PNG-8 with alpha transparency

I learned a new web trick today.

Apparently, Photoshop’s inability to save PNG-8 with alpha transparency is not a limitation of PNG-8 but a limitation in Photoshop.

For years, I have been operating under the assumption that I need to use PNG-24 to achieve transparency effects in my web projects. This is usually a compromise in terms of file size and browser compatibility (requiring ie-specific hacks). But it doesn’t have to be…

[Enter Fireworks]

Fireworks to the rescue:

  • Open your big Photoshop-exported PNG-24 with nice alpha transparency in Fireworks.
  • Change the file format to PNG-8.
  • Change the transparency option to “alpha transparency”
  • Rebuild and export your PNG-8
  • Revel in the MUCH smaller file size

Bonus points for ie6 compatibility!

Learned this from Brenelz’s screencast which was linked on NetTuts

Obama.

I am still trying to wrap my head around this amazing development. Through the numbing fog of cynicism and despite a generalized suspicion of politics, I was genuinely moved when Barack Obama gave his acceptance speech. It really does feel monumental and historic.

What happened in CA with Prop (h)8, though? Lame.