Dell Precision M6800
NVIDIA GK104GLM [Quadro K5100M]
Ubuntu Studio 22.04 LTS
完全更新 ( sudo apt update && sudo apt full-upgrade
)
这个答案似乎是最有希望让 NVENC 工作的答案。它的一系列命令是:
sudo apt update
sudo apt remove '^nvidia'
sudo apt autoremove
sudo apt install nvidia-driver-???
sudo reboot
???
目前大概是最新的。在撰写本文时 Tab 补全给出:
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-
按照上面的说明,首先尝试了 525 驱动程序。而不是 GUI 桌面,它似乎挂在文本错误上,说这个 GPU 不受支持。最大支持版本为 470。
好的。经过一些谷歌搜索以弄清楚如何从中获取命令提示符 ( Ctrl++ Alt) F3,我使用命令历史再次完成该过程并选择 470 驱动程序。这让我有了桌面,但仅限于外接显示器。它不再识别笔记本电脑屏幕。
逐步降低每一个非服务器版本 - 相同的过程 - 寻找支持笔记本电脑屏幕的最新版本。只有 390 人这样做了。
仔细观察,高于它的所有东西 - 418 及以上 - 似乎都取决于比它本身晚到 470 的所有东西,所以我认为无论如何我总是得到 470。除非我选择了 390,然后我得到了那个。
所以看起来(至少没有一些诡计)我必须使用 390 才能让笔记本电脑屏幕工作。
同时,ffmpeg 似乎不支持低于 418/470 的 NVENC。(无论我安装 418 包时实际得到什么)
在 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:~$
在 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:~$
我的 ffmpeg 命令基于此,然后缩减为使用默认值而不是指定现在已弃用的内容:
https ://trac.ffmpeg.org/wiki/HWAccelIntro#NVENC
因此,我似乎可以拥有笔记本电脑屏幕或硬件视频编码,具体取决于我选择的驱动程序,但不能同时拥有。至少不容易。有人可以指导我如何同时获得两者吗?
事实证明,BIOS 有影响。谁知道?
无论如何,多亏了这个答案,我的笔记本电脑屏幕才能与更新的驱动程序一起使用!我的 BIOS 没有标明,但这是设置:
选中该框,应用并退出。然后笔记本电脑屏幕与 470 驱动程序一起工作。
毕竟,
xrandr
说笔记本电脑屏幕已从重命名DP-4
为eDP-1-1
。所以我还必须更新一个脚本来保持触摸屏正确对齐。