No hardware encoding available for Docker on Ubuntu 22.04, Intel I7 laptop

I can not get hardware encoding working on Ubuntu with Docker. I did get hardware encoding working when installing ChannelsDvr directly from shell script as a local application. But I need TVE and thus need the container version.

I have tried to install the TVE Docker on Ubuntu using the ---device /dev/dri:/dev/dri, but I get the error message docker: Error response from daemon: error gathering device information while adding custom device "/dev/dri": no such file or directory

Per some other support threads, I have tried changing permission to the dev/dri folder to 777. I have also tried adding the dev/dri folder as a file sharing resource in Docker Desktop.

The TVE Docker starts fine without the --device parameter, but then I only have software encoding.

The whole point of moving to a new, upgraded Intel-based chipset (previously on AMD), was to make use of the hardware encoding and smaller recording sizes by using the H265 codec.

Here is the non-working Docker cli command I am using:

docker run \
  --detach \
  --name=channels-dvr \
  --restart=on-failure:10 \
--device /dev/dri:/dev/dri \
  -p=8089:8089 \
  --volume /home/user1/channels-dvr:/channels-dvr \
  --volume /media/user1/dvr_data:/shares/DVR \
  fancybits/channels-dvr:tve

Thanks for any suggestions.

Can't you install chromium instead of using the docker?
sudo apt update
sudo apt install chromium-browser xvfb

I assume you already did this

  • If you have an Intel processor, make sure you add your user to the video and render groups so the Channels DVR Server transcoder can use /dev/dri for hardware acceleration:
    sudo adduser $(id -u -n) video && sudo adduser $(id -u -n) render

Is that the case? Instead of using Docker for TVE, can you install locally on Ubunutu and use the chromium browser and xvfb packages to use TVE?

I have already followed those instructions to add my user to those groups. The ls -alh /dev/dri command shows my user as a member of those groups. Thanks for the suggestion, though. Good thought.

I may try installing locally without Docker, and see if I can add TVE sources, if there are no other suggestions for getting the container to see those device folders.

Thanks.

1 Like

From the install instructions here Channels β€” Channels DVR Server

  • If you plan to use TV Everywhere, install your linux distrubution's chrome or chromium package. For example, apt-get install chromium-browser xvfb.
1 Like

Install chrome not chromium if your running desktop version of Ubuntu. Skip docker. This is what I do and it works great for tve.

1 Like

But not the snap install, correct?

Correct. I believe it was separate from snap. You don’t want snap as it’s been known to cause problems

Thanks! I will give that a try.

Please post the output

> ls -alh /dev/dri
total 0
drwxrwxrwx   3 root root        100 Dec  2 09:21 .
drwxr-xr-x  20 root root       4.6K Dec  5 03:25 ..
drwxrwxrwx   2 root root         80 Dec  2 09:57 by-path
crwxrwxrwx+  1 root video  226,   0 Dec  2 09:57 card0
crwxrwxrwx+  1 root render 226, 128 Dec  2 09:57 renderD128

I wonder if the "extended permissions" indicated by the presence of the plus sign have anything to do with this issue. I'm not familar with the ACLs that are used for this purpose -- but I'm guessing this is maybe something to do with it being Ubuntu Desktop?

I'm using the channels-dvr:tve container with Docker running in a LXC Debian container on a Proxmox host (nested virtualization), and I'm able to passthrough Intel Quick Sync without issue. Verified using intel_gpu_top on the Proxmox host while using the container's Channels WebUI to watch an HDHomeRun channel:

intel-gpu-top -  275/ 275 MHz;    0% RC6;  1.11 Watts;      645 irqs/s

      IMC reads:     1136 MiB/s
     IMC writes:      641 MiB/s

          ENGINE      BUSY                                                                                          MI_SEMA MI_WAIT
     Render/3D/0   13.69% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰                                                                           |      7%      0%
       Blitter/0    0.80% |β–‹                                                                                      |      0%      0%
         Video/0    6.20% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–                                                                                 |      0%      0%
  VideoEnhance/0    7.70% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹                                                                                |      2%      0%

Also, this is using 660 permissions, not 777.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.