Fedora Linux Support Community & Resources Center
  #1  
Old 25th June 2015, 10:26 PM
wolfv Offline
Registered User
 
Join Date: Jun 2015
Location: USA
Posts: 32
linuxfedorachrome
Question Waking Fedora 22 from suspend

The only way I have found to wake my Fedora box from suspend is to press the computer's power button.
Mouse and keyboard do not wake Fedora.
Is that how suspend is supposed to work? If not, is this a Fedora issue or a Gnome issue?

My system is Fedora-Workstation-netinst-x86_64-22.iso is installed on Haswell Intel NUC Kit D54250WYK
The suspend configuration is:
Settings > Power > Automatic suspend On when idle
Touching the mouse woke the hardware from sleep when Windows 7 was installed.

Thank you.

Last edited by wolfv; 26th June 2015 at 12:23 AM.
Reply With Quote
  #2  
Old 26th June 2015, 01:06 AM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 7,034
unknownfirefox
Re: Waking Fedora 22 from suspend

That's normal for laptops, many of them implement the keyboard and mouse over USB.
That gets shut off in suspend. So the hardware power button is used. The nuc is the same way
Reply With Quote
  #3  
Old 26th June 2015, 01:58 AM
wolfv Offline
Registered User
 
Join Date: Jun 2015
Location: USA
Posts: 32
linuxfedorachrome
Thumbs up Re: Waking Fedora 22 from suspend

Thank you for the explanation Marko.
Reply With Quote
  #4  
Old 26th June 2015, 03:05 AM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 7,034
linuxfedorafirefox
Re: Waking Fedora 22 from suspend

Actually I'm probably wrong, I didn't see that you said Windows 7 would wake up
when you touched the mouse. I've never really heard of a suspended system having
the mouse lit up, that doesn't make much sense to me but windows does a lot of things
differently. I would think that would increase the power usage quite a bit and
negate a lot of the point of 'suspend' mode.


So when you used Windows 7, and it was suspended, was the mouise always lit up?

I personally really don't like the mouse waking up a suspended system, I always prefer it
to require either pressing the power button or pressing a key.
It's annoying to just walk by the desk and have the PC come out of suspend due to the mouse
getting shaken a bit.
Reply With Quote
  #5  
Old 26th June 2015, 03:18 AM
lsatenstein Offline
Registered User
 
Join Date: Jun 2005
Location: Montreal, Que, Canada
Posts: 3,895
linuxfedorafirefox
Re: Waking Fedora 22 from suspend

On my computer, within the bios, I have settings to indicate what the wake up signal should be. For example, following a powerfailure, awaken, wait for a mouse action to awaken, wait for a network signal to awaken, etc.

Please check your computer bios settings regarding wakeups. Windows xx does not actually shutdown, but keeps an interrupt processor hanging. That is why, with suspend and windows 7, the power light remains lit.
__________________
Leslie in Montreal

Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840
Reply With Quote
  #6  
Old 26th June 2015, 04:00 PM
wolfv Offline
Registered User
 
Join Date: Jun 2015
Location: USA
Posts: 32
linuxfedorachrome
Re: Waking Fedora 22 from suspend

That's interesting lsatenstein.
My BIOS secondary power settings seem correct.

When I had Windows 7 installed, it would wake from sleep via mouse, but not the keyboard.

Last week I changed the operating system from Windows 7 to Fedora 22 (Linux Kernel 4.0, GNOME 3.16).
After installing Fedora 22, the mouse and keyboard do not wake the PC, but the power button does.
Also, in Fedora 22, the mouse becomes unresponsive every few hours; replugging it's USB restores the mouse.
The system has one keyboard and one mouse, which are plugged into a USB hub.

Other people are reporting a similar problem waking NUC from Hibernate:
https://communities.intel.com/message/313654
Reply With Quote
  #7  
Old 27th June 2015, 01:47 PM
Dutchy Online
Registered User
 
Join Date: Aug 2011
Location: ~
Posts: 1,861
linuxfedorafirefox
Re: Waking Fedora 22 from suspend

Can this kind of thing be configured via /proc/acpi/wakeup?
Reply With Quote
  #8  
Old 27th June 2015, 10:25 PM
wolfv Offline
Registered User
 
