Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] Help! Something Borked my Hardware Aceleration (AMD)  (Read 3293 times)

Offline TheGarage

  • User
  • Posts: 9
[EN] Help! Something Borked my Hardware Aceleration (AMD)
« on: 2023/12/19, 00:53:40 »
Recent dist-upgrade seems to have broken my hardware acceleration. It had been working fine for years. I have va-driver-all and libva2 installed. Nothing seems to have been removed. It seems like hardware decoding is actually working as kodi shows it being active when I hit the o key for info and firefox shows the videos are playing, but I get no video only a black screen. No errors show in the terminal when running these applications.

inxi -G shows

Code: [Select]
user@hpoffice:~$ inxi -G
Graphics:
  Device-1: AMD Sumo [Radeon HD 6530D] driver: radeon v: kernel
  Display: x11 server: X.Org v: 21.1.10 driver: X: loaded: radeon
    unloaded: fbdev,modesetting,vesa dri: r600 gpu: radeon
    resolution: 1920x1080~60Hz
  API: EGL v: 1.5 drivers: kms_swrast,r600,swrast
    platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.5 vendor: mesa v: 23.3.1-3 renderer: AMD SUMO (DRM
    2.50.0 / 6.6.7-1-siduction-amd64 LLVM 17.0.6)

vainfo shows

Code: [Select]
user@hpoffice:~$ vainfo
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.12.0)
vainfo: Driver version: Mesa Gallium driver 23.3.1-3 for AMD SUMO (DRM 2.50.0 / 6.6.7-1-siduction-amd64, LLVM 17.0.6)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High10             : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

vdpauinfo shows (although I don't know if vdpau does much on AMD raedeon graphics)

Code: [Select]
user@hpoffice:~$ vdpauinfo
display: :0.0   screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0

Video surface:

name   width height types
-------------------------------------------
420    16384 16384  NV12 YV12
422    16384 16384  UYVY YUYV
444    16384 16384  Y8U8V8A8 V8U8Y8A8
420_16 16384 16384 
422_16 16384 16384 
444_16 16384 16384 

Decoder capabilities:

name                        level macbs width height
----------------------------------------------------
MPEG1                          --- not supported ---
MPEG2_SIMPLE                    3  9216  2048  1152
MPEG2_MAIN                      3  9216  2048  1152
H264_BASELINE                  41  9216  2048  1152
H264_MAIN                      41  9216  2048  1152
H264_HIGH                      41  9216  2048  1152
VC1_SIMPLE                      1  9216  2048  1152
VC1_MAIN                        2  9216  2048  1152
VC1_ADVANCED                    4  9216  2048  1152
MPEG4_PART2_SP                  3  9216  2048  1152
MPEG4_PART2_ASP                 5  9216  2048  1152
DIVX4_QMOBILE                  --- not supported ---
DIVX4_MOBILE                   --- not supported ---
DIVX4_HOME_THEATER             --- not supported ---
DIVX4_HD_1080P                 --- not supported ---
DIVX5_QMOBILE                  --- not supported ---
DIVX5_MOBILE                   --- not supported ---
DIVX5_HOME_THEATER             --- not supported ---
DIVX5_HD_1080P                 --- not supported ---
H264_CONSTRAINED_BASELINE       0  9216  2048  1152
H264_EXTENDED                  --- not supported ---
H264_PROGRESSIVE_HIGH          --- not supported ---
H264_CONSTRAINED_HIGH          --- not supported ---
H264_HIGH_444_PREDICTIVE       --- not supported ---
VP9_PROFILE_0                  --- not supported ---
VP9_PROFILE_1                  --- not supported ---
VP9_PROFILE_2                  --- not supported ---
VP9_PROFILE_3                  --- not supported ---
HEVC_MAIN                      --- not supported ---
HEVC_MAIN_10                   --- not supported ---
HEVC_MAIN_STILL                --- not supported ---
HEVC_MAIN_12                   --- not supported ---
HEVC_MAIN_444                  --- not supported ---
HEVC_MAIN_444_10               --- not supported ---
HEVC_MAIN_444_12               --- not supported ---
AV1_MAIN                       --- not supported ---
AV1_HIGH                       --- not supported ---
AV1_PROFESSIONAL               --- not supported ---

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8         16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A4I4 I4A4 A8I8 I8A8
R8G8B8A8         16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A4I4 I4A4 A8I8 I8A8
R10G10B10A2      16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A4I4 I4A4 A8I8 I8A8
B10G10R10A2      16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A4I4 I4A4 A8I8 I8A8

Bitmap surface:

name              width height
------------------------------
B8G8R8A8         16384 16384
R8G8B8A8         16384 16384
R10G10B10A2      16384 16384
B10G10R10A2      16384 16384
A8               16384 16384

Video mixer:

feature name                    sup
------------------------------------
DEINTERLACE_TEMPORAL             y
DEINTERLACE_TEMPORAL_SPATIAL     -
INVERSE_TELECINE                 -
NOISE_REDUCTION                  y
SHARPNESS                        y
LUMA_KEY                         y
HIGH QUALITY SCALING - L1        y
HIGH QUALITY SCALING - L2        -
HIGH QUALITY SCALING - L3        -
HIGH QUALITY SCALING - L4        -
HIGH QUALITY SCALING - L5        -
HIGH QUALITY SCALING - L6        -
HIGH QUALITY SCALING - L7        -
HIGH QUALITY SCALING - L8        -
HIGH QUALITY SCALING - L9        -

parameter name                  sup      min      max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH              y        48     2048
VIDEO_SURFACE_HEIGHT             y        48     1152
CHROMA_TYPE                      y 
LAYERS                           y         0        4

attribute name                  sup      min      max
-----------------------------------------------------
BACKGROUND_COLOR                 y 
CSC_MATRIX                       y 
NOISE_REDUCTION_LEVEL            y      0.00     1.00
SHARPNESS_LEVEL                  y     -1.00     1.00
LUMA_KEY_MIN_LUMA                y 
LUMA_KEY_MAX_LUMA                y 

Videos play fine in all programs if I disable vaapi acceleration, but really load up my cpu.

Any ideas?

Online towo

  • Administrator
  • User
  • *****
  • Posts: 2.939
Re: Help! Something Borked my Hardware Aceleration (AMD)
« Reply #1 on: 2023/12/19, 11:50:02 »
Your vainfo output does not show vp9 support, that's the problem.
I don't know, what cause that, but i have the same problem, after i checked vainfo on my system.
Ich gehe nicht zum Karneval, ich verleihe nur manchmal mein Gesicht.

Offline Fellfrosch

  • User
  • Posts: 43
Re: Help! Something Borked my Hardware Aceleration (AMD)
« Reply #2 on: 2023/12/19, 13:41:14 »
I don't think that it is much a help. But it doesn't seem to be a general problem:

Code: [Select]
vainfo
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.12.0)
vainfo: Driver version: Mesa Gallium driver 23.3.1-3 for AMD Radeon RX 5700 (radeonsi, navi10, LLVM 17.0.6, DRM 3.54, 6.6.7-1-siduction-amd64)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      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
      VAProfileNone                   : VAEntrypointVideoProc

