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.

44 questions
36
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
  • 7,010
  • 4
  • 54
  • 68
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,638
  • 18
  • 73
  • 146
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
  • 31,729
  • 16
  • 153
  • 201
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
  • 42,671
  • 44
  • 178
  • 308
5
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
  • 1,091
  • 5
  • 19
  • 51
3
votes
1 answer

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:…
manhkhoa168
  • 151
  • 1
  • 4
  • 8
3
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
  • 31
  • 1
  • 5
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
  • 828
  • 1
  • 12
  • 26
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
  • 42,671
  • 44
  • 178
  • 308
2
votes
2 answers

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

what does shutdown -p command do?

In Linux, what does shutdown -p command do, will it directly power off the system without Halting? if it halts the system first then power off, then can we directly power off without halting using any command?
1
vote
3 answers

How to get Raspberry Pi‘s wlan1 interface work after poweroff?

I plugged an additional wifi connector in my Raspberry Pi 3B+. I can‘t see the interface of the additional connector after plugging my Raspberry Pi out of power or use sudo poweroff for save shutdown. But after sudo reboot the wifi connector is…
user9245497
  • 71
  • 1
  • 6
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
  • 318
  • 1
  • 3
  • 16
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
  • 10
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,589
  • 2
  • 17
  • 44
1
2 3