Huge battery drain of notebook's battery


#1

Hi,

Today I bought a new battery for one of my old laptop (I installed Haiku).

This laptop is a Sony Vaio FS-215E:
Screen: 15,4
CPU: Intel Celeron M 1.5GHz
1 GB DDR1 Ram
Video: Integrated Intel (atm I’m away and I can’t recall the exact model, however is supported by Haiku: no vesa)

Haiku runs very well, but today, when I inserted the battery (charged while the laptop was turned off), I booted Haiku and I discover a thing that disappointed me a little bit:

When was 14:42 o’clock, the battery was at 100% of charge: I booted Haiku and leaved the laptop turned on without any activity (so idle); I back at 15:18 o’ clock and the battery was drained to 54%! Obviously, by going in the ProcessController app, i select power saving instead of low latency. But the battery, as I’ve said, is draining very quicly; before I had Windows XP, and with the previous battery, years ago, I didn’t encountered this huge battery drain.

Some hints?
For those which runs Haiku on a laptop, I’d like to receive some feedbacks :slight_smile:


#2

LOL… I also found that when Haiku-laptop is on battery power, the clock goes slow as reported here https://dev.haiku-os.org/ticket/6152 :joy:

When I had Windows XP on this laptop, I didn’t encountered these troubles…

EDIT
Well, at least the slowliness of clock (and also of the system itself) has been “resolved” by disabling ACPI in the kernel setting file…
https://dev.haiku-os.org/ticket/13915

EDIT2
With ACPI disabled, seems also that the battery drain is gone… Unfortunately with ACPI disabled, I cannot check the battery status, but the first impression after 1 hour of intensive usage, was good.


#3

Just to add some data, here are my stats. I don’t see a slow clock or extremely rapid power drainage.

I have a i7-4712MQ notebook, 15,4", 16GiB, SSD, using VESA (intel_extreme blacklisted). The battery info says it has a capacity of about 3300 mAh when fully charged. The “design capacity” is 5600 mAh, so I’d say the battery isn’t in top condition anymore… It’s 3.5 years old.

Fully charged I get about 1:45 hours out of it when only doing very light websurfing. I think it used to be around 2:30 hours when it was new.

This is with the ProcessController setting “Low latency”. I should try with “Power saving”, but that had some stability issues in the past IIRC.


#4

Checking the “fully charged” capacity of the battery is indeed the first thing to do here. Maybe your battery is just old, if you compare with how the machine behaved a few years ago.

Also, our powersaving features are focused on more modern machines. We didn’t spend the time supporting powersaving modes of older CPUs. So maybe your machine is just too old to enjoy complete powersaving in Haiku.


#5

Hi guys, thanks for the feedback.
However the battery is new and original.
I found that by disabling ACPI in the kernel setting file, I got rid of all the troubles: https://dev.haiku-os.org/ticket/13915


#6

Which CPUs is older?


#7

Well, from the discussion with the developer (on this ticket https://dev.haiku-os.org/ticket/13915) I got it that old hardware is no longer supported by Haiku?


#8

It is older CPUs are 32 bit?
I think there is a point to separate support of Haikus’ 32 bit to 32 bit CPUs and 64 bit to 64 bit CPU.


#9

I don’t remember the specifics, but when we implemented power saving, we only implemented it on then recent CPUs, because they had hardware support that made things much easier, and we left support for older CPUs for “later”. And then it never happened.

This does not prevent using Haiku on such machines, and it does not run worse than it did before. But I can understand none of the devs are interested in supporting 10+ years old hardware (it does annoy me as well, but I do my best to at least keep things running).

The official minimal supported CPU is still Pentium with MMX instructions. I think no one would be crazy enough to try running Haiku on anything older. We do get bug reports when things expect SSE2 instructions, so we still try to provide some support to these users.

In the case of the linked ticket, the hardware is supported in some way (you can disable ACPI and get Haiku running). This was not too uncommon for Linux a few years ago and even happened to me with some Windows machines (some Sony VAIO laptop would always keep the backlight off when ACPI was enabled, for example). We could invest a lot of efforts in making obsolete machines run ACPI, but I think it is a waste of time when you can just disable ACPI if you really want to use such an old computer.


#10

So, (I’m not criticizing, I’m quiet): why I face the huge battery drain with ACPI enabled? (when disabled there is no huge battery drains) maybe the ACPI driver attempts to trigger the power saving on a CPU which doesn’t follow the recent standards? Just curiosity. on Linux Mint 12 ACPI works fine, which are the differences with the method implemented by developers?

However I also discovered that if I enable APM beside ACPI, at least the system doesn’t become slow, but APM tends to freeze the system.
APM - correct me if I’m wrong - is the old method; shouldn’t be at least robust (I don’t say better), since was developed with old standards?


#11

Well, at least my CPU supports SSE2 instructions :slight_smile:

So, is however not enough?


#12

I don’t know much about this, but Haiku has little control on it. We use the standard implementation of ACPI (ACPICA) and just run their code. This code relies on data provided by the computer manufacturer (ACPI tables, built into the BIOS) to know what to do.

What usually happens is that the manufacturer made mistakes in their ACPI tables or did not follow the standards. They usually cover this up in their Windows drivers. And Linux people make enough efforts to extract these fixes and integrate them in their own ACPI driver. But we rely on manufacturers doing things right (and in most recent machines, they do).

There is also another problem: the way we manage clocks when doing powersaving. There are various clocks running at different speeds in a computer, and some are stopped or change speed when saving power. Some early implementations slowed down the clock we use to keep track of the “wall clock” time, so the deskbar clock can end up running out of sync on such machines. This is also something that was changed in modern machines where we can rely on this clock always running at the same speed (even when the CPUs themselves are slowed down for powersaving or stopped and put asleep). Avoiding this problem would need a lot of work and specific code for affected machines. We could do it, but we have enough work trying to keep up with recent machines already, so maybe trying to get older ones to work is not the best way to spend our time.

APM is a very old thing, and I don’t think it did get much attention in Haiku either (except to get shutdown working before we got ACPI, maybe). So it should be more stable on the hardware side, but our drivers may also need some debugging.


#13

@PulkoMandy answered your question, but you can also check how many people affected by non-standard ACPI tables, just search for “DSDT patching”.

Maybe you can search for pre-patched DSDT for your Laptop too. Haiku doesnt provides any way to override the BIOS provided one, but you can load it with 3rd Party bootloaders.

Or you can extract it from your BIOS, decompile it, and you can try to recompile the results, to See how many problems lurking in it. Prepare yourself, it will be surprising.

Just forgot that concept, that it is just a printed circuit. Your motherboard is a frickin complicated stuff, and it doesn’t speak the standard. And every motherboard comes with different DSDT. And every BIOS update also introduces a different DSDT, with different quirks.

FYI: he DSDT programming guide is more than 3000 sites long. A fun night-read… I really like it, one can Do cool hacks with it.

Other solution: check your computer-specific Linux ACPI patches and try to implement it for Haiku, or complain to your hardware OEM.


#14

Thank you for your complete answer, @extrowerk

However I have a good news:
I updated Haiku from hrev51713 to hrev51724, after seeing that Fredrik Holmqvist done some commits about ACPI http://cgit.haiku-os.org/haiku/log/

Well: the system, at least, don’t behaves as before: is no longer slow, when ACPI is enabled; and the battery no longer drains fastly.