Online towo

  • Administrator
  • User
  • *****
  • Posts: 2.939
Re: Help! Something Borked my Hardware Aceleration (AMD)
« Reply #3 on: 2023/12/19, 15:24:39 »
On my side, mesa git was the problem, with mesa from unstable, video acceleration works.
Ich gehe nicht zum Karneval, ich verleihe nur manchmal mein Gesicht.

Offline TheGarage

  • User
  • Posts: 9
Re: Help! Something Borked my Hardware Aceleration (AMD)
« Reply #4 on: 2023/12/19, 20:43:27 »
Your vainfo output does not show vp9 support, that's the problem.
I don't know, what cause that, but i have the same problem, after i checked vainfo on my system.

vp9 has never worked accelerated on this old gpu, but something broke acceleration after last week dist-upgrade. Now h264 doesn't work either or any other type of video. Last week everything worked, but vp9 (youtube for example) was always software decoded. Now I've had to disable hardware accel in all programs or else I only get a black screen, no video.

I think here is when it broke. Dist-upgrade last Thursday 12-14.
Code: [Select]
user@hpoffice:~$ grep "installed xserver" /var/log/dpkg.log
2023-12-14 10:14:56 status half-installed xserver-common:all 2:21.1.9-1
2023-12-14 10:14:57 status half-installed xserver-xorg-legacy:amd64 2:21.1.9-1
2023-12-14 10:14:57 status half-installed xserver-xorg-core:amd64 2:21.1.9-1
2023-12-14 10:15:37 status half-installed xserver-xorg-input-wacom:amd64 1.2.0-1
2023-12-14 10:15:53 status installed xserver-common:all 2:21.1.10-1
2023-12-14 10:15:54 status installed xserver-xorg-legacy:amd64 2:21.1.10-1
2023-12-14 10:15:58 status installed xserver-xorg-core:amd64 2:21.1.10-1
2023-12-14 10:15:59 status installed xserver-xorg-input-wacom:amd64 1.2.0-2
« Last Edit: 2023/12/19, 21:22:38 by TheGarage »

Offline orinoco

  • User
  • Posts: 233
  • Bullshit artist
Re: Help! Something Borked my Hardware Aceleration (AMD)
« Reply #5 on: 2024/01/04, 19:48:47 »
My system is also affected by this problem. Various programs (VLC, Firefox, Avidemux etc.) only provide a black image.

