No matter which charger I connect (original Nokia N900 charger, powerbank, generic dumb wall charger, PC USB port), the only effect I see is that the reported negative current_now reduces for about 100mA, but does not go positive.
Also the voltage stays low, not indicating charging.
What I suspect is that the charger does not negotiate for more than 100mA basic USB current.
I can charge the n900 when booted into maemo, so the hardware is OK.
I also don't see anything inside dmesg concerning a charger being connected.
Edited
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
It seems this problem happens if the battery is too empty. I had to charge the battery manually with an external charger because I couldn't get it to charge in the phone.
I'm running it down now, while monitoring the voltage until n900 shuts down.
When this problem happend first, I had left the phone to run empty and then started it again.
It did start, but the battery was below 3.2V. at the end it was even below 3V. This deep discharge should not have happened. I think in maemo the kernel prevents a boot when the battery is this empty.
Administratorchanged title from [nokia-n900/RX-51] charging does not work to [nokia-n900/RX-51] charging does not work after battery runs empty·
Imported
changed title from [nokia-n900/RX-51] charging does not work to [nokia-n900/RX-51] charging does not work after battery runs empty
I ran down the battery over night, with logging over netcat, and it cut out at 2.8V, which is way too low. I think maemo cuts out at 3.2V.
Interestingly I could start a charge with the powerbank, but I let it boot into maemo charge mode and let it charge for a few minutes.
Then I unplugged and booted into postmarketOS, which again ran with a voltage below 3.2V.
Plugging in the charger then did work.
So the main problem seems to be that when you accidentally boot the phone with an empty battery, it will let you boot, but the charger will no longer work.
If you want to, you could compare this with Maemo Leste, they are using the mainline kernel too and maybe they have it figured out already (so we could compare with postmarketOS and fix it).
Various "strange" chargers behave strangely, and problem is more
serious when battery is empty. For example now I'm looking at
"strange" charger providing 5.35V, 0.03A. Yesterday it charged N900
normally, now it does not. And this is with Maemo (kernel-power).
On N900, you normally want to set "current_limit" in /sys/.../. 1800
for good wall charger, 500 for PC.
If battery is very low, not even maemo boots. Bootloader turns on
yellow LED, refuses to boot, and charges very slowly. After half an
hour or so it boots into Linux which (again) plays dead, but this time
it charges fast and yellow light pulsates.
The thing is that my n900 seems to not like the original charger anymore. I only get the a periodic rd flash meaning charger error. I might have broken it running my pi1b off it for a couple of years. :(
The only way i can get my n900 to charge at the moment is my powerbank or a PC.
I'll give maemo-leste a try over the weekend.
Also I'm running kernel-power53 and bme-replacement on my maemo already.
Ok, in such case, I'd charge from PC. But you need to set the
current_limit to 500 to get any useful charging, and you may want to
set it to 1800 (violating the specs, but most PCs handle that ok.)
The same 'problem' happens on Leste. However, as you've correctly identified, the issue is that we don't turn the device off when the battery gets critically low. Maemo turns the device off somewhere between 3000-3200mV (3248mV is where calibration takes place, so you should not turn device off before this)
The solution to run some sort of daemon that will monitor the battery level. I think Pavel's unicsy_demo has a battery monitor.
I've been working on a boot lock script to prevent booting while the battery is low and also powers off the phone if the battery voltage is too low (meaning no charger connected). It works, but it's not nice yet. I'm having problems with controlling the console while output is redirected to the log file.
As for a low voltage shut down: a shell script with sleeps seems too power hungry most of the time. It would be nicer if there was ACPI functionality like on a laptop.
Having this properly in the kernel is probably the best approach. But in the meantime, I think it would be great to have a userspace solution, like what @Darrien has been working on.
As for a low voltage shut down: a shell script with sleeps seems too power hungry most of the time. It would be nicer if there was ACPI functionality like on a laptop.
Well, having a shell script with sleeps would be better than what we have now at least :) @Darrien: it would be awesome if you could streamline your scripts and make a merge request with them.
Afterwards we could follow up with a generic c program (so it is very battery friendly), which works for all devices by reading the /sys paths and threshold values from a config file. If we had that, we could simply make a device depend on that batterywatchdog package (or how we would call it), and install the device specific config file, and then it works for any device which would need it.
But really, if it belongs in kernel, it should be in kernel, and
kernel programming is not that hard compared to userland C
development. Plus there's already a patch (which just misses
configurability) and Sebastian is likely to take it after some tweaks.
Administratorchanged title from [nokia-n900/RX-51] charging does not work after battery runs empty to [N900/RX-51] charging does not work after battery runs empty·
Imported
changed title from [nokia-n900/RX-51] charging does not work after battery runs empty to [N900/RX-51] charging does not work after battery runs empty