Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
wiki:system_configuration [2021/03/01 21:30] – [sysctl.conf] autostaticwiki:system_configuration [2021/03/05 12:52] – [Disabling resource-intensive daemons, services and processes] autostatic
Line 252: Line 252:
  
 You could also add a line to your ''/etc/rc.local'' file for instance to set the governor to //performance// at boot time: You could also add a line to your ''/etc/rc.local'' file for instance to set the governor to //performance// at boot time:
-  echo -n performance /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor+  echo -n performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor 
 + 
 +Another option is to create a Systemd Unit that does this for you. Example of an audio-setup Unit file: 
 +  [Unit] 
 +  Description=Prepare system for audio 
 +   
 +  [Service] 
 +  Type=oneshot 
 +  ExecStart=/usr/local/bin/audio-setup 
 +  RemainAfterExit=yes 
 +   
 +  [Install] 
 +  WantedBy=multi-user.target 
 + 
 +This will start ''/usr/local/bin/audio-setup'' at boot so you can add the aformentioned line regarding setting the CPU's to the //performance// scaling governor there, make the file executable, enable the Systemd service and start it. 
 +  echo 'echo -n performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor' | sudo tee /usr/local/bin/audio-setup 
 +  sudo chmod +x /usr/local/bin/audio-setup 
 +  sudo systemctl enable audio-setup 
 +  sudo systemctl start audio-setup 
 + 
 +The ''audio-setup'' script could then also be used to set up other things.
  
 == Ubuntu == == Ubuntu ==
  
-On Ubuntu systems the command in your ''/etc/rc.local'' file only works if you disable the ondemand service: +On Ubuntu systems the command in your ''/etc/rc.local'' or ''/usr/local/bin/audio-setup'' file only works if you disable the ondemand service: 
-  sudo update-rc.d ondemand disable +  sudo systemctl mask ondemand.service
-  +
-Another option would be to modify the ''ondemand'' init script and rename it to ''performance'': +
-  sudo sed -i 's/ondemand/performance/g' /etc/init.d/ondemand +
-  sudo update-rc.d ondemand disable +
-  sudo cp /etc/init.d/ondemand /etc/init.d/performance +
-  sudo update-rc.d performance defaults+
  
 == Debian == == Debian ==
wiki/system_configuration.txt · Last modified: 2024/01/13 15:00 by autostatic