Questions tagged [power-management]

The process by which some operating systems will attempt to conserve energy.

May include spinning down disks or fans during idle time. May also effect monitors and entire systems.

Power management system usually implement selectable policies such as conservative or performance.

Primarily relevant to laptops where battery life is an issue though may also refer to turning off monitors to avoid screen burn-in.

See also hibernate and sleep.

473 questions
6
votes
1 answer

Read power input from usb

Is there any way to read the power input from a USB connection in Android? For example plug in a micro usb lead into the phone from either a computer USB output, a mains charger, or something similar and read the voltage and amp output? I have no…
Thomas Clayson
  • 29,657
  • 26
  • 147
  • 224
6
votes
2 answers

Battery status is always not charging

@Override public void onReceive(Context context, Intent intent) { int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, BatteryManager.BATTERY_STATUS_UNKNOWN); if (status == BatteryManager.BATTERY_STATUS_CHARGING || status ==…
Mohit Deshpande
  • 53,877
  • 76
  • 193
  • 251
6
votes
2 answers

My screensaver is stopping screen suspend but I don't want it to

I made a screensaver in .Net 4.0. It basically just moves the bits in an image around and displays it using .Invalidate on a timer and overriding the onPaint event. So far, it works great - however - I noticed one problem with it. It's stopping the…
Dracorat
  • 1,184
  • 7
  • 12
6
votes
1 answer

Android - Activity has leaked IntentReceiver

I'm writing very simple app. It works OK, but when I hit a back key it crashes (Activity has leaked IntentReceiver that was originally registered here). This app should work in background. How to do it properly? import android.app.Activity; import…
user1411291
  • 81
  • 1
  • 3
6
votes
3 answers

How is the Android battery health determined?

I am not talking about how to read the value. Rather, I am interested in how the value of BatteryManager.EXTRA_HEALTH is being set. Does it come from the firmware? Manufacturer specific? What determines these values? int BATTERY_HEALTH_COLD int…
simonso
  • 595
  • 1
  • 8
  • 19
5
votes
4 answers

iPhone GPS - Battery Draining Extremely Fast

We are developing an app that has heavy GPS usage, and we are unable to optimize the battery life. Even when the device is not moved, there is significant battery drainage that, according to the code, should not happen. Here is the…
KB403
  • 91
  • 1
  • 5
5
votes
2 answers

Android disable display off while charging

In my application I need to disable display power off when device is charging. There is an option in Developer Menu to disable it, so I can to send Intent for user to enable it. Also I've found info about PowerManager and WakeLocks, but it is for…
skayred
  • 10,603
  • 10
  • 52
  • 94
5
votes
1 answer

Why do MWAIT Power Management hints cause premature wakeups?

For university I'm currently experimenting with the MONITOR/MWAIT instruction pair. Specifically, I want to measure how much energy the CPU uses in different scenarios and have already programmed a relatively well working test setup. As part of the…
ObiBabobi
  • 63
  • 4
5
votes
1 answer

What is the latest auto-start activity intent for Huawei's system settings?

Previously, an intent with one of the following components lead me to Huawei's system settings to change the auto-start behavior of an app. ComponentName( "com.huawei.systemmanager", …
5
votes
1 answer

How to enable ACPI (for powering off) on LattePanda

I wrote this code to use ACPI for powering off computers from my program launched from 64-bit UEFI. (sorry for long code, but I think all parts are necessary) #include #define in8(data, port) __asm__ __volatile__ \ ("xor %%eax,…
MikeCAT
  • 73,922
  • 11
  • 45
  • 70
5
votes
1 answer

How to set cronjob on wake up from sleep?

For example if you want a cron job to run after each reboot, you add sth like this to your cron file: @reboot ./do_sth Is there something similar to that for waking up from a sleep state?
Charming Robot
  • 2,460
  • 2
  • 17
  • 34
5
votes
2 answers

Appropriate audio format for sound effects on Android phones regarding efficiency

I profiled my programs, and it turned out a large portion of CPU was spent on SoundPool.play(). The game has ~10 sound files, each under 1 second. Currently they are 64kbs variable MP3s. They are loaded to a SoundPool at the beginning and played…
Phil
  • 5,595
  • 5
  • 35
  • 55
5
votes
1 answer

Is there any way to receive a CPU wake event in Android?

I'm trying to reduce power consumption in an Android application which must do some menial data processing periodically, but not so urgently that it needs to trigger wakes itself. Is there any way to receive an event when another app or process is…
KG6ZVP
  • 3,610
  • 4
  • 26
  • 45
5
votes
0 answers

Possible to find all Windows processes preventing automatic sleep, w/o admin rights?

The command powercfg -requests will provide a list of processes that are currently preventing a Windows 10 device from automatically entering sleep mode. However, the command requires administrator permissions. Asking for admin access just to…
5
votes
5 answers

Compact Framework - System.Threading.Timer stops when the user turns off the screen

I have an application that needs to "poll" a webservice to see if the user has any new messages waiting. I have no control over the webservice so I cannot switch to a "push" mechanism, I'm stuck making a request every X number of seconds to see…
Jake Stevenson
  • 3,009
  • 6
  • 35
  • 40