netbrain / zwift

Easily zwift on linux
The Unlicense
230 stars 27 forks source link

feat: use gamemode for screensaver inhibit #149

Closed perrin4869 closed 3 weeks ago

perrin4869 commented 3 weeks ago

This is an alternative to https://github.com/netbrain/zwift/pull/148 The main concern is that this may not work for someone running mate or cinnamon, but can't tell for sure without trying it out or digging into their source code...

sHedC commented 3 weeks ago

I will run tests to day on a few of my VM's. Learning how to checkout and test PR's :)

sHedC commented 3 weeks ago

have an issue with Wayland but not sure what it is yet so testing.

perrin4869 commented 3 weeks ago

Wow that's interesting! Thanks for testing 😀 I'll update the PR tomorrow Btw, do you know which program from xdg-utils is needed by experimental Wayland? Wonder why it isn't a dependency of the package

sHedC commented 3 weeks ago

Um no i will see if I can find out. It just complains that the wrong version of opengl so will check the wine forum

On Fri, 5 Jul 2024, 16:22 Julian Grinblat, @.***> wrote:

Wow that's interesting! Thanks for testing 😀 I'll update the PR tomorrow Btw, do you know which program from xdg-utils is needed by experimental Wayland? Wonder why it isn't a dependency of the package

— Reply to this email directly, view it on GitHub https://github.com/netbrain/zwift/pull/149#issuecomment-2211060595, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQU62KAF3SY2HAHJ7PZPF5TZK22Z7AVCNFSM6AAAAABKMZO7KWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJRGA3DANJZGU . You are receiving this because your review was requested.Message ID: @.***>

sHedC commented 3 weeks ago

as far as I can tell it uses xdg-open but maybe also xdg-runtime.

sHedC commented 3 weeks ago

its relying on the waylanddrv which in turn relies on xdg

include "xdg-output-unstable-v1-client-protocol.h"

include "xdg-shell-client-protocol.h"

sHedC commented 3 weeks ago

Testing - Adding xdg-utils back in temporarily to test wayland experimental.

Also seems to stop power save mode at least in Fedora 40 Gnome.

sHedC commented 3 weeks ago

Tested what I can seems to work fine, let me know when you have re-added xdg-utils.

perrin4869 commented 3 weeks ago

Ok, added xdg-utils back. I'm wondering if maybe this is a bug in the dependencies on the Ubuntu package side though

sHedC commented 3 weeks ago

Ok, added xdg-utils back. I'm wondering if maybe this is a bug in the dependencies on the Ubuntu package side though

I think that wine wayland is depending on xdg-shell maybe, but then I am not that into wine dev to know, I did find this which is an read: https://bugaevc.gitbooks.io/writing-wayland-clients/content/beyond-the-black-square/xdg-shell.html

sHedC commented 3 weeks ago

@netbrain - I have reviewed and tested this seems to be good for both screen saver/ power management and performance in all my tests.

netbrain commented 3 weeks ago

Looks good! Great work