Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Third Party
| |-+  Repairing and Upgrading Rockbox Capable Players
| | |-+  iPod Mini 2G Dramatic difference in battery life
« previous next »
  • Print
Pages: [1] 2

Author Topic: iPod Mini 2G Dramatic difference in battery life  (Read 5775 times)

Offline denkly

  • Member
  • *
  • Posts: 4
iPod Mini 2G Dramatic difference in battery life
« on: April 15, 2024, 06:26:22 AM »
Hello! I've successfully upgraded my Mini 2G with iFlash CF-SD + new 600mAh battery. Installed Rockbox Daily, no problems. Did some tests and figured that on Rockbox playtime is about 6 hours, while on original OS it's over 20 hours. Is there some patch i need to apply? I don't want to stick with original OS on Mini, cause it's sounds so nice on Rockbox.
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 657
Re: iPod Mini 2G Dramatic difference in battery life
« Reply #1 on: April 15, 2024, 08:18:38 AM »
Rockbox writes to the disk far, far more often than the Apple firmware.

The fundamental problem is that the CF->SD chipset the iFlash adapters are built on don't properly support standard ATA power management commands (including "run in the lowest power mode possible without automatically going to sleep" and "flush everything to disk so it is safe to sleep" and even "flush everything and go to sleep now") so we have no way of reliably knowing when it is actually safe to kill power.  Even the "just flush everything" command falsely claims success!)  Killing power when it's not safe is near-guaranteed to cause data corruption.  So we are forced to leave power on, which can severely hurt battery life depending on the specific SD card.

That said there is a flaw in the current code that results in power being left on even when it's safe to turn off -- I have a patch in gerrit that needs some wider testing:

  https://gerrit.rockbox.org/r/c/rockbox/+/5647

Meanwhile, SATA SSDs are are a different kettle of fish, and there are supposedly issues there too, but since these are native ATA devices, more research is needed to determine the root cause of reported issues with those.  For example, many problems have been traced to loose/flaky cables, which obviously that has nothing to do with Rockbox.  Similarly, the SATA SSDs usually have _worse_ power characteristics than the original hard drives, which again is not uinque to Rockbox.
Logged

Offline denkly

  • Member
  • *
  • Posts: 4
Re: iPod Mini 2G Dramatic difference in battery life
« Reply #2 on: April 15, 2024, 09:29:30 AM »
Quote from: speachy on April 15, 2024, 08:18:38 AM
Rockbox writes to the disk far, far more often than the Apple firmware.

The fundamental problem is that the CF->SD chipset the iFlash adapters are built on don't properly support standard ATA power management commands (including "run in the lowest power mode possible without automatically going to sleep" and "flush everything to disk so it is safe to sleep" and even "flush everything and go to sleep now") so we have no way of reliably knowing when it is actually safe to kill power.  Even the "just flush everything" command falsely claims success!)  Killing power when it's not safe is near-guaranteed to cause data corruption.  So we are forced to leave power on, which can severely hurt battery life depending on the specific SD card.

That said there is a flaw in the current code that results in power being left on even when it's safe to turn off -- I have a patch in gerrit that needs some wider testing:

  https://gerrit.rockbox.org/r/c/rockbox/+/5647

Meanwhile, SATA SSDs are are a different kettle of fish, and there are supposedly issues there too, but since these are native ATA devices, more research is needed to determine the root cause of reported issues with those.  For example, many problems have been traced to loose/flaky cables, which obviously that has nothing to do with Rockbox.  Similarly, the SATA SSDs usually have _worse_ power characteristics than the original hard drives, which again is not uinque to Rockbox.

Thanks! Hope it will be resolved, as Mini is one the greatest :)
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 467
Re: iPod Mini 2G Dramatic difference in battery life
« Reply #3 on: April 15, 2024, 05:43:17 PM »
Quote from: speachy on April 15, 2024, 08:18:38 AM
Rockbox writes to the disk far, far more often than the Apple firmware.

