Questions tagged [wakeup]

Resuming the previously suspended thread, process, activity, application or the whole operating system.

203 questions
6
votes
3 answers

Android WakeLock

I have a problem with acquiring a WakeLock. It seems not to work. I am trying to acquire a FULL_WAKE_LOCK but neither the display gets enabled nor is my app able to perform tasks. I am using the following permission: android.permission.WAKE_LOCK My…
Coxer
  • 549
  • 1
  • 8
  • 8
5
votes
0 answers

are there reasons for sun.nio.ch.WindowsSelectorImpl.setWakeupSocket0 to hang

With JDK 1.6.024, we see threads consuming near 100% CPU in setWakeupSocket0() for a socket connection. This native method is called from setWakeupSocket() which in turn is the private part of wakeup() in this particular SelectorImpl. What could…
Ralf H
  • 1,392
  • 1
  • 9
  • 17
5
votes
4 answers

How to programmatically schedule system wake up using system preferences on a Mac?

I would like to programmatically wake up a Mac. I started off by using IOPMSchedulePowerEvent, however, that method requires admin access and privileged helpers. I've implemented and it works but is way too complicated. I've looked around for a…
David
  • 14,205
  • 20
  • 97
  • 144
5
votes
2 answers

Programmatically wake display on OSX

I've managed to get the display to sleep immediately with pmset displaysleepnow in terminal, however for waking the display I've only found pmset schedule wake "12/24/2009 00:00:00" which fails to work if I try to schedule anything earlier than…
Lee Andrew
  • 798
  • 7
  • 28
5
votes
2 answers

How to wake up android and show the activity?

Please, help me. I have a broadcast reciever: public class BrcRec extends BroadcastReceiver{ public static WakeLock wakeLock; @Override public void onReceive(Context context, Intent intent) { PowerManager pm = (PowerManager)…
user2254276
  • 51
  • 1
  • 3
5
votes
1 answer

Wake up Android Phone/tablet?

I've got a push notification-app, is there any way to wake up the screen (just make it light up) whenever I receive a push notification? if you want some code just let me know! and Thank you for your answers!
intINk
  • 129
  • 1
  • 12
4
votes
1 answer

Use NSWorkspaceDidWakeNotification to activate method?

I created a simple app to learn how to use NSWorkspaceWillSleepNotification and NSWorkspaceDidWakeNotification. My goal is to call a method when the computer sleeps and wakes. The app I created will change each label accordingly. After building the…
wigging
  • 8,492
  • 12
  • 75
  • 117
4
votes
1 answer

Should I explicitly wake a thread sucking on BlockingQueue.take() for performance?

I understand that having a thread sucking for elements of a BlockingQueue using the take() method will wait for an element to be available (unless it is interrupted). I have two questions: i) Is the thread automatically woken-up as soon as an…
Jérôme Verstrynge
  • 57,710
  • 92
  • 283
  • 453
4
votes
0 answers

C++ condition_variable and spurious wakeup

I'm interested to use the condition_variable to synchronize two threads ( A and B ) that don't share data. A good solution I found surfing the internet is the following one. class WaitableCondition I found it here : Paper link The problem is in two…
4
votes
1 answer

What to make of an "impossible" stack trace after a crash?

My program appears to be suffering from a very hard-to-reproduce bug: Once in a blue moon, when a user puts his Mac to sleep and later on wakes it back up again, one of my program's child processes will crash immediately after the Mac wakes…
Jeremy Friesner
  • 70,199
  • 15
  • 131
  • 234
4
votes
1 answer

How soon will Windows OS be able to wake from a wake timer?

I'm writing a program using C++ and Win APIs. I employed SetSuspendState() API to send the system into a sleep mode (with a possibility to wake on a wake timer, 'DisableWakeEvent' set to FALSE.) I then use CreateWaitableTimer and SetWaitableTimer…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
4
votes
4 answers

Need to run a powershell script every time system wakes up from Sleep

I just finished writing a script with PowerShell and I need it to run every time my system wakes up from sleep or Hibernation. I tried the gpedit.msc -> User Config -> Windows Settings -> Scripts -> Logon but this does not work when my system Wakes…
Kir
  • 385
  • 1
  • 7
  • 20
3
votes
1 answer

Android - How to wake up wifi?

I have an app that sends data every 5 min, i saw that wifi after some time goes sleep and stop working. I found one solution that is use a WakeLock SCREEN_DIM_WAKE_LOCK. The thing is: i can't have my screen waking (even dimmed) in this process.…
Raist
  • 72
  • 1
  • 7
3
votes
1 answer

How to send notification every x minutes even when phone is locked

I'm making an reminder app, so I need to send notification every x minutes, as I researched I found that I need to use AlarmManager ( idk if I can use any other method ). So I'm trying to use AlarmManager to fire Notification. It works only when I'm…
Web.11
  • 406
  • 2
  • 8
  • 23
3
votes
3 answers

Wake the device up when app prompts user

I'm using handler to repeatedly prompt user for an input every e.g. 5 minutes. When the device goes into sleeping mode and screen is locked, how can I wake the device up when my app prompts user for input? I've tried this but it doesn't seem to…
springrolls
  • 1,331
  • 1
  • 14
  • 40
1
2
3
13 14