completely blind computer geek, lover of science fiction and fantasy (especially LitRPG). I work in accessibility, but my opinions are my own, not that of my employer. Fandoms: Harry Potter, Discworld, My Little Pony: Friendship is Magic, Buffy, Dead Like Me, Glee, and I'll read fanfic of pretty much anything that crosses over with one of those. keyoxide: aspe:keyoxide.org:PFAQDLXSBNO7MZRNPUMWWKQ7TQ
AI generated textI know, let's ask AI! What could go wrong?
Q: How can I get a computer running Debian bookworm to shut down cleanly when it switches to the UPS? The UPS is connected to my computer via a USB cable, but I have no idea what kind it is.
A: To configure your Debian Bookworm system to shut down cleanly when the UPS switches to battery power, you can use a UPS management tool like apcupsd or NUT (Network UPS Tools). Here's a step-by-step guide:
### 1. Install a UPS Management Tool Choose one of the following tools based on your UPS type:
#### Option A: Using ``apcupsd`` (for APC UPS or compatible devices) 1. Install ``apcupsd``: ```bash sudo apt install apcupsd ``` 2. Configure it: - Edit the configuration file: ```bash sudo nano /etc/apcupsd/apcupsd.conf ``` - Set parameters like ``UPSNAME`, `UPSCABLE`, `UPSTYPE`, and `DEVICE``. For example: ``` UPSCABLE usb UPSTYPE usb DEVICE ``` - Save and exit.
3. Restart the service: ```bash sudo systemctl restart apcupsd ```
4. Test the setup: ```bash apcaccess status ```
#### Option B: Using ``NUT`` (for broader UPS support) 1. Install ``NUT``: ```bash sudo apt install nut ``` 2. Detect your UPS: ```bash sudo nut-scanner ``` This will help identify the driver for your UPS.
3. Configure ``NUT``: - Edit ``/etc/nut/ups.conf`` to define your UPS. - Edit ``/etc/nut/upsd.conf` and `/etc/nut/upsmon.conf`` for monitoring and shutdown behavior.
4. Start and enable the service: ```bash sudo systemctl enable nut-driver.service sudo systemctl start nut-driver.service ```
### 2. Configure Automatic Shutdown Both tools allow you to configure thresholds for battery level or runtime. When these thresholds are met, the system will shut down gracefully. Refer to the documentation for the specific tool you choose.
### 3. Test the Setup Simulate a power outage to ensure the system shuts down as expected.
### Notes: - If you don't know your UPS type, try connecting it via USB and running ``lsusb` to identify it. Alternatively, use `nut-scanner`` from the NUT package. - For APC UPS devices, ``apcupsd` is typically easier to set up. For other brands, `NUT`` offers broader compatibility.
Did I back up whatever the heck I did to get my server to shut down when it switches to UPS after yesterday's #Debian reinstall? No, of course I didn't! Do I remember what I did several years ago? No, of course not! Looks like this afternoon's #linux adventure is all planned out. My brain is mumbling something about upsmon, but it doesn't have any other details to offer.
@lizzy Yes, as I said in my post, that works if the hardware is dead or removed or otherwise borked. But if there's issues with the filesystem, it'll halt the boot and ask you what to do/how to recover it, landing you in emergency mode.
@remmy Instead of messing with the terrifying mess that is systemd dependencies, I just have permissions set on the mounting directory so processes can't write there. They can only write to the actual mounted filesystem. So thanks for the tip! This will help.
For anyone complaining about lack of engagement or discovery on the fediverse: the secret is to complain about Linux, and get into arguments about systemd. I'm not sure what the secret on Bluesky is, yet. Maybe complaining about ATProtocol and saying ActivityPub is better?
@dandylover1 I disagree that the vulgarity is needless. In the year 2025, when OSX, Windows, IOS, and Android can run screen readers in recovery mode, it's obscene that Linux can't. Far more obscene than the use of the word fuck.
Even completely headless, command line #linux doesn't prioritize #accessibility in any way. Today I had to reinstall an entire #debian system from scratch because a drive listed in my /etc/fstab died. That makes #systemd boot into emergency mode, where you get no SSH, no network, no sound, and no screen reader. There is no quick way to force it to try and boot even though drive 7 of 11 has died, and it could absolutely bring up SSH and the network to let me fix it if it wanted to, just like sysvinit used to do. You can't even force systemd to add SSH and the network to emergency mode because of circular dependencies. nofail will only continue the boot if the drive doesn't exist, but if the filesystem has issues...emergency mode for you. In short: if your drive dies on Linux, fuck you. Be able to see, or reinstall your entire system, because nobody in Linuxland gives a shit about #a11y or your needs.
So I read a lot both for personal enjoyment, and for work. If you want to see a real time feed of what I'm reading, you can find that here: tinygem.org/fastfinge/
IOS Shortcuts are the worst. Just spent like three hours debugging one. I now know far more than I ever wanted to about how shortcuts work, and all of the VoiceOver bugs in the shortcuts app, and the various bugs with posting form data to an API from a shortcut.
To be fair, sometimes I do fall asleep with a YouTube video on, and then thanks to autoplay I wake up hours later to a man named Ian yelling at me about lunchables. So God only knows what my sleep self has been watching.
Either that or Grognak The Destroyer and Putput are obscure sex kinks and I’ve just unintentionally revealed some deep, dark secret to all of the fediverse.
Uh, should I be worried that the first thing YouTube recommends under the topics to explore thing is “Groknak the destroyer”? Who or what is Grognak the destroyer? Is it coming for me? All the other topics are things like “putput”, “offline TV”, “offensive board games”, “live chess tournaments”, you know…perfectly normal things to watch on YouTube. I assume Grognak the destroyer and putput are the demons Apple AI was warning me about a couple days ago.
I always forget just how small and compressible text is. The entire database for this instance is less than 5 gigs in size, with about four million posts. And that includes overhead for the indexes, views, log files, etc. The big drain on any instances is the media. I proxy remote media, but don't cache it, so the only crap I have to store is my own. Same for rblind.com; it's also only a few gigs. Slightly more, because we cache some thumbnails, and a Lemmy post is generally much longer than a microblogging post.