0

Dell Precision M6800
NVIDIA GK104GLM [Quadro K5100M]
Ubuntu Studio 22.04 LTS
Fully updated (sudo apt update && sudo apt full-upgrade)


This answer seemed to be the most promising to get NVENC working. Its series of commands is:

sudo apt update
sudo apt remove '^nvidia'
sudo apt autoremove
sudo apt install nvidia-driver-???
sudo reboot

Where ??? is presumably the latest at the moment. Tab completion at the time of this writing gives:

aaron@aaron-ubuntustudio-m6800:~$ sudo apt install nvidia-driver-
nvidia-driver-390         nvidia-driver-435         nvidia-driver-450-server  nvidia-driver-465         nvidia-driver-510         nvidia-driver-515-server  nvidia-driver-525-open
nvidia-driver-418         nvidia-driver-440         nvidia-driver-455         nvidia-driver-470         nvidia-driver-510-server  nvidia-driver-520
nvidia-driver-418-server  nvidia-driver-440-server  nvidia-driver-460         nvidia-driver-470-server  nvidia-driver-515         nvidia-driver-520-open
nvidia-driver-430         nvidia-driver-450         nvidia-driver-460-server  nvidia-driver-495         nvidia-driver-515-open    nvidia-driver-525
aaron@aaron-ubuntustudio-m6800:~$ sudo apt install nvidia-driver-

Tried the 525 driver first, following the instructions above. Instead of a GUI desktop, it appeared to hang on the text errors saying that this GPU isn't supported. Max supported version is 470.

Okay. After some googling to figure out how to get a command prompt out of that (Ctrl+Alt+F3), I used the command history to go through that process again and choose the 470 driver. That got me the desktop, but only on the external monitors. It didn't recognize the laptop screen anymore.

Incrementally stepped down through every single non-server version - same process - looking for the latest one to support the laptop screen. Only 390 did.

Looking closer, everything above that - 418 and up - seemed to depend on everything later than itself up to 470, and so I think I always got 470 regardless. Unless I chose 390, and then I got that.

So it appears that (without some trickery at least) I have to use 390 in order for the laptop screen to work.


Meanwhile, ffmpeg doesn't seem to support NVENC on anything less than 418/470. (whatever I actually got when I installed the 418 package)

On 390:

aaron@aaron-ubuntustudio-m6800:~$ nvidia-smi
Wed Dec 21 14:20:57 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.157                Driver Version: 390.157                   |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro K5100M       Off  | 00000000:01:00.0  On |                  N/A |
| N/A   57C    P0    24W /  N/A |    295MiB /  8110MiB |      1%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1654      G   /usr/lib/xorg/Xorg                           195MiB |
|    0      2043      G   /usr/bin/kwin_x11                             78MiB |
|    0      2107      G   /usr/bin/plasmashell                          16MiB |
+-----------------------------------------------------------------------------+
aaron@aaron-ubuntustudio-m6800:~$ ffmpeg -i Radioactive.mp4 -c:v h264_nvenc output.mp4
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil      56. 70.100 / 56. 70.100
libavcodec     58.134.100 / 58.134.100
libavformat    58. 76.100 / 58. 76.100
libavdevice    58. 13.100 / 58. 13.100
libavfilter     7.110.100 /  7.110.100
libswscale      5.  9.100 /  5.  9.100
libswresample   3.  9.100 /  3.  9.100
libpostproc    55.  9.100 / 55.  9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Radioactive.mp4':
Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Radioactive
    artist          : EZ Wolf
    date            : 20141121
    encoder         : Lavf58.76.100
    comment         : https://www.youtube.com/watch?v=uhfbForokYk
    description     : Fun little project with Masada!
                    : German users: please use this link to watch it:
                    : https://vimeo.com/112515413
    synopsis        : Fun little project with Masada!
                    : German users: please use this link to watch it:
                    : https://vimeo.com/112515413
Duration: 00:02:58.72, start: 0.000000, bitrate: 4773 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 4640 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
    handler_name    : VideoHandler
    vendor_id       : [0][0][0][0]
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
    handler_name    : SoundHandler
    vendor_id       : [0][0][0][0]
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_nvenc))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264_nvenc @ 0x557f2ebb8300] Driver does not support the required nvenc API version. Required: 11.1 Found: 8.1
[h264_nvenc @ 0x557f2ebb8300] The minimum required Nvidia driver for nvenc is (unknown) or newer
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[aac @ 0x557f2ebbcc40] Qavg: 15980.515
[aac @ 0x557f2ebbcc40] 2 frames left in the queue on closing
Conversion failed!
aaron@aaron-ubuntustudio-m6800:~$ rm output.mp4
aaron@aaron-ubuntustudio-m6800:~$ 

