All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 215839] New: distorted video playback with hybrid GPU (DRI_PRIME=1, Radeon HD 6470M and Intel-GPU)
@ 2022-04-15 16:20 bugzilla-daemon
  2022-04-15 16:30 ` [Bug 215839] " bugzilla-daemon
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: bugzilla-daemon @ 2022-04-15 16:20 UTC (permalink / raw)
  To: dri-devel

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@kernel-bugs.osdl.org
          Reporter: kolAflash@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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 215839] distorted video playback with hybrid GPU (DRI_PRIME=1, Radeon HD 6470M and Intel-GPU)
  2022-04-15 16:20 [Bug 215839] New: distorted video playback with hybrid GPU (DRI_PRIME=1, Radeon HD 6470M and Intel-GPU) bugzilla-daemon
@ 2022-04-15 16:30 ` bugzilla-daemon
  2022-04-15 17:02 ` bugzilla-daemon
  2022-04-16  9:39 ` bugzilla-daemon
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2022-04-15 16:30 UTC (permalink / raw)
  To: dri-devel

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

Alex Deucher (alexdeucher@gmail.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alexdeucher@gmail.com

--- Comment #1 from Alex Deucher (alexdeucher@gmail.com) ---
This is a mesa bug.  I'd suggest filing a bug here:
https://gitlab.freedesktop.org/groups/mesa/-/issues
There is either a memory alignment bug in the r600 mesa driver or the intel
mesa driver is not allocating memory with the proper alignment requirements for
the radeon hardware so when the radeon driver tries to use the buffer the
commands get rejected causing the image distortions.

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 215839] distorted video playback with hybrid GPU (DRI_PRIME=1, Radeon HD 6470M and Intel-GPU)
  2022-04-15 16:20 [Bug 215839] New: distorted video playback with hybrid GPU (DRI_PRIME=1, Radeon HD 6470M and Intel-GPU) bugzilla-daemon
  2022-04-15 16:30 ` [Bug 215839] " bugzilla-daemon
@ 2022-04-15 17:02 ` bugzilla-daemon
  2022-04-16  9:39 ` bugzilla-daemon
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2022-04-15 17:02 UTC (permalink / raw)
  To: dri-devel

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

--- Comment #2 from kolAflash (kolAflash@kolahilft.de) ---
Thanks for your assessment Alex!

Here is the Mesa bug:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/6326
I can only set the status of this kernel.org bug to "resolved". But I guess it
should be "invalid" or something else!?

I also found a workaround for Kodi:
Settings -> Player
Set UI mode to >= Advanced
Under "Videos" disable
  "Allow hardware acceleration - VAAPI"
Then Kodi will work fine with DRI_PRIME=1
Interestingly even without DRI_PRIME=1 full HD videos now play smooth too.
(maybe Kodi should leave VAAPI disabled by default...)

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 215839] distorted video playback with hybrid GPU (DRI_PRIME=1, Radeon HD 6470M and Intel-GPU)
  2022-04-15 16:20 [Bug 215839] New: distorted video playback with hybrid GPU (DRI_PRIME=1, Radeon HD 6470M and Intel-GPU) bugzilla-daemon
  2022-04-15 16:30 ` [Bug 215839] " bugzilla-daemon
  2022-04-15 17:02 ` bugzilla-daemon
@ 2022-04-16  9:39 ` bugzilla-daemon
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2022-04-16  9:39 UTC (permalink / raw)
  To: dri-devel

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

Artem S. Tashkinov (aros@gmx.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |ANSWERED

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-16  9:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-15 16:20 [Bug 215839] New: distorted video playback with hybrid GPU (DRI_PRIME=1, Radeon HD 6470M and Intel-GPU) bugzilla-daemon
2022-04-15 16:30 ` [Bug 215839] " bugzilla-daemon
2022-04-15 17:02 ` bugzilla-daemon
2022-04-16  9:39 ` bugzilla-daemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.