GTX 1650 in the TVS-872x

Printers, HDDs, USB/eSATA drives, 3rd-party programs
Post Reply
datavortex
New here
Posts: 7
Joined: Thu Jun 30, 2022 9:40 am

GTX 1650 in the TVS-872x

Post by datavortex »

Greetings everyone! Been lurking a while and I thank you all for the informative threads, they have helped me along quite a bit.

I'm going on an adventure and figured I would contribute, and bring you all along with me. I have the 872x setup as a home backup target, but it's primary role is as a Plex media server. I'm moving into the 4k HDR video realm, and Plex transcoding the video files has gotten a bit rough, in particular with HEVC. Suffice to say, the Core i5 onboard graphics cannot quite keep up with my needs. I got the 872x with the open PCIe Gen 3 x16 slot in mind for just this problem, so I am going to throw a GPU at it and see if I can't get everything running nice and smooth. The video card gets here tomorrow and I will be posting my results, but I welcome any warnings, information, or commentary that might help me out.

First, what I am working with:
  • TVS-872x-i5 running QuTS Hero
  • Crucial RAM 64GB Kit (2x32GB) DDR4 2666 MHz CL19 (CT2K32G4SFD8266)
  • System volume: 2x Western Digital 1TB WD Red SA500 (WDS100T1R0A) in RAID 1, Bays 7 & 8
  • Storage volume: 4x, Western Digital Ultrastar DC HC550 18TB SATA Ultra SE (0F38459) in RAID 5, Bays 1-4
  • Cache: 2x Samsung 980 PRO SSD 2TB PCIe NVMe Gen 4 M.2 (MZ-V8P2T0B)
I plan to add to this the ZOTAC GAMING GeForce GTX 1650 LP 4GB GDDR6 (ZT-T16520H-10L), which is NOT on the compatibility list (hence the adventure). This is a Turing-based board running the TU117 chip (not the slightly newer TU116) with the 4th generation NVDEC decoding. It also has the 6th generation NVENC encoding, though for the moment of course Plex will not do any HEVC encoding (hopefully someday). It's a dual slot card, so no, I don't have any other plans for the other PCIe slot, which only offers 4 lanes to the PCH. Thankfully this unit already has a 10GbE port and that's as much as I can use for the foreseeable future, anyway.

I went with this card because the list of supported cards for the 872x is pretty thin. All the ones listed as supporting transcoding are 1050 or 1030 boards (save for a single P2000), which are both hard to find these days and are pretty overpriced. From browsing other compatibility lists, I believe the predecessors to this card from ZOTAC do in fact support transcoding in the QNAP, and I expect the current version of the NVidia drivers to fully support all the 1650 DDR6 boards, which have been out for a couple of years now. It's low profile and the dimensions match other boards that are noted as compatible. The suggested PSU wattage is 300 (the 872x ships with a 250), but the same is true for most of the other boards on the compatibility list, so fingers crossed on that one.

I am aware of the procedure from QNAP for switching over Plex to the new GPU so I am ready on that front.

Wish me luck or tell my why I am super stupid. Either way I'll let you know what happens next!
datavortex
New here
Posts: 7
Joined: Thu Jun 30, 2022 9:40 am

Re: GTX 1650 in the TVS-872x

Post by datavortex »

I got everything installed. Had to remove the PSU in order to get at the screws for the card, but it fit and booted alright. QuTS recognized the card and automatically installed NvKernelDriver 5.0.0.2069. I went and installed NVIDIA GPU Driver 5.0.4.1

Control panel hardware tab looked good (imgur[.]com/hHeqQYP, sorry, spam filter is over-aggressive), allowing me to put the GPU into QTS mode and showing a checkmark for Hardware Transcoding. I went ahead and followed Craig's instructions for pointing Plex at the correct GPU, which in my case matched his device ID. So I added

Code: Select all

HardwareDevicePath="/dev/dri/renderD129"
to my Preferences.xml file for Plex. Only difference was that I used vim instead of vi.

Unfortunately, no love from Plex. Never tried to use the new GPU. Instead, in the Plex logs I now see problems trying to use libcuda:

Code: Select all

