SOLVED Moving mouse of hitting a key won't wake PC again

All Gurus once were Newbies
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
ADee
Level 2
Level 2
Posts: 56
Joined: Tue Sep 04, 2018 2:58 pm

SOLVED Moving mouse of hitting a key won't wake PC again

Post by ADee » Mon Sep 24, 2018 2:57 pm

A few weeks ago I had this issue:

viewtopic.php?f=90&t=277163&p=1523327#p1523327

I have an old HP tower I have been experimenting with Mint and Cinnamon 19 on and would like to know if there is a way to wake it back up from SUSPEND with the keyboard or the mouse. I have to push the power button. Then it will often come on and I lost everything that I was working on, and any programs that were loaded. Thanks.

I had to replace the HDD and reinstall Cinnamon 19 and encountered the same problem. I went through the same steps that fixed it the last time and got stuck with this message:

As always the help is greatly appreciated.

Note I gave the computer to my wife.

Code: Select all

 jan@jan-HP-ProDesk-405-G1-MT:~$ cat /sys/bus/usb/devices/4-3/power/wakeup
cat: /sys/bus/usb/devices/4-3/power/wakeup: No such file or directory
jan@jan-HP-ProDesk-405-G1-MT:~$ 

Code: Select all

jan@jan-HP-ProDesk-405-G1-MT:~$ inxi -Fxz
System:    Host: jan-HP-ProDesk-405-G1-MT Kernel: 4.15.0-34-generic x86_64
           bits: 64 gcc: 7.3.0
           Desktop: Cinnamon 3.8.9 (Gtk 3.22.30-1ubuntu1)
           Distro: Linux Mint 19 Tara
Machine:   Device: desktop System: Hewlett-Packard product: HP ProDesk 405 G1 MT serial: N/A
           Mobo: Hewlett-Packard model: 2171 v: NULL serial: N/A
           BIOS: AMI v: 80.04 date: 12/25/2013
Battery    hidpp__0: charge: N/A condition: NA/NA Wh
           model: Logitech Wireless Mouse status: Discharging
           hidpp__1: charge: N/A condition: NA/NA Wh
           model: Logitech K520 status: Discharging
CPU:       Dual core AMD E1-2500 APU with Radeon HD Graphics (-MCP-) 
           arch: Jaguar rev.1 cache: 1024 KB
           
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm) bmips: 5589
           clock speeds: max: 1400 MHz 1: 1100 MHz 2: 1106 MHz
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Kabini [Radeon HD 8240 / R3 Series]
           bus-ID: 00:01.0
           Display Server: x11 (X.Org 1.19.6 )
           drivers: ati,radeon (unloaded: modesetting,fbdev,vesa)
           Resolution: 1920x1080@60.00hz
           OpenGL: renderer: AMD KABINI (DRM 2.50.0 / 4.15.0-34-generic, LLVM 6.0.0)
           version: 4.5 Mesa 18.0.5 Direct Render: Yes
Audio:     Card Creative Labs Sound Core3D [Sound Blaster Recon3D / Z-Series]
           driver: snd_hda_intel bus-ID: 01:00.0
           Sound: Advanced Linux Sound Architecture v: k4.15.0-34-generic
Network:   Card-1: Realtek RTL8111/8168/8411 PCIE Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: e000 bus-ID: 02:00.0
           IF: enp2s0 state: down mac: <filter>
           Card-2: Realtek RTL8188EUS 802.11n Wireless Network Adapter
           driver: r8188eu v: v4.1.4_6773.20130222 usb-ID: 001-003
           IF: wlxc4e9840a9654 state: N/A mac: N/A
Drives:    HDD Total Size: 2000.4GB (2.5% used)
           ID-1: /dev/sda model: ST500DM002 size: 500.1GB
           ID-2: /dev/sdb model: ST1500DM003 size: 1500.3GB
Partition: ID-1: / size: 28G used: 7.1G (28%) fs: ext4 dev: /dev/sda1
           ID-2: /home size: 423G used: 33G (9%) fs: ext4 dev: /dev/sda5
           ID-3: swap-1 size: 8.00GB used: 0.00GB (0%)
           fs: swap dev: /dev/sda6
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 52.4C mobo: N/A gpu: 53.0
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 168 Uptime: 5 min Memory: 1038.8/7415.3MB
           Init: systemd runlevel: 5 Gcc sys: 7.3.0
           Client: Shell (bash 4.4.191) inxi: 2.3.56 
jan@jan-HP-ProDesk-405-G1-MT:~$ 

Code: Select all

jan@jan-HP-ProDesk-405-G1-MT:~$ lsusb -t
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/4p, 12M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/4p, 12M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 1: Dev 2, If 2, Class=Human Interface Device, Driver=usbhid, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/4p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/4p, 480M
    |__ Port 3: Dev 3, If 0, Class=Vendor Specific Class, Driver=r8188eu, 480M
jan@jan-HP-ProDesk-405-G1-MT:~$ 

Code: Select all

jan@jan-HP-ProDesk-405-G1-MT:~$ dmesg | grep /input/
[    2.678021] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
[    2.678186] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
[    5.399421] input: Logitech K520 as /devices/pci0000:00/0000:00:12.0/usb3/3-1/3-1:1.2/0003:046D:C52B.0003/0003:046D:2011.0004/input/input2
[    5.409215] input: Logitech  as /devices/pci0000:00/0000:00:12.0/usb3/3-1/3-1:1.2/0003:046D:C52B.0003/0003:046D:4055.0005/input/input3
[   19.486781] input: HP WMI hotkeys as /devices/virtual/input/input4
jan@jan-HP-ProDesk-405-G1-MT:~$ 
Last edited by ADee on Tue Sep 25, 2018 6:49 am, edited 1 time in total.

gm10
Level 13
Level 13
Posts: 4581
Joined: Thu Jun 21, 2018 5:11 pm

Re: Moving mouse of hitting a key won't wake PC again

Post by gm10 » Mon Sep 24, 2018 3:04 pm

Hi again. It looks like you simply plugged the device into a different USB port this time, so we'll just use the same solution as last time but adjust the script to account for the different USB port. Run (copy & paste as a whole):

Code: Select all

sudo tee /lib/systemd/system-sleep/K520_enable_wakeup <<'EOB'
#!/bin/sh
case $1 in
    pre)
        echo enabled > /sys/bus/usb/devices/3-1/power/wakeup
        ;;
esac
EOB
followed by:

Code: Select all

sudo chmod +x /lib/systemd/system-sleep/K520_enable_wakeup
That's hopefully all that's needed, otherwise let me know.

ADee
Level 2
Level 2
Posts: 56
Joined: Tue Sep 04, 2018 2:58 pm

Re: Moving mouse of hitting a key won't wake PC again

Post by ADee » Mon Sep 24, 2018 3:49 pm

Hello and thanks, again!

Before I mark this solved, which it is I have a couple of questions.

Is there a way to set it up so that if I move the receiver dongle to another port I don't have this problem again? Last time it was in the front of the PC. I moved the PC to another location and the dongle is better in the back now. If I change the location of the PC to a desk I might move the receiver to the front again.

I am going to be setting Cinnamon 19 up on a newer HP machine which is in transit at the moment. If I encounter this issue is there a way to fix this w/o asking here? When it comes to the Terminal my skills are limited to copy and paste after I ask a question.

gm10
Level 13
Level 13
Posts: 4581
Joined: Thu Jun 21, 2018 5:11 pm

Re: Moving mouse of hitting a key won't wake PC again

Post by gm10 » Mon Sep 24, 2018 4:36 pm

I see, you're putting me to work here. Challenge accepted. :P

Run this instead:

Code: Select all

sudo tee /lib/systemd/system-sleep/K520_enable_wakeup <<'EOB'
#!/bin/bash
case $1 in
    pre)
        cd /sys/bus/usb/devices/
        for i in *; do
          if [ -d "$i" ] && [ -e "$i/idVendor" ] && [ -e "$i/power/wakeup" ]; then
            [ "$(cat $i/idVendor)" == "046d" ] && echo enabled > /sys/bus/usb/devices/$i/power/wakeup
          fi
        done
        ;;
