You are not logged in.

#1 2024-07-26 08:42:02

disrupt6967
Member
Registered: 2024-07-26
Posts: 2

Too many frames skipped on Framework 16 Laptop running Arch Linux

I am trying to record PS5 footage fed from a capture card on my Framework 16 laptop. I installed VAAPI and other necessary packages. To make the most out of the graphics module, I am using a hardware encoder.

Below are some detailed OBS Studio settings:

Sources: Video Capture Device (V4L2) - Elgato Game Capture HD60 X

Streaming: None

Output: Advanced
├─Recording Settings
│ ├─Recording Format: mkv
│ ├─Video Encoder: VAAPI AV1 on Navi 33 (Radeon RX 7600/7600 XT/7600M XT/7600S/7700S/PRO W7600)
│ └─Audio Encoder: FFmpeg FLAC (16-bit)
├─Encoder Settings
│ ├─qos: Not selected
│ ├─min-force-key-unit-interval: 0
│ ├─key-int-max: 60
│ ├─gf-group-size: 32
│ ├─ref-frames: 7
│ ├─hierarchial-level: 6
│ ├─superblock-128x128: Not selected
│ ├─min-qp: 0
│ ├─max-qp: 255
│ ├─qp: 128
│ ├─bitrate: 0
│ ├─target-percentage: 66
│ ├─target-usage: 4
│ ├─cpb-size: 0
│ ├─num-tile-cols: 1
│ ├─num-tile-rows: 1
│ ├─mbbrc: GST_VA_FEATURE_AUTO
│ ├─rate-control: Variable Bitrate
├─Track 1 Audio Bitrate: 320
└─Replay buffer: Disabled

Video
├─Base (Canvas) Resolution: 1920x1080
├─Output (Scaled) Resolution: 1920x1080
└─FPS: 60

When I ran multiple 30-second recording sessions, the videos were saved and could be played. While the audio was fine, the videos were extremely laggy. When I checked the stats, CPU was never being used more than 3% and memory 1GB. FPS was always 60 and it took 1.5ms to render each frame. Less than 1 out of 20000 frames were lost due to rendering lag, but more than half of all frames were being skipped due to encoding lag. Are my encoder and recording settings too much for a laptop to handle? If not, which settings can I change to improve performance?

Below are my latop specs:
Laptop: Framework 16
CPU: Ryzen 9 7940HS
Memory: DDR5-5600 - 64GB (2 x 32GB)
Storage: WD_BLACK SN850X NVMe M.2 2280 4TB & Western Digital SN740 NVMe - M.2 2230 - 2TB
OS: Arch Linux
Expansion Bay Module: Graphics Module (AMD Radeon RX 7700S)

Offline

#2 2024-07-26 09:46:27

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,616

Re: Too many frames skipped on Framework 16 Laptop running Arch Linux

Please use code tags for command output.

I am using a hardware encoder.

├─Video Encoder: VAAPI AV1 on Navi 33 (Radeon RX 7600/7600 XT/7600M XT/7600S/7700S/PRO W7600)

Please post the output of vainfo to verify whether AV1 is supported for encoding .

Your system has 2 videocards in that setup an integrated radeon 780M and the RX 7770
Please post lspci -k .

Are you using X or wayland ?
Which WM/DE/compositor ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2024-07-26 09:52:10

disrupt6967
Member
Registered: 2024-07-26
Posts: 2

Re: Too many frames skipped on Framework 16 Laptop running Arch Linux

Lone_Wolf wrote:

Please post the output of vainfo to verify whether AV1 is supported for encoding .

Your system has 2 videocards in that setup an integrated radeon 780M and the RX 7770
Please post lspci -k .

Are you using X or wayland ?
Which WM/DE/compositor ?

> vainfo
Trying display: wayland
vainfo: VA-API version: 1.21 (libva 2.22.0)
vainfo: Driver version: Mesa Gallium driver 24.1.4-arch1.2 for AMD Radeon 780M (radeonsi, gfx1103_r1, LLVM 18.1.8, DRM 3.57, 6.10.1-arch1-1)
vainfo: Supported profile and entrypoints
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSlice
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointEncSlice
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileVP9Profile2            :	VAEntrypointVLD
      VAProfileAV1Profile0            :	VAEntrypointVLD
      VAProfileAV1Profile0            :	VAEntrypointEncSlice
      VAProfileNone                   :	VAEntrypointVideoProc

> sudo lspci -k
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14e8
	Subsystem: Framework Computer Inc. Device 0005
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Device 14e9
	Subsystem: Framework Computer Inc. Device 0005
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14ea
00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14ed
	Subsystem: Advanced Micro Devices, Inc. [AMD] Device 1453
	Kernel driver in use: pcieport
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14ed
	Subsystem: Advanced Micro Devices, Inc. [AMD] Device 1453
	Kernel driver in use: pcieport
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14ea
00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14ee
	Subsystem: Advanced Micro Devices, Inc. [AMD] Device 1453
	Kernel driver in use: pcieport
00:02.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14ee
	Subsystem: Advanced Micro Devices, Inc. [AMD] Device 1453
	Kernel driver in use: pcieport
