In the past I was annoyed by the system notification about “mouse battery low” to the point that I just changed a still-good battery to get over it.

This time I decided to tackle it once and for all.

I found this post All the credit go to the author

Please go there for more detail, this is just my self note.

1. Download and patch upowerd

# Download and patch upowerd
git clone  
cd upower/src  
patch < up-device.patch  
cd ..  

Ater the make command, you will have these two new file

# cd src/.libs


# cd tools/.libs  

Next we will back up the originals and replace them with these instead. You need to know the path to upower upowerd path


upower path


3. Replace the originals with new patched file

3.1 Replace upowerd

# Install upowerd
# From the original folder
cd src/.libs  
strip upowerd  
sudo chown root.root upowerd  
sudo cp upowerd ${PATH_UPOWERD}/upowerd-silent  
sudo mv upowerd upowerd-original  
sudo ln -s upowerd-silent upowerd 

Install upower

From the original folder

cd tools/.libs
strip upower
sudo chown root.root upower
sudo mv upower ${PATH_UPOWER}/upower-silent
sudo cp upower upower-original
sudo ln -s upower-silent upower

# Restart upowerd
sudo systemctl restart upower