[Bug 215839] New: distorted video playback with hybrid GPU (DRI_PRIME=1, Radeon HD 6470M and Intel-GPU)

bugzilla-daemon at kernel.org bugzilla-daemon at kernel.org
Fri Apr 15 16:20:39 UTC 2022


https://bugzilla.kernel.org/show_bug.cgi?id=215839

            Bug ID: 215839
           Summary: distorted video playback with hybrid GPU (DRI_PRIME=1,
                    Radeon HD 6470M and Intel-GPU)
           Product: Drivers
           Version: 2.5
    Kernel Version: 5.15.28
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Video(DRI - non Intel)
          Assignee: drivers_video-dri at kernel-bugs.osdl.org
          Reporter: kolAflash at kolahilft.de
        Regression: No

At least Kodi and VLC show garbage when being run with DRI_PRIME=1

I guess this is either a bug in the "radeon" kernel module or in Mesa3D /
Gallium.



Hardware:
HP Notebook
Product: LR294EA#ABD
Model: Pavilion g6-1024sg
CPU + integrated graphics: Intel® Core™ i5 ("i915" driver)
Dedicated GPU: Radeon HD 6470M ("radeon" driver)
https://icecat.biz/de-at/p/hp/lr294ea/pavilion-notebooks-0886111633067-g6-1024sg-8025113.html

OS:
Tested Debian-11 (Linux-5.10.106)
manjaro-xfce-21.2.5-minimal-220314-linux515.iso (Linux-5.15.28)
(both running X)

$ cat /sys/kernel/debug/vgaswitcheroo/switch
0:DIS: :DynOff:0000:01:00.0
1:IGD:+:Pwr:0000:00:02.0

Console output (both VLC and Kodi):
radeon: The kernel rejected CS, see dmesg for more information (-22).

dmesg:
[ 2210.372308] radeon 0000:01:00.0: evergreen_surface_check_linear_aligned:214
texture pitch 1920 invalid must be aligned with 256
[ 2210.372320] radeon 0000:01:00.0: evergreen_cs_track_validate_texture:829
texture invalid 0x1dfc3bc1 0x10000437 0x0b200000 0x00000000 0x00000000
0x80020001
[ 2210.372327] [drm:radeon_cs_ioctl [radeon]] *ERROR* Invalid command stream !



I connected an external full HD (1920x1080) monitor and disabled the notebooks
internal monitor via xrandr.
(especially in Kodi you may not be able to reproduce slow rendering without an
1920x1080 monitor)
(I want to use the notebook as media computer for my TV)

When running Kodi-19.4 or VLC-3.0.17.3 without specific settings, full HD
(1920x1080 H264) videos don't render smoothly.
On Debian-11 additionally Firefox-ESR-91.8 also becomes slow (all CPU cores
under heavy load) when playing full HD videos with JavaScript controls.
Try these:
https://www.ardmediathek.de/video/seehund-puma-und-co/fuenf-mann-ueber-bord-215/das-erste/Y3JpZDovL2Rhc2Vyc3RlLmRlL3NlZWh1bmQsIHB1bWEgJmFtcDsgY28uLzI1MDdkNTZlLWI0ZjYtNDAxNS1iYTI1LTE1N2FjOWNjZTE3NA
https://pdvideosdaserste-a.akamaihd.net/int/2021/06/10/6528b8d0-72d0-45b4-9e7c-29dce5bb796a/1920-1_917111.mp4
(caution: baby seals shown compete hard with baby kittens ;-))
In Kodi install the "ARDundZDF" add-on from repo.kodinerds.net and open:
ARDundZDF -> TV-Livestreams -> Überregional (second option) -> Das Erste ->
1920x1080



To solve this for Firefox I simply added "export DRI_PRIME=1" to ~/.profile
Now Firefox-ESR-91.8 on Debian-11 works fine!
But the issue wasn't fixed for Kodi and VLC. Instead they now show complete
garbage :-(

For VLC I was able to nail down the problem:
When running VLC without specific settings, video output "OpenGL" and decoding
via "VA-API" (without DRM) are being chosen.
So when running VLC with these settings and with DRI_PRIME=1 the output is
distorted.

So for VLC the workaround is pretty easy:
Choose any other video decoder (VDPAU, "VA-API video decoder via DRM" or simply
"Disable").
In this case the video will playback fine and smooth with and without setting
DRI_PRIME=1.
Some other video output methods like "XVideo output (XCB)" also solve the
problem while keeping VA-API as video decoder. Actually I also reported a bug
to VLC about the questionable default settings:
https://code.videolan.org/videolan/vlc/-/issues/26831

Until now I found no solution for Kodi!



= Notes =

ffplay renders smoothly without further settings. (with and without
DRI_PRIME=1)

Maybe related:
https://bugzilla.kernel.org/show_bug.cgi?id=89331

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.


More information about the dri-devel mailing list