Notification not being displayed when power is low


I just installed Lubuntu 20.04 on my hp laptop with 4gb ram and Ryzen 3. The problem is that my system just shuts down without showing any notification when power is low.

Following are the values that I have in the power management settings:

When power is low: Lock Screen
Warning: 30 seconds
Level is low at: 5%

I tried running “sudo apt-get install --reinstall indicator-power” but didn’t work.

I checked the values in the /etc/Upower/Upower.conf file and it shows UsePercentageForPolicy=true and CriticalPowerAction=HybridSleep.

There is also a comment in the Upower.conf file that states that if hybridsleep mode is not available, hibernate will be used.

But the thing is that the hibernate option is not working in my system either.

So I tried running “sudo pm-hibernate” but got an error saying “pm-hibernate command not found”.

Also tried “sudo systemctl hibernate”. Got an error “Failed to hibernate system via logind: Sleep verb hibernate not supported”