Sample Header Ad - 728x90

Unable to set power tuning parameters at boot time from systemd

0 votes
1 answer
343 views
I'm using Fedora 30 on a laptop. I've tried setting power tune parameters using the systemd service that comes with powertop (powertop.service) and that didn't work. I then tried creating a shell script along with a custom .service file to run it at boot and that doesn't work either, checking the parameters after a reboot with powertop shows them not to have been changed. Running the script after logging in works. custom script '/root/bin/powertune-HPEnvy.sh'
#!/bin/sh
 echo '1' > '/sys/module/snd_hda_intel/parameters/power_save'; 
 echo 'auto' > '/sys/bus/i2c/devices/i2c-0/device/power/control'; 
 echo 'auto' > '/sys/bus/i2c/devices/i2c-2/device/power/control'; 
 echo 'auto' > '/sys/bus/i2c/devices/i2c-6/device/power/control'; 
 echo 'auto' > '/sys/bus/i2c/devices/i2c-1/device/power/control'; 
 echo 'auto' > '/sys/bus/pci/devices/0000:02:00.0/power/control'; 
 echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.2/power/control'; 
 echo 'auto' > '/sys/bus/pci/devices/0000:00:14.0/power/control'; 
 echo 'auto' > '/sys/bus/pci/devices/0000:00:08.0/power/control'; 
 echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.0/power/control'; 
 echo 'auto' > '/sys/bus/pci/devices/0000:00:15.0/power/control'; 
 echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.4/power/control'; 
 echo 'auto' > '/sys/bus/pci/devices/0000:00:00.0/power/control'; 
 echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.3/power/control'; 
 echo 'auto' > '/sys/bus/pci/devices/0000:01:00.0/power/control'; 
 echo 'auto' > '/sys/bus/pci/devices/0000:00:15.1/power/control'; 
 echo 'auto' > '/sys/bus/pci/devices/0000:00:02.0/power/control'; 
 echo 'auto' > '/sys/bus/pci/devices/0000:00:14.2/power/control'; 
 echo 'auto' > '/sys/bus/pci/devices/0000:00:04.0/power/control'; 
 echo 'auto' > '/sys/bus/pci/devices/0000:00:17.0/power/control'; 




 echo 'enabled' > '/sys/class/net/wlp1s0/device/power/wakeup'; 
 echo 'enabled' > '/sys/bus/usb/devices/usb1/power/wakeup'; 
 echo 'enabled' > '/sys/bus/usb/devices/usb2/power/wakeup';
custom systemd service '/etc/systemd/system/powertune-HPEnvy.service'
[Unit]
Description=Set HP Envy 15-as133cl powersaving

[Service]
Type=oneshot
ExecStart=/root/bin/powertune-HPEnvy.sh


[Install]
WantedBy=multi-user.target
Asked by Matthew (1 rep)
Aug 10, 2019, 05:15 AM
Last activity: Aug 15, 2019, 12:45 PM