The fundamental problem is that the CF->SD chipset the iFlash adapters are built on don't properly support standard ATA power management commands (including "run in the lowest power mode possible without automatically going to sleep" and "flush everything to disk so it is safe to sleep" and even "flush everything and go to sleep now") so we have no way of reliably knowing when it is actually safe to kill power.  Even the "just flush everything" command falsely claims success!)  Killing power when it's not safe is near-guaranteed to cause data corruption.  So we are forced to leave power on, which can severely hurt battery life depending on the specific SD card.

Does this mean that a Rockbox user would see a notable power consumption improvement when using a true CF card rather than a CF->SD adapter?  (Meaning that a true CF card would be better than both the original HD and a CF->SD adapter?)

Is the power consumption even more degraded if the CF->SD adapter contains a microSD in an SD->microSD adapter?

Are you able to specify/recommend which SD (and/or microSD) cards do better than others re Rockbox power consumption with a CF->SD adapter?

[Edit - adding the following question]
Does Rockbox do better re power consumption when the mini contains one of the cheapo CF->SD adapters rather than the iFlash version?

Thanks very much.
« Last Edit: April 15, 2024, 06:06:47 PM by iPodVT »
Logged

Offline denkly

  • Member
  • *
  • Posts: 4
Re: iPod Mini 2G Dramatic difference in battery life
« Reply #4 on: April 15, 2024, 07:12:25 PM »
Quote from: iPodVT on April 15, 2024, 05:43:17 PM
Is the power consumption even more degraded if the CF->SD adapter contains a microSD in an SD->microSD adapter?
Does Rockbox do better re power consumption when the mini contains one of the cheapo CF->SD adapters rather than the iFlash version?

I've done tests on both: Red CF-microSD Adapter + 128Gb Samsung EVO microSD — 6:10 hours of continuous FLAC playtime, iFlash CF-SD + Original SD Adapter + 512GB Samsung EVO microSD — 6:45 hours of continuous FLAC playtime. So about the same.

I have a question — this flaw is on ALL iPods with ATA (iPod Gen 3 A1040, iPod Gen 4 A1059/1099)? As i have iPod Gen 5 A1136, and it's playtime on Rockbox is very good. I'm getting 70 hours with 3000mah battery, thought i did not tested on original firmware. But, also, i have A1040 with CF-SD adapter, and Rockbox playtime is about the same 5-6 hours. Will do tests on A1040 on original firmware to confirm.
« Last Edit: April 15, 2024, 07:16:21 PM by denkly »
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 657
Re: iPod Mini 2G Dramatic difference in battery life
« Reply #5 on: April 15, 2024, 11:40:50 PM »
Quote from: iPodVT on April 15, 2024, 05:43:17 PM
Does this mean that a Rockbox user would see a notable power consumption improvement when using a true CF card rather than a CF->SD adapter?  (Meaning that a true CF card would be better than both the original HD and a CF->SD adapter?)

It is likely that the CF card has a higher active read/write current than the SD card would, but assuming it properly implements the (mandatory!) power management commands, then yes, it would show overall better power consumption because we'd be able to safely power it down.

Quote from: iPodVT on April 15, 2024, 05:43:17 PM
Is the power consumption even more degraded if the CF->SD adapter contains a microSD in an SD->microSD adapter?

No, the SD->uSD adapter is completely passive, only adapting the physical form factor.

Quote from: iPodVT on April 15, 2024, 05:43:17 PM
Are you able to specify/recommend which SD (and/or microSD) cards do better than others re Rockbox power consumption with a CF->SD adapter?

Unfortunately, no.  Anectdotally battery life reports have varied very widely, and given how commoditized SD cards are (and widespread counterfeits) just because a "FooCo Class 99 64GB" adapter showed good results doesn't mean that the next person trying to get the same model will see consistent results.

Quote from: iPodVT on April 15, 2024, 05:43:17 PM
Does Rockbox do better re power consumption when the mini contains one of the cheapo CF->SD adapters rather than the iFlash version?

AFAICT all of the PATA/CF->SD adapters are all built on the same FC1307 chipset, and perform identically (quality control notwithstanding; anectdotally the iFlash branded ones seem to have fewer problem reports...)

