Note, these assume debian or a debian based system, i.n. ubuntu.
I you have a diffrent system, you will have to replace all apt
commands with your distro's package manager.
You may also have to do extra configuration.
- Get a root shell (if not loged in as root)
su
- install sudo
apt install sudo
Replace [username]
with the username of a trusted normal user.
usermod -Ga sudo [username]
sudo apt install i3
or
sudo apt install sway
sudo apt install ufw
- Run it.
ufw enable
Bumblebee is slower than other options, but it is the most convienant and works almost out of the box. (for me)
- On Nouveau
sudo apt install bumblebee primus
- On Nvidia drivers
sudo apt install bumblebee-nvidia primus-nvidia primus-vk-nvidia
- Configure bumblebee
sudoedit /etc/bumblebee/bumblebee.conf
-
Change default bridge to
primus
-
Change these settings in
[bumblebeed]
KeepUnusedXServer=false
ServerGroup=bumblebee
TurnCardOffAtExit=true
- Restart bumblebeed
sudo systemctl restart bumblebeed.service
- note: using
vblank_mode=0 primusrun
insted ofprimusrun
can result in lower input lag.
sudo apt install tlp powertop
sudo powertop -r
-
examine the tuning tab in powertop.html
-
make shell script to preform tuning
-
Note: if you installed bumblebee skip PM for gps.
sudoedit /root/tune
sudo chmod a+x /root/tune
- create a systemd service to run script
note, if you don't use systemd, you will have to do this differently,
sudoedit /lib/systemd/system/setup-pm.service
- you can use this template
Description=Tweak device params to impove power
After=network.target
After=systemd-user-sessions.service
[Service]
User=root
Type=simple
ExecStart="/root/tune"
[Install]
WantedBy=multi-user.target
- enable the service
sudo systemctl enable setup-pm
sudo systemctl start setup-pm
- Installing the drivers is highly recommended
https://github.com/aircrack-ng/rtl8188eus
if you experance poor preformace, try echo ON | sudo tee /proc/acpi/bbswitch
and sudo systemctl restart bumblebeed.service