Which packages cause this behavior? Which versions offer the usual behavior? Will there be repair packages for Siduction?

So far I have been using export LIBGL_ALWAYS_SOFTWARE=1 in /etc/profile

This helps, but of course the performance is really bad.

Code: [Select]
Linux jake 6.6.9-1-siduction-amd64 #1 SMP PREEMPT_DYNAMIC siduction 6.6-9 (2024-01-01) x86_64 GNU/Linux

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Juniper XT [Radeon HD 6770]

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Mesa (0xffffffff)
    Device: llvmpipe (LLVM 17.0.6, 128 bits) (0xffffffff)
    Version: 23.3.2
    Accelerated: no
    Video memory: 16006MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 4.5
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 31 MB, largest block: 31 MB
    VBO free aux. memory - total: 11772 MB, largest block: 11772 MB
    Texture free memory - total: 31 MB, largest block: 31 MB
    Texture free aux. memory - total: 11772 MB, largest block: 11772 MB
    Renderbuffer free memory - total: 31 MB, largest block: 31 MB
    Renderbuffer free aux. memory - total: 11772 MB, largest block: 11772 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 4293775410 MB
    Total available memory: 4293791416 MB
    Currently available dedicated video memory: 31 MB
OpenGL vendor string: Mesa
OpenGL renderer string: llvmpipe (LLVM 17.0.6, 128 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 23.3.2-1
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.5 (Compatibility Profile) Mesa 23.3.2-1
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.3.2-1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.12.0)
vainfo: Driver version: Mesa Gallium driver 23.3.2-1 for AMD JUNIPER (DRM 2.50.0 / 6.6.9-1-siduction-amd64, LLVM 17.0.6)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High10             : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

Offline TheGarage

  • User
  • Posts: 9
Re: Help! Something Borked my Hardware Aceleration (AMD)
« Reply #6 on: 2024/01/04, 22:16:28 »
Still fighting this issue but more info. It appears that hardware decoding is working as mpv shows

   
Quote
user@hpoffice:~$ mpv --hwdec '/home/user/Videos/161104 #KISS - C mon and love me #KKVI.mp4'
    (+) Video --vid=1 (*) (h264 1280x720 30.000fps)
    (+) Audio --aid=1 (*) (aac 1ch 44100Hz)
    Cannot load libcuda.so.1
    Using hardware decoding (vaapi).
    AO: [pulse] 44100Hz mono 1ch float
    VO: [gpu] 1280x720 vaapi[nv12]

However even though hardware decoding is working the video displayed is just a black screen......with sound.

So I start mpv with the --hwdec & vo=x11 options & I now have video......

   
Quote
user@hpoffice:~$ mpv --hwdec --vo=x11 '/home/user/Videos/161104 #KISS - C mon and love me #KKVI.mp4'
    (+) Video --vid=1 (*) (h264 1280x720 30.000fps)
    (+) Audio --aid=1 (*) (aac 1ch 44100Hz)
    [vo/x11] Warning: this legacy VO has bad performance. Consider fixing your graphics drivers, or not forcing the x11 VO.
    [ffmpeg] AVHWDeviceContext: Cannot load libcuda.so.1
    [ffmpeg] AVHWDeviceContext: Could not dynamically load CUDA
    Using hardware decoding (vaapi-copy).
    AO: [pulse] 44100Hz mono 1ch float
    VO: [x11] 1280x720 nv12

I have video, but terrible performance. mpv reports "[vo/x11] Warning: this legacy VO has bad performance. Consider fixing your graphics drivers, or not forcing the x11 VO." So I've tried every other vo= option....

   
Quote
user@hpoffice:~$ mpv --vo=help
    Available video outputs:
    libmpv render API for libmpv
    gpu Shader-based GPU Renderer
    gpu-next Video output based on libplacebo
    vdpau VDPAU with X11
    wlshm Wayland SHM video output (software scaling)
    xv X11/Xv
    sdl SDL 2.0 Renderer
    dmabuf-wayland Wayland dmabuf video output
    vaapi VA API with X11
    x11 X11 (software scaling)
    null Null video output
    image Write video frames to image files
    tct true-color terminals
    caca libcaca
    drm Direct Rendering Manager (software scaling)
    sixel terminal graphics using sixels
    kitty Kitty terminal graphics protocol

No other option outputs a video display.

MPV by default outputs to vo=gpu without setting any vo= option. VLC does the same when video output option is set to auto, but also shows video when x11 output is chosen.
Both show black or blank video using vo=gpu, but had been working fine. Now the only way I get video is to specify vo=x11 option which seems I have no "hardware accelerated rendering". But glxinfo shows

   
Quote
user@hpoffice:~$ glxinfo
    name of display: :0.0
    display: :0 screen: 0
    direct rendering: Yes

