Power cuts and lost settings

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
BrandNewUser
Level 1
Level 1
Posts: 26
Joined: Tue Sep 14, 2021 8:22 am

Power cuts and lost settings

Post by BrandNewUser »

After 20 years my xp machine broke. In order to save money I bought a used desktop pc and I installed linux mint..
On my home power gets cut often. With windows xp about 2/10 this was happening I had to check disk and fix errors and no settings were never touched. Now with mint every time this is happening settings are reset to many apps. With a live usb I use disks to check and fix errors on the filesystem, but settings are still lost. Is there any way to avoid this?
Do not tell me that I need a ups. Just answer me if I can avoid this situation when power gets cut. Thanks for your time.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
1000
Level 6
Level 6
Posts: 1018
Joined: Wed Jul 29, 2020 2:14 am

Re: Power cuts and lost settings

Post by 1000 »

Now with mint every time this is happening settings are reset to many apps.
Be exact. What applications?
As some desktop environments and applications may use the default settings and not the saved settings.

Can you give output of command ?

Code: Select all

inxi -Fxxxrz
On my home power gets cut often.
However UPS it can be helpful for your hard drive and system.
It's about life expectancy.
- Interrupting the power supply during a system update may break your system.
- Interruption of power to disk drives can sometimes scratch / damage the hard drive.
I don't know, maybe SSD drives are more resistant. But my SSD don't have SMART technology, so I don't know when will broken.
I have very very small, cheap "PowerWalker" UPS. It's enough for me to turning off the computer.
Laptop users have batteries and do not need a UPS. Because it is the same.
SuperJoker
Level 1
Level 1
Posts: 46
Joined: Tue Jun 22, 2021 11:32 am

Re: Power cuts and lost settings

Post by SuperJoker »

It's not a total solution and you will still have to check-fix for errors the disk bur you can save on a usb the hidden folder .config of your home folder and restore it when applications settings are reset.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11145
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Power cuts and lost settings

Post by AZgl1800 »

if you refuse to get a UPS, then you must at a minimum use Timeshift and have it storing to different Partition or /HDD/SDD

and set the backups to at minimum of 12 hours apart....

then if the power fails, boot up again, and use the last backup to Restore from.

IF, however, you are loosing DATA, that is different, you need to use BackInTime and configure it much the same as above.

In my case, I have a Win7 Desktop that has never been powered off since I bought it back in 2006.....
it has a 1500W UPS on it with the OEM software that powers the Desktop down when a Utility Grid power goes away.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Power cuts and lost settings

Post by rene »

You need a UPS. And may without one be helped by mounting your /home filesystem with the data=journal option.

In the normal situation of having /home not split off, this is to say you edit as root /etc/fstab and change defaults on the line for your root filesystem (i.e., the line showing the filesystem to mount on /) to data=journal.

That advise assumes you don't use home directory encryption; when quickly checking, I don't believe that you can if you do influence syncing, so you'd reinstall without home directory encryption.

[EDIT] You may also want commit=1, i.e. data=journal,commit=1, although it'll seriously hurt performance (most noticeably on HDD rather than SSD) and although you may not in fact be helped tremendously by it: your symptom seems to say that e.g. your dconf database is being damaged and that's basically open all the time anyway even if not constantly being written to...
Petermint
Level 9
Level 9
Posts: 2981
Joined: Tue Feb 16, 2016 3:12 am

Re: Power cuts and lost settings

Post by Petermint »

Your situation is a good reason to buy a laptop instead of a desktop. Built in battery backup.

Linux delays disk writes for up to a minute. If you are losing the last minute of activity, you can set the write delay to a shorter interval.

For losses of settings over more than a minute, it depends on the application with some applications having their own built in delay which might be 5 minutes. Please give examples, the application and how long between the setting change and the power failure.
1000
Level 6
Level 6
Posts: 1018
Joined: Wed Jul 29, 2020 2:14 am

Re: Power cuts and lost settings

Post by 1000 »

Eh, if it uses the system in a virtual machine, then the virtual machine will restore the previous system.
If he don't write more details, you can only read from the coffee grounds what's wrong with it. ( divination )
Locked

Return to “Beginner Questions”