-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
[Bug]: ubuntu 22.04 LTS powerMonitor.getSystemIdleTime() returns "0" #34826
Comments
This falls directly to this function in Chromium. You should open a https://crbug.com/ identifying this issue, and then we will recieve the fix when upstream addresses it. |
I wrote to https://crbug.com/ and they gave me the answer https://bugs.chromium.org/p/chromium/issues/detail?id=1343535 |
This seems to be a Wayland issue. Chromium currently uses the X11 Ozone platform by default so it's using X11ScreenOzone's CalculateIdleTime which always returns zero on Wayland because of the lack of an X11 screen saver. Adding the command flags There is this bug reported a year ago about it, and it's because GNOME's Mutter doesn't support server-side decorations with the xdg-decoration protocol. It is not planned as well. Chrome does have client-side decoration support under Wayland on GNOME, so it looks like Electron might be lacking client-side decoration support on Wayland when So there is a workaround, but depending on your Wayland display server, or rather your desktop environment, it probably won't be practical in terms of usability until client-side decorations are available. |
I've been looking into this a bit more, and it seems since Electron 17 support for client-side decorations is available with the additional flag
|
Preflight Checklist
Electron Version
18.0.3
What operating system are you using?
Ubuntu
Operating System Version
ubuntu 22.04 LTS
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
I expect the
getSystemIdleTime()
function to work as before in the ubuntu 22.04 LTSActual Behavior
My app uses
powerMonitor.getSystemIdleTime()
. I recently upgraded ubuntu from 18.04.6 to 22.04 LTS andgetSystemIdleTime()
function stopped counting idle time.I know works in 20.04.4 LTS too. Doesn't work on the v22.04 LTS
Testcase Gist URL
https://gist.github.com/trae-op/663bbb53cd75c6485ccd40d36d14a64f
Additional Information
No response
The text was updated successfully, but these errors were encountered: