Archives For battery

Got wireless mouse, keyboard, or controller connect to your PC? You can have a glance at the battery level of them in top-bar of Ubuntu 22.04|22.10, Fedora 36/37, Arch/Manjaro with GNOME desktop!

This can be done via a Gnome Shell extension based on upower power management daemon.

Ubuntu 22.04 and Ubuntu 22.10 user can get the extension simply by following the steps below one by one.

1. First open Ubuntu Software, then search for and install the Extension Manager tool.

Install Extension Manager in Ubuntu 22.04+

2. Then, press Super (Windows Logo) key on keyboard to open Activities overview, search for and open the Extension Manager.

3. When the tool opens, navigate to ‘Browse’ tab. Finally, search for and install either extension below:

  • UPower Battery. – it just works but no configuration.
  • Battery Indicator (upower) – with option to toggle which device to display on panel and manually refresh.

The applet should be there in system tray area immediately after installation, though it can be empty if no wireless device detected.

For Fedora, Arch/Manjaro Linux with GNOME 42/43, just open the link Battery indicator or UPower Battery and use ON/OFF switch to install it. And install Gnome Extensions app from Gnome Software for configuring extensions.

Want to change system power mode between Performance, Balanced, and Power Saver automatically when plug / un-plug power supply?

Here’s an extension can do the job for Ubuntu 22.04, Ubuntu 22.10, Fedora 36/37, Arch and other Linux with GNOME 42 & 43.

GNOME introduced setting options to switch power mode since v40. For laptop running on AC power supply, user may use ‘Performance’ mode for gaming or doing heavy work. To prevent from draining power fast after un-plug AC power, it’s better to switch to ‘Balanced’ mode, or even ‘Power Saver’ mode when battery level is low. To automate this work, ‘Power Profile Switcher’ extension was born.

1. First, open Ubuntu Software app, then search for and install ‘Extension Manager’.

Install Extension Manager in Ubuntu 22.04+

2. Then, either click ‘Activities’ or 9 dots icon on dock, search for and launch ‘Extension Manager’. And, use it to search and install ‘Power Profile Switcher’ extension.

For Fedora Workstation and other Linux with GNOME 42/43, use ON/OFF switch in this page to install the extension.

3. After installed the extension, switch back ‘Installed’ tab in Extension Manager. Or, use Gnome Extensions tool to open the configuration dialog for it.

Finally, select your desired power mode when running on AC power and on battery. And, set the low battery level percentage to automatically go to power saving mode.

The system power mode will change automatically when you plug and un-plug power supply. That’s all. Enjoy!

Running Ubuntu laptop without power supply? It’s wise to keep an eye on the battery percentage. And, here’s how to make Ubuntu 22.04 display the info in top-right corner just besides the battery icon.

Method 1: Single command toggle display battery percentage

For those OK with Linux commands, just press Ctrl+Alt+T on keyboard to open terminal. When it opens, paste the command below:

gsettings set org.gnome.desktop.interface show-battery-percentage true

You’ll see the change immediately after hitting Enter to run the command.

And, to hide the percentage again, use command:

gsettings reset org.gnome.desktop.interface show-battery-percentage

Method 2: Use Gnome Control Center -> Power settings

In Ubuntu 22.04, the GNOME Tweaks tool no longer provide the option to toggle display battery percentage. Because, GNOME has merged this option into system settings (aka gnome-control-center).

1.) Firstly, open ‘Settings’ either from the dash or top-right system tray menu.

2.) When it opens, navigate to Power panel in the left. And, finally use the on/off switch in bottom right to toggle display battery percentage:

That’s it. Enjoy!

Want to check your laptop battery status in Ubuntu or other Linux? There’s a small indicator applet that can do the job in GNOME desktop.

Battery Status” is the free and open-source indicator applet developed by Lorenzo Carbonell, a software developer behind touchpad-indicator and my weather indicator.

It displays an icon on GNOME top bar in system tray area, along with the battery remaining time. By clicking on the applet, it shows battery percentage based on both current and original maximum capacities.

As well, it shows battery health via current and original maximum capacities, and the original and current Voltages.

Battery Health

A setting dialog is also available to configure the refresh time, warning, and colors, etc.

Battery Status Settings

How to Install ‘Battery Status’ in Ubuntu:

The app is available to install as GNOME Extension. At the moment, it supports for Gnome 3.36 and Gnome 40. Which means, user may install it in Ubuntu 20.04 and Ubuntu 21.10 via following steps.

1. Install ‘chrome-gnome-shell’:

Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command to install the ‘chrome-gnome-shell’ package if you don’t have it:

sudo apt install chrome-gnome-shell

This package enables ability to install Gnome Extensions via a web browser.

2. Install the Extension:

Next, click the link button below to go to the extension web page and turn on the slider icon to install it:

If you don’t see the toggle icon, install the browser extension via the link in that page and refresh it.

NOTE: The pre-installed Firefox in Ubuntu 21.10 is a Snap package that does NOT support for installing Gnome Extensions so far. Use another browser or install Firefox as deb.

The indicator should appear immediately after installation. If not, try to enable it via “Gnome Extensions” app, which can be installed via command:

sudo apt install gnome-shell-extension-prefs

That’s all. Enjoy!

gnome shell

After moving to Ubuntu 17.10 Gnome Desktop, you may find that some handy indicator applet switches has gone.

One of them is that neither ‘Settings’ nor ‘Gnome Tweaks’ show options to enable battery percentage in top panel.

Also there’s no options to configure the date and time display settings in the center of the top panel.

1. To show battery percentage in Gnome panel, install dconf editor from Ubuntu Software.

2. Then launch it and navigate to org -> gnome -> desktop -> interface, scroll down and turn on the switch for ‘show-battery-percentage’.

There you can also set clock time format, show or hide date and seconds.