mixxxdj / mixxx

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

waveform scrolling #11617

Closed robi970 closed 1 year ago

robi970 commented 1 year ago

Bug Description

I installed Mixxx 2.4 beta and started it. I quickly realized that the waveforms, spinnys and elapsed time display are displayed as if "4-5 frames per second" is set.

on the same PC I keep Mixxx 2.2.4 installed, which obviously still works perfectly

Version

2.4 beta

OS

Win10 pro 64bit - AMD ryzen 5 3600; 16GB ram; AMD radeon R9 200 series

JoergAtGithub commented 1 year ago
robi970 commented 1 year ago

sorry, but i can't figure out how to insert an image in this editor...

Anyway: wavwforms section settings

while playing, the preferences say: "average frame rate 6.67" music stopped: "average frame rate 12"

CPU usage - 4% RAM - 22% GPUs - 2% max

I uninstalled Mixxx 2.3.5 to install Mixxx 2.4. It worked fine. I always keep the 2.2.4 build installed because with it I manage timecode vinyls better than the 2.3 versions

PS: I've now discovered how to attach a photo :P

preferenze

JoergAtGithub commented 1 year ago

Could you please try all waveform types available in the top selector. Does any waveform type shows different frame rates?

robi970 commented 1 year ago

with all waveforms the value is always around 6.67, except with HSV (FPS: 7.50)

same thing also changing the values ​​of the second selector

(OT question: in this editor is it possible to write in your own language, or do I have to continue with google translate?)

JoergAtGithub commented 1 year ago

Please write in English!

JoergAtGithub commented 1 year ago

@m0dB Could you have a look

JoergAtGithub commented 1 year ago

Does it help if you start with .\mixxx.exe --disableVuMeterGL

robi970 commented 1 year ago

switched to 15 fps (both during play and stop)

m0dB commented 1 year ago

I have no idea, this is very strange and the first time something like this has been reported.

To be sure: 2.3.5 runs as 60 fps?

I will create a build with some logging, but it might take a while, sorry.

m0dB commented 1 year ago

Are you having no fps issues with other applications (games)?

Question for @daschuer : are we configuring Qt on windows with configure -opengl dynamic ?

JoergAtGithub commented 1 year ago

It's dynamic and ANGLE is used when the OPENGL driver is missing or blacklisted by Qt. If ANGLE is used, you see it clearly in the driver information in the waveform preferences.

m0dB commented 1 year ago

Thanks, @JoergAtGithub ! So I understand that in this case ANGLE isn't used because a proper OpenGL driver is detected. It might be interesting to see if forcing ANGLE makes a difference, right? Have you ever tried that yourself?

@robi970 can you try running with environment variable QT_OPENGL=angle? Go to the folder where you have your mixxx.exe in the File Explorer, open a command prompt by typing cmd in the address bar, and in the command prompt type:

set QT_OPENGL=angle mixxx.exe

(Note that I am clutching at straws here, not being a windows user myself)

robi970 commented 1 year ago

sorry for the delay...

Swiftb0y commented 1 year ago

Also grasping at straws here, but you mentioned this:

I installed Mixxx 2.4 beta and started it. I quickly realized that the waveforms, spinnys and elapsed time display are displayed as if "4-5 frames per second" is set.

I'm pretty sure the elapsed time display is not hardware accelerated so that leads me to believe missing hardware acceleration might not be the problem. Whats your audio buffer size set to?

If I force some weird audio circumstances (mind this is on linux with pipewire, so not quite the same), I can force some low-fps behavior that is not because the waveform rendering is too slow (see the low amount of dropped frames compared to the actual fps) but I think because the update of the playposition depends on the buffer size. Here's a screen recording showing the issue in action: screencast.webm

robi970 commented 1 year ago

Here you are:

"direct rendering" is not enabled on your machine

