Set Tunables On Startup
Problém:Problem: NástrojThe powertop --auto-tune potool startuaggressively systému agresivně uspávásuspends USB porty,ports cožafter způsobujesystem zamrzánístartup, nebocausing odpojováníthe myšimouse aand klávesnice.keyboard to freeze or disconnect.
Řešení:Solution: ÚpravaModifying the Powertop systemd služby Powertopuservice – poafter provedeníperforming the auto-tunetune, se vynutí trvalé zapnutí konkrétníchspecific USB portů.ports are forced to stay permanently on.
⚠️
Pozor:Note:TotoThisřešenísolutionjeisvázanétiednatokonkrétníspecificfyzicképhysical USBporty.ports.PokudIfmyšyouneboplugklávesnicithepřepojíšmousedoorjinéhokeyboard into a different USBvstupu,port,jeyounutnémustcestyupdatevthekonfiguracipathsaktualizovat.in the configuration.
PostupSteps
1. OtevřeníOpening konfiguracethe službyservice configuration
SpusťRun vthe terminálucommand příkazin prothe editaciterminal to edit the Powertop systemd konfigurace Powertopu:configuration:
sudo systemctl edit --full powertop.service
2. ÚpravaModifying konfiguračníhothe souboruconfiguration file
VIn otevřenémthe editoruopen najdieditor, sekcifind the [Service] asection podand řádekadd začínajícíthe following two ExecStartPost lines below the line starting with ExecStart= přidej následující dva řádky ExecStartPost::
[Service]
# PůvodníOriginal řádekline (nechatleave jakas je)is):
ExecStart=/usr/bin/powertop --auto-tune
# PřidanéAdded řádkylines proto vynuceníforce napájení:power on:
ExecStartPost=/bin/sh -c "echo 'on' > '/sys/bus/usb/devices/5-2.3/power/control'"
ExecStartPost=/bin/sh -c "echo 'on' > '/sys/bus/usb/devices/5-2.2/power/control'"
sudo systemctl restart powertop.service