Video freezes and audio stutters (SMPlayer and Firefox)

Hi everyone, I'm new to Manjaro and have been on a learning curve since I installed Manjaro KDE this past week end.

Pretty much everything works on my 10 years old hardware, compliments to the developers for creating a great system.

I have only two problems which I can't quite find solution for, this is the first one: whenever I play movie files on SMPlayer (mpv engine) and whenever I watch videos in Firefox, the video often freezes and the audio stutters (repeats the same word or sentence in a loop). If I move the mouse the problem stops. There is no strict regularity to these glitches but they do happen too often to be ignored.

In SMPlayer, mpv engine is set to default video and audio output (I have no idea what the other available settings mean and research only led to articles which appear to deal with hardware that is much more recent than mine.

Can anyone suggest ways to get videos to play without freezing and stuttering? I attach my hardware profile.

Thanks all in advance and stay safe

'''
System: Kernel: 5.6.16-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.1.0
parameters: BOOT_IMAGE=/boot/vmlinuz-5.6-x86_64 root=UUID=40a745aa-efbe-48d4-b243-a1e764f428bf rw quiet
apparmor=1 security=apparmor udev.log_priority=3
Desktop: KDE Plasma 5.18.5 tk: Qt 5.15.0 wm: kwin_x11 dm: SDDM Distro: Manjaro Linux
Machine: Type: Desktop Mobo: Gigabyte model: GA-890XA-UD3 serial: BIOS: Award v: F2 date: 03/04/2010
CPU: Topology: Quad Core model: AMD Phenom II X4 965 bits: 64 type: MCP arch: K10 family: 10 (16) model-id: 4
stepping: 3 microcode: 10000C8 L2 cache: 2048 KiB
flags: lm nx pae sse sse2 sse3 sse4a svm bogomips: 27334
Speed: 2200 MHz min/max: 800/3400 MHz Core speeds (MHz): 1: 2200 2: 800 3: 800 4: 800
Vulnerabilities: Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass status: Not affected
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full AMD retpoline, STIBP: disabled, RSB filling
Type: tsx_async_abort status: Not affected
Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Redwood XT [Radeon HD 5670/5690/5730] vendor: XFX Pine
driver: radeon v: kernel bus ID: 01:00.0 chip ID: 1002:68d8
Display: x11 server: X.Org 1.20.8 driver: radeon FAILED: ati unloaded: modesetting alternate: fbdev,vesa
compositor: kwin_x11 resolution: 1680x1050~60Hz, 1920x1080~60Hz
OpenGL: renderer: AMD REDWOOD (DRM 2.50.0 / 5.6.16-1-MANJARO LLVM 10.0.0) v: 3.3 Mesa 20.0.7 compat-v: 3.1
direct render: Yes
Audio: Device-1: Advanced Micro Devices [AMD/ATI] SBx00 Azalia vendor: Gigabyte driver: snd_hda_intel v: kernel
bus ID: 00:14.2 chip ID: 1002:4383
Device-2: Advanced Micro Devices [AMD/ATI] Redwood HDMI Audio [Radeon HD 5000 Series] vendor: XFX Pine
driver: snd_hda_intel v: kernel bus ID: 01:00.1 chip ID: 1002:aa60
Sound Server: ALSA v: k5.6.16-1-MANJARO
Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Gigabyte driver: r8169 v: kernel
port: ce00 bus ID: 04:00.0 chip ID: 10ec:8168
IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac:
Drives: Local Storage: total: 3.22 TiB used: 2.63 TiB (81.8%)
ID-1: /dev/sda vendor: Western Digital model: WD3000HLFS-01G6U1 size: 279.46 GiB block size: physical: 512 B
logical: 512 B speed: 3.0 Gb/s rotation: 10000 rpm serial: rev: 4V02 scheme: MBR
ID-2: /dev/sdb vendor: Kingston model: SH103S3240G size: 223.57 GiB block size: physical: 512 B logical: 512 B
speed: 6.0 Gb/s serial: rev: BBF0 scheme: MBR
ID-3: /dev/sdc type: USB vendor: Seagate model: Expansion Desk size: 2.73 TiB block size: physical: 4096 B
logical: 4096 B serial: rev: 0739 scheme: MBR
Partition: ID-1: / raw size: 223.57 GiB size: 219.06 GiB (97.98%) used: 11.47 GiB (5.2%) fs: ext4 dev: /dev/sdb1
Sensors: System Temperatures: cpu: 39.0 C mobo: N/A gpu: radeon temp: 48 C
Fan Speeds (RPM): N/A
Info: Processes: 208 Uptime: 1h 26m Memory: 7.77 GiB used: 2.18 GiB (28.0%) Init: systemd v: 245 Compilers:
gcc: 10.1.0 Shell: bash v: 5.0.17 running in: konsole inxi: 3.0.37
'''

This can to be your problem:


For me, 300ms works fine.

Thanks @Wibol for your reply.
I was thinking that some kind of timer could be taking my external HD to sleep (and a lot of my videos are stored there). So what you suggest might address that.

But I can't help but notice the difference in circumstances.
My system doesn't freeze as described here. In my case, it's only the video that freezes within the video player, whilst audio stutters. The rest of my system is responsive (I can continue using the browser, the text editor, etc). In your example, the whole system freezes whilst audio goes on playing, without any stuttering involved.

Last night I had the time to look into this a bit more. And I noticed a very high CPU usage when playing videos.
I monitored CPU use whilst watching films, either located on the external HD or on the internal main drive.
I tested both SMPLayer and VLC. VLC is by far the worst 'offender' with CPU use of nearly always between 95% and 107%. SMPLayer also taxes the CPU but a little less.
In SMPlayer, lag and stutter occur when the CPU is used at over 100%. VLC tears the screen whenever the CPU is overloaded.
Neither player uses my GPU, even when I set video output to GPU, VAAPI, or OpenGL.

I think the main problem is getting any video player to use hardware acceleration, involving the graphics card instead of just taxing the CPU.
I'm going to research that tomorrow (not home today).
I also think that the Firefox/Youtube problem is connected to hardware acceleration. I read a long time ago that browsers don't do hardware acceleration on Linux. But there has to be a workaround out there. I will do some digging on Sunday.

Once I solve the CPU usage issue, I will try what you suggest should the problem persist when I play videos located on the extension drive.

Thanks again for your time. Enjoy today.

Don't seems the same problem then...

Make sure you have mesa-vdpau and libva-mesa-driver installed.
VLC will probably be best using VDPAU?
In any cause .. amd/radeon has ability for both vdpau and vaapi .. so try those on both players.
In smplayer, ex: Settings > Performance > Hardware decoding > vdpau

Thanks @cscs for your reply.

I did try both vdpau and vaapi, as well as OpenGL.

Sadly, the problems still persisted and the CPU usage was really high, whilst my GPU was not being used at all. VLC really hammers the CPU, so I focused on SMPlayer...which still doesn't give my GPU a look-in.

I used the guidance on the Arch 'hardware acceleration' page, to check whether vaapi and vdpau were actually working (the relevant drivers are installed) - see guidance here

Result was not good - vaapi / vdpau do not work on my system. Looking at my inxi Fxxxza profile again, I realised that the ATI driver does not load. This probably explains vaapi / vdpau not being used even though they are installed (as per pamac).

Now, more reading on the Arch wiki page refered above also implies that configuring hardware acceleration is only possible if relying on either the AMDGPU driver or the Catalyst driver:

'' Configuring VA-API

You can override the driver for VA-API by using the LIBVA_DRIVER_NAME environment variable:

Nowhere do they mention configuring the ATI free driver. AMDGPU does not concern my old graphics card. I would have to install the proprietary (obsolete) Catalyst.

Installing Catalyst doesn't appeal. I'd like to know if anyone here has done it, knows anything about it, can provide any advice at this point. It would be very much appreciated.
Thank you all for your patience with this.

PS - the Manjaro wiki has a page about Catalyst

ATI/AMD

ATI and AMDGPU open-source drivers support both VA-API and VDPAU:

  • VA-API on Radeon HD 2000 and newer GPUs is supported by libva-mesa-driver.
  • VDPAU on Radeon R300 and newer GPUs is supported by mesa-vdpau.

yes - unless you like a broken system with a very old version of Xorg I wouldnt touch catalyst.

I do not want to downgrade Xorg, so installing Catalyst is out of the question.

libva-mesa-driver and mesa-vdpau are both installed. But for some reason, they do not appear to work.
I tested for presence of vaapi and was returned a negative.
As for vdpau it is supposed to be implemented by r600....but when I select vdpau in SMPlayer, the image disappears. Only the sound goes on playing. So vdpau doesn't work either.

Maybe it's a configuration thing. But the Arch wiki hardware acceleration page, even though it mentions ATI as supporting vaapi and vdpau, does not say anything about configuring ATI when vaapi and vdpau do not work. The config changes proposed by Arch concern only AMDGPU and Catalyst.

@cscs, there is definitely a problem with the drivers...they don't load. Take a look at this:

$ inxi -G
Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Redwood XT [Radeon HD 5670/5690 /5730] driver: radeon v: kernel
Display: x11 server: X.Org 1.20.8 driver: radeon FAILED: ati unloaded: modesetting
resolution: 1680x1050~60Hz, 1920x1080~60Hz

Without the driver loaded, the GPU can't be relied on for 3D hardware acceleration. Any attempts result in the CPU working too hard. Thus the video and audio problems.

I probably need to raise this as a driver issue in the tech support section of the forum.

Maybe .. as it is outside of the scope of the original title.

Though .. I think that output might be misleading.

I havent dealt with legacy radeon for a while .. but I think inxi is just reporting oddly.

The driver failure is also reported by inxi -Fxxxa.......I know it's inxi again!!

I'm researching other ways to get info about the X server and video drivers. I hope to find something to confirm (or not) the inxi findings.

I've just found a page about configuring the direct rendering manager to help in case Xorg doesn't load a driver. It's a page belonging to the gentoo project and may not be applicable here. I only mention it here as info.

Thank you for your time so far :slight_smile:

Well the thing is .. inxi is saying you have loaded radeon driver. but 'ati' is failed.
I think this is just a misnomerization of sorts.

Problem solved by obtaining more recent hardware.

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

Forum kindly sponsored by