Sleep Inhibitor #3034

Open
opened 2026-02-20 22:16:58 -05:00 by deekerman · 6 comments
Owner

Originally created by @Ourouk on GitHub (Aug 14, 2025).

Context

I'm currently switching people from Discord/Jitsi Meet/MS Teams to mumble for obvious reasons. (it's better at being just an audio call client)

And simple features that seem to annoy them during long calls without interactions with the computer, is that the sleep of the computer isn't inhibited.

Description

The features inhibit computer sleep during calls and a toggle, because it's not for everyone, of course. This add-on would be cool.

Mumble component

Client

OS-specific?

No

Additional information

I did check quickly on the web how to implement that, but I don't have much spare time for it right now. Unfortunately, it seems to be OS specific, because qt doesn't provide any uniform system call for that feature.
Still, the feature could be useful on all platform.

Originally created by @Ourouk on GitHub (Aug 14, 2025). ### Context I'm currently switching people from Discord/Jitsi Meet/MS Teams to mumble for obvious reasons. (it's better at being just an audio call client) And simple features that seem to annoy them during long calls without interactions with the computer, is that the sleep of the computer isn't inhibited. ### Description The features inhibit computer sleep during calls and a toggle, because it's not for everyone, of course. This add-on would be cool. ### Mumble component Client ### OS-specific? No ### Additional information I did check quickly on the web how to implement that, but I don't have much spare time for it right now. Unfortunately, it seems to be OS specific, because qt doesn't provide any uniform system call for that feature. Still, the feature could be useful on all platform.
Author
Owner

@Krzmbrzl commented on GitHub (Aug 15, 2025):

In theory this seems somewhat straight forward to do. We'd have to engage the non-sleep/non-screen-lock state when connecting to a server and disengage once the connection is closed again.

Relevant APIs seem to be

See also:

@Krzmbrzl commented on GitHub (Aug 15, 2025): In theory this seems somewhat straight forward to do. We'd have to engage the non-sleep/non-screen-lock state when connecting to a server and disengage once the connection is closed again. Relevant APIs seem to be - Windows: https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate - macOS: https://developer.apple.com/library/archive/qa/qa1340/_index.html - Linux with systemd: https://www.freedesktop.org/wiki/Software/systemd/inhibit/ See also: - https://gist.github.com/Vineg/eca223fbf478a3c806444a13e538a9fc - https://unix.stackexchange.com/a/643459
Author
Owner

@jvbsl commented on GitHub (Aug 17, 2025):

For linux we also have D-Bus:
org.freedesktop.PowerManagement.Inhibit
and/or
org.freedesktop.ScreenSaver.Inhibit

I think would kind of make a little more sense to use those dbus interfaces instead of only support systemd. Also afaik systemd itself provides this dbus interface as well. so we get systemd for free

@jvbsl commented on GitHub (Aug 17, 2025): For linux we also have D-Bus: org.freedesktop.PowerManagement.Inhibit and/or org.freedesktop.ScreenSaver.Inhibit I think would kind of make a little more sense to use those dbus interfaces instead of only support systemd. Also afaik systemd itself provides this dbus interface as well. so we get systemd for free
Author
Owner

@nixietab commented on GitHub (Aug 28, 2025):

This woud be something great to implement and really usefull,
For what i see, QT has a built in cross-plataform api that woud be really easy to implement. ill look into it


About doing the actual implementation:
For what i see there is a Qt api call "setScreenSaverInhibited()" that by itself shoud be easy to implement, but this call appears after Qt ≥ 5.14

As i am not sure on how does mumble manage its Qt modules with certainty i will try to investigate

@nixietab commented on GitHub (Aug 28, 2025): This woud be something great to implement and really usefull, For what i see, QT has a built in cross-plataform api that woud be really easy to implement. ill look into it --- About doing the actual implementation: For what i see there is a Qt api call "setScreenSaverInhibited()" that by itself shoud be easy to implement, but this call appears after Qt ≥ 5.14 As i am not sure on how does mumble manage its Qt modules with certainty i will try to investigate
Author
Owner

@Krzmbrzl commented on GitHub (Aug 29, 2025):

For what i see there is a Qt api call "setScreenSaverInhibited()" that by itself shoud be easy to implement, but this call appears after Qt ≥ 5.14

No problem, on the master branch we're using Qt 6 anyway

@Krzmbrzl commented on GitHub (Aug 29, 2025): > For what i see there is a Qt api call "setScreenSaverInhibited()" that by itself shoud be easy to implement, but this call appears after Qt ≥ 5.14 No problem, on the master branch we're using Qt 6 anyway
Author
Owner

@Hartmnt commented on GitHub (Sep 8, 2025):

@nixietab

About doing the actual implementation:
For what i see there is a Qt api call "setScreenSaverInhibited()" that by itself shoud be easy to implement, but this call appears after Qt ≥ 5.14

Could you please share a link to that? I am unable to find this. Having a link to the documentation would greatly help when trying to implement this.

@Hartmnt commented on GitHub (Sep 8, 2025): @nixietab > About doing the actual implementation: > For what i see there is a Qt api call "setScreenSaverInhibited()" that by itself shoud be easy to implement, but this call appears after Qt ≥ 5.14 Could you please share a link to that? I am unable to find this. Having a link to the documentation would greatly help when trying to implement this.
Author
Owner

@nixietab commented on GitHub (Sep 8, 2025):

@Hartmnt

Sorry about the confusion, this was a layer 8 error on my part. I misread another function. The function setScreenSaverInhibited() doesn’t actually exist. My apologies for informing this late.

@nixietab commented on GitHub (Sep 8, 2025): @Hartmnt Sorry about the confusion, this was a layer 8 error on my part. I misread another function. The function `setScreenSaverInhibited()` doesn’t actually exist. My apologies for informing this late.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mumble-mumble-voip#3034
No description provided.