And glxgears loads & displays properly.

Problem seems to be either xserver-xorg-video-radeon package or the radeon driver in the kernel itself maybe? I reverted to an earlier kernel to check but it made no difference.

I'm confused. How can I have "hardware decoded video", but have to use "software rendered video" which is what vo=x11 does, to view a video?

Problem is system wide.

Offline orinoco

  • User
  • Posts: 233
  • Bullshit artist
Re: Help! Something Borked my Hardware Aceleration (AMD)
« Reply #7 on: 2024/01/05, 13:25:57 »
I found this issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059782

After I reset the versions of the following packages to version 23.2.1-1, the accelerated playback of h264 material works for me again. Now I have to wait for repaired packages.

Code: [Select]
libegl-mesa0_23.2.1-1_amd64.deb
libgbm1_23.2.1-1_amd64.deb
libgl1-mesa-dri_23.2.1-1_amd64.deb
libglapi-mesa_23.2.1-1_amd64.deb
libglx-mesa0_23.2.1-1_amd64.deb
mesa-va-drivers_23.2.1-1_amd64.deb
mesa-vdpau-drivers_23.2.1-1_amd64.deb
mesa-vulkan-drivers_23.2.1-1_amd64.deb

Offline scholle1

  • User
  • Posts: 86
Re: Help! Something Borked my Hardware Aceleration (AMD)
« Reply #8 on: 2024/01/05, 16:11:47 »
Ein anderer User schrieb im IRC #siduction-de:
"Nachher kommt der Mesa-fix. Wer jetzt schon will muss incoming freischalten."

Another user wrote in IRC #siduction-de:
"The Mesa fix will come later. If you want it now, you have to unlock incoming."
Je mehr Bürgerinnen und Bürger mit Zivilcourage ein Land hat, desto weniger Helden wird es einmal brauchen.
(Franka Magnani)

Offline eriefisher

  • User
  • Posts: 266
Re: Help! Something Borked my Hardware Aceleration (AMD)
« Reply #9 on: 2024/01/05, 16:29:48 »
These packages just came through with an nala upgrade. Have not tested yet.

Offline TheGarage

  • User
  • Posts: 9
Re: Help! Something Borked my Hardware Aceleration (AMD)
« Reply #10 on: 2024/01/05, 19:11:23 »
Not wanting to downgrade I checked incoming & nothing is there yet. I'll probably just wait for v24 to hit incoming. The v23.3.2-2 updates didn't fix the issue. Found this on the Arch BB.

Quote
I have this issue as well with my laptop with a AMD 6250 GPU.  Downgrading to mesa 1:23.2.1-2 and libva-mesa-driver 1:23.2.1-2 fixes the problem so the bug seems to be with version 1:23.3.  Mesa-git version 24 devel from AUR also fixes the issue.  So the problem is isolated to mesa 23.3.  The latest package 1:23.3.2-1 still has the problem.

Looks like a fix is on the way from upstream,

Offline eriefisher

  • User
  • Posts: 266
Re: Help! Something Borked my Hardware Aceleration (AMD)
« Reply #11 on: 2024/01/05, 19:19:12 »
The only player I'm having trouble with is Vlc. I must explicitly choose "X11 video output(XCB)" . Setting to automatic or vdpau fail to show video but it's playing. Parole, Celluloid and MPV seem to work fine.

Offline TheGarage

  • User
  • Posts: 9
Re: Help! Something Borked my Hardware Aceleration (AMD)
« Reply #12 on: 2024/01/06, 17:11:04 »
The only player I'm having trouble with is Vlc. I must explicitly choose "X11 video output(XCB)" . Setting to automatic or vdpau fail to show video but it's playing. Parole, Celluloid and MPV seem to work fine.

MPV doesn't enable hardware accel by default, so it will work. Start like this
Code: [Select]
mpv --hwdec and you'll probably have black box. Then try
Code: [Select]
mpv --hwdec --vo=x11 and you should have video, hardware decode should be working, but x11 rendering is very poor. MPV displays valuable info in the terminal to help one figure out what's going on.

Offline orinoco

  • User
  • Posts: 233
  • Bullshit artist
Re: Help! Something Borked my Hardware Aceleration (AMD)
« Reply #13 on: 2024/01/19, 17:06:49 »
Meanwhile we have Mesa 23.3.3-3 and I still see no progress. Accelerated video playback is still broken on my system. How about you?

Offline TheGarage

  • User
  • Posts: 9
Re: Help! Something Borked my Hardware Aceleration (AMD)
« Reply #14 on: 2024/01/19, 18:13:44 »
HW accel still broke here too! Seems it won't be fixed until Mesa v24 comes out.