00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14ea
00:03.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 19h USB4/Thunderbolt PCIe tunnel
	Subsystem: Advanced Micro Devices, Inc. [AMD] Device 1453
	Kernel driver in use: pcieport
00:04.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14ea
00:04.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 19h USB4/Thunderbolt PCIe tunnel
	Subsystem: Advanced Micro Devices, Inc. [AMD] Device 1453
	Kernel driver in use: pcieport
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14ea
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14eb
	Subsystem: Device 0005:f111
	Kernel driver in use: pcieport
00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14eb
	Subsystem: Device 0005:f111
	Kernel driver in use: pcieport
00:08.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14eb
pcilib: Error reading /sys/bus/pci/devices/0000:00:08.3/label: Operation not permitted
	Subsystem: Device 0005:f111
	Kernel driver in use: pcieport
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 71)
	Subsystem: Framework Computer Inc. Device 0005
	Kernel driver in use: piix4_smbus
	Kernel modules: i2c_piix4, sp5100_tco
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
	Subsystem: Framework Computer Inc. Device 0005
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14f0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14f1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14f2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14f3
	Kernel driver in use: k10temp
	Kernel modules: k10temp
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14f4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14f5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14f6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14f7
01:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Upstream Port of PCI Express Switch (rev 12)
	Kernel driver in use: pcieport
02:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch (rev 12)
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch
	Kernel driver in use: pcieport
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 33 [Radeon RX 7600/7600 XT/7600M XT/7600S/7700S / PRO W7600] (rev c1)
	DeviceName: Realtek
	Subsystem: Framework Computer Inc. Device 0007
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu
03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 HDMI/DP Audio
	Subsystem: Framework Computer Inc. Device 0005
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
04:00.0 Non-Volatile memory controller: Sandisk Corp PC SN740 NVMe SSD (DRAM-less) (rev 01)
	Subsystem: Sandisk Corp PC SN740 NVMe SSD (DRAM-less)
	Kernel driver in use: nvme
	Kernel modules: nvme
05:00.0 Network controller: MEDIATEK Corp. MT7922 802.11ax PCI Express Wireless Network Adapter
	Subsystem: MEDIATEK Corp. Device e616
	Kernel driver in use: mt7921e
	Kernel modules: mt7921e
06:00.0 Non-Volatile memory controller: Sandisk Corp WD Black SN850X NVMe SSD (rev 01)
	Subsystem: Sandisk Corp WD Black SN850X NVMe SSD
	Kernel driver in use: nvme
	Kernel modules: nvme
c5:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 (rev c1)
	Subsystem: Framework Computer Inc. Device 0005
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu
c5:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller
	Subsystem: Framework Computer Inc. Device 0005
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
c5:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 19h (Model 74h) CCP/PSP 3.0 Device
	Subsystem: Framework Computer Inc. Device 0005
	Kernel driver in use: ccp
	Kernel modules: ccp
c5:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15b9
	Subsystem: Framework Computer Inc. Device 0005
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
c5:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15ba
	Subsystem: Framework Computer Inc. Device 0005
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
c5:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 63)
	Subsystem: Framework Computer Inc. Device 0005
	Kernel driver in use: snd_pci_ps
	Kernel modules: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x, snd_acp_pci, snd_rpl_pci_acp6x, snd_pci_ps, snd_sof_amd_renoir, snd_sof_amd_rembrandt, snd_sof_amd_vangogh, snd_sof_amd_acp63
c5:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller
	Subsystem: Framework Computer Inc. Device 0005
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
c6:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Device 14ec
	Subsystem: Framework Computer Inc. Device 0005
c6:00.1 Signal processing controller: Advanced Micro Devices, Inc. [AMD] AMD IPU Device
	Subsystem: Framework Computer Inc. Device 0005
c7:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Device 14ec
	Subsystem: Framework Computer Inc. Device 0005
c7:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15c0
	Subsystem: Framework Computer Inc. Device 0005
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
c7:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15c1
	Subsystem: Framework Computer Inc. Device 0005
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
c7:00.5 USB controller: Advanced Micro Devices, Inc. [AMD] Pink Sardine USB4/Thunderbolt NHI controller #1
	Subsystem: Framework Computer Inc. Device 0005
	Kernel driver in use: thunderbolt
	Kernel modules: thunderbolt
c7:00.6 USB controller: Advanced Micro Devices, Inc. [AMD] Pink Sardine USB4/Thunderbolt NHI controller #2
	Subsystem: Framework Computer Inc. Device 0005
	Kernel driver in use: thunderbolt
	Kernel modules: thunderbolt

I prioritize Wayland, falling back to X if needed. My desktop environment is GNOME.

Offline

#4 2024-07-26 10:19:44

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,616

Re: Too many frames skipped on Framework 16 Laptop running Arch Linux

Both your videocards are shown as vga-compatible which is good .

OBS uses qt6 , you could try forcing the wayland plugin to verify it that matters .
https://wiki.archlinux.org/title/Wayland#Qt

Vaapi was designed by intel (and still tends to perform better on intel videocards) while gstreamer targets all card manufacturers.
https://wiki.archlinux.org/title/Open_B … _GStreamer shows how to use gstreamer instead of native vaapi .

Another alternative is to use vulkan capture instead of x or wayland .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB