It is incredibly annoying to me that my mouse wakes the computer when I barely touch it. If I want my PC to turn on, I press the Super key.

I find very hacky scripts online, I tried some but they didn’t work. How did you disable it?

This option is missing from settings.

  • MyNameIsRichard@lemmy.ml
    link
    fedilink
    arrow-up
    7
    ·
    10 months ago

    I created a systemd service by putting the following in /etc/systemd/system/disable-mouse-wakeup.service

    
    [Unit]
    Description=Disable Mouse wakeup triggers
    
    [Service]
    Type=oneshot
    ExecStart=/bin/sh -c "echo XHC0 > /proc/acpi/wakeup"
    ExecStop=/bin/sh -c "echo XHC0 > /proc/acpi/wakeup"
    RemainAfterExit=yes
    
    [Install] 
    WantedBy=multi-user.target
    

    Then I ran sudo systemctl enable --now disable-mouse-wakeup

    It works perfectly on my AMD machine.

      • fuckwit_mcbumcrumble@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        10 months ago

        What system do you have? Laptop or desktop, if laptop which one, if desktop which mobo do you have? Check your bios for any sleep options, specifically S0 vs S3 standby.

        S0 standby vs S3 standby can change things a lot. If you’re in S3 standby then it’s up to your bios/firmware to handle waking from sleep. If you’re in S0 standby then your OS is in control.

      • MyNameIsRichard@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        10 months ago

        Run cat /proc/acpi/wakeup and try some of the other devices instead of XHC0 if they are enabled

        Edit: Remember to run sudo systemctl stop disable-mouse-wakeup to reset them if it doesn’t work

        • GravitySpoiled@lemmy.mlOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          10 months ago

          Unfortunately, disabling the devices doesn’t work.

          RP01	  S4	*enabled   pci:0000:00:1c.0
          RP05	  S4	*enabled   pci:0000:00:1c.4
          RP06	  S4	*enabled   pci:0000:00:1c.5
          LID0	  S3	*enabled   platform:PNP0C0D:00
          PBTN	  S3	*enabled   platform:PNP0C0C:00
          

          I had this device earlier but I disabled it with your systemctl service earlier and although I stopped the service, it didn’t come back. Probably, it’s back on next reboot. XHC S0 *enabled pci:0000:00:14.0

          I didn’t test LID0 or Powerbutton.

  • s38b35M5@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    10 months ago

    Which distro? Do you have tlp installed? If so, you an use tlpui to configure lots of power related settings.

  • peasntanks@lemmy.ml
    link
    fedilink
    arrow-up
    1
    arrow-down
    2
    ·
    10 months ago

    I just unplug the mouses USB from the PC and plug it back in after putting the PC to sleep. Et voila, pc no longer wakes from mouse.