projectM-visualizer / frontend-sdl2

Standalone application based on SDL2 that turns your desktop audio into awesome visuals. Available on most platforms supported by both libprojectM and libSDL2.
GNU General Public License v3.0
58 stars 32 forks source link

Running project-M using prime-run results in project-M being very laggy on external monitor #11

Closed 9las closed 2 years ago

9las commented 3 years ago

I use optimus-manager on my laptop (running Arch Linux). When I switch to hybrid mode using optimus-manager and I start projectM using the command prime-run (from the package nvidia-prime) it results in that projectM is very laggy when I only output to my external monitor. It is fine when I output to both monitors or if I output to my laptop monitor only. Starting projectM without prime-run is fine in all cases.

If I switch to nvidia mode using optimus-manager then I experience no issues. In this case prime-run is not necessary, but even if I start projectM using prime-run, then I have no issues.

I had the same issues using prime-run without optimus-manager.

I have disabled Vertical Synchronization (VSYNC) for my Intel graphics as described here. Without doing this I experience lag when running projectM even without using prime-run, whenever I output to my external monitor only. Without disabling VSYNC I also experience lag when starting Google Chrome and outputting to my external monitor only. Google Chrome does however not have an issue when VSYNC is disabled and starting it with prime-run like projectM has.

My laptop is an Legion Y540-15IRH Laptop (Lenovo) - Type 81SX (81SX0008MX).

kblaschke commented 2 years ago

If this issue is still relevant, could you please add the console output of the projectMSDL command here? This contains onformation about the OpenGL and shader language version. From the looks of it it seems that when running with nvidia-prime, projectM falls back to Mesa-based software rendering. There also could be some other bottleneck in 3D acceleration on the machine.

Besides fixing the detection of a wrong OpenGL version during context creation, I'm not sure there's much we could do from projectM's side.

kblaschke commented 2 years ago

Closing due to inactivity. If the propblem persists, please reopen or create a new issue. Make sure to add proper information so we can identify and possibly reproduce the issue.