This commit is contained in:
op52 2018-12-20 08:43:40 +08:00
parent 2a123594c9
commit 3b0f6dc8a8
No known key found for this signature in database
GPG Key ID: 326183D9B74E5C87
9 changed files with 61 additions and 1 deletions

1
_nv_modeset Normal file
View File

@ -0,0 +1 @@
options nvidia-drm modeset=1

6
_undervolt Normal file
View File

@ -0,0 +1,6 @@
[Unit]
Description=undervolt
[Service]
Type=oneshot
ExecStart=/usr/local/bin/undervolt -v --core -125 --cache -125 --uncore -125 --analogio -125 --gpu -50

12
_undervolt_timer Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=Apply undervolt settings
[Timer]
Unit=undervolt.service
# Wait 2 minutes after boot before first applying
OnBootSec=2min
# Run every 30 seconds
OnUnitActiveSec=30
[Install]
WantedBy=multi-user.target

9
_wakeup_fix Normal file
View File

@ -0,0 +1,9 @@
[Unit]
Description=Wakeup fix
[Service]
ExecStart=/bin/sh -c '/bin/echo XHC > /proc/acpi/wakeup; /bin/echo LID0 > /proc/acpi/wakeup; /bin/echo PBTN > /proc/acpi/wakeup; /bin/echo deep > /sys/power/mem_sleep'
[Install]
WantedBy=multi-user.target

View File

@ -5,6 +5,6 @@ sudo add-apt-repository -y -u ppa:snwh/ppa
sudo add-apt-repository -y ppa:graphics-drivers
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt install -y vim arc-theme gnome-tweak-tool paper-icon-theme ibus-pinyin clang lld qemu cmake nasm grub-pc-bin bochs bochs-sdl xorriso
sudo apt install -y vim arc-theme gnome-tweak-tool paper-icon-theme ibus-pinyin clang lld qemu nasm grub-pc-bin bochs bochs-sdl xorriso git dconf-editor
sudo apt-get -y autoremove
ibus restart

7
setupo_laptop_pwr.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
echo "Installing power-saving packages"
sudo apt install -y powertop tlp
sudo apt-get -y autoremove
echo "Edit /etc/default/tlp such that the default mode is BAT"

View File

@ -0,0 +1,14 @@
#!/bin/bash
echo "Installing undervolt packages"
sudo apt install -y python-pip
sudo apt-get -y autoremove
sudo pip install undervolt
echo "Applying undervolt"
sudo cp _undervolt /etc/systemd/system/undervolt.service
sudo cp _undervolt_timer /etc/systemd/system/undervolt-timer.service
sudo systemctl enable undervolt-timer
sudo systemctl start undervolt-timer

7
setupo_laptop_wakeup.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
echo "Applying wakeup fix"
sudo cp _wakeup_fix /etc/systemd/system/wakeup-fix.service
sudo systemctl enable wakeup-fix
sudo systemctl start wakeup-fix

4
setupo_prime_sync.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
sudo cp _nv_modeset /etc/modprobe.d/zz-nvidia-modeset.conf
sudo update-initramfs -u