mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
feat: page the session out to zram before suspending it, and zram is always on where supported
This commit is contained in:
1 parent
aaa2e40def
commit
240b7fcce6
43 files changed
+122
-168
No files matched your search
@@ -60,6 +60,9 @@ clear_stale_tmp() {
|
||||
return 0
|
||||
}
|
||||
[ -z "${BL_INSIDE:-}" ] && clear_stale_tmp
|
||||
if [ -z "${BL_INSIDE:-}" ]; then
|
||||
if [ "${BL_ZRAM:-0}" = 1 ]; then printf 0 > /tmp/.bl-zram; else rm -f /tmp/.bl-zram; fi
|
||||
fi
|
||||
|
||||
steam_update_stuck() {
|
||||
[ "$1" -lt 60 ] || steam_updates=0
|
||||
@@ -441,7 +444,6 @@ case $mode in
|
||||
step "client cores: $BL_CLIENT_CPUS"
|
||||
fi
|
||||
if [ "${BL_ZRAM:-0}" = 1 ]; then
|
||||
printf 0 > /tmp/.bl-zram
|
||||
step "zRAM compression: on"
|
||||
(
|
||||
bl_zram_scan() {
|
||||
@@ -490,8 +492,6 @@ case $mode in
|
||||
nap 5
|
||||
done
|
||||
) &
|
||||
else
|
||||
rm -f /tmp/.bl-zram
|
||||
fi
|
||||
if [ "${BL_LAUNCHER_CORES:-1}" != 0 ] && [ -n "${BL_LAUNCH_DIR:-}" ] && [ -z "${BL_DESKTOP:-}" ] \
|
||||
&& [ "${BL_STEAM_UI:-}" != desktop ] && [ -x /usr/local/bin/droiddeck-launcher-cores ]; then
|
||||
|
||||
@@ -148,8 +148,6 @@ static void zr_child(void) {
|
||||
}
|
||||
|
||||
__attribute__((constructor)) static void zr_init(void) {
|
||||
const char *name = program_invocation_short_name;
|
||||
if (strcmp(name, "steam") != 0 && strcmp(name, "steamwebhelper") != 0) return;
|
||||
void *libc = dlopen("libc.so.6", RTLD_LAZY | RTLD_NOLOAD);
|
||||
if (libc == NULL) return;
|
||||
zr_sys = (long (*)(long, ...))dlsym(libc, "syscall");
|
||||
|
||||
Reference in new issue
Block a user