SOLVED: How To Keep My Trackball Wakeup Flag Enabled?
Posted: Sun Jul 22, 2018 12:15 am
Hello, all. After running Windows for the last 20+ years, I finally got up the courage to travel into the unknown, mysterious forest of Linux. After doing some deep searching and reading, Linux Mint Cinnamon 19 is what I chose to install on my desktop computer. I'd like it to be known that I am duly impressed! It didn't take me long to throw away my axe, my shotgun, and my bear spray, because I found that this Linux forest is not as perilous as I had always thought it to be. So, with that intro out of the way, I can confidently say that I am a new convert and intend to use LMC as my daily driver...
I could use some help in getting my Kensington Trackball set up, however. The basic functions of the trackball are all fine, no problems there. It's when I put the computer to sleep (suspend) mode, that I found out there is a slight oddity. From years of habit, I have developed the routine of clicking on a trackball button to bring my computer out of sleep mode. That doesn't happen with LMC. I have done quite a lot of searching, reading, and digging into this issue, and here's what I have come up with.
For some reason, LMC changes the wakeup flag ( hope I'm using the right term for that ) of my usb trackball from 'enabled' to 'disabled' every time it comes out of sleep, or every time it boots up, or does a reboot. After much time searching, the solution I found that sets that flag back to 'enabled' is this:
In the terminal, I first have to do the sudo su command, and then enter my password. Once that is done, I issue this command:
My trackball is, of course, device 5-4. So, after entering that command, and exiting from sudo su mode, I run this command to make sure that the flag was changed:
That always gives me this result:
OK, so the problem is solved to the point that next time I put the computer to sleep, I can use the trackball to wake it up.
What I would really appreciate some help with is in finding out if this whole procedure can somehow be done automatically? Or at the very least, is there an easier/faster way to enable that wakeup flag? I have some experience in Windows making scripts and running them, but I'm finding that it's not the same here in Linux land.
So, would anyone have any suggestions for me? (Other than going back to Windows, which I really have no intention of doing) The reason I'm even going to this trouble of getting the trackball enabled to wake the computer, is because the only other way I found to wake the computer from sleep is to keep tapping on random keyboard keys until it comes out of sleep. Seems like a rather crazy procedure to me..
The ideal solution for me would be in finding out how to set that flag every time I boot/reboot in an automatic way, and also how to do it after coming out of sleep mode, either automatically or in an easier way than what I've been doing.
Many thanks for reading this long-winded post!!
Oblias (The new guy in the forest)
I could use some help in getting my Kensington Trackball set up, however. The basic functions of the trackball are all fine, no problems there. It's when I put the computer to sleep (suspend) mode, that I found out there is a slight oddity. From years of habit, I have developed the routine of clicking on a trackball button to bring my computer out of sleep mode. That doesn't happen with LMC. I have done quite a lot of searching, reading, and digging into this issue, and here's what I have come up with.
For some reason, LMC changes the wakeup flag ( hope I'm using the right term for that ) of my usb trackball from 'enabled' to 'disabled' every time it comes out of sleep, or every time it boots up, or does a reboot. After much time searching, the solution I found that sets that flag back to 'enabled' is this:
In the terminal, I first have to do the sudo su command, and then enter my password. Once that is done, I issue this command:
Code: Select all
echo enabled > /sys/bus/usb/devices/5-4/power/wakeup
My trackball is, of course, device 5-4. So, after entering that command, and exiting from sudo su mode, I run this command to make sure that the flag was changed:
Code: Select all
grep . /sys/bus/usb/devices/*/power/wakeup
Code: Select all
/sys/bus/usb/devices/10-1/power/wakeup:enabled
/sys/bus/usb/devices/4-5/power/wakeup:enabled
/sys/bus/usb/devices/5-3/power/wakeup:disabled
/sys/bus/usb/devices/5-4/power/wakeup:enabled
/sys/bus/usb/devices/5-5/power/wakeup:disabled
/sys/bus/usb/devices/usb10/power/wakeup:disabled
/sys/bus/usb/devices/usb11/power/wakeup:disabled
/sys/bus/usb/devices/usb1/power/wakeup:disabled
/sys/bus/usb/devices/usb2/power/wakeup:disabled
/sys/bus/usb/devices/usb3/power/wakeup:disabled
/sys/bus/usb/devices/usb4/power/wakeup:disabled
/sys/bus/usb/devices/usb5/power/wakeup:disabled
/sys/bus/usb/devices/usb6/power/wakeup:disabled
/sys/bus/usb/devices/usb7/power/wakeup:disabled
/sys/bus/usb/devices/usb8/power/wakeup:disabled
/sys/bus/usb/devices/usb9/power/wakeup:disabled
What I would really appreciate some help with is in finding out if this whole procedure can somehow be done automatically? Or at the very least, is there an easier/faster way to enable that wakeup flag? I have some experience in Windows making scripts and running them, but I'm finding that it's not the same here in Linux land.
So, would anyone have any suggestions for me? (Other than going back to Windows, which I really have no intention of doing) The reason I'm even going to this trouble of getting the trackball enabled to wake the computer, is because the only other way I found to wake the computer from sleep is to keep tapping on random keyboard keys until it comes out of sleep. Seems like a rather crazy procedure to me..
The ideal solution for me would be in finding out how to set that flag every time I boot/reboot in an automatic way, and also how to do it after coming out of sleep mode, either automatically or in an easier way than what I've been doing.
Many thanks for reading this long-winded post!!
Oblias (The new guy in the forest)