GPU transcoding on Qnap TVS882

Server Version#: Version 4.87.2
been trying to get GPU transcoding to work for some time. Qnap says it is now supported for plex. Found a video from qnap about editing the preferences.xml. when I do edit to add line for the PCIe video card, plex will not start here is driver list
drwxr-xr-x 2 admin administrators 120 2022-09-17 19:36 ./
drwxr-xr-x 22 admin administrators 23000 2022-10-01 10:53 …/
crw------- 1 admin administrators 226, 0 2022-09-17 15:30 card0
crw------- 1 admin administrators 226, 1 2022-09-17 19:36 card1
crw------- 1 admin administrators 226, 128 2022-09-17 15:30 renderD128
crw------- 1 admin administrators 226, 129 2022-09-17 19:36 renderD129

and here is my preferneces.xml before I try and add GPU driver line

<?xml version="1.0" encoding="utf-8"?>
<Preferences OldestPreviousVersion="1.16.6.1592-b9d49bdb7" MachineIdentifier="d1873878-fe8d-46e4-b750-fed8433189ff" ProcessedMachineIdentifier="a686146eebab1dae21470595e80ef8ea4f274e2c" AnonymousMachineIdentifier="b514968d-b887-47b2-864c-43cdc95523b9" MetricsEpoch="1" AcceptedEULA="1" PublishServerOnPlexOnlineKey="1" REDACTED INFO DlnaEnabled="0" CertificateVersion="3" PubSubServer="REDACTED" PubSubServerRegion="ewr" PubSubServerPing="59" LastAutomaticMappedPort="24970" autoEmptyTrash="1" LanguageInCloud="1" PreferredNetworkInterface="bond0" EnableIPv6="0" DvrIncrementalEpgLoader="0" TranscoderTempDirectory="/share/CACHEDEV3_DATA/Media/trans" FSEventLibraryUpdatesEnabled="1" watchMusicSections="1" TranscoderQuality="0" FSEventLibraryPartialScanEnabled="1" ScheduledLibraryUpdateInterval="86400" ScheduledLibraryUpdatesEnabled="1" CloudSyncNeedsUpdate="0" ManualPortMappingMode="1" TranscoderH264BackgroundPreset="faster" HardwareAcceleratedCodecs="1" HardwareAcceleratedEncoders="1" CinemaTrailersFromBluRay="1" CinemaTrailersFromTheater="1" GlobalMusicVideoPathMigrated="1" CertificateUUID="6a2fbdb05d1e4b4fa7974f9c245625b2"/>

MODERATOR EDIT: Removed personal information & added </> formatting

can’t seem to post preferences.xml here

@insight2663

If your machine has the i5-6500 CPU , which is a SkyLake family, you won’t be able to use that for HEVC HDR tone mapping.

The mapping of /dev/dri is as follows:

  1. /dev/dri/renderD128 == Built into the CPU and always found first by the kernel.
  2. /dev/dri/renderD129 == First PCI card found

With this knowledge, add HardwareDevicePath="/dev/dri/renderD129" , with a leading and trailing space to Preferences.xml right before the closing />

It will look like this:

SomeOtherPref="Value"  HardwareDevicePath="/dev/dri/renderD129" />

I’ve done this procedure before and it worked fine. Recently noticed that my nvidia GPU isn’t being recognized by Plex anymore.

Went in again to modify the preferences.xml file to force Plex to recognize the GPU and somehow screwed up the file and destroyed my Plex installation. Had to reinstall, locked out of my own server, reclaim the server, etc. Complete disaster. Years worth of collections, posters, customization, viewing history, etc all gone! Yes–my fault for not doing a backup prior to editing the file and blindly trusting the process. However; this is a MAJOR software bug for Plex. With modern software, there should never be a time where an ssh HACK is the only solution to get it to use the GPU over the CPU.

Oh, and after all this trouble–GPU still doesn’t work due to this driver problem from QNAP. FML!

After the reinstall was there no possibility of restoring the db ?

I did not see an option to do that. It was actually quite difficult even to get my own server reestablished. Kept telling me I didn’t have access to my own server. Had to end up doing yet another ssh hack to reclaim the server with a code that refreshed every 4 minutes. Was not very user-friendly at all.

That reclaiming step is a security feature, and I totally get what it’s like to crash into a massive issue like that.

But what I was really hoping was you’d tell me you followed that article and found your backups that PMS makes automatically. The one running now will eventually overwrite any in maybe nine days I think.

Plex has a brilliant guy named ChuckPA who codes the Linux and QNAP install scripts for PMS, and he’s explained how careful he is to not let any part of Plex delete your db or media.

Oh he’s already on this thread :beer:

(Fingers crossed you didn’t think it so hopeless that you wiped your storage pool and installed a brand new QTS)

I didnt see a backup. Is there an article on where to find that?

The Restore article I linked above explained it at the top by sending you to another article. The short version – because people create their QNAP storage pools differently, the database location is not fixed. To locate it you can log in to your QNAP using SSH as admin, then

cd `getcfg -f /etc/config/qpkg.conf PlexMediaServer Install_path`
cd "Library/Plex Media Server/Plug-in Support/Databases"

Good luck!

i add HardwareDevicePath=“/dev/dri/renderD129” and plex does not start. i to un do the preferneces.xml. what am I missing here ?

Thanks for trying to help me. Everything in this folder has a date after the crash. :frowning:

Grab me the logs.tar.gz and attach please.

Plex Media Server Logs_2022-10-02_21-38-31.zip (4.5 MB)

made the preferences.xml chnages. this time, plex did start, but, tried transcodeing a 4k move to 1080p and still GPU shows no usage

any ideas ?

hello ?

ChuckPA asked for logs showing PMS not starting with renderD129 in preferences.xml, but instead you reverted preferences.xml and uploaded logs showing a running server. There’s not much to debug in there :slight_smile:

If you’d like help debugging the D129 issue:

  1. Stop PMS
  2. change the Preferences.xml file correctly, carefully, and accurately to add renderD129 as per any instructions you have
  3. Start PMS. I assume it will crash like you said.
  4. Gather server logs after the crash by copying the log directory to your PC.
  5. Zip and attach the log diretory.

If PMS never gets running far enough to log anything, you can try to start PMS from a command line and it will spit out errors there, like dyld not found or something.

If PMS never crashes on the other hand, just Settings → Troubleshooting → Download logs so we can verify that everything loaded correctly.

This seems to be the best thread to follow on from this locked one a few years ago: New PlexServer releases no NVIDIA GPU encoding on QNAP - #23 by stiVal

It seems that you need to manually edit preferences.xml every time PlexMediaServer is upgraded.

  1. Can we request a feature to select the correct Render device in the GUI or make it automatic
  2. Can we confirm the behaviour if we hardcode the RenderD129 device is the QuickSync iGPU functionality of a compatible Intel processor ignored or prioritised?

thanks

@Peelex @insight2663
Hey good to know there’s other people who share the same concern.
Because you’re a Plex Pass holder would you consider trying the new transcoder preview that’s on the forums? Ridley might be interested in whether it works out of the box. I’m running it on my QNAP with no GPU like yours though.

thanks @nibbles - will check this out, need to research how to backup everything first incase it causes any other unforeseen issues…