Hot answers tagged

22

pm-utils provides a bunch of scripts that run on sleep/resume, you could add your script there, but you'll need to be careful as screwing up will likely break resume. Look in /usr/lib/pm-utils/sleep.d, that's where the scripts are, you can look at the script called 95led as it's quite simple and will be a good model to start with. 95led provides cases for ...


12

This problem was probably caused by strange USB signals. gedit /proc/acpi/wakeup showed me, that wakeup was enabled for USB0 and USB2. sudo -s echo USB0 > /proc/acpi/wakeup echo USB2 > /proc/acpi/wakeup switched them to disabled (checked by gedit /proc/acpi/wakeup again or refreshing the file-view), and after that, the computer stays in suspend ...


9

When hibernating, the operating system is off and can't do anything. It's the computer's BIOS that does the waking up, so it's only possible if your computer's BIOS supports it. With some BIOSes, you can configure a scheduled wakeup quite easily. Press the key that gets you into "setup" or similar when the computer first boots up (often F2 or Del) and see ...


9

For Ubuntu 11.04 and above: You can access settings by typing System Settings in the Dash, or clicking "power" or "power cog" button in the top-right corner of the screen and choosing System Settings. Once you entered on the System Settings, click on Brigtness & Lock. For Ubuntu 10.10 and below or Ubuntu MATE: You can access to the screensaver ...


8

I have kernel 13.13 and Intel Z77X based motherboard, and following command works for me: sudo sh -c "echo EHC1 > /proc/acpi/wakeup;echo EHC2 > /proc/acpi/wakeup;echo XHC > /proc/acpi/wakeup"


7

You can do (at least half of) this with Gnome Schedule. (sudo apt-get install gnome-schedule) (NB: it gets put in your launcher as Scheduled Tasks, though typing gnome-schedule still brings it up.) After launching it, "New" -> "Recurrent Task". Fill in the form as you see fit. The command to hibernate is /usr/sbin/pm-hibernate (Suspend is ...


7

In 15.04, Vivid, you need to place your scripts in: /lib/systemd/system-sleep/ An example script based on one from the Arch wiki (systemd sleep Hooks): #!/bin/sh case $1/$2 in pre/*) echo "Going to $2..." # Place your pre suspend commands here, or `exit 0` if no pre suspend action required ;; post/*) echo "Waking up from $2..." # ...


7

I ran into this problem again on Ubuntu 12.10. The suggestions from user MTS unfortunately also did not work for me. However, you can write a script to automatically set the usb properties in /proc/acpi/wakeup right before every suspend. The solution is based on creating a suspend hook (based on this Archwiki article). Save the following as ...


6

Let's say you have a certain /path/to/your/soundfile.mp3 (where path/to/your/soundfile.mp3 is the full path and filename of the sound file you wish to play) Try: sudo gedit /etc/pm/sleep.d/50playsound Add the following lines into the file. case "$1" in hibernate|suspend) # Do nothing ;; thaw|resume) ...


6

What I found I am going to take the time to explain a few things that I found out. This should help people understand why this is such a complicated process, and what they can do to help make it better, at least for them. First, the Bluetooth radio on the MBP is a "USB" device. This is quite common on laptops and even some desktops. Because of that Linux ...


5

Perhaps http://forum.xbmc.org/showthread.php?tid=121158 will help? This is what it says: For those who are updating to the 3.2 kernel (which should be everyone due to the recent root exploit), you'll notice your USB wakeup is probably broken. They changed the default wakeup policy (http://www.spinics.net/lists/linux-usb/msg53661.html), so you'll need to ...


5

I found that it is difficult to wakeup Ubuntu from hibernation. So I use the following commands to boot Ubuntu at a predefined time: # Clear previously set wakeup time sudo sh -c "echo 0 > /sys/class/rtc/rtc0/wakealarm" # Set the wakeup time at 2:02 am sudo sh -c "echo `date '+%s' -d '2am next day + 2 minutes'` > /sys/class/rtc/rtc0/wakealarm" ...


5

              How to Make Your Linux PC Wake From Sleep Automatically Want to put your Linux PC into sleep or hibernate mode and have it automatically wake at a specific time? You can easily do this with the rtcwake command, included by default with most Linux systems. This can be useful if you want your computer to do something at a specific time, but ...


4

This is not really a separate independent answer but since I'm unable to comment (due to reputation restriction) I'd just like to add an important supplement to mfisch's answer which also worked for me. Please note that the HOME and PATH (and quite possibly other environmental variables) will probably not be the same as your regular shell environment. I had ...


4

The following worked for me: cat /proc/acpi/wakeup Look for any items with status enabled that look like they don't belong there (for me, anything except LID0). Then disable them by saying, for example: sudo echo XHC0 > /proc/acpi/wakeup Check that the corresponding entries have indeed been disabled, send the laptop into suspend and hope for the ...


4

Experiencing exactly the same problem (ThinkPad T530, Ubuntu 14.04, but also 13.10 and 13.04, after couple of suspends, computer resumes immediately after suspend). Disabling IBGE from wakeup did not help at all. As suggested by Romano, I've tried removing the e1000e module, et voila suspend as expected. So: sudo rmmod e1000e prior to suspend resolves ...


4

The OP provided the solution in a comment: I've found the solution. I shouldn't have used the open source Xorg driver instead of the proprietary Nvidia driver that seems to work correctly. – user278680 May 11 at 16:42


4

After shutdown, your computer is off. So nothing can happen with it, unless you press the power button manually. Of course, they may be some alternative like Wake-on-LAN capabilities if supported by your BIOS. This is a mechanism by which specific packets are sent to a powered off computer (but of course still connected to a power source and an Ethernet ...


3

From any device with internet access you can wake-up your machine from internet or LAN (if enabled in BIOS and forwarded properly trough a router, if any) by means of magic packet. The proper wake up event must be enable in bios for a desired suspend state like S3/S4. http://www.wakeonlan.me/ wakeonlan (Linux command line) A tool to send a ...


3

Disabing ACPI should be a last resort, in case you've almost given up. Check your BIOS settings whether you have a scheduled wakeup, it's called Resume by Alarm on AWARD BIOSes.


2

Yes. Use the pm-utils package. From /usr/share/doc/pm-utils/README: === pm-utils === What is pm-utils? Pm-utils provides simple shell command line tools to suspend and hibernate computer that can be used to run vendor, distribution, or user supplied scripts on suspend and resume. Why do we need it? All the main distributions are ...


2

I recently had the same symptom on Asus Zenbook Pro UX501 on Ubuntu 15.04. Bazon's exact fix did not work but Vladimir Rutsky's variation did. Specifically: If running from the terminal cat /proc/acpi/wakeup shows the following lines EHC1 S3 *enabled pci:0000:00:xx.x EHC2 S3 *enabled pci:0000:00:xx.x XHC S3 *enabled ...


2

Preferably try to fix your Hibernation function if its not working too. because in similar cases with "sleep problem",seems hibernate is more handy and workable solution.refer to this post Test pci=noacpi as a boot parameter take a look at /etc/default/acpi-support , probably it needs some changes and if you are lucky, this command can help you: sudo ...


2

Sorry, but I don't think so. Linux system are booting and shutting down more complicated than the java-language made os that Nokia used to use (Now it produces only smartphones with windows, android and symbian). So, sorry but I don't think that you can make it.


2

At the moment I can't find any relevant errors comparing the dmesg after sudo pm-suspend and dmesg after gui suspend. The gui suspend log suddenly breaks before: PM: Syncing filesystems ... done. PM: Preparing system for mem sleep Freezing user space processes ... (elapsed 0.001 seconds) done. Freezing remaining freezable tasks ... (elapsed 0.001 seconds) ...


2

Your commands are close, but try this in command line: sudo ethtool -s <NIC> wol g or add this to your /etc/network/interfaces file: auto eth0 iface eth0 inet dhcp up ethtool -s eth0 wol g 'g' enables wake via "Magic Packet" Looks like if you are shutting down using the following command: sudo shutdown -h now then you will also need ...


2

I don't know if there is a way to run things after entering your password as you request and I doubt there will be since that is handled by the desktop environment (probably the screensaver daemon). However, it should work perfectly well if you add the right scripts to /etc/pm/sleep.d. Since you have not shown the scripts you've tried, my guess is that you ...


2

After further research, I found that I could get the desired behavior with my setup. I went into the Power Settings and configured battery power as: Suspend when inactive for: Don't suspend When power is critically low: Power off When the lid is closed: Do nothing Likewise, when plugged in it's set to not suspend when inactive or the lid is closed. To ...


1

solution: As Tuxar shared his idea, solution is to disable UTC* (Universal Time Zone) Let's edit this file and disable it sudo nano /etc/default/rcS Take a look at this screen shot http://i.imgur.com/bFHFA8m.png And edit the line for UTC setting, set it to UTC=no. Then ctrl+x to save, press y key to accept and press enter. At this point you might wanna ...


1

I have found the solution months ago but i saw this question of mine so i said let's answer it so, people like me that couldn't find the answer until going through all that trouble, could easily find out how to solve it... Well first of all let me introduce you to protocol's codes in ns2. A protocol has been created with 2 main files(there is some protocols ...



Only top voted, non community-wiki answers of a minimum length are eligible