My laptop routinely runs between full and critical charge a few times over the course of a day (yes, it's old). Before I updated to 16.04, Cinnamon used to notify me at:

  • 20%, then again at

  • 10%, then again at

  • 7%, then again at

  • 5%, then finally

  • "The battery has reached a critical level. The computer will hibernate very soon unless it is plugged in." at 2% or so. (at which point it continues to function for another 15 minutes.)

When I installed 15.10 and obliterated Unity in favour of Cinnamon, I didn't (knowingly) change anything related to this (or know it was possible).

Some configurations were reset during my system-wide upgrade, including the ones related to these power notifications. This answer lets me set just two notifications, one for critical and one for action, but I clearly remember having the five notifications mentioned above each time as if it was yesterday (because it was, ha-ha).

As I said above, I didn't conciously install any external programs for this, so while I'm aware I could write a shell script which just continually polls the sys entry with the battery percentage and notifies at given times, I'm also convinced it was a default behaviour of Ubuntu / Cinnamon (both of which I still use).

Can I get my 5 notifications back, or should I go with the shell (or other) script?

  • Well , i'd say it is a bug, so report this on Launchpad to the developers . I personally use a script in addition to system notifications, but that's in Unity . If your notifyod is still installed, i can post the script and you can use that till you find a better solution. How's that ? Apr 25, 2016 at 23:29
  • @Serg That sounds good except I don't have a notifyod in my PATH, there are no files by that name (locate nor find) and it doesn't appear to be within the scope of apt search. Googling for it returns nothing related to Ubuntu (a lot of non-english things, apparently). Can you point me to where I can get notifyod?
    – cat
    Apr 25, 2016 at 23:34
  • Search in the repositories with apt-cache search notifyosd . Cinnamon should have something like that too, but we can get away with zenity popups too if that's ok. Apr 25, 2016 at 23:37
  • @Serg Neither notifyosd nor notifyod are anywhere to be found. Zenity's alright with me :P
    – cat
    Apr 25, 2016 at 23:41
  • Cool. Will post as soon as i get to my laptop. I'm on mobile right now Apr 25, 2016 at 23:43

1 Answer 1


The way I have my notifications set up is via script that launches in /etc/rc.local file on every boot. Simply place the full path into that file and call it like so:

/home/USERNAME/bin/batmon.sh &

What it will do is that it will continuously echo to GUI and to command line that "hey, your battery is draining" till you plug in AC source.

The script relies on couple of things : having correct battery name ( mine is BAT1 and the file we want is /sys/class/power_supply/BAT1/uevent) and the presence of on_ac_power script, which does come with every default Ubuntu flavor ( i don't know about Kubuntu or Xubuntu or others)

The source code for the script is located on my git https://github.com/SergKolo/sergrep/blob/master/batmon.sh

Feel free to modify the script to your liking , maybe tune the delay time. I've set mine to 30 seconds in sleep function, but you can change it to minute (60 seconds) or more.

  • Hi, will this work on 21.04 ?
    – user227495
    Sep 4, 2021 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.