Jul 12, 2022 22:23:22.199 [0x7fe776f28b38] Debug — [Req#31ff/Transcode] Codecs: testing h264_nvenc (encoder)
Jul 12, 2022 22:23:22.200 [0x7fe776f28b38] Debug — [Req#31ff/Transcode] Codecs: hardware transcoding: testing API nvenc
Jul 12, 2022 22:23:22.200 [0x7fe776f28b38] Error — [Req#31ff/Transcode] [FFMPEG] - Cannot load libcuda.so.1
Jul 12, 2022 22:23:22.200 [0x7fe776f28b38] Error — [Req#31ff/Transcode] [FFMPEG] - Could not dynamically load CUDA
Jul 12, 2022 22:23:22.200 [0x7fe776f28b38] Debug — [Req#31ff/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Unknown error occurred
Jul 12, 2022 22:23:22.200 [0x7fe776f28b38] Debug — [Req#31ff/Transcode] Could not create hardware context for h264_nvenc
Jul 12, 2022 22:23:22.200 [0x7fe776f28b38] Debug — [Req#31ff/Transcode] Codecs: testing hevc (decoder) with hwdevice vaapi
Jul 12, 2022 22:23:22.200 [0x7fe776f28b38] Debug — [Req#31ff/Transcode] Codecs: hardware transcoding: testing API vaapi
Jul 12, 2022 22:23:22.200 [0x7fe776f28b38] Error — [Req#31ff/Transcode] [FFMPEG] - libva: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Jul 12, 2022 22:23:22.200 [0x7fe776f28b38] Error — [Req#31ff/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Jul 12, 2022 22:23:22.200 [0x7fe776f28b38] Debug — [Req#31ff/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: I/O error
Jul 12, 2022 22:23:22.200 [0x7fe776f28b38] Debug — [Req#31ff/Transcode] Could not create hardware context for hevc
Jul 12, 2022 22:23:22.200 [0x7fe776f28b38] Debug — [Req#31ff/Transcode] Codecs: testing hevc (decoder) with hwdevice nvdec
Jul 12, 2022 22:23:22.200 [0x7fe776f28b38] Debug — [Req#31ff/Transcode] Codecs: hardware transcoding: testing API nvdec
Jul 12, 2022 22:23:22.201 [0x7fe776f28b38] Error — [Req#31ff/Transcode] [FFMPEG] - Cannot load libcuda.so.1
Jul 12, 2022 22:23:22.201 [0x7fe776f28b38] Error — [Req#31ff/Transcode] [FFMPEG] - Could not dynamically load CUDA
Jul 12, 2022 22:23:22.201 [0x7fe776f28b38] Debug — [Req#31ff/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Unknown error occurred
Jul 12, 2022 22:23:22.201 [0x7fe776f28b38] Debug — [Req#31ff/Transcode] Could not create hardware context for hevc
And this is where I am currently stuck. Any ideas?
datavortex
New here
Posts: 7
Joined: Thu Jun 30, 2022 9:40 am

Re: GTX 1650 in the TVS-872x

Post by datavortex »

I believe I have resolved this problem. There appears to be a bug QNAP’s current version of the NVidia GPU installation script. I discovered this by poking around the libraries a bit. None of them were loaded. Here is what to do:
  1. ssh in to the device as “admin”. No other user will work due to file permissions.
  2. Edit "/etc/ld.so.conf" using your editor of choice such as vim.
  3. Add a new line with the contents "/opt/NVIDIA_GPU_DRV/usr/lib" (Note directory is correct for the QuTS Hero OS and driver versions at the top of the thread.)
  4. Save the file.
  5. Run `ldconfig`
  6. Restart Plex Media Server.
Plex will now find and use the installed libcuda library.
hopeandnotexpect
Starting out
Posts: 27
Joined: Wed Mar 09, 2022 11:09 am

Re: GTX 1650 in the TVS-872x

Post by hopeandnotexpect »

This is indeed very useful info, as I plan to be installing a GPU as well. Thanks for sharing both your journey and your findings =)
camattin
First post
Posts: 1
Joined: Wed Nov 30, 2016 2:21 pm

Re: GTX 1650 in the TVS-872x

Post by camattin »

Just wanted to chime in and say I'm glad this thread came up in a Google search. After finally noticing that the 5.1.0.0822 NVIDIA driver update broke everything I downgraded back to 5.0.4.1. Things were looking fine and no issues setting it to QTS mode but Plex was crashing. Found this thread, vaguely remembering doing this so many months ago, did the needful, and now Plex is back to hw transcoding on the GPU!
BlackDuck888
New here
Posts: 4
Joined: Thu Mar 03, 2016 3:18 pm

Re: GTX 1650 in the TVS-872x

Post by BlackDuck888 »

QTS 5.1 is out as stable and i stepped into the same problem. I figured out, that the 5.1.0.0822 NVIDIA driver has an other filestructure than older versions. The new path for the CUDA Libs is "/opt/NVIDIA_GPU_DRV/usr/nvidia" if you use the example of datavortex it should work with this path again.

I did it with an other trick. I changed in /share/VOLUMEN/.qpkg/PlexMediaServer/plex.sh and add at line 140

Code: Select all

# determine and write paths (QTS & QuTS) 5.1
GPU_DRV_DIR="$(getcfg -f $CONF NVIDIA_GPU_DRV Install_Path)"
[ "$GPU_DRV_DIR" != "" ] && echo $GPU_DRV_DIR/usr/nvidia >> ${QPKG_DIR}/etc/ld-musl-x86_64.path
After a restart of plex hardware transconding is working again for me.

Under the line plex can't find the cuda library an this is coused by a chance of the file structure within the NVIDIA driver. There are 3 possible solutions, 1) a new plex package witch respect the new path 2) an new nvidia package with the old path and 3) a system change to know the cuda lib system wide.

I opened a ticket yesterday at QNAP support, may it will be fixed in a couple of weeks.
Post Reply

Return to “Hardware & Software Compatibility”