this means that displaying waveforms will be very slow and can take a toll on your CPU. Update your configuration to enable Direct Rendering, or disable waveform display in Mixxx Preferences by selecting "blank" as waveform display in the "interface" section when starting Mixxx

how do i update the configuration?

m0dB commented 1 year ago

Oh, this direct rendering warning is very relevant. Now, how to fix this, I have no idea.

robi970 commented 1 year ago

since in this editor it is possible to insert videos:

https://github.com/mixxxdj/mixxx/assets/135370043/63cdf889-77a1-46bf-b66a-e89f41630920

m0dB commented 1 year ago

Any windows / AMD radeon users who can comment on this? Any idea how to enable Direct Rendering?

atskler commented 1 year ago

I can reproduce the problem on a really old HP Compaq 8510P notebook, with Windows 8.1 and with ATI Mobility Radeon HD 2600.

m0dB commented 1 year ago

@robi970 can you please try again with a recent 2.4 beta? There was a problem with OpenGL version detection which was was fixed https://github.com/mixxxdj/mixxx/pull/11673 . This fix solved the warning about Direct Rendering for specific Linux drivers, so maybe it also solves it for you on Windows.

atskler commented 1 year ago

@m0dB for me the problem is still there with: 2.4-beta-28-g7dcadb17ab (HEAD) https://github.com/mixxxdj/mixxx/actions/runs/5348576035

JoergAtGithub commented 1 year ago

Could you try to set the Windows environment variable QT_NO_OPENGL_BUGLIST (value doesnt matter) before starting Mixxx. For details see: https://doc.qt.io/qt-5/windows-requirements.html#dynamically-loading-graphics-drivers

atskler commented 1 year ago

@JoergAtGithub the problem is the same with: set QT_NO_OPENGL_BUGLIST=1 mixxx.exe

JoergAtGithub commented 1 year ago

Do you have libEGL.dll and libGLESv2.dll in your Mixxx program directory? Could you try to replace these two file with the version from Mixxx 2.3.5? There might be also d3dcompiler_47.dll, but I guess this is not needed by Mixxx.

atskler commented 1 year ago

That two dll is there. The problem is still there with that two dll copied from 2.3.5.

JoergAtGithub commented 1 year ago

Thanks for testing! Seems to be a dead end. Maybe you can play with the other environment variables described in: https://doc.qt.io/qt-5/windows-requirements.html#dynamically-loading-graphics-drivers

atskler commented 1 year ago

Mixxx also can be started without that two dll and with the 2.4 beta the problem is still there, and 2.3.5 works correctly.

JoergAtGithub commented 1 year ago

These two DLLs are the libraries for the ANGLE emulation of OPENGL. It is used by Qt in case, that the official graphic adapter driver is blacklisted or does not support OPENGL at all. ANGLE is a fast emulation using DirectX. If Qt could neither find a native OpenGL driver, nor ANGLE, it falls back to Sowtware emulation using the CPU instead of the GPU. It's obvious that your system falls back to this slow software emulation - but I don't know why.

JoergAtGithub commented 1 year ago

Could you post a screenshot of the waveform preferences of the working 2.3.5. I would like to see, which graphic system is running there.

atskler commented 1 year ago

DSC_4566__24beta DSC_4565__235

JoergAtGithub commented 1 year ago

In #11673 there was an additional log output for the Supported OpenGL version added, can you search for two lines like this:

debug [Main] OpenGL driver version string "4.6.0 Compatibility Profile Context 22.20.28.15.230324", vendor "ATI Technologies Inc.", renderer "AMD Radeon(TM) Graphics"
debug [Main] Supported OpenGL version: 4.6
atskler commented 1 year ago
Debug [Main] OpenGL driver version string "3.3.11672 Compatibility Profile Context", vendor "ATI Technologies Inc.", renderer "ATI Mobility Radeon HD 2600"
Debug [Main] Supported OpenGL version: 3.3
JoergAtGithub commented 1 year ago

