distribution/packages/jelos/sources/autostart/common/002-kernel
2022-09-11 06:51:08 -04:00

18 lines
471 B
Bash
Executable file

#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
sysctl vm.swappiness=1
sysctl kernel.nmi_watchdog=0
sysctl vm.laptop_mode=5
sysctl vm.dirty_writeback_centisecs=1500
for device in $(find /sys -name power_save | grep -v wifi) /sys/bus/usb/devices/*/power/autosuspend
do
echo 1 >${device} 2>/dev/null
done
for device in /sys/bus/*/devices/*/power/control
do
echo auto > ${device} 2>/dev/null
done