-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_bat_powersave.sh
More file actions
35 lines (32 loc) · 1.46 KB
/
Copy pathrun_bat_powersave.sh
File metadata and controls
35 lines (32 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
# Disable Ethernet
# Refer to ifconfig for your ethernet interface name. See below example:
#-------------------
# #tuanho@precision: ~/repo/batteryimprove (master)
# $ ifconfig
# enp0s31f6: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
# ether a0:29:19:21:7b:ca txqueuelen 1000 (Ethernet)
# RX packets 0 bytes 0 (0.0 B)
# RX errors 0 dropped 0 overruns 0 frame 0
# TX packets 0 bytes 0 (0.0 B)
# TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
# device interrupt 16 memory 0xb7380000-b73a0000
#-------------------
#
sudo ifconfig enp0s31f6 down
# Tune powertop
# Run powertop --calibrate first
# https://wiki.archlinux.org/index.php/powertop
#
sudo powertop --auto-tune
# Disable CPU Core 4-11 (4/6 phys cores) on battery mode
# This applies for an Intel CPU with physical 6 cores
#
# echo 0 | sudo tee /sys/devices/system/cpu/cpu11/online
# echo 0 | sudo tee /sys/devices/system/cpu/cpu10/online
# echo 0 | sudo tee /sys/devices/system/cpu/cpu9/online
# echo 0 | sudo tee /sys/devices/system/cpu/cpu8/online
# echo 0 | sudo tee /sys/devices/system/cpu/cpu7/online
# echo 0 | sudo tee /sys/devices/system/cpu/cpu6/online
# echo 0 | sudo tee /sys/devices/system/cpu/cpu5/online
# echo 0 | sudo tee /sys/devices/system/cpu/cpu4/online