Frank Ursel wrote:
On Sa, Mai 19, 2007 at 02:11:31 -0700, Arjan van de Ven wrote:
Frank Ursel wrote:
Hi,
Output with terminal startet through gksu:
| Power usage (ACPI estimate) :  14.0 W (2.2 hours left)
Output without gksu running:
| Power usage (ACPI estimate) :  13.2 W (2.5 hours left)

wow you found an app that costs you 0.8W... (which is quite some
battery life).....

Yes, and after some testing it shows that it is reproducible. With gksu
running, powertop shows 12.4 Watt (brightness was set to a lower level
than my previous post). As fast as I close gksu it drops to 11.2 Watt.
The difference is about 30 minutes of battery life.


      tv.tv_sec = 0;
      tv.tv_usec = 100;

      while (!waitpid (pid, &status, WNOHANG))
        {
          bzero (buf, 256);
          usleep (200);

          if (cmdline)
            g_free (cmdline);
          cmdline = get_process_name (pid);

          usleep(1000);

          if (select (fdpty+1, &rfds, NULL, NULL, &tv) < 0)
            {



this piece of code (in libgksu.c) is most likely the culprit.. it has a 100 *microsecond* delay loop in here. The changelog says they added a usleep() because 2.6 kernels wouldn't want to sleep for them; I suspect they missed the fact that 100 microseconds is just a horribly short time... to the point that I think it's a bug and they meant 100 milliseconds instead...

why they have to poll-in-a-loop in the first place is a different story altogether of course...
_______________________________________________
Power mailing list
[email protected]
http://www.bughost.org/mailman/listinfo/power

Reply via email to