Join Date: Jun 2015
Location: USA
Posts: 32
linuxfedorachrome
Re: Waking Fedora 22 from suspend

Thank you Dutchy. I did not know about the /proc/acpi/wakeup file.

I didn't find any straight forward /proc/acpi/wakeup solutions.
I will poke the /proc/acpi/wakeup file in a few weeks after I get my other project done.
Reply With Quote
  #9  
Old 27th June 2015, 11:13 PM
joncr Offline
Registered User
 
Join Date: May 2012
Location: NC
Posts: 2,222
linuxfedorafirefox
Re: Waking Fedora 22 from suspend

Here, the ThinkPad always requires a punch of the power button to wake up.

The desktop seems to vary from kernel to kernel. Right now, tapping a key wakes it up. Other times, only the power button rouses it. The mouse has always been ignored.
Reply With Quote
  #10  
Old 27th June 2015, 11:27 PM
robertdaleweir Offline
Registered User
 
Join Date: Oct 2005
Location: British Columbia, Canada
Posts: 808
linuxfirefox
Re: Waking Fedora 22 from suspend

Quote:
Originally Posted by joncr View Post
Here, the ThinkPad always requires a punch of the power button to wake up.

The desktop seems to vary from kernel to kernel. Right now, tapping a key wakes it up. Other times, only the power button rouses it. The mouse has always been ignored.
I have used many Acer Laptops and any key will bring them back. My friend had an HP that always requires the Power Button. This has been the case up to F21 on all of my current units. I am not sure why the difference but it is there. I have not, as yet, tried F22, but I expect similar results.
__________________
Robert :)
Kernel 4.9.13-101.fc24.x86_64 Gnome Software 3.20
CPU AMD FX-6300 Six Core AM3+
MoBo Gigabyte 78LMT-USB3 AMD760G AM3+ MicroATX
Memory 8 Gigs Gskill Ripjaw DDR3-1333 PC-10666
Reply With Quote
  #11  
Old 28th June 2015, 03:25 AM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 7,034
linuxfedorafirefox
Re: Waking Fedora 22 from suspend

My Toshiba Satellite laptop will not wake up by mouse or keyboard, you have to press the manual power button, it all depends on how the bios and hardware is set up.
Reply With Quote
  #12  
Old 28th June 2015, 12:00 PM
Skull One Offline
Registered User
 
Join Date: Jun 2010
Location: Lost...
Posts: 1,300
linuxredhatmozilla
Re: Waking Fedora 22 from suspend

