linux:powersave:powertop
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| linux:powersave:powertop [2019/08/16 08:57] – external edit 127.0.0.1 | linux:powersave:powertop [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Power Optimization Linux ====== | ||
| - | ===== Cursor blink off ===== | ||
| - | Blinking cursur uses an interupt and increased power usage.There are 2 options to turn this off: | ||
| - | === 1. Framebuffer configuration === | ||
| - | < | ||
| - | # echo 0 > / | ||
| - | </ | ||
| - | This command can be executed on startup by adding the command to a systemd unit. It can be included in the powertop optimatization service (" | ||
| - | |||
| - | === 2. Kernel parameter === | ||
| - | Setting Kernel parameter vt.global_cursor_default=0 | ||
| - | < | ||
| - | # nano / | ||
| - | |||
| - | Add vt.global_cursor_default=0 to the following line in: | ||
| - | GRUB_CMDLINE_LINUX_DEFAULT=" | ||
| - | |||
| - | Update grub and reboot | ||
| - | # update-grub | ||
| - | </ | ||
| - | |||
| - | ===== Powertop ===== | ||
| - | ==== Measure ==== | ||
| - | PowerTop has two methods to investigate power consumption impovement options: | ||
| - | To find out which ones are suggested, proceed as follows: | ||
| - | # powertop | ||
| - | # powertop --html=powerreport.html | ||
| - | With the normal powertop command you can see the tuning options in the " | ||
| - | Using the html option provides a more easy way to see all the tuning commands. In the " | ||
| - | # powertop --calibrate | ||
| - | Note: Calibration will toggle various functions like backlight or wifi. Thus, it may turn your screen black for some time, lose your connection, and so on. Do not touch the machine during the calibration. | ||
| - | |||
| - | ==== Tune ==== | ||
| - | === 1. Automatic === | ||
| - | This can be done by having " | ||
| - | < | ||
| - | # nano / | ||
| - | |||
| - | [Unit] | ||
| - | Description=Powertop tunings | ||
| - | [Service] | ||
| - | ExecStart=/ | ||
| - | RemainAfterExit=true | ||
| - | [Install] | ||
| - | WantedBy=multi-user.target | ||
| - | </ | ||
| - | Install and enable the service unit: | ||
| - | < | ||
| - | # systemctl daemon-reload | ||
| - | # systemctl enable powersave.service | ||
| - | # systemctl start powersave.service | ||
| - | </ | ||
| - | |||
| - | === 2. Customized === | ||
| - | These can be done by creating a script with optimization commands that is started by a service. | ||
| - | The script will look like: | ||
| - | < | ||
| - | # cat / | ||
| - | |||
| - | #!/bin/sh | ||
| - | # Is invoked by systemd powersave.service | ||
| - | # Need a delay because of race condition with framebuffer init (/ | ||
| - | /bin/sleep 5 | ||
| - | echo min_power > / | ||
| - | echo min_power > / | ||
| - | echo min_power > / | ||
| - | echo min_power > / | ||
| - | echo min_power > / | ||
| - | echo min_power > / | ||
| - | echo 0 > / | ||
| - | echo 1500 > / | ||
| - | echo auto > / | ||
| - | echo auto > / | ||
| - | echo auto > / | ||
| - | # USB Mouse | ||
| - | #echo auto > / | ||
| - | echo auto > / | ||
| - | echo auto > / | ||
| - | echo auto > / | ||
| - | echo auto > / | ||
| - | echo auto > / | ||
| - | echo auto > / | ||
| - | echo auto > / | ||
| - | echo auto > / | ||
| - | echo auto > / | ||
| - | echo auto > / | ||
| - | / | ||
| - | echo 0 > / | ||
| - | |||
| - | # Enable L1 and L0s on PCIe Intel Bridge and Realtek network adapter | ||
| - | # Does not seem to differ anything | ||
| - | setpci -s 00:1c.0 0x50.B=0x43 | ||
| - | setpci -s 01:00.0 0x80.B=0x43 | ||
| - | |||
| - | #SSD Optimization the deadline scheduler ensures bulk transactions won't slow down small transactions | ||
| - | echo deadline > / | ||
| - | </ | ||
| - | Make the script executable: | ||
| - | < | ||
| - | # chmod +x / | ||
| - | </ | ||
| - | Create the service unit that will look like: | ||
| - | < | ||
| - | # nano / | ||
| - | |||
| - | [Unit] | ||
| - | Description=Power Saving tunings | ||
| - | Requires=getty.target | ||
| - | After=getty.target | ||
| - | [Service] | ||
| - | Type=idle | ||
| - | RemainAfterExit=true | ||
| - | ExecStart=/ | ||
| - | [Install] | ||
| - | WantedBy=multi-user.target | ||
| - | </ | ||
| - | Install and enable the service unit: | ||
| - | < | ||
| - | # systemctl daemon-reload | ||
| - | # systemctl enable powersave.service | ||
| - | # systemctl start powersave.service | ||
| - | </ | ||
linux/powersave/powertop.1565945831.txt.gz · Last modified: (external edit)
