wake

Linux电源管理(7)_Wakeup events framework

£可爱£侵袭症+ 提交于 2019-12-05 20:35:57
1. 前言 本文继续“Linux电源管理(6)_Generic PM之Suspend功能”中有关suspend同步以及PM wakeup的话题。这个话题,是近几年Linux kernel最具争议的话题之一,在国外Linux开发论坛,经常可以看到围绕该话题的辩论。辩论的时间跨度和空间跨度可以持续很长,且无法达成一致。 wakeup events framework是这个话题的一个临时性的解决方案,包括wake lock、wakeup count、autosleep等机制。它们就是本文的话题。 2. wakeup events framework要解决的问题 我们知道,系统处于suspend状态,可通过wakeup events唤醒。具体的wakeup events可以是按键按下,可以是充电器插入,等等。但是,如果在suspend的过程中,产生了wakeup events,怎么办?答案很肯定,"wakeup"系统。由于此时系统没有真正suspend,所以这的"wakeup"是个假动作,实际上只是终止suspend。 但由于系统在suspend的过程中,会进行process freeze、 device suspend等操作,而这些操作可能导致内核或用户空间程序不能及时获取wakeup events,从而使系统不能正确wakeup,这就是wakeup events

iPhone alarms that wake up the device from sleep with sound

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm a bit confused on iPhone's capabilities for alarms (local notifications) and I haven't found a clear answer yet. I would like to create functionality like the alarm clock (or even new mail). Specifically, if the device is asleep, it gets waken with a buzz or sound. A popup message that you can't see (because the device is asleep) is a lot less useful. But, it seems that using the UILocalNotification service, this doesn't seem to be happening. I haven't checked out push notifications, but they seem to be for something else. I'm may be

timeout has expired, giving up wake lock!

匿名 (未验证) 提交于 2019-12-03 09:19:38
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a doubt...i am not sure whether its some carelessness from my part. I was using mBitmap.compress(Bitmap.CompressFormat.PNG,100, out); to save a bitmap to png . In the code the line beneath this code does not respond along with this. Let me make it clear, I have given Log.i(xy,xy); in all the alternating lines in the method to trace the issue, but all the Log until the line before mBitmap.compress(Bitmap.CompressFormat.PNG,100, out); prints and I have included the whole code in a try-catch , but no exception was caught. I have checked

How to wake up an Android on incoming data

匿名 (未验证) 提交于 2019-12-03 09:02:45
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want an Android service, which is listening for data (I have tried TCP and UDP) to wake up the service/phone when data arrives. Currently the phone stays asleep when IP data arrives and that data is lost. Is this normal for Android? I see sleeps of 2+ hours several times a day, and 7+ hour sleeps when I am asleep. Does GCM provided a solution which wakes up a service/phone when a message arrives. I need messages to be displayed within a few seconds of them being sent from the server. Can this only be achieved by keeping the CPU running all

android: turn off screen when close to face

匿名 (未验证) 提交于 2019-12-03 03:02:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My app allows the user to access their corporate voice mail. Normally, durring a phone call when the user holds the device up to their ear, the screen shuts off so they wont accidentally push buttons with their face. I would like to make my app do the same thing when the user is listening to their voice mail. anyone know how to do this? 回答1: What you are seeing is the use of a proximity sensor. For devices that have one, you access it through SensorManager . 回答2: If you are allowed to look at open source code without causing yourself

How do I wake from display sleep in OSX 10.7.4?

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In the most recent version of OSX Lion, how do you wake up the machine from display sleep? This is in response to network activity. In 10.7.3 this was possible with the following call: IOPMAssertionID id = 0; IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reason, &id) However, this does not work in 10.7.4. What can be done instead? 回答1: I have not yet tested the performance implications nor the interaction with the idle timer itself, but: io_registry_entry_t regEntry = IORegistryEntryFromPath

Battery historian cannot find end time android

匿名 (未验证) 提交于 2019-12-03 02:27:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to use Battery Historian Python script from GitHub to analyze battery usage, but the html generated each time I use the script shows "cannot find end time". I'm following the steps form here . Here is a sample batterystats.txt file generated: Battery History: -2m43s770ms 100 44020302 status=not-charging health=good plug=none temp=270 volt=4339 +wifi +wifi_running +wake_lock brightness=medium phone_state=off -2m43s151ms 100 44020302 -2m38s500ms 100 04020302 -wake_lock -2m20s496ms 100 44020302 +wake_lock -2m17s471ms 100 04020302

How to wake up iPhone app from watchOS 2?

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an app that has a very rich network layer and my apple watch app depends on all the models. Unfortunately the app is not modular enough to make this layer available in the watch app. I solved this problem by using openParentApplication: to wake up the iPhone app, perform the request and give back the results. In watchOS 2 this method is gone and I should use WatchConnectivity. The best way to use this would be by sending userInfo dictionaries. But how can I wake up the iPhone app to handle my requests? To get notifications about new

How to wake up iOS app with bluetooth signal (BLE)

匿名 (未验证) 提交于 2019-12-03 01:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: using the BLE with CoreBluetooth (no iBeacon), is there a way to wake app a not running app when the device receives a bluetooth signal? I'm simulating a beacon with the redbearlab's BLE Shield ( http://redbearlab.com/bleshield/ ). Thanks, DAN * UPDATE 03/05/14 * It looks like Apple has introduced a major update with iOS 7.1: now iOS will open your app for you if it detects a UUID that matches your app. The app only needs to be installed, it doesn't have to be running (logic in AppDelegate needed to answer the wake-up call). 回答1: If the app