The devices can be configured using sysfs (https://www.kernel.org/doc/Documenta...-devices-power)

For usb devices, you can use the following script:
Code:
#!/bin/bash
#
# List the usb devices that can be used to wakeup a suspended system.
# Provides the commands/udev rules to apply to enable this feature
#

# colors
RST='\e[0m'
BOLDBLUE='\e[1;34m'
YELLOW='\e[33m'
GREEN='\e[32m'
RED='\e[31m'

# a counter
DEVICES=0

# udev file
UDEV_RULE="/etc/udev/rules.d/90-devices-can-wakeup.rules"
# print udev rule to use
PRINT_UDEV=1

# check for lsusb
if ! [ -f /usr/bin/lsusb ]; then
        echo "This script requires the command 'lsusb'. Run:"
        echo "\tyum install /usr/bin/lsusb"
        echo "to install it."
        exit 1
fi

function print_udev_rule() {
        local TMPPATH=$1
        local VENDOR=
        local PRODUCT=
        local SERIAL=
        local NAME=
        local IDVENDOR=
        local IDPRODUCT=
        # get info
        while read; do
                IFS='='
                PARAM=($REPLY)
                if [ "${PARAM[0]}" == "ID_VENDOR_ID" ]; then
                        IDVENDOR=${PARAM[1]}
                        VENDOR="ATTR{idVendor}==\"${PARAM[1]}\""
                elif [ "${PARAM[0]}" == "ID_MODEL_ID" ]; then
                        IDPRODUCT=${PARAM[1]}
                        PRODUCT="ATTR{idProduct}==\"${PARAM[1]}\""
                elif [ "${PARAM[0]}" == "ID_SERIAL_SHORT" ]; then
                        SERIAL="ATTR{idSerial}==\"${PARAM[1]}\""
                elif [ "${PARAM[0]}" == "ID_MODEL_FROM_DATABASE" ]; then
                        NAME="${PARAM[1]}"
                fi
        done <<_EOC
$(/usr/bin/udevadm info -q property -p $TMPPATH)
_EOC

        # udev rule
        RULE="ACTION==\"add\", SUBSYSTEM==\"usb\", "
        [ -n "$VENDOR" ]  && RULE+="$VENDOR, "
        [ -n "$PRODUCT" ] && RULE+="$PRODUCT, "
        [ -n "$SERIAL" ]  && RULE+="$SERIAL, "

        RULE+="RUN+=\"/bin/sh -c 'tmppath=/sys/\$devpath; while [ -f \$tmppath/power/wakeup ]; do /usr/bin/echo enabled > \$tmppath/power/wakeup; tmppath=\$(/usr/bin/dirname \$tmppath); done'\""

        # print
        echo -e "\t---------------------------------------------------------"
        echo -e "\tTo automatically enable this device to wakeup the system:"
        if ! [ -f "$UDEV_RULE" ]; then
                echo -e "\t1. Create the file $UDEV_RULE and write the rule:"
        else
                echo -e "\t1. Append to the file $UDEV_RULE the rule:"
        fi
        
        echo ""
        echo -e "\t# $NAME"
        echo -e "\t$RULE"
        echo ""

        echo -e "\t2. Run as root:"
        echo -e "\t   /usr/bin/udevadm control --reload"
        echo -e "\t   /usr/bin/udevadm trigger --action=add -a idVendor=$IDVENDOR -a idProduct=$IDPRODUCT"
        echo -e "\t---------------------------------------------------------"
}

function wakeup_analyse() {
        local TMPPATH=/sys$1
        local DISABLED=""
        echo -e "\twakeup tree status: "
        # check the tree
        while [ -f $TMPPATH/power/wakeup ]; do
                echo -en "\t$TMPPATH/power/wakeup: "
                STATUS=$(/usr/bin/cat $TMPPATH/power/wakeup)
                if [ "$STATUS" == "disabled" ]; then
                        echo -e "$YELLOW$STATUS$RST"
                        DISABLED+="$TMPPATH "
                else
                        echo -e "$GREEN$STATUS$RST"
                fi
                TMPPATH=$(/usr/bin/dirname $TMPPATH)    
        done

        # print the command to enable wakeup
        if [ -n "$DISABLED" ]; then
                echo -e "\t-----------------------------------------------------"
                echo -e "\tTo use this device to wakeup the system, run as root:"
                for TMPPATH in $DISABLED; do
                        echo -e "\techo enabled > $TMPPATH/power/wakeup"
                done
                echo -e "\t-----------------------------------------------------"

                [ $PRINT_UDEV -eq 1 ] && print_udev_rule $1
        fi
}

#-----------------------------
# MAIN
#-----------------------------
# Get the usb devices (hub filtered out)
echo -e "usb devices found on the system:"
while read; do
        # inc counter
        let DEVICES+=1
        # get the name
        DEV_NAME=$(/usr/bin/sed 's,^Bus\ [0-9]\+\ Device\ [0-9]\+:\ ID\ [0-9a-z:]\+\ \(.*\)$,\1,g' <<< $REPLY)
        # get the dev path
        DEV_PATH=$(/usr/bin/sed 's,^Bus\ \([0-9]\+\)\ Device\ \([0-9]\+\):.*$,/dev/bus/usb/\1/\2,g' <<< $REPLY)
        # get the sysfs path
        SYSFS_PATH=$(/usr/bin/udevadm info -q path $DEV_PATH)

        # check if the device can be used for wakeup
        [ -f /sys/$SYSFS_PATH/power/wakeup ] && WAKEUP=1 || WAKEUP=0

        # print info
        echo -e " * $BOLDBLUE$DEV_NAME$RST"
        if [ $WAKEUP -eq 0 ]; then
                echo -e "\t${RED}this device cannot be used for wakeup$RST"
        else
                wakeup_analyse $SYSFS_PATH
        fi

done <<_EOC
$(/usr/bin/lsusb | grep -v -i hub)
_EOC

[ $DEVICES -eq 0 ] && echo -e "No usb devices found."
The script uses 'lsusb' and 'udevadm' to get informations.
It will print the current wakeup status and the commands to run to use a device to wakeup the system. It will also print an udev rule if you want the changes to be persistent.

I have tested it on a laptop with an optical mouse, and it seems to work fine.

However, note that each device that is enabled will still get some power when the computer is suspended. So, the default setting (everything disabled) is a powersaving measure.
__________________
:confused:
Reply With Quote
  #13  
Old 4th July 2015, 05:26 PM
wolfv Offline
Registered User
 
Join Date: Jun 2015
Location: USA
Posts: 32
linuxfedorachrome
update

Thank you for all your responses.

Turns out the problem is with the Intel NUC BIOS (my Fedora 22 install is on a Intel NUC).
There is a bug in the NUC BIOS, and somehow Linux suspend triggers this bug.
The fix is to not suspend NUC from Linux until the NUC BIOS is patched.
Here are the details: https://communities.intel.com/thread/76708

I would not have purchased an Intel NUC if I was aware to the bug, I regret buying it

After I told Intel Support that "My NUC D54250WYK won’t boot", Intel Support told me, "We can't speak on the reliability of Linux distros in the NUC since we have only focused on Windows to this point, though we don't expect major issues on it."
Reply With Quote
  #14  
Old 1st March 2017, 05:29 PM
wolfv Offline
Registered User
 
Join Date: Jun 2015
Location: USA
Posts: 32
linuxfedorachrome
Question Re: Waking Fedora 25 from suspend

I am back!
BIOS Version 0042 Fixed "NUC can't wake up from suspend in Linux" (NUC is a mini PC, not a laptop, and no lid to close).
So now the power button can wake the PC from suspend.

I used Skull One's script and followed it's instructions for making the keyboard wake the PC.
The script is real nice, but the keyboard still won't wake my NUC.
This is the out put from Skull One's script:
Code:
$ ./list_USB_wake.sh
usb devices found on the system:
 * Intel Corp.
	wakeup tree status: 
	/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/power/wakeup: disabled
	/sys/devices/pci0000:00/0000:00:1d.0/usb1/power/wakeup: disabled
	/sys/devices/pci0000:00/0000:00:1d.0/power/wakeup: enabled
	-----------------------------------------------------
	To use this device to wakeup the system, run as root:
	echo enabled > /sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/power/wakeup
	echo enabled > /sys/devices/pci0000:00/0000:00:1d.0/usb1/power/wakeup
	-----------------------------------------------------
	---------------------------------------------------------
	To automatically enable this device to wakeup the system:
	1. Create the file /etc/udev/rules.d/90-devices-can-wakeup.rules and write the rule:

	# 
	ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="8087", ATTR{idProduct}=="8000", RUN+="/bin/sh -c 'tmppath=/sys/$devpath; while [ -f $tmppath/power/wakeup ]; do /usr/bin/echo enabled > $tmppath/power/wakeup; tmppath=$(/usr/bin/dirname $tmppath); done'"

	2. Run as root:
	   /usr/bin/udevadm control --reload
	   /usr/bin/udevadm trigger --action=add -a idVendor=8087 -a idProduct=8000
	---------------------------------------------------------
 * Tenx Technology, Inc. 
	this device cannot be used for wakeup
 * Comfort Keyboard Co. Comfort Keyboard
	wakeup tree status: 
	/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/power/wakeup: enabled
	/sys/devices/pci0000:00/0000:00:14.0/usb2/power/wakeup: disabled
	/sys/devices/pci0000:00/0000:00:14.0/power/wakeup: enabled
	-----------------------------------------------------
	To use this device to wakeup the system, run as root:
	echo enabled > /sys/devices/pci0000:00/0000:00:14.0/usb2 /power/wakeup
	-----------------------------------------------------
	---------------------------------------------------------
	To automatically enable this device to wakeup the system:
	1. Create the file /etc/udev/rules.d/90-devices-can-wakeup.rules and write the rule:

	# Comfort Keyboard
	ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0b51", ATTR{idProduct}=="0020", RUN+="/bin/sh -c 'tmppath=/sys/$devpath; while [ -f $tmppath/power/wakeup ]; do /usr/bin/echo enabled > $tmppath/power/wakeup; tmppath=$(/usr/bin/dirname $tmppath); done'"

	2. Run as root:
	   /usr/bin/udevadm control --reload
	   /usr/bin/udevadm trigger --action=add -a idVendor=0b51 -a idProduct=0020
	---------------------------------------------------------
 * Pixart Imaging, Inc. Optical Mouse
	wakeup tree status: 
	/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/power/wakeup: disabled
	/sys/devices/pci0000:00/0000:00:14.0/usb2/power/wakeup: disabled
	/sys/devices/pci0000:00/0000:00:14.0/power/wakeup: enabled
	-----------------------------------------------------
	To use this device to wakeup the system, run as root:
	echo enabled > /sys/devices/pci0000:00/0000:00:14.0/usb2/2-2 /sys/devices/pci0000:00/0000:00:14.0/usb2 /power/wakeup
	-----------------------------------------------------
	---------------------------------------------------------
	To automatically enable this device to wakeup the system:
	1. Create the file /etc/udev/rules.d/90-devices-can-wakeup.rules and write the rule:

	# Optical Mouse
	ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="093a", ATTR{idProduct}=="2510", RUN+="/bin/sh -c 'tmppath=/sys/$devpath; while [ -f $tmppath/power/wakeup ]; do /usr/bin/echo enabled > $tmppath/power/wakeup; tmppath=$(/usr/bin/dirname $tmppath); done'"

	2. Run as root:
	   /usr/bin/udevadm control --reload
	   /usr/bin/udevadm trigger --action=add -a idVendor=093a -a idProduct=2510
	---------------------------------------------------------
This is what I did:
Code:
$ cat /etc/udev/rules.d/90-devices-can-wakeup.rules
# Comfort Keyboard
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0b51", ATTR{idProduct}=="0020", RUN+="/bin/sh -c 'tmppath=/sys/$devpath; while [ -f $tmppath/power/wakeup ]; do /usr/bin/echo enabled > $tmppath/power/wakeup; tmppath=$(/usr/bin/dirname $tmppath); done'"

$ sudo /usr/bin/udevadm control --reload
$ sudo /usr/bin/udevadm trigger --action=add -a idVendor=0b51 -a idProduct=0020
Which seems to have worked as intended:
Code:
$ ./list_USB_wake.sh
usb devices found on the system:

 * Comfort Keyboard Co. Comfort Keyboard
	wakeup tree status: 
	/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/power/wakeup: enabled
	/sys/devices/pci0000:00/0000:00:14.0/usb2/power/wakeup: enabled
	/sys/devices/pci0000:00/0000:00:14.0/power/wakeup: enabled
But the keyboard still does not wake the PC

I am running Fedora 25 with Gnome 3.22.2 on a Haswell Intel NUC Kit D54250WYK, Intel Core i5-4250U.
The keyboard woke the PC when Windows 7 was installed.

Thank you.

Last edited by wolfv; 1st March 2017 at 10:23 PM. Reason: changed title to "Fedora 25"
Reply With Quote
  #15  
Old 2nd March 2017, 09:56 AM
Dutchy Online
Registered User
 
Join Date: Aug 2011
Location: ~
Posts: 1,861
linuxfedorafirefox
Re: Waking Fedora 22 from suspend

Sounds like there is still something amiss with the interface that regulates suspend power status either at the Intel Muc or at the Linux side or both. You could try using different acpi boot parameters and see if the the behaviour changes.
But even if it is some interface problem, ultimately the hardware stays in charge, if it really wants to the firmware could just ignore the calls from the software or the behaviour could even be (possibly erroneously) hard-wired into the board.
For your sanity it is probably best to not delve too deep into problems like these but instead try to work with what you have and move on (unless of course if you like a challenge and have nothing else to do). ;p
Reply With Quote
Reply

Tags
fedora, suspend, waking

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Keyboard doesn't work after waking from suspend Jalovcan Hardware & Laptops 2 14th May 2015 09:38 PM
Fedora 21 - Problem waking up after suspend nisargshah95 Using Fedora 0 4th February 2015 11:30 AM
Sluggish video performance after waking from suspend in F12 joe.pelayo Using Fedora 2 13th May 2010 04:42 AM
Trouble with waking from suspend mode? cjohnson Using Fedora 3 22nd February 2010 09:19 PM
Waking up system from suspend john.mahaffey Using Fedora 1 17th January 2007 04:13 PM


Current GMT-time: 17:08 (Monday, 24-04-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat