Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

wakelock not block system sleep (#8504)

21pagescfd27c8d87e2
diff --git a/src/platform/mod.rs b/src/platform/mod.rs
index 65d047cff..fe66e50dc 100644
--- a/src/platform/mod.rs
+++ b/src/platform/mod.rs
@@ -104,8 +104,11 @@ pub fn get_wakelock(_display: bool) -> WakeLock {
hbb_common::log::info!("new wakelock, require display on: {_display}");
#[cfg(target_os = "android")]
return crate::platform::WakeLock::new("server");
+ // display: keep screen on
+ // idle: keep cpu on
+ // sleep: prevent system from sleeping, even manually
#[cfg(not(target_os = "android"))]
- return crate::platform::WakeLock::new(_display, true, true);
+ return crate::platform::WakeLock::new(_display, true, false);
}
pub(crate) struct InstallingService; // please use new