Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interacting with KDE desktop elements or changing wallpaper settings on high refresh rate monitors causes shader to speed up. #43

Open
Fighterbuilder opened this issue Apr 4, 2024 · 7 comments
Labels
bug Something isn't working Plasma6

Comments

@Fighterbuilder
Copy link

When using this wallpaper on a monitor with a refresh rate above 60 Hz, interacting with desktop components of KDE Plasma 5 (not including applications like Dolphin) causes the shader to speed up very briefly, and it's very distracting.
https://github.com/y4my4my4m/kde-shader-wallpaper/assets/33814663/a34f79b9-2235-44fe-b5bf-1e5e37e5e7c9
In this case, I'm currently using a monitor with a refresh rate of 240 Hz but the problem is still visible in a 60 FPS recording.

A similar issue occurs when opening the wallpaper settings to adjust the shader, this time speeding up consistently for the entire time the menu is open.
https://github.com/y4my4my4m/kde-shader-wallpaper/assets/33814663/6f8d570a-74e1-45c9-8400-90b1099e8a0c

Changing the refresh rate to 60 Hz does resolve this problem, but I would rather not have to do that.

@y4my4my4m
Copy link
Owner

Oh wow that's super strange.

Thanks for sharing. I have a 120hz monitor, however so far I've only been working from a VM so I hadn't noticed this.

I'll see what I can do

@luisbocanegra
Copy link

luisbocanegra commented Apr 8, 2024

What if you try changing 16 to 4 here:

And 0.016 to 0.004 here:

shader.iTime += 0.016 * (wallpaper.configuration.shaderSpeed ? wallpaper.configuration.shaderSpeed : 1.0);

Does this make sense? I know nothing about shaders

Edit: Actually it should be 4 and not 8 (1/240)

@y4my4my4m
Copy link
Owner

What if you try changing 16 to 4 here:

Good thinking.
@Fighterbuilder if this works, I'll implement a way to detect the frequency of the monitor and divide accordingly.

Could you please test it?

@y4my4my4m y4my4my4m added bug Something isn't working Plasma6 labels Apr 9, 2024
@Fighterbuilder
Copy link
Author

I'm sorry, I don't really know how to find those files on my install. I'm still very much a Linux noob lol

If you could help point me in the right direction, I'd greatly appreciate it!

@luisbocanegra
Copy link

It's in ~/.local/share/plasma/wallpapers/online.knowmad.shaderwallpaper/contents/ui/main.qml the lines you have to modify are by the end of the file inside the Timer {} block.

@y4my4my4m
Copy link
Owner

y4my4my4m commented Apr 10, 2024

@Fighterbuilder

In a folder of your choice:

  1. clone the project with git: git clone https://github.com/y4my4my4m/kde-shader-wallpaper.git
  2. go in the folder:cd kde-shader-wallpaper
  3. switch to the plasma6 branch: git checkout plasma6 && git pull
  4. modify the lines he's mentioned in the comment above
  5. delete the old installation of the plugin: rm -rf ~/.local/share/plasma/wallpapers/online.knowmad.shaderwallpaper/
  6. still from within kde-shader-wallpaper, install the modified one from source: kpackagetool6 -t Plasma/Wallpaper -i package
  7. restart plasmashell pkill plasmashell && plasmashell
  8. reselect "shaders" plugin from your desktop > configure desktop and wallpaper
  9. verify

@Fighterbuilder
Copy link
Author

Fighterbuilder commented Apr 14, 2024

Alright, I'm finally getting around to this, sorry for the wait there.
Anyway, I'm on Plasma 5.27.8 - do you still want me to use the Plasma 6 branch @y4my4my4m?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Plasma6
Projects
None yet
Development

No branches or pull requests

3 participants