Closed jamesholland-uk closed 4 months ago
Sorry, but I don't have m1 to check on :(
It would be great if someone could check whether getSystemIdleTime
from electron is working correctly on mac m1 https://www.electronjs.org/de/docs/latest/api/power-monitor#powermonitorgetsystemidletime.
Also, maybe some app is making the system not being "idle"? I noticed such a behavior in the past with some music players and such
Thanks @hovancik. If there is an easy way for me to check any of this for you on my M1 machine, let me know.
You could try running this repo: https://github.com/electron/electron-quick-start and edit the code to print powerMonitor.getSystemIdleTime()
every few seconds. When you think your system is on idle, you can check what does the electron (and therefore stretchly) thinks.
I tried and failed for an hour or so, seems my Javascript is not very good, sorry!
No worries, this things sometimes get fixed with new versions of Electron, so let's see
I am on an M1 Mac Mini. I have confirmed that powerMonitor.getSystemIdleTime()
works in Electron (and so the upstream
tag can be removed from this issue, and/or this issue may be closed):
$ git clone https://github.com/electron/electron-quick-start
$ cd electron-quick-start
$ sed -i "s/\( } = require('electron')\)/, powerMonitor\1/" main.js
$ sed -i 's/^}$/\n setInterval(() => console.log(powerMonitor.getSystemIdleTime()), 1000)\n&/' main.js
$ npm install
$ npm start
> electron-quick-start@1.0.0 start
> electron .
1
2
3
4
5
6
7
8
9
10
11
0 # <-- when I move the mouse
Version
Known issues
Existing issues
What operating system are you using?
macOS
Operating System Version
macOS Monterey 12.6
Reproduction steps
Expected Behavior
Whilst the Mac is idle, the breaks should not continue.
Actual Behavior
Whilst the Mac is idle, the breaks continue.
Relevant log output
Preferences
Additional information
Code of Conduct