I was trying to record my screen using the default screen capture app of Ubuntu 22.04 but the captured video is glitchy with many dropped frames to the point that it is unusable.
I tried using OBS Studio but it throws this error after I hit record:
Failed to open NVENC codec: Unknown error occurred
Please check your video drivers are up to date.
I then used Peek which records short GIFs but even this has dropped frames!
I suspect this has to do with Nvidia driver. Last week I disabled secure boot to enable using the driver without signing.
I am currently using the recommended driver:
Question: how can I troubleshoot this problem?
Here are my system specs:
`:+ssssssssssssssssss+:` ----------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 22.04.1 LTS x86_64
.ossssssssssssssssssdMMMNysssso. Host: Nitro AN515-43 V1.12
/ssssssssssshdmmNNmmyNMMMMhssssss/ Kernel: 5.15.0-52-generic
+ssssssssshmydMMMMMMMNddddyssssssss+ Uptime: 11 mins
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Packages: 2219 (dpkg), 7 (flatpak), 24 (snap)
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Shell: fish 3.5.1
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ Resolution: 1920x1080
ossyNMMMNyMMhsssssssssssssshmmmhssssssso DE: GNOME 42.5
ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM: Mutter
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ WM Theme: Adwaita
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Theme: Yaru-blue-dark [GTK2/3]
/sssssssshNMMMyhhyyyyhdNMMMNhssssssss/ Icons: Yaru-blue [GTK2/3]
+sssssssssdmydMMMMMMMMddddyssssssss+ Terminal: gnome-terminal
/ssssssssssshdmNNNNmyNMMMMhssssss/ CPU: AMD Ryzen 7 3750H with Radeon Vega Mobile Gfx (8) @ 2.300GHz
.ossssssssssssssssssdMMMNysssso. GPU: NVIDIA GeForce GTX 1650 Mobile / Max-Q
-+sssssssssssssssssyyyssss+- GPU: AMD ATI Radeon Vega Series / Radeon Vega Mobile Series
`:+ssssssssssssssssss+:` Memory: 3604MiB / 13920MiB
UPDATE #1: the problem seems related to the size of the capture window, smaller windows capture smooth video. I believe this further confirms the GPU as the source of the problem.
UPDATE #2: The system is not using the Nvidia GPU. I used nvidia-smi
to log GPU stats several times while recording and it is stuck at 2MiB / 4096MiB :
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 520.56.06 Driver Version: 520.56.06 CUDA Version: 11.8 |
|-------------------------------+----------------------+----------------------+
| 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 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A |
| N/A 50C P8 1W / N/A | 2MiB / 4096MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 2232 G /usr/bin/gnome-shell 1MiB |
+-----------------------------------------------------------------------------+