ondemand script in initscripts uses arbitrary sleep
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sysvinit (Ubuntu) |
Triaged
|
High
|
Unassigned |
Bug Description
Binary package hint: initscripts
The ondemand script in the initscripts package is all very well, but the 60 second pause before activation is both arbitrary, and in my case, wrong.
The comment next to it suggests that the 60 seconds is to allow the desktop to be logged in before the CPU govener is changed. however my laptop gets from grub to desktop in 17 seconds and then I have to wait up to one minute from then for my CPUs to be put into ondemand mode. Given I can have CPU frequency panel applets which can change the frequency govener; why is the ondemand setting not an XDG autostart app which uses the same communications channels to set the govener after the desktop has started?
It took me quite some time to track down that this was the issue as I was, from a user point of view, simply seeing that my CPU govener choice of ondemand was not being preserved across reboots, yet if I left my laptop alone for a bit after booting, the CPUs "suddenly" went into ondemand mode.
Changed in sysvinit (Ubuntu): | |
status: | Confirmed → Triaged |
importance: | Undecided → High |
Let me add that having a /etc/init. d/something script that sleeps before doing its work is bad because: d/rc.local because it is executed last in the boot sequence
- it defeats the very concept of "boot sequence"
- it violates the years old assumption that you can put final actions in /etc/init.
Having to recur to a script like
...
set_governor conservative # once
sleep 63
set_governor conservative # again
...
is frankly a shame, more than an inconvenience.