I’m using Linux Mint 22 on a Dell Precision 7750, 64GB ram, 1TB Kingfisher base drive (host), and a 2TB Crucial NVME SSD. mounted in one of the four option bays. I use this for storage and execution of a VMWare VM. Twice in the past two weeks the laptop battery has shutdown unexpectedly. Both times the NVME card (VM was in use at the time) was corrupted beyond recovery. This is costing me a lot of time, frustration, and data loss. I have to re-install the raw VM and proceed through the entire process of upgrading and re-installing software on the VM. Is there some way to reduce this issue? Thanks.
I am also a Mint 22 user. The problem is that your system hasn"t the time to react to the shutdown. Its your BIOS that is reacting to the loss of power. Memory is always vulnerable when power spikes and outages occur. I would suggest to take your computer to a battery store and have a new one installed. Or if you are handy and can extract your current battery, order or shop a new battery. Knowing that you battery is bad, keep it plugged in always when operating. If its failing when plugged in, its past the time to wait.
Just my opinion.
In addition to what @Paul has suggested, you might install this power manager applet in order to monitor the power levels of both your battery and your plugged-in supply.
I recently reloaded a Zorin instance on someone’s machine due to corruption from just this issue. Luckily all of her data was intact, the ssd simply became unbootable.
I booted from a usb stick, copied data to another external usb device, reinstalled the OS and restored the data. I was not able to simply reinstall grub & carry on, which has been successful in the past for borked boot block issues.
Losing power can be a serious PITA.
Is your battery at its end of life?
(Later) We just took the dog for a walk and I was thinking about this.
The Power Mangement app on our systems used to have options in the UI for taking some action when the battery reached a certain percent of charge. Used to as it’s not there now.
However - there are a couple of ways to work around this. One being the upower service which runs on both mint and zorin & modifying /etc/UPower/UPower.conf, the second being a simple shell script which starts at boot time and runs continuously in the background, checking the battery percentage every 2 minutes and shutting the system down if the battery reaches a defined percentage - the example in the script at this link is 11 percent.
Check this: power management - How do I set the computer to suspend when battery is critically low? - Ask Ubuntu
Scroll down to this text and start reading:
Edit /etc/UPower/UPower.conf and set
There are 2 example scripts there, at first blush both look like they would address the issue.
Here’s what the previous Power Management app looked like, notice “When power is critically low”…