Hardware acceleration not working

Hello. I have been having this video stuttering problem ever since I installed Manjaro on my laptop. Here are the specs:

H/W path Device Class Description

                     system      Compaq CQ58 Notebook PC (C0X70EA#ABD)

/0 bus 1885
/0/0 memory 128KiB BIOS
/0/1c memory 4GiB System Memory
/0/1c/0 memory SODIMM [empty]
/0/1c/1 memory 4GiB SODIMM DDR3 Synchronous Unbuffered (Un
/0/26 processor AMD E1-1200 APU with Radeon(tm) HD Graphics
/0/26/27 memory 128KiB L1 cache
/0/26/28 memory 1MiB L2 cache
/0/100 bridge Family 14h Processor Root Complex
/0/100/1 display Wrestler [Radeon HD 7310]
/0/100/1.1 multimedia Wrestler HDMI Audio
/0/100/11 storage FCH SATA Controller [AHCI mode]
/0/100/12 bus FCH USB OHCI Controller
/0/100/12/1 usb3 bus OHCI PCI host controller
/0/100/12.2 bus FCH USB EHCI Controller
/0/100/12.2/1 usb1 bus EHCI Host Controller
/0/100/12.2/1/3 multimedia HP Truevision HD
/0/100/14 bus FCH SMBus Controller
/0/100/14.2 multimedia FCH Azalia Controller
/0/100/14.3 bridge FCH LPC Bridge
/0/100/14.4 bridge FCH PCI Bridge
/0/100/15 bridge Hudson PCI to PCI bridge (PCIE port 0)
/0/100/15/0 generic RTS5229 PCI Express Card Reader
/0/100/15.1 bridge Hudson PCI to PCI bridge (PCIE port 1)
/0/100/15.1/0 eno1 network RTL810xE PCI Express Fast Ethernet controll
/0/100/15.3 bridge Hudson PCI to PCI bridge (PCIE port 3)
/0/100/15.3/0 wlo1 network RT5390R 802.11bgn PCIe Wireless Network Ada
/0/100/16 bus FCH USB OHCI Controller
/0/100/16/1 usb4 bus OHCI PCI host controller
/0/100/16/1/1 multimedia Plantronics .Audio 628 USB
/0/100/16.2 bus FCH USB EHCI Controller
/0/100/16.2/1 usb2 bus EHCI Host Controller
/0/101 bridge Family 12h/14h Processor Function 0
/0/102 bridge Family 12h/14h Processor Function 1
/0/103 bridge Family 12h/14h Processor Function 2
/0/104 bridge Family 12h/14h Processor Function 3
/0/105 bridge Family 12h/14h Processor Function 4
/0/106 bridge Family 12h/14h Processor Function 6
/0/107 bridge Family 12h/14h Processor Function 5
/0/108 bridge Family 12h/14h Processor Function 7
/1 power MU06047

Now, I've read this article: https://wiki.archlinux.org/index.php/Hardware_video_acceleration
and I have these drivers installed:

              NAME               VERSION          FREEDRIVER           TYPE

       video-linux            2018.05.04                true            PCI
        video-vesa            2017.03.12                true            PCI
 video-modesetting            2020.01.13                true            PCI

When I run vainfo i get this error

libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
vaInitialize failed with error code -1 (unknown libva error),exit

vdpauinfo gives this one:

display: :0.0 screen: 0
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
Error creating VDPAU device: 1

I tried this command too: grep -iE 'vdpau | dri driver' /var/log/Xorg.0.log
and it returned nothing which makes me suspect that no settings for vdpau have been set.

And I'm having a hard time fixing it... Can't even view 720p videos on vlc or firefox. This is unusual since this worked perfectly fine when I was on windows a couple weeks ago. I tried many things but nothing seems to work. How do I activate vaapi? Sorry if this is a silly question but I have little experience with linux os.

:+1: Welcome to Manjaro! :+1:

Please read this:


and post some more information so we can see what's really going on. Now we know the symptom of the disease, but we need some more probing to know where the origin lies...

:innocent:

P.S. If you enter a bit more details in your profile, we can also see which Desktop Environment you're using, which CPU/GPU you have, ...

Can you post the output of 'inxi -Axxxz' and 'mhwd - lhi'?

Ok thanks for the reply! I added this information into my profile. I saw that other people on the forum post their code in special boxes but I didn't know how to reproduce this effect. Since this is my first time having an on a forum like this, I will try to be to the point to the best of my ability.

At this point I think the problem is just about configuring va-api, vdpau but I'm not sure how to do that exactly. I tried to manually add an environment variables

 export LIBVA_DRIVER_PATH=/usr/lib/dri
 export LIBVA_DRIVER_NAME=radeonsi

But that just gave me a different error

libva error: /usr/lib/dri/radeonsi_drv_video.so init failed
vaInitialize failed with error code 2 (resource allocation failed),exit

so I unset them.

here is the output of inxi -Axxxz:

Audio:     Device-1: Advanced Micro Devices [AMD/ATI] Wrestler HDMI Audio vendor: Hewlett-Packard driver: snd_hda_intel 
           v: kernel bus ID: 00:01.1 chip ID: 1002:1314 
           Device-2: Advanced Micro Devices [AMD] FCH Azalia vendor: Hewlett-Packard driver: snd_hda_intel v: kernel 
           bus ID: 00:14.2 chip ID: 1022:780d 
           Sound Server: ALSA v: k5.4.23-1-MANJARO 

And also this command mhwd -lhi doesn't work so here is
mhwd -li

 Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI
            video-vesa            2017.03.12                true            PCI
     video-modesetting            2020.01.13                true            PCI

and mhwd -lh

> PCI devices:
--------------------------------------------------------------------------------
                          TYPE            BUS   CLASS  VENDOR  DEVICE   CONFIGS
--------------------------------------------------------------------------------
            Network controller   0000:03:00.0    0200    10ec    8136         0
                        Bridge   0000:00:18.3    0600    1022    1703         0
                        Bridge   0000:00:15.1    0604    1022    43a1         0
                        Bridge   0000:00:18.1    0600    1022    1701         0
           Unclassified device   0000:02:00.0    ff00    10ec    5229         0
            Display controller   0000:00:01.0    0300    1002    9809         3
         Serial bus controller   0000:00:16.2    0c03    1022    7808         0
                        Bridge   0000:00:14.3    0601    1022    780e         0
         Serial bus controller   0000:00:16.0    0c03    1022    7807         0
                        Bridge   0000:00:18.6    0600    1022    1716         0
         Serial bus controller   0000:00:12.2    0c03    1022    7808         0
                        Bridge   0000:00:00.0    0600    1022    1510         0
                        Bridge   0000:00:18.4    0600    1022    1704         0
         Serial bus controller   0000:00:12.0    0c03    1022    7807         0
                        Bridge   0000:00:18.2    0600    1022    1702         0
                        Bridge   0000:00:15.0    0604    1022    43a0         0
         Multimedia controller   0000:00:01.1    0403    1002    1314         0
                        Bridge   0000:00:18.0    0600    1022    1700         0
                        Bridge   0000:00:14.4    0604    1022    780f         0
         Multimedia controller   0000:00:14.2    0403    1022    780d         0
       Mass storage controller   0000:00:11.0    0106    1022    7804         0
            Network controller   0000:04:00.0    0200    1814    539b         0
                        Bridge   0000:00:18.7    0600    1022    1719         0
         Serial bus controller   0000:00:14.0    0c05    1022    780b         0
                        Bridge   0000:00:18.5    0600    1022    1718         0
                        Bridge   0000:00:15.3    0604    1022    43a3         0


> USB devices:
--------------------------------------------------------------------------------
                          TYPE            BUS   CLASS  VENDOR  DEVICE   CONFIGS
--------------------------------------------------------------------------------
                           Hub        3-0:1.0   10a00    1d6b    0001         0
           Unclassified device        1-3:1.0    0000    0bda    58de         0
                           Hub        4-0:1.0   10a00    1d6b    0001         0
                           Hub        1-0:1.0   10a00    1d6b    0002         0
                           Hub        2-0:1.0   10a00    1d6b    0002         0

  1. No worries: we live and we learn... :innocent:
  2. You have AMD Graphics whereas I have nVidia Graphics, so I won't be of much help to you except: Have you tried a different kernel yet?

:wink:

No this was my first install. How could that help?

When using a rolling release (=cutting edge) Linux Distro like Manjaro, Kernel management becomes a thing, so try installing the following kernels, reboot and try them out from the grub menu:

Warning! Save all data before continuing!

sudo mhwd-kernel --install linux56
sudo mhwd-kernel --install linux419
sudo reboot

Why both the oldest and newest kernel you ask? Well:

  • The 4.19 is a Long Time Service (LTS) Kernel and gets very little updates, so the screen tearing might not be present there (yet)
  • The 5.6 currently is an RC (Release Candidate) kernel, but will become an LTS kernel in the near future and it has all the latest and greatest bells, whistles, cheers, confetti and flags, so the screen tearing might be solved there already.

:innocent:

So I installed the new kernels on my system and it took me a bit to figure out how to access the advanced options at boot time but this didn't change much sadly. I'm still stuck

One last thing:

sudo mhdw --remove pci video-vesa

And if that doesn't work, I'm out of ideas as you have AMD hardware and I have nVidia...
:sob:

AFAIK firefox in linux doesn't support hardware acceleration at all. I couldn't make it work in vlc either.
What works for me, in some cases, like YT, is smplayer. You can enable hardware accel here and open a url.
Not overly convenient but, hey. : )

Oh don't worry about it, I reinstalled Manjaro once again and tried to fix it that way. The situation has changed. I re-read this guide https://wiki.archlinux.org/index.php/ATI#Selecting_the_right_driver which had the answer all along: I needed to configure this file
/etc/X11/xorg.conf.d/20-radeon.conf

I added these lines of code to it:

Section "Device"
	Identifier  "Radeon"
	Driver "radeon"
	Option "AccelMethod" "glamor"
        Option "DRI" "3"
        Option "TearFree" "on"
        Option "ColorTiling" "on"
        Option "ColorTiling2D" "on"
EndSection

after reboot hardware acceleration was running, no screen tearing was present, I can now watch HD videos in vlc and also HD youtube videos. Ever since this fix my laptop has been running better in general.

1 Like

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

Forum kindly sponsored by