Compare commits
10 commits
0379d33d8d
...
6ee602d0b9
Author | SHA1 | Date | |
---|---|---|---|
6ee602d0b9 | |||
d4e38fe9dd | |||
87c8a5a49c | |||
ef798d84aa | |||
cfba2b2031 | |||
5142021197 | |||
d5d91679cd | |||
cf352f1062 | |||
88ef0ad3ac | |||
832627cfc9 |
7 changed files with 60 additions and 5 deletions
9
scripts/powertop/j5040.sh
Executable file
9
scripts/powertop/j5040.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
# author: Daniel Sommer <daniel.sommer@velvettear.de>
|
||||
# license: MIT
|
||||
|
||||
echo '0' > '/proc/sys/kernel/nmi_watchdog';
|
||||
echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs';
|
||||
echo 'disabled' > '/sys/bus/usb/devices/2-3/power/wakeup';
|
||||
echo 'disabled' > '/sys/bus/usb/devices/2-4/power/wakeup';
|
8
scripts/powertop/n100.sh
Executable file
8
scripts/powertop/n100.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
# author: Daniel Sommer <daniel.sommer@velvettear.de>
|
||||
# license: MIT
|
||||
|
||||
echo '0' > '/proc/sys/kernel/nmi_watchdog';
|
||||
echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs';
|
||||
echo 'auto' > '/sys/bus/usb/devices/3-7.3/power/control';
|
18
scripts/powertop/powertop.sh
Executable file
18
scripts/powertop/powertop.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
# author: Daniel Sommer <daniel.sommer@velvettear.de>
|
||||
# license: MIT
|
||||
|
||||
# exit on error
|
||||
set -e
|
||||
|
||||
# check permissions
|
||||
[[ "$EUID" != 0 ]] && printf "error: permission denied!\n" >&2 && exit 1
|
||||
|
||||
# check if script exists
|
||||
script="$(dirname $(realpath "$0"))/$(hostname).sh"
|
||||
[[ ! -x "$script" ]] && printf "error: script '"$script"' does not exist or is not executable!\n" >&2 && exit 1
|
||||
|
||||
# execute script
|
||||
printf ">> executing script '"$script"'...\n"
|
||||
. "$script"
|
|
@ -42,11 +42,10 @@ printf ""$font_colored"> removing orphaned packages..."$font_default"\n"
|
|||
printf ""$font_colored"> removing \"no valid subscription\" message..."$font_default"\n"
|
||||
sed -i.bak "s/data.status.* !== 'ACTIVE'/false/I" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
|
||||
|
||||
printf ""$font_colored"> updating restic..."$font_default"\n"
|
||||
restic self-update
|
||||
|
||||
#printf ""$font_colored"> installing dark theme..."$font_default"\n"
|
||||
#bash <(curl -s https://raw.githubusercontent.com/Weilbyte/PVEDiscordDark/master/PVEDiscordDark.sh ) install
|
||||
if [[ "$(which restic &> /dev/null)" ]]; then
|
||||
printf ""$font_colored"> updating restic..."$font_default"\n"
|
||||
restic self-update
|
||||
fi
|
||||
|
||||
printf ""$font_colored_bold">> system updated finished after "$SECONDS" seconds!"$font_default"\n"
|
||||
|
||||
|
|
9
systemd/cpupower@.service
Normal file
9
systemd/cpupower@.service
Normal file
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=set cpu governor to %i
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=cpupower frequency-set -g %i
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
9
systemd/powertop.service
Normal file
9
systemd/powertop.service
Normal file
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=enable various powersaving modes
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/home/velvettear/.dots/scripts/powertop/powertop.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -3,5 +3,8 @@
|
|||
# author: Daniel Sommer <daniel.sommer@velvettear.de>
|
||||
# license: MIT
|
||||
|
||||
# share zsh history
|
||||
setopt SHARE_HISTORY
|
||||
|
||||
# exit if user is not root
|
||||
[[ "$EUID" != "0" ]] && return
|
||||
|
|
Loading…
Reference in a new issue