esac
EOB
and

Code: Select all

sudo chmod +x /lib/systemd/system-sleep/K520_enable_wakeup
Let me know if it works or if I broke your system. Just kidding...maybe. ;)

ADee
Level 2
Level 2
Posts: 56
Joined: Tue Sep 04, 2018 2:58 pm

Re: Moving mouse of hitting a key won't wake PC again

Post by ADee » Mon Sep 24, 2018 5:14 pm

I didn't mean to challenge you, but you won!!!! It worked. I moved the receiver to the front of the PC and to the rear, and the computer wakes up. :P

Will those instructions work for the HP PC I have on the way? Or is that something that will have to be addressed if I have the same problem?

Thanks

gm10
Level 13
Level 13
Posts: 4581
Joined: Thu Jun 21, 2018 5:11 pm

Re: Moving mouse of hitting a key won't wake PC again

Post by gm10 » Mon Sep 24, 2018 5:37 pm

ADee wrote:
Mon Sep 24, 2018 5:14 pm
I didn't mean to challenge you, but you won!!!! It worked. I moved the receiver to the front of the PC and to the rear, and the computer wakes up. :P

Will those instructions work for the HP PC I have on the way? Or is that something that will have to be addressed if I have the same problem?
It will probably work. That script I created for you will enable any connected Logitech device to wake up your computer. On some systems it can be necessary to set the flag for the USB port and the root hub as well, but we'll worry about that should that happen.

ADee
Level 2
Level 2
Posts: 56
Joined: Tue Sep 04, 2018 2:58 pm

Re: Moving mouse of hitting a key won't wake PC again

Post by ADee » Mon Sep 24, 2018 5:56 pm

Thanks a lot for your time and help!

I might have to use a MSFT branded wireless keyboard and mouse with the PC in route. I have 2 PC's in close proximity of each other using Logitech wireless keyboards and mice. For some reason I found the keyboard and mouse will lag on the Linux system, on Win 10 it's fine. I think it's because having two Logitech devices close to each other causes issues. I'll cross that bridge when I get to it I guess.

gm10
Level 13
Level 13
Posts: 4581
Joined: Thu Jun 21, 2018 5:11 pm

Re: Moving mouse of hitting a key won't wake PC again

Post by gm10 » Mon Sep 24, 2018 6:01 pm

We could just adjust it then. Or we do the lazy way and simply enable all USB devices to wake up your system, this script will do that:

Code: Select all

sudo tee /lib/systemd/system-sleep/K520_enable_wakeup <<'EOB'
#!/bin/sh
case $1 in
    pre)
        echo enabled | tee /sys/bus/usb/devices/*/power/wakeup
        ;;
esac
EOB

ADee
Level 2
Level 2
Posts: 56
Joined: Tue Sep 04, 2018 2:58 pm

SOLVED Re: Moving mouse of hitting a key won't wake PC again

Post by ADee » Mon Sep 24, 2018 6:23 pm

I'm going with the lazy man's approach if I have a problem with that PC.

Thanks again!

gm10
Level 13
Level 13
Posts: 4581
Joined: Thu Jun 21, 2018 5:11 pm

Re: Moving mouse of hitting a key won't wake PC again

Post by gm10 » Mon Sep 24, 2018 6:36 pm

You're very welcome. I had to work for the "SOLVED" this time, haha, but please edit the subject line of the first post of the thread instead to mark the entire thread as solved. ;)

ADee
Level 2
Level 2
Posts: 56
Joined: Tue Sep 04, 2018 2:58 pm

Re: Moving mouse of hitting a key won't wake PC again

Post by ADee » Tue Sep 25, 2018 6:50 am

gm10 wrote:
Mon Sep 24, 2018 6:36 pm
You're very welcome. I had to work for the "SOLVED" this time, haha, but please edit the subject line of the first post of the thread instead to mark the entire thread as solved. ;)
Done. Thanks again!

Post Reply

Return to “Newbie Questions”