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
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
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Completely disable power management
« previous next »
  • Print
Pages: [1]

Author Topic: Completely disable power management  (Read 737 times)

Offline palik4

  • Member
  • *
  • Posts: 8
Completely disable power management
« on: September 30, 2019, 06:02:57 PM »
I'm experiencing random skips and freezes with Rockbox 3.14 on my Sandisk Sansa Clip+ using a Sandisk UltraSDXC 128 GB SD card. I'm pretty sure they're related to heavy power management that managed to double battery life and was introduced in 3.14. Playback stops and device starts to hang as if it was waiting for a blocking event. Once I even got a dc_write_callback() PANIC as well. I experience this a few times a week and is getting more and more annoying.

I don't really have the time and the patience to do hours of debugging with dozens of development builds. I just want to use my Clip+ for playing music, preferably with a stable version. Rockbox performs very well on my Clip+ and goes for about 26-30 hours, however I would also be happy with going only for 12 hours if it was stable enough.

I would like to tell Rockbox to stop messing around with voltages or stop all kinds of power management. How would this be possible?

I was also thinking of going back to 3.13 but I would really miss some new improvements like adjustable resampler, high quality compressor, etc.

Help is appreciated.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Completely disable power management
« Reply #1 on: September 30, 2019, 10:45:52 PM »
Under the debug menu, you can go and set the CPU boost to 2 or higher, in which case all clocks and voltages are locked at max.  Might be worth trying that with a playlist set to loop overnight and see if it crashes. 

Logged

Offline palik4

  • Member
  • *
  • Posts: 8
Re: Completely disable power management
« Reply #2 on: October 01, 2019, 03:34:24 AM »
That's exactly I was looking for. Thanks!

Are the values of maximum voltages the same as the original firmware (with less power management capabilities in general) uses most of the time?

Meanwhile I found a very similar issue. Does setting boost_counter to 2 achieve the same voltage raise for the SD card that your patch would do with boost_countetr=0?

How can I make the setting of boost_counter persistent and keep it even after a reboot?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Completely disable power management
« Reply #3 on: October 01, 2019, 09:39:15 AM »
We don't know what the OF voltages are, although I suppose for something external like the SD card you might be able to measure them with some effort.

Disabling voltage and clock scaling is not the same as the SD card changes in that thread.

If raising the boost counter works, I'll make you a build that has it by default.
Logged

Offline palik4

  • Member
  • *
  • Posts: 8
Re: Completely disable power management
« Reply #4 on: October 01, 2019, 05:49:30 PM »
Quote
If raising the boost counter works, I'll make you a build that has it by default.
Thanks, that would be useful. Meanwhile I was able to create my own build environment inside docker, so a diff would be enough. ;)

However, first I'll see if the solution for the mentioned SD card freeze issue solves my problem, as I have found your patch from June 2017 on CVDD2 voltage increase for SD cards. I took that and cherry-picked on top of the v3.14 branch, then created a custom 3.14 build for further testing during normal operation. It works so far without issues. We'll see how it goes for a week.

By the way, regarding power management, is there any chance of Rockbox PM distorting audio at specific volume ranges? How is the voltage of the end amplifier (that generates the output for headphones) linked to CPU voltage/frequency?
« Last Edit: October 01, 2019, 05:54:45 PM by palik4 »
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Completely disable power management
« Reply #5 on: October 01, 2019, 08:55:03 PM »
Quote from: palik4 on October 01, 2019, 05:49:30 PM
However, first I'll see if the solution for the mentioned SD card freeze issue solves my problem, as I have found your patch from June 2017 on CVDD2 voltage increase for SD cards. I took that and cherry-picked on top of the v3.14 branch, then created a custom 3.14 build for further testing during normal operation. It works so far without issues. We'll see how it goes for a week.

I didn't catch that you were running 3.14 and not the current build.  If that patch helps, just update and you'll have those changes.

Quote from: palik4 on October 01, 2019, 05:49:30 PM
By the way, regarding power management, is there any chance of Rockbox PM distorting audio at specific volume ranges? How is the voltage of the end amplifier (that generates the output for headphones) linked to CPU voltage/frequency?

Yes.  There is a seperate power rail for the audio system.  The voltage is set so that the player will distort above 0dB. 
Logged

Offline palik4

  • Member
  • *
  • Posts: 8
Re: Completely disable power management
« Reply #6 on: October 02, 2019, 02:14:33 AM »
Quote
If that patch helps, just update and you'll have those changes.
Yes, I know but my intention was to keep the stable build if possible and have the fix only for things that really need to be fixed. I could verify the patch has become effective as CVVD2 is now between 2750-2765 under Debug -> View I/O Ports.

Quote
Yes.  There is a seperate power rail for the audio system.  The voltage is set so that the player will distort above 0dB.
Good to know. I also noticed that above 3 dB the volume doesn't change immediately but with a 2 second delay. Is this some kind of software volume overdrive that takes place in the audio buffer?

I've also read in a previous thread that voltage for the audio system is lowered for power management purposes if I stay at lower volume levels. I can hear pops & crackles when adjusting the volume between -43 and -44 dB, -9 and -8 dB, -3 and -2 dB, 1 and 2 dB. These are hardly noticeable during playback but indicate that something changes underneath. Are these voltage levels safe for all kinds of audio equipment used for listening, and should not distort at any levels below 0 dB, regardless the impedance of connected headphones or amplifier?
« Last Edit: October 02, 2019, 02:16:33 AM by palik4 »
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Completely disable power management
« Reply #7 on: October 02, 2019, 09:03:31 PM »
Quote from: palik4 on October 02, 2019, 02:14:33 AM
Quote
If that patch helps, just update and you'll have those changes.
Yes, I know but my intention was to keep the stable build if possible and have the fix only for things that really need to be fixed.

As you have noticed, old builds tend to be less stable than newer ones, so I do not recommend doing this.

Quote from: palik4 on October 02, 2019, 02:14:33 AM
Good to know. I also noticed that above 3 dB the volume doesn't change immediately but with a 2 second delay. Is this some kind of software volume overdrive that takes place in the audio buffer?

We don't do software volume control, and there should not be any delay.

Quote from: palik4 on October 02, 2019, 02:14:33 AM
I've also read in a previous thread that voltage for the audio system is lowered for power management purposes if I stay at lower volume levels.

I don't think we do anything like that, although I could be forgetting. 

Quote from: palik4 on October 02, 2019, 02:14:33 AM
I can hear pops & crackles when adjusting the volume between -43 and -44 dB, -9 and -8 dB, -3 and -2 dB, 1 and 2 dB. These are hardly noticeable during playback but indicate that something changes underneath.

That was a side effect of one of the more recent changes, I think this one:  https://github.com/Rockbox/rockbox/commit/42219b6e797791e2c037c41393a87513973e4588

These voltage levels are within spec.  I think the minimum impedance without distortion is around 8-10 ohms, that is a hardware thing that cannot be changed and does not depend on voltage.
Logged

Offline palik4

  • Member
  • *
  • Posts: 8
Re: Completely disable power management
« Reply #8 on: October 04, 2019, 07:03:32 AM »
Quote
As you have noticed, old builds tend to be less stable than newer ones, so I do not recommend doing this.
I'm not really a fan of rolling releases. :-\ They always tend to have more bugs and instability by definition, as new features always come with new bugs. Also, I don't like changes of behavior, even small ones, like extra or removed menu entries, extra features I don't need. The real problem here is that your stable branch doesn't get updated with bugfixes. If it did, it would be more stable than your development builds by definition. In the future it would be nice to have a real maintenance release (like a 3.14.1), with bugfixes only against a stable branch (now 3.14). 8) However, if your CVVD2 patch doesn't help on the SD card freeze problem, I will give the devlopment build a try for daily usage. ;)

Quote
We don't do software volume control, and there should not be any delay.
If you raise the volume from 2 to 3-6 dB, there is definitely a 2 second delay before the audible amplification takes place. Below 2 dB the audible volume is changed immediately. This effect just reminded me to software volume overdrive which players do in their buffer so it would take a few moments to the not-yet amplified buffer data to be read and played.

Quote
These voltage levels are within spec.  I think the minimum impedance without distortion is around 8-10 ohms, that is a hardware thing that cannot be changed and does not depend on voltage.
That is good to know. Thanks for clarifying.
Logged

Offline johnb

  • Member
  • *
  • Posts: 207
Re: Completely disable power management
« Reply #9 on: October 04, 2019, 09:09:08 AM »
On the AMS Sansas, the volume step is 1.5dB.
I.e. you have to click twice to really hear a change (otherwise it is rounded).
See
http://gerrit.rockbox.org/r/#/c/1555/

Is this what you experience?
Logged

Offline palik4

  • Member
  • *
  • Posts: 8
Re: Completely disable power management
« Reply #10 on: October 05, 2019, 05:57:21 PM »
Quote
http://gerrit.rockbox.org/r/#/c/1555/
Is this what you experience?
No, this is not what I experience. At every single volume step I do hear a difference. I also hear difference between 2 and 3-6 dB but with a slight delay.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Completely disable power management
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.076 seconds with 15 queries.