Questions tagged [power-off]

The term "power-off" in embedded or computing devices is the idea of stopping the operations of a piece of hardware unit itself, not by turning off the power, but by using some sort of preregistered hooks in software (kernel) to tell the machine that it is time to stop(turn off) the system peripherals and eventually entire hardware device.

41 questions
34
votes
3 answers

Powering off Android Things

Usually, to power down an Android device, you do this via the power button of course. You can also do adb shell and reboot -p. But in Android Things, I don't see a way to shut down the device. If it is no problem, I'd love to just cut the power of…
Boy
  • 5,006
  • 4
  • 47
  • 60
9
votes
3 answers

How to reveal that screen is locked?

In my application I need to know when device is locked (on HTC's it looks like short press on "power" button). So the question is: which event is triggered when device is locked? Or device is going to sleep?
Barmaley
  • 16,009
  • 17
  • 68
  • 139
5
votes
1 answer

How to handle power off button on a notebook

I want to handle power off button pressing on my notebook with Windows 7. I've configured power management options to do nothing on this event, so it will not turn off immediately, but i want to catch the moment when user presses power button. How…
madhead
  • 25,830
  • 14
  • 131
  • 174
5
votes
2 answers

How to make linux power off when halt is run?

I have successfully used the pm_power_off function pointer to make my custom Linux board call its power management chip over i2c (to turn the power off). I would like the Linux halt command to switch the power off too. How can I achieve this? The…
fadedbee
  • 37,386
  • 39
  • 142
  • 236
3
votes
5 answers

Embedded File System and power-off

I am working on an embedded application without any OS that needs the use of a File System. I've been over this many times with the people in the project and some agree with me that the system must make a proper shut down of the system whenever…
morcillo
  • 967
  • 4
  • 17
  • 47
2
votes
2 answers

Shutdown menu by code

Is there a way to make the "Phone Options" menu ( the one that is showed when you long press the power button with power off / airplane mode ... ) show by code without having to root the phone ? The idea is just to show it.
user1077915
  • 654
  • 1
  • 6
  • 18
2
votes
0 answers

poweroff redirect system halted

I'm playing with image built from Builtroot, and run with QEMU. But when I run "poweroff" command, machine not shutdown. And "System halted" appear! (See console output bellow) # poweroff # Stopping network: OK Saving random seed: random: dd:…
2
votes
0 answers

Where is the correct place in the kernel to add platform-specific halt and power-off

I'm writing a platform-specific multi-function device driver, which includes an i2c driver. I want to send an i2c message to a custom power-management chip, when the Linux kernel is halted or powered-off. I've tried pm_power_off = my_func to…
fadedbee
  • 37,386
  • 39
  • 142
  • 236
2
votes
1 answer

When recording MP4 using ffmpeg suddenly power off

Now I used C language and ffmpeg realize a multiplex real-time audio and video to MP4 files of the program and everything works fine, but when in the process of reuse of sudden power failure, the recording is MP4 file is damaged, VLC can not play…
wanglx
  • 21
  • 4
2
votes
1 answer

AlarmManager.RTC_WAKEUP not wakes up my android devices when it is switched off

I have used below code to schedule an alarm in my android application. /** * To set the alarm service to be fire on OFF mode */ public void setOffModeAlarmService() { int offModeStartHour = 8; int offModeStartMinute =…
1
vote
1 answer

Last command during poweroff

I am writing some software to shutdown some external hardware wired into my control board. The catch is that I need to wait for the VERY end of the poweroff operation to send the signal (through a gpio output). I am weighing some options right now,…
Austin
  • 158
  • 1
  • 11
1
vote
2 answers

Power OFF the Beaglebone Black without Button or hardware intervention

I need to power OFF the Beaglebone black from a Python Code directly without using any gpio buttons or any hardware intervention. There is the command line shutdown -h now but this command won't work on a python code since it requires a sudo…
dorian
  • 63
  • 8
1
vote
1 answer

Unable to send SMS before shutting down device

I'm developing an app which needs to send an SMS if / when the device shuts down. In order to receive the action I'm using android.intent.action.ACTION_SHUTDOWN and android.intent.action.QUICKBOOT_POWEROFF actions, and it works perfectly well. In…
Grender
  • 1,478
  • 1
  • 14
  • 39
1
vote
0 answers

Power Off Message Android

I am using the following intent filters for detecting power off for a device
Parth Kapadia
  • 323
  • 1
  • 17
1
vote
1 answer

Programmatically power off the windows machine immediately

Can I create a simple program to power off the windows machine immediately? I would like the behavior to be like pressing PWR OFF/RESET button. So the power is cut off immediately. Is there any way to send a software interrupt to motherboard to make…
HcTeP
  • 11
  • 1
1
2 3