Intel Arc A380 as a Plex Media Server Transcoding Accelerator on Linux

Previously, if one wanted hardware accelerated transcoding in one’s Plex Media Server, the options were to either use a Nvidia card, or use an Intel CPU with QuickSync (and a platform that enables the iGPU). With Intel releasing the Arc series of GPUs, a 3rd option emerged. Recently, low profile variants of both the Arc A380 and Arc A310 have become widely available, presenting a low cost, low power, and easy to fit hardware transcoding option. On the software side, not much is needed to get hardware accelerated transcoding working with the Arc A380/A310.

Drivers

First up, you will need the Intel graphics drivers in your kernel. Check your distro’s guides for how to do this (Gentoo has a fairly good wiki entry on this). One item to note, the choice of whether to compile the driver as a module or include it in the kernel depends on your setup. A general rule of thumb that has worked for me: if you use an initramfs, compile the DRM_I915 driver as a module; if you use efistub as your bootloader, build the driver into your kernel and include the firmware into the kernel image.

If you need to include the firmware into the kernel image (building the DRM_I915 driver into the kernel instead of as a module), you will need to install the linux-firmware package before compiling your kernel. Under the firmware loader settings, you’ll need to include the following firmware blobs: the dg2_dmc, dg2_guc, and dg2_huc. As of Linux 6.4.13 these are the versions the i915 driver will want: i915/dg2_dmc_ver2_08.bin i915/dg2_guc_70.bin i915/dg2_huc_gsc.bin

Userland

After rebooting with the new kernel, within the Plex Settings, under the Transcoding section, enabling hardware acceleration should be available. Additionally, the Arc A380/A310 should show up in the Hardware transcoding device dropdown. Make sure both “Use hardware acceleration when available” and “Use hardware-accelerated video encoding” are checked. For the “Hardware transcoding device” option, if you have other GPUs, you may want to select the Arc device so it is targeted. Don’t forget to press the “Save Changes” button.

While Plex is now finding the device, it still may not be able to use it just yet. If libva isn’t installed, Plex will not be able to use the Arc GPU for transcoding. For funtoo users, ensure that your profile has the gfxcard-intel mix-in and then install libva. At this point, hardware transcoding should work. You can double check this by using intel_gpu_top while playing a video. Another method of checking if hardware transcoding is working is through the “Now Playing” section of the Plex dashboard. If you see a (hw) next to the codec and the word Transcode in the video section, hardware transcoding is working.

Note that getting hardware transcoding working with Plex Media Server only required the Intel graphics Linux kernel driver, some firmware blobs, and libva. X server, Wayland, a window manager, and desktop environment were not needed or installed.

-John Havlik

Fixing the ‘btrfs block device size is smaller than total_bytes in device item’ Error

Recently, I ran into a problem with an old SSD formatted with btrfs. The filesystem refused to mount. Checking dmesg I had an error stating that "the device total_bytes should be at most NUMBER1 but found NUBMER2", where NUMBER1 is less than NUMBER2.

The solution is to use the relatively new fix-device-size feature in btrfs rescue. This was added sometime after 2022, likely in Linux 6.3 (the patch to add this feature was submitted in the kernel developer mailing list in mid-2022). At the moment, I can confirm that 6.4.13 has this feature. Syntax wise, the command is:

btrfs rescue fix-device-size <device>

Just replace <device> with the /dev/ path to the device you are having issues mounting due to the size missmatch. This should work for most cases where the total_bytes for the device is only ‘slightly’ larger than the actual device size.

-John Havlik

Breadcrumb NavXT Menu Magic 2.3.1

Announcing an update to Breadcrumb NavXT Menu Magic that enhances PHP8 compatibility. The previous version improperly set the URL to NULL when generating an unlinked breadcrumb (a remnant of Breadcrumb NavXT behavior prior to 6.4) . This resulted in PHP warnings being thrown within the bcn_breadcrumb::set_url() method in PHP8 environments. With version 2.3.1, Breadcrumb NavXT Menu Magic now uses the proper API calls for Breadcrumb NavXT 7.0 and newer.

Users with valid and activated license keys should receive an update notification within the WordPress dashboard and be able to use the update mechanism to update (just like with any plugin in the WordPress.org repository). If you run into any issues, please open a support ticket.

-John Havlik

Breadcrumb NavXT WPML Extensions 1.5.6

Announcing an update to Breadcrumb NavXT WPML Extensions that enhances compatibility with the WPML 4.x. Previously, WPML transparently handled translation of Custom Post Type (CPT) labels, including when displayed in the breadcrumb trail. However, at some point this behavior stopped working. Breadcrumb NavXT WPML Extensions 1.5.6 adds a new translation domain, “Breadcrumb NavXT CPT Title”, which is populated with the CPT titles for translation. These titles are registered every time the Breadcrumb NavXT settings are saved in the settings page.

Users with valid and activated license keys should receive an update notification within the WordPress dashboard and be able to use the update mechanism to update (just like with any plugin in the WordPress.org repository). If you run into any issues, please open a support ticket.

-John Havlik

Customizing the Separator Based on Position Within Breadcrumb Trail

With Breadcrumb NavXT 7.0, updates to the internals of the plugin added support for more than a single dimension for the breadcrumb trail, allowing portions of the plugin to be cleaned up. As a consequence, non-hierarchical terms now are separated by an actual separator that is controllable. While this separator was not exposed in the settings page, Breadcrumb NavXT 7.2 introduced the bcn_display_separator filter which allows us to control the breadcrumb separator.

The combination of these two features allows new breadcrumb trails that were only possible with lists and CSS in the past. Which, while a valid method, can be a little clunky.

An Example

Suppose the site design requires changing the last separator for non-hierarchical terms (e.g. tags) from the default , to & resulting in a breadcrumb trail for an example post to look like:

Home > Blog > Tag 1, Tag 2 & Tag 3 > Awesome Post

To accomplish this, the bcn_display_separator filter can be used to dynamically replace the separator. Below is an example implementation that does just that:

add_filter('bcn_display_separator', my_bcn_separator, 10, 4);
function my_bcn_separator($separator, $position, $last_position, $depth)
{
    //On the 2nd level and lower, change the last separator to an ampersand
    if($depth > 1 && $position == $last_position - 1)
    {
        return ' &amp; ';
    }
    return $separator;
}

This code will, for any breadcrumb that is beyond the first dimension/level (indicated by $depth) set the separator to & before the final breadcrumb in that dimension/level. Using this code is straightforward, just place it in a site specific plugin (and activate the site specific plugin if it isn’t already active). Naturally, the example code can be modified to use a different separator and to target different positions within the breadcrumb trail, should that be required.

-John Havlik