<p dir="auto">`const { app, powerMonitor } = require('electron')</p>
<p dir="auto">app.on('ready', () =&gt; {<br>
powerMonitor.on('suspend', () =&gt; {<br>
console.log('The system is going to sleep')<br>
})<br>
})`</p>
<p dir="auto">The system is going to sleep<br>
The system is going to sleep</p>
<h3 dir="auto">Preflight Checklist</h3>

<ul dir="auto">
<li>[x ] I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li>[ x] I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li>[x ] I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<p dir="auto">When I upgrade the electron version 6.1.9 to 8.4.0, the PowerMonitor module "resume" and "suspend" event send twice on macOS.</p>
<p dir="auto">useage:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="app.on(&quot;ready&quot;, () =&gt; {
    const { powerMonitor } = require('electron')
    
    powerMonitor.on('suspend', () =&gt; {
        mainLog.info('system suspend.')
        mainWindow.webContents.send('system-status', 'suspend');
    });

    powerMonitor.on('resume', () =&gt; {
        mainLog.info('system resume.')
        mainWindow.webContents.send('system-status', 'resume');
    });
});"><pre class="notranslate"><code class="notranslate">app.on("ready", () =&gt; {
    const { powerMonitor } = require('electron')
    
    powerMonitor.on('suspend', () =&gt; {
        mainLog.info('system suspend.')
        mainWindow.webContents.send('system-status', 'suspend');
    });

    powerMonitor.on('resume', () =&gt; {
        mainLog.info('system resume.')
        mainWindow.webContents.send('system-status', 'resume');
    });
});
</code></pre></div>
<p dir="auto">electron-log, main.log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2020-07-31 11:29:41.926] [info] system suspend.
[2020-07-31 11:29:41.933] [info] system suspend.
[2020-07-31 11:30:20.169] [info] system resume.
[2020-07-31 11:30:21.963] [info] system resume."><pre class="notranslate"><code class="notranslate">[2020-07-31 11:29:41.926] [info] system suspend.
[2020-07-31 11:29:41.933] [info] system suspend.
[2020-07-31 11:30:20.169] [info] system resume.
[2020-07-31 11:30:21.963] [info] system resume.
</code></pre></div>
<ul dir="auto">
<li>
<p dir="auto"><strong>Electron Version:</strong></p>
<ul dir="auto">
<li>
8.4.0
</li>
</ul>
</li>
<li>
<p dir="auto"><strong>Operating System:</strong></p>
<ul dir="auto">
<li>
macOS 10.15.6
</li>
</ul>
</li>
<li>
<p dir="auto"><strong>Last Known Working Electron version:</strong></p>
<ul dir="auto">
<li>
8.4.0
</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>

<p dir="auto">just one times "resume" and "suspend" event.</p>
<h3 dir="auto">Actual Behavior</h3>

<p dir="auto">i receive twice same events.</p>
<h3 dir="auto">To Reproduce</h3>




<h3 dir="auto">Screenshots</h3>

<h3 dir="auto">Additional Information</h3>