[HWE] Cannot access /dev/dri/renderD129: no such file or directory

Ubuntu Linux setup. Channels is functioning correctly but I don't think it's hardware transcoding.

I get this error in the logs when running 'curl -XPOST http://127.0.0.1:8089/hls/hwaccel'

[HWE] Cannot access /dev/dri/renderD129: no such file or directory

Under /dev/dri I have:

by-path
card0
renderD128

Trying to add user to the video group works fine but adding to the render groups gets this:

sudo adduser $(id -u -n) render
adduser: The group `render' does not exist.

Help?

Try to find out which group owns the render node:

ls -l /dev/dri/

Then, add the user that Channels runs as to the same group that owns the node. Also, if you are doing this as your own user (why would you do something like that?), remember that adding yourself to the group won't really take until you log out then back in again.

drwxr-xr-x 2 root root 80 Mar 18 11:42 by-path
crw-rw---- 1 root video 226, 0 Mar 18 11:42 card0
crw-rw---- 1 root video 226, 128 Mar 18 11:42 renderD128

'Then, add the user that Channels runs as to the same group that owns the node'

Adding user to the video group works fine.

'Also, if you are doing this as your own user (why would you do something like that?)'

It's a server, I created a channels user account.

renderD129 does not exist, renderD128 does.

Anything?

Not sure how renderD129 and renderD129 correlate or how one is created instead of the other.

renderD129 is usually the second render node, while renderD128 is usually the first. Has anything in your system configuration changed? Have you tried restarting the Channels process, or rebooting the server?

Also, if Channels' ffmpeg instance seems intent on only accessing the …129 node, then you may want to consider a link, maybe add something to your /etc/rc.local like:

ln -sf renderD128 /dev/dri/renderD129

I did re-run the original install script when I realized that renderD128 was getting permission errors. I thought maybe a script error or something didn't create the right symbolic links. After that I only see renderD128.

Yes, I have rebooted the server. I now only see renderD128 under that directory.

Is the script supposed to create a 'render' group?

I could create that symbolic link but will it affect anything in the future? I'd like to make sure I'm running this correctly....

Also,
Just created that symbolic link for a test and then ran hwaccel....

2020/03/18 15:58:32.667237 [HWE] Failure: exit status 1

The notes to add the user to the render group refer to many Linux distributions placing the /dev/dri members into that particular group; some other distros use the video group, which is appears yours does.

(I've never been one for helper scripts, so I'm a bit confused as to what exactly the adduser snippet you posted does, as sudo usermod -aG video channels seems more straightforward. But that could just be me.)

Interesting: I just hit up the same hwaccel endpoint, and I get permission errors, too. However, I have no issues with using hardware transcoding, so I'm not sure what changed. But, just because the error messages are there, it doesn't necessarily mean that anything is wrong.

Yea, 'adduser' is the equivalent under a Debian. As you know, multiple ways to do the same thing under different revisions.

After adding that symbolic link it would seem like a simple proposition to run Hwaccel and get the right results.

No dice. [HWE] Failure: exit status 1

Ugh.

How can you tell that you are transcoding properly if you are getting log errors?

I don't understand the failure error.

But, do you have the option to enable hardware transcoding?

You opened the thread with the errors from Channels' internal checks for a hardware encoder, but you never mentioned why you were running the test.

Well, last week it was working fine; however, when I just ran a few things to test, my server is no longer reporting hardware transcoding. Nothing changed in the interim, other than perhaps a kernel upgrade or similar.

So, now I'm scrambling to troubleshoot this situation and see what's going on here.

EDIT: I just did a fresh update (pacman -Syuu) on my server, both inside its container and to the host—and everything is back to normal. The server is back to hardware transcoding, so I don't know exactly where the hiccup occured.

'But, do you have the option to enable hardware transcoding?'

From the Channels client or server? I think I'm looking in the right place on the server side to enable it, it looks right. I could be off here....

'You opened the thread with the errors from Channels' internal checks for a hardware encoder, but you never mentioned why you were running the test.'

I was running into some buffering with the client and checked against the logs to discover that transcoding was running into errors.

The setting is on the server, under the Settings > Transcoder section in the web UI. If you can use hardware transcoding, it will offer an option; if you cannot, it will simply have the text "Software" beside "Transcoder".

Yes, it says hardware is available but I'm still getting the error. Not sure what's going on here or how to check that transcoding is actually happening.

I have my server running with automatic snap upgrades so theoretically I really shouldn't have to do anything.

It's a simple script. I just don't understand why the original permission errors.

  1. Why I am not getting RenderD129
  2. Why creating the symbolic link leads to 'Failure: exit status 1'.
  3. How to check that hardware transcoding is actually happening....

It hardware is shown and selected then it is being used. There's nothing further you need to do.

  1. Not all systems will have the renderD129 node.
  2. The failure is not related to the symlink, but rather a test that the Channels server is performing to test the presence/ability of a type of hardware encoding; it can safely be ignored.
  3. You can test if your hardware encoding is working by trying to stream something that will require a transcode. For instance, I have web streams set at 480p@2Mbps, so to test I try to play a channel from the web UI; after a few moments I stop the feed, and check the logs. It will indicate in the logs if hardware transcoding was used; also, the encoder will tell you, too. (On my system, it says encoder=h264_vaapi which is the hardware encoder for Intel and AMD graphics on Linux.)

This is good information. Is there any reason why the logs shows errors? I just want to know for my own knowledge.