Results 1 to 5 of 5

Thread: Wireless Mouse - Final bit of help needed.

  1. #1
    Join Date
    Jan 2013
    Location
    East Yorkshire
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Wireless Mouse - Final bit of help needed.

    So my Logitech Wireless Mouse works fine, except, if I Suspend. Then the mouse wakes up the computer, but thereafter is dead. I found the problem was to disable power wake up. So if I run in a terminal:
    Code:
    echo disabled > /sys/bus/usb/devices/1-1.3/power/wakeup
    1-1.3 being the mouse, everything works fine. The problem is that this setting isn't permanent, I lose it at every reboot and have to do it again. So how do I make it a permanent setting?

  2. #2
    Join Date
    Oct 2004
    Location
    33.4N -112.1W
    Beans
    2,497
    Distro
    Ubuntu Budgie

    Re: Wireless Mouse - Final bit of help needed.

    You can create/enable/start a system services file in /etc/systemd/system/<file_name>.service

    Similar could be done from a .bashrc file but it's messier an less secure.

    For example:

    Code:
    [Unit]
    Description=Disables power wakeup
    After=network.target
    StartLimitIntervalSec=0
    
    
    [Service]
    Type=simple
    Restart=always
    RestartSec=1
    User=root
    ExecStart=/usr/bin/sh -c "echo 'disabled' > /sys/bus/usb/devices/1-1.3/power/wakeup"
    
    
    [Install]
    WantedBy=multi-user.target
    /path/to/Truth

  3. #3
    Join Date
    Jan 2013
    Location
    East Yorkshire
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Wireless Mouse - Final bit of help needed.

    Thanks Xian. I tried your example, but power/wakeup is still enabled after a reboot. The code in my 1st post only works after "sudo su" & requires a password. Whether that's relevant I don't know. Also your example file, will it need making executable before copying to etc/systemd/system/ or not?

  4. #4
    Join Date
    Jun 2018
    Beans
    167

    Re: Wireless Mouse - Final bit of help needed.

    Did you enable the service? If you named the service "nomouse.service" and stored it in "/etc/systemd/system/", then try to run "systemctl status nomouse". If the service shows up as "disabled", enable it with "sudo systemctl enable nomouse" and either reboot or start it with "sudo systemctl start nomouse". Run the "status" command to check if the service did what it should. You may also want to replace "Type=simple" with "Type=oneshot".
    Last edited by dinkidonk; May 2nd, 2021 at 12:30 PM.
    Have a ubuntastic day!

  5. #5
    Join Date
    Jan 2013
    Location
    East Yorkshire
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Wireless Mouse - Final bit of help needed.

    Thank you both. You've made my day. That's what I needed to do, run "sudo systemctl enable nomouse" first. Now my wireless mouse works as it should. Thanks again.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •