The configuration defaults for GNOME Power Manager have not been installed

A friend brought me a Ubuntu system with the following issue:

On entering gdm, the login prompt was displayed on a black background and the following message appeared in the top-right corner:

“The configuration defaults for GNOME Power Manager have not been installed correctly. Please contact your computer administrator.”

Trying to log in as any user account was unsuccessful.

I don’t remember where I found the fix, but here’s what I did to fix it:

Once the gdm login screen appears, press CTRL-ALT-F1, which will switch you to a text-based login prompt, and log in using an account that has sudo privleges.

Run the following command:

sudo dpkg --configure -a

It may take a minute or two to complete. After that:

sudo reboot

After the reboot, when gdm appears you should have your colored background and the message should not appear.

Questions, comments, and feedback on this are welcome.