Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/auth/Fingerprint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,20 @@ void CFingerprint::init() {
g_dbus->m_freedesktopLogin1->uponSignal("PrepareForSleep").onInterface(LOGIN_MANAGER).call([this](bool start) {
Log::logger->log(Log::INFO, "fprint: PrepareForSleep (start: {})", start);
m_sDBUSState.sleeping = start;
if (!m_sDBUSState.sleeping && !m_sDBUSState.verifying)
startVerify();
if (m_sDBUSState.sleeping)
return;

// Some readers power down during sleep and re-enumerate on resume, and
// fprintd may have been restarted, so the pre-sleep claim (and even the
// device object path) may no longer exist. Release whatever we held —
// ignoring failures — and rebuild the proxy so startVerify() re-queries
// the device and claims it again.
if (m_sDBUSState.device) {
stopVerify();
releaseDevice();
m_sDBUSState.device.reset();
}
startVerify();
});
}

Expand Down