ondemand script in initscripts uses arbitrary sleep

Bug #740127 reported by Daniel Silverstone
26
This bug affects 4 people
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.

Revision history for this message
g1pi (g1pi) wrote :

Let me add that having a /etc/init.d/something script that sleeps before doing its work is bad because:
- it defeats the very concept of "boot sequence"
- it violates the years old assumption that you can put final actions in /etc/init.d/rc.local because it is executed last in the boot sequence

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.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in sysvinit (Ubuntu):
status: New → Confirmed
Daniel Hahler (blueyed)
Changed in sysvinit (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
Revision history for this message
Andrea Ieri (aieri) wrote :

It also overrides whatever governor the cpufrequtils sets, and with such delay not even careful ordering of the services can prevent ondemand from winning.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.