Logo Search packages:      
Sourcecode: guidance-power-manager version File versions

def powermanage::PowerManage::test (   self  ) 

Try all kinds of stuff and see what breaks.

Definition at line 505 of file powermanage.py.

00505                   :
        """ Try all kinds of stuff and see what breaks."""
        print "Trying to adjust brightness ..."
        bright = self.getBrightness()
        self.adjustBrightness(2)
        time.sleep(1)
        self.adjustBrightness(bright)
        print " ... OK."

        if self.USE_CPUFREQ:
            print "Reading speeds from cpufreq..."
            for cpu in self.cpus:
                print self.getCpuState(cpu)
            print "Report supported cpufreq policies..."
            for policy in self.cpu_policy.keys():
                print "Policy:", policy, "=", self.cpu_policy[policy]

            print "Trying all cpufreq policies ..."
            orig_pol = self.getCpuPolicy()
            for pol in self.cpu_policy.keys():
                print ". ", pol
                self.setCpuPolicy(pol)
            self.setCpuPolicy(orig_pol)
            print "... OK."
        else:
            print "Skipping CPUFREQ: USE_CPUFREQ = False"

        if self.SCREENSAVER_BLANKONLY:
            if self.setScreensaverBlankOnly(True):
                debug("Manipulating screensaver seems to work well.")
            else:
                debug("Manipulating screensaver seems broken.")

        if isroot:
            print "Trying to use Disk powermanagement and laptop_mode"
            self.setDiskPM(True)
            time.sleep(1)
            self.setDiskPM(False)
            print "...OK"
        else:
            print "Skipping DiskPM, not root."
            
        if self.hasLid:
            if self.getLidClosedState():
                print "Lid is closed."
            else:
                print "Lid is currently open."

    def setDiskPM(self,on=True):


Generated by  Doxygen 1.6.0   Back to index