AskUbuntu · @askubuntu
81 followers · 2141 posts · Server ubuntu.social

Boot error after upgrading to 23.04, pcie:hp: cannot get irq -1 for the hotplug controller

askubuntu.com/q/1465398/612

#boot #hotplug

Last updated 1 year ago

AskUbuntu · @askubuntu
66 followers · 2113 posts · Server ubuntu.social

How can gpsd correctly detect a usb GPS device when inserted after system boots?

askubuntu.com/q/1461124/612

#usb #gps #hotplug

Last updated 1 year ago

TSM at Work · @tsmatwork
8 followers · 35 posts · Server noc.social

Asking the kernel to disable PCI may have just turned a (the cylindrical one) from a workstation no longer receiving vendor software updates into something longer-lived. And more in line with my way of computing, which tends to be low-, moderate-, and high-memory. I wonder if it will run a bunch of or in the near future.

#jails #freebsd #virtualmachines #bhyve #cpu #gpu #macpro2013 #hotplug

Last updated 2 years ago

claude · @mathr
287 followers · 2739 posts · Server post.lurk.org

how to when is and running on

useful for media art installations where you don't want the laptop battery to be destroyed by excessive power consumption if there is a long power cut

```
$ cat /usr/local/bin/psu-hotplug.sh
#!/bin/bash
ACTIVE="${1}"
PSUUSER=myinstallationuser
XUSER="$(who | grep -F "(:0)" | cut -d\ -f 1)"
if [ "x${XUSER}" = "x${PSUUSER}" ]
then
if [ "x${ACTIVE}" = "x0" ]
then
# power off if power is not restored
echo "$(date --iso=s) power lost" >> /var/log/psu-hotplug.log
touch /var/run/psu-hotplug.shutdown
sleep 30
if [ -f /var/run/psu-hotplug.shutdown ]
then
echo "$(date --iso=s) shutting down" >> /var/log/psu-hotplug.log
shutdown now -h
else
echo "$(date --iso=s) not shutting down" >> /var/log/psu-hotplug.log
fi
else
echo "$(date --iso=s) power restored" >> /var/log/psu-hotplug.log
rm -f /var/run/psu-hotplug.shutdown
fi
fi
$ cat /etc/udev/rules.d/50-psu-hotplug.rules
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}!="0", RUN+="/usr/local/bin/psu-hotplug.sh 1"
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_NAME}=="AC", ENV{POWER_SUPPLY_ONLINE}!="0", RUN+="/usr/local/bin/psu-hotplug.sh 1"
```

#hotplug #udev #linux #battery #disconnected #power #psu #ac #shutdown

Last updated 3 years ago