Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[6.10.0] acpi_handler.sh modifications been ignored/duplicated.

  • Solved
  • Annoyance

Hi

 

Recently upgraded from 6.9.2 up to 6.10 stable, the process was quite smooth with only some small hiccups updating my Windows 11 to use the new TMP method.

 

There is how ever a change in the system through the upgrade that I am unable to rectify. Previously on unraid boot I had a script that modified the acpi_handler.sh to incorporate a script when the power button was pressed, this would determine the state of my Windows 11 VM and Start/Stop the VM if needed. Now it seems to be both performing the VM start as well as the default behaviour of system shutdown i.e. when the power button is pressed the VM will load for about 1 minute before the system force closes it and the array stops for a shutdown.

 

acpi_handler.sh update script run at array first start. (I have also tried just replacing the entire file instead of the line, no difference)

 

#!/bin/bash
sed -i 's|power) /sbin/init 0|power) . /boot/config/plugins/user.scripts/scripts/VMStartStop/script|g' /etc/acpi/acpi_handler.sh

 

modified acpi_handler.sh file after array start. (so we know its been modified correctly)

 

#!/bin/sh
# Default acpi script that takes an entry for all actions

IFS=${IFS}/
set $@

case "$1" in
  button)
    case "$2" in
      power) . /boot/config/plugins/user.scripts/scripts/VMStartStop/script
         ;;
      *) logger "ACPI action $2 is not defined"
         ;;
    esac
    ;;
  *)
#    logger "ACPI group $1 / action $2 is not defined"
    ;;
esac
 

VM control script that is called from acpi_handler.sh.

 

#! /bin/bash

# if domain is running, shut down
if virsh list | grep "Windows 11 .*running" ; then
  virsh shutdown "Windows 11"

# resume domain if it's paused
elif virsh list | grep "Windows 11 .*paused" ; then
  virsh resume "Windows 10"
elif virsh list | grep "Windows 11 .*pmsuspended" ; then
  virsh dompmwakeup "Windows 11"

# otherwise start domain
else
  virsh start "Windows 11"
fi

 

With nothing changed from the original running scripts except updating the 6.10 I can only assume a critical change has occurred in the new kernel or system version.

Please don't recommend I use WOL as I already do, or a separate button or device. Been able to just press the power button and treat my server like a desktop is a very convenient feature for all that use the desktop.

 

Troy

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.