Announcement

Collapse
No announcement yet.

Disable wake on mouse movement

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Disable wake on mouse movement

    I'd like to stop the machine waking from sleep if I move the mouse. There doesn't seem to be a setting for that. Can anyone help?

    (Edit: I now wish I'd called this "Disable wake on mouse click" but it seems to be too late.)
    Last edited by User0x770865; Feb 04, 2016, 03:52 PM.

    #2
    what version ?

    basically should be controlled from "system settings" screen locking "require password after locking"

    VINNY
    i7 4core HT 8MB L3 2.9GHz
    16GB RAM
    Nvidia GTX 860M 4GB RAM 1152 cuda cores

    Comment


      #3
      Originally posted by User0x770865 View Post
      I'd like to stop the machine waking from sleep if I move the mouse. There doesn't seem to be a setting for that. Can anyone help?
      1. With "waking from sleep", you mean waking the machine from suspend or hibernation, waking the display from powersave or something else?
      2. What kind of mouse you are using? (integrated, ps/2, usb, bluetooth)
      3. To get a list of devices that have wakeup enabled, run "cat /proc/acpi/wakeup"
      4. And to connect cryptic device codes to actual devices, run "lspci"

      Answer those (and post the outputs of the commands) and we can try to disable the mouse wakeups.

      Comment


        #4
        Yes. The machine is in sleep mode, apparently powered down but waiting for an instruction to wake up. After some experiments it seems it's not movement but a mouse click which wakes the machine.

        The mouse is a wireless USB one.

        First answer:
        Code:
        cat /proc/acpi/wakeup
        Device  S-state   Status   Sysfs node
        PCI0      S5    *disabled  no-bus:pci0000:00
        PEX0      S5    *disabled  pci:0000:00:1c.0
        PEX1      S5    *disabled  pci:0000:00:1c.1
        PEX2      S5    *disabled
        PEX3      S5    *disabled
        PEX4      S5    *disabled
        PEX5      S5    *disabled
        PEX6      S5    *disabled
        PEX7      S5    *disabled
        HUB0      S5    *disabled  pci:0000:00:1e.0
        USBE      S3    *enabled   pci:0000:00:1d.0
        USE2      S3    *enabled   pci:0000:00:1a.0
        AZAL      S5    *disabled  pci:0000:00:1b.0
        Then:
        Code:
        lspci
        00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
        00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
        00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
        00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
        00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
        00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
        00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
        00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5)
        00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
        00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a5)
        00:1f.0 ISA bridge: Intel Corporation H61 Express Chipset Family LPC Controller (rev 05)
        00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family SATA AHCI Controller (rev 05)
        00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
        01:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9230 PCIe SATA 6Gb/s Controller (rev 11)
        02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
        03:00.0 USB controller: Fresco Logic FL1009 USB 3.0 Host Controller (rev 02)
        Thanks.
        Last edited by User0x770865; Feb 01, 2016, 04:23 PM.

        Comment


          #5
          We can first try to disable the USB controller wakeups to see if that fixes the mouse wakeups (these changes are not yet permanent):
          1. Run:
          Code:
          echo USBE | sudo tee /proc/acpi/wakeup
          and
          Code:
          echo USE2 | sudo tee /proc/acpi/wakeup
          2. check that corresponding wakeups are now disabled:
          Code:
          cat /proc/acpi/wakeup
          3. Test whether mouse still wakes the machine up from sleep
          4. Report back. We'll either look into making the changes permanent (if it works) or try to come up with a new idea (if it doesn't work)

          Comment


            #6
            Code:
            echo USBE | sudo tee /proc/acpi/wakeup
            [sudo] password for user: 
            USBE
            echo USE2 | sudo tee /proc/acpi/wakeup
            USE2
            cat /proc/acpi/wakeup
            Device  S-state   Status   Sysfs node
            PCI0      S5    *disabled  no-bus:pci0000:00
            PEX0      S5    *disabled  pci:0000:00:1c.0
            PEX1      S5    *disabled  pci:0000:00:1c.1
            PEX2      S5    *disabled
            PEX3      S5    *disabled
            PEX4      S5    *disabled
            PEX5      S5    *disabled
            PEX6      S5    *disabled
            PEX7      S5    *disabled
            HUB0      S5    *disabled  pci:0000:00:1e.0
            USBE      S3    *disabled  pci:0000:00:1d.0
            USE2      S3    *disabled  pci:0000:00:1a.0
            AZAL      S5    *disabled  pci:0000:00:1b.0
            Tested, works perfectly. Thank you.

            Comment


              #7
              Originally posted by User0x770865 View Post
              Tested, works perfectly.
              To make it permanent, the script in here (see first answer): https://askubuntu.com/questions/1524...keup-permanent could come handy.
              It basically makes sure USB wakeups are set to disabled when the system goes to sleep (because cold reboots, for example, will probably reset them to enabled).

              In your case, you should replace the line:
              for usb in `cat /proc/acpi/wakeup | grep USB | cut -f1`;
              with
              for usb in 'USBE' 'USE2';
              And you also need sudo to make the script executable:
              Code:
              sudo chmod +x /usr/lib/pm-utils/sleep.d/45fixusbwakeup

              Comment


                #8
                I put this in the sleep.d folder:
                Code:
                #!/bin/bashcase $1 in
                    hibernate)
                            echo "Going to suspend to disk!"
                            ;;
                    suspend)
                            echo "Fixing acpi settings."
                            for usb in 'USBE' 'USE2';
                            do
                                    state=`cat /proc/acpi/wakeup | grep $usb | cut -f3 | cut -d' ' -f1 | tr -d '*'`
                                    echo "device = $usb, state = $state"
                                    if [ "$state" == "enabled" ]
                                    then
                                            echo $usb > /proc/acpi/wakeup
                                    fi
                            done
                            echo "Suspending to RAM."
                            ;;
                    thaw)
                            echo "Suspend to disk is now over!"
                            ;;
                    resume)
                            echo "We are now resuming."
                            ;;
                    *)
                            echo "Somebody is callin me totally wrong."
                            ;;
                esac
                and did
                Code:
                sudo chmod +x /usr/lib/pm-utils/sleep.d/45fixusbwakeup
                then I restarted the computer. I checked the status again:

                Code:
                cat /proc/acpi/wakeupDevice  S-state   Status   Sysfs node
                PCI0      S5    *disabled  no-bus:pci0000:00
                PEX0      S5    *disabled  pci:0000:00:1c.0
                PEX1      S5    *disabled  pci:0000:00:1c.1
                PEX2      S5    *disabled
                PEX3      S5    *disabled
                PEX4      S5    *disabled
                PEX5      S5    *disabled
                PEX6      S5    *disabled
                PEX7      S5    *disabled
                HUB0      S5    *disabled  pci:0000:00:1e.0
                USBE      S3    *enabled   pci:0000:00:1d.0
                USE2      S3    *enabled   pci:0000:00:1a.0
                AZAL      S5    *disabled  pci:0000:00:1b.0
                and it had changed back. So I clicked the Sleep button in the K menu and tested it. The computer doesn't wake up when I click the mouse, as required. When I started the computer and checked the status again I found the two items disabled:

                Code:
                cat /proc/acpi/wakeupDevice  S-state   Status   Sysfs node
                PCI0      S5    *disabled  no-bus:pci0000:00
                PEX0      S5    *disabled  pci:0000:00:1c.0
                PEX1      S5    *disabled  pci:0000:00:1c.1
                PEX2      S5    *disabled
                PEX3      S5    *disabled
                PEX4      S5    *disabled
                PEX5      S5    *disabled
                PEX6      S5    *disabled
                PEX7      S5    *disabled
                HUB0      S5    *disabled  pci:0000:00:1e.0
                USBE      S3    *disabled  pci:0000:00:1d.0
                USE2      S3    *disabled  pci:0000:00:1a.0
                AZAL      S5    *disabled  pci:0000:00:1b.0
                I'm calling that fixed. Thanks very much for your help.

                It seems like a thing there should be a setting in System Settings for.

                Comment

                Working...
                X