mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.
http://mixxx.org
Other
4.37k stars 1.26k forks source link

Graphics performance loss with rpi5 and Qt6 #12841

Open gui-lux opened 6 months ago

gui-lux commented 6 months ago

Bug Description

Hi everyone,

I built v2.4 yesterday after living on the beta, doing monthly fresh builds.

I’m facing a graphics performance loss now on rpi5/raspbian. Waveforms display became choppy.

Right after building v2.4, I noticed my FPS setting was altered, 60FPS were set by default. My original setting is 25FPS. Not 100 % sure but I think the dropped frames counter in the prefs now shows more dropped frames than before. Setting my original FPS setting didn’t help. I even tried to set 20FPS and waveforms are still choppy.

But still, many thanks for the huge work behind this release !

Version

2.4

OS

raspbian

gui-lux commented 6 months ago

Something else I've just noticed : moving the pitch slider while playing kills the waveforms display smoothness a bit more.

JoergAtGithub commented 6 months ago

Can you specify the exact Beta version, which were not affected?

gui-lux commented 6 months ago

I wiped the last beta build dir so I'm afraid I can't specify the exact version. At least I'm sure everything was working fine by the 10th of January (sorry, this is wayyy back)

daschuer commented 6 months ago

Which waveform do you use?

gui-lux commented 6 months ago

I use both 'Filtered' for main and overview waveforms, zoom level set at 33.3%.

daschuer commented 6 months ago

Do you see the "GLSL ES" variant of filtered? Does it make a difference compared to the CPU rendered?

gui-lux commented 6 months ago

Thx for your reply

I'm not getting the exact "GLSL ES" from the dropdown menu. The closest choices I found were : Filtered (GLSL), Filtered (legacy, GLSL) and Simple (GLSL). I tried them. Filtered (GLSL) : bit better but still choppy (and it's just me but I find the color palette disturbing) Filtered (legacy, GLSL) : does not work for me, produces something blank Simple (GLSL) : choppy as well

Not sure this will help but it's choppy when playing one track and twice as much when playing two tracks.

daschuer commented 6 months ago

What is the content of the OpenGL Box below the waveform settings? Maybe you use the slow software OpenGL emulator, instead of the native GLES that is supported by Mixxx. Maybe it can be adjusted with: https://docs.mesa3d.org/envvars.html

gui-lux commented 6 months ago

OpenGL box : 3.1 Mesa 23.2.1-1~bpo12+rpt3 (V3D 7.1)

https://docs.mesa3d.org/envvars.html

I had a look but not sure what I should do with these.

daschuer commented 6 months ago

That is interesting. V3D should be a GLES driver: https://docs.mesa3d.org/drivers/v3d.html Hoverer you see the full GL waveforms. Something seems to be wrong. I wil prepare a test.

m0dB commented 6 months ago

Hi @gui-lux, the decision to change the framerate to 60 fps was deliberate, because we found that even on oldish hardware, with the new GLSL waveforms, we got 60 fps reliably.

You say you have been running betas until now. Did these perform better? If so, I have a hard time understanding how that can be, the OpenGL related code has been pretty much unchanged for quite some time.

As @daschuer says, the new GLSL waveforms should work with GL and GL ES, and IIUC, the Raspberry Pi should support OpenGL ES. I will ask around to see if I can borrow one.

gui-lux commented 6 months ago

Hi m0dB,

yes, I stepped into the beta in the first days of July 2023 (rpi4 at that time, got an rpi5 like 6 weeks ago), rebuilding like monthly. Graphics and everything were fine until the release.

we got 60 fps reliably.

might be another story on rpi. On the first launch after building the release (default 60fps), when toggling the filter knob dropdown menu, the whole app went flashing then I realized the default fps had changed. This behavior disappeared when setting 25 fps.

I have a hard time understanding

Same for me. When I built the release, I thought everything was fine in terms of deps, I was wrong, I had to run the 'debian_buildenv.sh' which has installed qmake6-bin, qt6-base-dev-tools, qt6-qpa-plugins, qtkeychain-qt6-dev, qt6-qmltooling-plugins, qt6-base-dev, qt6-svg-dev, qt6-5compat-dev, qt6-declarative-dev-tools and qt6-declarative-dev and related libs. Not sure this helps but it sounds to me like a noticeable event.

m0dB commented 6 months ago

So you are building main? Can you try building 2.4 ?

gui-lux commented 6 months ago

Haha, my bad ! I feel dumb sometimes. Just let me uninstall as proper as I can and reinstall.

gui-lux commented 6 months ago

@daschuer , @m0dB , @JoergAtGithub , sorry for the noise. Fortunately, I'm better at playing with mixxx than developer : )

It's all running fine, even at 60 fps, which is very new for me. Mixxx is an awesome software, thx again for your support !

m0dB commented 6 months ago

Good to hear that! Still, it is not expected that main performs worse than 2.4, so this is something to investigate. @daschuer any idea what could cause this? I'd be surprised if Qt6 causes this but who knows...

daschuer commented 6 months ago

No idea yet. @gui-lux Do you now see the "ES" waveforms? Has the string in the OpenGl box changed?

@m0dB maybe Qt6 uses silently a software emulator?

gui-lux commented 6 months ago

@daschuer @m0dB

OpenGL box content is still the very same : 3.1 Mesa 23.2.1-1~bpo12+rpt3 (V3D 7.1)

About waveform types, I'll just list what I have available : Filtered Filtered (GLSL) Filtered (legacy, GL) Filtered (legacy, GLSL) HSV HSV (GLSL) RGB RGB (GLSL) RGB (legacy, GL) RGB (legacy, GLSL) RGB L/R (GLSL) RGB Stacked (legacy, GLSL) Simple (GLSL) Simple (legacy, GL)

daschuer commented 6 months ago

MMM, that does not reveal the issue. We need to keep an eye in it for the 2.5 release which is planned to use Qt6 by default. So I will reopen this bug as a reminder.