On 418/470:

aaron@aaron-ubuntustudio-m6800:~$ nvidia-smi
Wed Dec 21 14:08:18 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.161.03   Driver Version: 470.161.03   CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Quadro K5100M       Off  | 00000000:01:00.0  On |                  N/A |
| N/A   51C    P8     6W /  N/A |    162MiB /  8110MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1611      G   /usr/lib/xorg/Xorg                100MiB |
|    0   N/A  N/A      1865      G   /usr/bin/kwin_x11                  38MiB |
|    0   N/A  N/A      1941      G   /usr/bin/plasmashell               17MiB |
+-----------------------------------------------------------------------------+
aaron@aaron-ubuntustudio-m6800:~$ ffmpeg -i Radioactive.mp4 -c:v h264_nvenc output.mp4
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil      56. 70.100 / 56. 70.100
libavcodec     58.134.100 / 58.134.100
libavformat    58. 76.100 / 58. 76.100
libavdevice    58. 13.100 / 58. 13.100
libavfilter     7.110.100 /  7.110.100
libswscale      5.  9.100 /  5.  9.100
libswresample   3.  9.100 /  3.  9.100
libpostproc    55.  9.100 / 55.  9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Radioactive.mp4':
Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Radioactive
    artist          : EZ Wolf
    date            : 20141121
    encoder         : Lavf58.76.100
    comment         : https://www.youtube.com/watch?v=uhfbForokYk
    description     : Fun little project with Masada!
                    : German users: please use this link to watch it:
                    : https://vimeo.com/112515413
    synopsis        : Fun little project with Masada!
                    : German users: please use this link to watch it:
                    : https://vimeo.com/112515413
Duration: 00:02:58.72, start: 0.000000, bitrate: 4773 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 4640 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
    handler_name    : VideoHandler
    vendor_id       : [0][0][0][0]
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
    handler_name    : SoundHandler
    vendor_id       : [0][0][0][0]
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_nvenc))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mp4, to 'output.mp4':
Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Radioactive
    artist          : EZ Wolf
    date            : 20141121
    synopsis        : Fun little project with Masada!
                    : German users: please use this link to watch it:
                    : https://vimeo.com/112515413
    comment         : https://www.youtube.com/watch?v=uhfbForokYk
    description     : Fun little project with Masada!
                    : German users: please use this link to watch it:
                    : https://vimeo.com/112515413
    encoder         : Lavf58.76.100
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 2000 kb/s, 25 fps, 12800 tbn (default)
    Metadata:
    handler_name    : VideoHandler
    vendor_id       : [0][0][0][0]
    encoder         : Lavc58.134.100 h264_nvenc
    Side data:
    cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay: N/A
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
    handler_name    : SoundHandler
    vendor_id       : [0][0][0][0]
    encoder         : Lavc58.134.100 aac
frame= 4467 fps= 69 q=28.0 Lsize=   43837kB time=00:02:58.73 bitrate=2009.3kbits/s speed=2.77x
video:40918kB audio:2801kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.268805%
[aac @ 0x560c12875c40] Qavg: 315.715
aaron@aaron-ubuntustudio-m6800:~$ rm output.mp4
aaron@aaron-ubuntustudio-m6800:~$ 

My ffmpeg command is based on this, then pared down to use the defaults instead of specifying things that are now deprecated:
https://trac.ffmpeg.org/wiki/HWAccelIntro#NVENC


So it seems that I can have EITHER the laptop screen OR hardware video encoding, depending on which driver I choose, but not both. At least not easily. Can someone walk me through how to get both?

Maybe then I can get rid of this error popup in OBS, AND still have a useful rig:
enter image description here

1 Answer 1

1

Turns out that the BIOS has an effect. Who knew?

Anyway, thanks to this answer, I got the laptop screen to work with the newer driver! My BIOS isn't labeled as clearly, but this is the setting:

enter image description here

Check that box, Apply, and Exit. Then the laptop screen works with the 470 driver.


After all that, xrandr says that the laptop screen has been renamed from DP-4 to eDP-1-1. So I also had to update a script that keeps the touchscreen aligned correctly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .