Sleep but no wakeup from keyboard or mouse

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
grahamgo

Sleep but no wakeup from keyboard or mouse

Post by grahamgo »

Hi I am new to Linux Mint (3 days). So far very pleased but I have a couple of niggles.

I have installed Linux Mint dual boot with XP. XP will sleep and wakeup fine using the keyboard (hit space bar). I want the same with Linux Mint. At the moment I can hit the keyboard sleep (moon symbol) and it sleeps. But I can only get wakeup using the PC's power button, the keyboard / mouse will not wake it up. I have checked the BIOS settings and so on but as XP works I think it is something within Linux.

Stumbling around I find this info, I think I need to enable PS2K. But this is my problem, I cannot get past "permission denied" whichever way I try. Please help, it may be simple, but I am stumped......

$ cat /proc/acpi/wakeup
Device S-state Status Sysfs node
P0P1 S4 disabled pci:0000:00:01.0
P0P3 S4 disabled pci:0000:00:1e.0
P0P9 S4 disabled pci:0000:00:1c.0
P0P8 S4 disabled pci:0000:00:1c.1
P0P7 S4 disabled
P0P6 S4 disabled
P0P5 S4 disabled
P0P4 S4 disabled
PS2K S4 disabled pnp:00:0a
UAR1 S4 disabled pnp:00:0c
USB2 S4 disabled pci:0000:00:1d.1
USB3 S4 disabled pci:0000:00:1d.2
USB4 S4 disabled pci:0000:00:1d.3
MC97 S4 disabled
USB1 S4 disabled pci:0000:00:1d.0
EUSB S4 disabled pci:0000:00:1d.7
grahamgo

Re: Sleep but no wakeup from keyboard or mouse

Post by grahamgo »

I found that in Terminal if I do the following, I can enable PS2K and wakeup from keyboard works correctly.

BUT if I turn the PC off and on then wakeup stops working, so a new question. How do I tell Linux Mint to remember this new setting? When powered off


IN TERMINAL
$ su
Password:
echo PS2K > /proc/acpi/wakeup

graham-desktop graham # cat /proc/acpi/wakeup
Device S-state Status Sysfs node
.............
P0P4 S4 disabled
PS2K S4 enabled pnp:00:0a
UAR1 S4 disabled pnp:00:0c
............
User avatar
terdon
Level 4
Level 4
Posts: 276
Joined: Tue Jan 13, 2009 2:52 pm
Location: Marseille

Re: Sleep but no wakeup from keyboard or mouse

Post by terdon »

Hi, there is probably a specific option to set this up somewhere but I don't know it, so here's a workaround :)

What you want to do is set up a little script that executes the command you mentioned every time the computer is switched on. So, try the following in a terminal:

First create a file called wakeuptweak (or anything else you want to call it) in the /etc/init.d directory. This directory contains system scripts that are run on startup.

Code: Select all

sudo gedit /etc/init.d/wakeuptweak 
This will make a gedit window appear. Paste the following lines into the new file and save it.

Code: Select all

#!/bin/bash 
echo PS2K > /proc/acpi/wakeup
Now you have to make the script you just created executable:

Code: Select all

 sudo chmod a+x /etc/init.d/wakeuptweak
Finally, inform the system of your changes:

Code: Select all

update-rc.d -f  wakeuptweak defaults 
That should be all, now your computer should always wake up from the mouse. Post back here if you need more help.
Last edited by terdon on Wed Oct 27, 2010 9:28 am, edited 2 times in total.
grahamgo

Re: Sleep but no wakeup from keyboard or mouse

Post by grahamgo »

grahamgo wrote:I found that in Terminal if I do the following, I can enable PS2K and wakeup from keyboard works correctly.

BUT if I turn the PC off and on then wakeup stops working, so a new question. How do I tell Linux Mint to remember this new setting? When powered off


IN TERMINAL
$ su
Password:
echo PS2K > /proc/acpi/wakeup

graham-desktop graham # cat /proc/acpi/wakeup
Device S-state Status Sysfs node
.............
P0P4 S4 disabled
PS2K S4 enabled pnp:00:0a
UAR1 S4 disabled pnp:00:0c
............
Thank you for this info. Right now I am away on 2 weeks vacation. But will try this when I get back if it works I will mark the thread as "solved" - Brilliant thanks! I see Linux is a fun playground - I need to learn how to play......
hocaspocas
Level 1
Level 1
Posts: 2
Joined: Fri Mar 18, 2011 12:00 am

Re: Sleep but no wakeup from keyboard or mouse

Post by hocaspocas »

First, thank you for LMDE. I used the codes supplied and it worked on my system, which is AMD x6 1055t with an Asus m4a88td-m motherboard. I could not get it to wake with the keyboard until I followed the instructions here. Now it works after reboot. I use a ps2 keyboard and this [echo PS2K > /proc/acpi/wakeup] in the terminal would work, but on reboot, it would revert. So, thank you terdon.
Post Reply

Return to “Beginner Questions”