The OpenGL detection code seems to work correct. Is it possible, that we just raised the minimum required OpenGL version higher than 3.3?

atskler commented 1 year ago

Is it possible, that we just raised the minimum required OpenGL version higher than 3.3?

robi970 has the problem with: OpenGL 4.6.13559 Compatibility Profile Context 26.20.12028.2 (AMD Radeon R9 200 Series)

robi970 commented 1 year ago

@robi970 can you please try again with a recent 2.4 beta? There was a problem with OpenGL version detection which was was fixed #11673 . This fix solved the warning about Direct Rendering for specific Linux drivers, so maybe it also solves it for you on Windows.

I reinstalled Mixxx 2.4 beta, just downloaded from the site... (I hope that is the correct version). alas no, nothing has changed:

Mixxx 2 4b

atskler commented 1 year ago

@JoergAtGithub is there a 2.4 beta build for Windows with QOPENGL=OFF?

JoergAtGithub commented 1 year ago

@atskler Can you confirm, that you also get warning dialog at startup shown here: https://github.com/mixxxdj/mixxx/issues/11617#issuecomment-1586179762

JoergAtGithub commented 1 year ago

Since you both use AMD GPUs, here are my driver settings. I have 60fps with these settings: grafik grafik grafik

JoergAtGithub commented 1 year ago

I noticed in your screenshots of the waveform preferences, that there is always an exact integer factor between target framerate and the real framerate: 60/6.67= 9 60/12.00=5

Could you try to adjust the target frame rate to other values. Does the integer factor remain?

Swiftb0y commented 1 year ago

@robi970 can you check out the newest beta version and look for the line starting with "debug [Main] Supported OpenGL version: " in the debug log? What version does it print exactly?

I'm a little confused because the "Direct Rendering" Warning should only occur if the version is not sufficient. Since the version string does say 4.6 but its not detected correctly, there might be something wrong with the detection logic. https://github.com/mixxxdj/mixxx/blob/a5ae80ac68005dc34f9dcc8030d80035b8053238/src/mixxxmainwindow.cpp#L1189-L1194

atskler commented 1 year ago

@atskler Can you confirm, that you also get warning dialog at startup shown here: #11617 (comment)

Yes, if I start it with: set QT_OPENGL=angle mixxx.exe

And Mixxx will not even start, just crashes. mixxx.exe has stopped working and once more: mixxx.exe has stopped working

atskler commented 1 year ago

My AMD Catalyst settings: catalyst

JoergAtGithub commented 1 year ago

Can you vary: Wait for vertical refresh

atskler commented 1 year ago

I noticed in your screenshots of the waveform preferences, that there is always an exact integer factor between target framerate and the real framerate: 60/6.67= 9 60/12.00=5

Could you try to adjust the target frame rate to other values. Does the integer factor remain?

It will differ a bit if the frame rate is odd number. For example 37 will give fluctuating frame rate: 11.43, 11.62.

atskler commented 1 year ago

"Direct Rendering" Warning

@Swiftb0y That warning happens with: set QT_OPENGL=angle

atskler commented 1 year ago

Can you vary: Wait for vertical refresh

@JoergAtGithub

From left to right there are the following options for:

Wait for vertical refresh:

Performance

1) Always off 2) Off, unless application specifies 3) On, unless application specifies 4) Always on

Quality

With option 1) the fps problem goes away.

atskler commented 1 year ago

The warning and the crash with: set QT_OPENGL=angle remains.

JoergAtGithub commented 1 year ago

With option 1) the fps problem goes away.

Important finding!

Than the ANGLE issue is an independend issue.

robi970 commented 1 year ago

@Swiftb0y the Mixxx version reinstalled yesterday is as follows:

Image 001

JoergAtGithub commented 1 year ago

@robi970 Do you have the "Wait for vertical refresh" setting in your AMD driver too? Could you try if it solves the issue for you too?