Quote from: denkly on April 15, 2024, 07:12:25 PM
I have a question — this flaw is on ALL iPods with ATA (iPod Gen 3 A1040, iPod Gen 4 A1059/1099)? As i have iPod Gen 5 A1136, and it's playtime on Rockbox is very good. I'm getting 70 hours with 3000mah battery, thought i did not tested on original firmware. But, also, i have A1040 with CF-SD adapter, and Rockbox playtime is about the same 5-6 hours. Will do tests on A1040 on original firmware to confirm.

It would behave more or less the same across all <6th gen models, correct.  The 6th gen's hardware is completely different and has a bespoke ATA controller+driver.  I'd expect the same sort of problems, but due to the 128GB limitation of the 6th-gen Apple firmware folks prefer to mod the 5th gen instead.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 467
Re: iPod Mini 2G Dramatic difference in battery life
« Reply #6 on: April 16, 2024, 08:11:20 AM »
Quote from: speachy on April 15, 2024, 08:18:38 AM
That said there is a flaw in the current code that results in power being left on even when it's safe to turn off -- I have a patch in gerrit that needs some wider testing:

  https://gerrit.rockbox.org/r/c/rockbox/+/5647

I would be happy to test this if there is a fully built version I can install.  I took a look at the page pointed to by the link above and it was not clear to me how I would incorporate the patch (which is something I've never done before).  At this time I can't take on the project of installing a development environment and building my own versions of Rockbox from code.

My mini is a 2nd Gen, containing an iFlash CF->SD adapter which contains a 256GB Samsung Pro Plus microSD in an SD->microSD adapter.  If I put a fresh battery in the mini, would it be necessary to first go through a few calibration cycles in order to get meaningful results from the power consumption testing?  (Which begs the question:  If a battery is disconnected and then reconnected, should it be recalibrated in order to get meaningful results from power consumption testing?)
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 657
Re: iPod Mini 2G Dramatic difference in battery life
« Reply #7 on: April 16, 2024, 09:12:44 AM »
Quote from: iPodVT on April 16, 2024, 08:11:20 AM
I would be happy to test this if there is a fully built version I can install.

Here are test builds for the ipod5g, ipod6g, and mini2g:

https://www.shaftnet.org/~pizza/rockbox-ipod5g-exp.zip
https://www.shaftnet.org/~pizza/rockbox-mini2g-exp.zip
https://www.shaftnet.org/~pizza/rockbox-ipod6g-exp.zip

For the purposes of this testing, the mini2g and ipod5g are interchangeable from a hardware/software perspective, but the ipod6g needs to be independently tested. 

All three identify as "ab2af16c7c-240415" and are are git master plus three patches from gerrit (#5647, #5648, and #5650) as of this writing. 
I have been updating those three files as I've made more changes, so any test results need to include the version string (taken from the "rockbox info" menu item).

There appear to be no regressions on the mini2g and ipod5g with their original hard drives.  I need data corruption and power consumption results for (1) real CF cards, (2), SD adapters, and (3) SATA adapters.  I'll also need to have the ssd detection sanity checked too; that's in the disk info debug page.

If there are any issues, I will also need (1) the "identify info" file (dumped via the debug menu) and (2) the contents of the disk info screens (ideally everything, but at minumum the power management and SSD lines)

I have a mini2g, but when taking it apart yesterday to swap in a CF card, I think I damaged the clickwheel ribbon cable, so I'm probably not going to get any useful testing done on it.  I also have a ipod5g with dead audio out that I intend to take apart for a SATA SSD swap, but I don't know when I'll have the time (and desk space) to get that done.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 467
Re: iPod Mini 2G Dramatic difference in battery life
« Reply #8 on: April 16, 2024, 10:20:36 AM »
I have installed ab2af16c7c-240415 onto my 2nd Gen mini with CF->SD adapter.  At the outset I'm seeing

SSD detected: yes
Power mgmt: unsupported

I don't know what you mean by "the ssd detection sanity"

Should I first see how long it will run with the Apple firmware as a benchmark, and then run this test version of Rockbox?  I figure I should do the Apple version first in case any corruption results from running the Rockbox version.

[edit: addition] Or at this point are you only/mainly interested in stability/robustness, not necessarily power efficiency and how it compares to the Apple firmware's power efficiency?
« Last Edit: April 16, 2024, 10:28:46 AM by iPodVT »
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 657
Re: iPod Mini 2G Dramatic difference in battery life
« Reply #9 on: April 16, 2024, 10:29:09 AM »
Quote from: iPodVT on April 16, 2024, 10:20:36 AM
I have installed ab2af16c7c-240415 onto my 2nd Gen mini with CF->SD adapter.  At the outset I'm seeing

SSD detected: yes
Power mgmt: unsupported

This is what I expected.

Quote from: iPodVT on April 16, 2024, 10:20:36 AM
Should I first see how long it will run with the Apple firmware as a benchmark, and then run this test version of Rockbox?  I figure I should do the Apple version first in case any corruption results from running the Rockbox version.

I'd expect battery life to not be so great with this, but the more important thing is to ensure there's no data corruption.  copy files over to it, do a database update, generally abuse things.  :)
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 467
Re: iPod Mini 2G Dramatic difference in battery life
« Reply #10 on: April 16, 2024, 10:31:09 AM »
Got it.  Will do.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 467
Re: iPod Mini 2G Dramatic difference in battery life
« Reply #11 on: April 22, 2024, 07:39:09 PM »
Quote from: speachy on April 16, 2024, 09:12:44 AM
Here are test builds for the ipod5g, ipod6g, and mini2g:

https://www.shaftnet.org/~pizza/rockbox-ipod5g-exp.zip
https://www.shaftnet.org/~pizza/rockbox-mini2g-exp.zip
https://www.shaftnet.org/~pizza/rockbox-ipod6g-exp.zip

Do you want me to continue to evaluate these test builds or should I switch to the new dev builds that contain today's code changes?

So far I have only tried the mini2g-exp version and it seems to have been stable for me.  I think it might be a bit sluggish in places, but I'm not sure of that because I hadn't previously used my mini in a while until I installed this test version, and I'm more accustomed to using 5G Videos and 6G Classics.
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 657
Re: iPod Mini 2G Dramatic difference in battery life
« Reply #12 on: April 22, 2024, 09:11:55 PM »
Quote from: iPodVT on April 22, 2024, 07:39:09 PM
Do you want me to continue to evaluate these test builds or should I switch to the new dev builds that contain today's code changes?

Current dev builds, please.   At worst they're no more broken than before.  :)

Quote from: iPodVT on April 22, 2024, 07:39:09 PM
So far I have only tried the mini2g-exp version and it seems to have been stable for me.  I think it might be a bit sluggish in places, but I'm not sure of that because I hadn't previously used my mini in a while until I installed this test version, and I'm more accustomed to using 5G Videos and 6G Classics.

When it comes to the raw oomph, the mini2g and ipod5g are more or less equivalent, but the 6g packs more of a punch.

The only change with respect to the 6G is that we now check to see if the storage device supports the power management ATA commands, and if not, don't issue them -- or power down.  This should at least prevent data corruption with the common SD adapters.
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 657
Re: iPod Mini 2G Dramatic difference in battery life
« Reply #13 on: April 22, 2024, 10:06:05 PM »
Quote from: speachy on April 22, 2024, 09:11:55 PM
Current dev builds, please.   At worst they're no more broken than before.  :)

   https://www.shaftnet.org/~pizza/rockbox-ipod6g-exp2.zip

Please try this one on the 6g.  It has some additions that might provide a path to powering off devices with SD adapters.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 467
Re: iPod Mini 2G Dramatic difference in battery life
« Reply #14 on: April 23, 2024, 12:41:09 PM »
Quote from: speachy on April 22, 2024, 10:06:05 PM
   https://www.shaftnet.org/~pizza/rockbox-ipod6g-exp2.zip

Please try this one on the 6g.  It has some additions that might provide a path to powering off devices with SD adapters.

I manually installed the above ipod6g-exp2 version (f042880bb4-240423) on my MC293LL/A Classic but it freezes on the boot splash screen.

I used Rockbox Utility to install a5d75a5743-240423 onto my 2nd Gen mini and 5.5 Gen Video and they are both rebuilding their dbs from scratch.  I have to turn to other things now, but I'll check back in later today.
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Third Party
| |-+  Repairing and Upgrading Rockbox Capable Players
| | |-+  iPod Mini 2G Dramatic difference in battery life
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.075 seconds with 21 queries.