ubuntu-flutter-community / musicpod

Music, radio, television and podcast player for Ubuntu, Windows, MacOs and Android
GNU General Public License v3.0
352 stars 41 forks source link

Weird visual artifacts when window is maximized #747

Open rene-coty opened 1 month ago

rene-coty commented 1 month ago

I use Musicpod as a flatpak (version 1.4.1) on Fedora 40 / GNOME 46. When I maximize the window and a song / radio is playing, the bottom of the app (the player) will display several glitches like duplicated and greyed out buttons, a buggy gradient,…

I couldn't record it, because my screen recorder doesn't seem to capture these artifacts -it will only display a black zone instead (which at least indicates there's something wrong ^^')

Capture vidéo du 2024-05-17 18-59-58.webm

rene-coty commented 1 month ago

A more descriptive video I managed to take with a phone https://github.com/ubuntu-flutter-community/musicpod/assets/95506494/4261027d-b79d-42aa-85aa-d5c33b5933f5

Feichtmeier commented 1 month ago

Oh :( is this the flatpak? ( I need to learn to read) thanks for the report the flatpak is brand new and has some issues, the snap works without any issues (I know I know ;))

https://github.com/ubuntu-flutter-community/musicpod/assets/15329494/aa1b75ab-8f9f-4834-becd-fe7e0177d7a3

https://github.com/ubuntu-flutter-community/musicpod/assets/15329494/761c531a-76a4-4c6a-a433-07de19fb2032

https://github.com/ubuntu-flutter-community/musicpod/assets/15329494/6966e087-ae06-4a98-a1d2-dc3c85bb5b9e

CC @TheShadowOfHassen

TheShadowOfHassen commented 1 month ago

Id bet my boots this is the same as the other issue. I have a job I have to do but im working on figuring this out.

Feichtmeier commented 1 month ago

Btw thanks for using MusicPod @rene-coty Awesome to have Fedora users now

rene-coty commented 1 month ago

Thanks for your quick replies! This bug only occurs when using the 'maximize' button in the top-right corner, not when resizing with the mouse. When the app is in a maximized state, the player at the bottom turns into some semi-transparent widget and magical things might happen (multiple mouse pointers sometimes…)

Another video :

https://github.com/ubuntu-flutter-community/musicpod/assets/95506494/391cd040-3dbd-4934-81e5-e35c5d4769da

Feichtmeier commented 1 month ago

yeah its a missing graphic bit! @TheShadowOfHassen will work on it when he has time some parts seem to be missing that are in the snap but not the flatpak (mesa... drivers... etc)

TheShadowOfHassen commented 1 month ago

@rene-coty , can you show me the output of flatpak run org.feichtmeier.Musicpod?

rene-coty commented 1 month ago

It displays the following lines:

OnLoad package:media_kit_libs_linux registered. media_kit: VideoOutput: video_output_new: 5136412915792 Cannot load libcuda.so.1 media_kit: VideoOutput: Using H/W rendering. flutter: VideoOutput.Resize flutter: {handle: 5136412915792, id: 5136229717392, rect: {left: 0, top: 0, width: 1, height: 1}} flutter: NativeVideoController: Texture ID: 5136229717392

TheShadowOfHassen commented 1 month ago

That's what I got from a fedora install, and a Manjaro install, but not from Ubuntu which I test it on.

I'm going to ask around. I'll let you know what I find out!

TheShadowOfHassen commented 1 month ago

@rene-coty could you tell me what version of flatpak you're running (flatpak --version)

rene-coty commented 1 month ago

1.15.8

TheShadowOfHassen commented 1 month ago

I'm working on diagnosing the problem, but I've run into some problems. I will try to fix this, but it may take a while. Thank you for your patience !

TheShadowOfHassen commented 1 month ago

@rene-coty what graphic drivers are you running, and do you have x11 or wayland?

rene-coty commented 1 month ago

I just found and copy-pasted these information from GNOME Control Center:

Rapport d’informations du système


Détails du compte rendu

Informations liées au matériel :

Informations liées au logiciel :

And here is the output of lspci -n -n -k | grep -A 2 -e VGA -e 3D (which should print video drivers in use):

05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series] [1002:15d8] (rev cd)
    Subsystem: Acer Incorporated [ALI] Device [1025:1456]
    Kernel driver in use: amdgpu
--
05:00.7 Non-VGA unclassified device [0000]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/Renoir Non-Sensor Fusion Hub KMDF driver [1022:15e6]
    Subsystem: Acer Incorporated [ALI] Device [1025:1456]
    Kernel driver in use: i2c_amd_mp2
TheShadowOfHassen commented 1 month ago

I've discovered that this issue affects not only Fedora but the latest Debian testing and Manjaro.

Furthermore if I build Musicpod from source using this patched version: Branch (https://github.com/ubuntu-flutter-community/musicpod/tree/mk_test) PR: https://github.com/ubuntu-flutter-community/musicpod/pull/761) I get the same issue.

NOTE: you have to use that patched version because you need the git version of mediakitvideo to work on newer systems. NOTE2: I only tested the source build on Debian, but I'm getting the same problem, so I assume it'll require the same solution. (Hopefully)

Therefore, I can conclude that this probably isn't a Flatpak problem, but is something else between Flutter and the system.

@Feichtmeier has informed me of plans to port Musicpod to the next version of Flutter that just released a few days ago. It'll take some time to get to Musicpod because he needs to port the Yaru toolkit first. It's possible that this flutter update could fix the problem, so I'm going to wait until then and see.

If that doesn't fix it my best guess is its either a problem with libhandy (I think the bottom thing is a libhandy widget?) or flutter. Currently, I lean towards a flutter issue, but we'll see then.

@rene-coty, I'm sorry, but this issue is going to take a while to fix, I have to wait for the new flutter port. If you need a musicplayer until then I suggest Rhytmnbox, It doesn't look nearly as good as musicpod, but it has a lot of the same features.