vampyre_masquerade

Members
  • Posts

    18
  • Joined

  • Last visited

Report Comments posted by vampyre_masquerade

  1. 14 hours ago, Janko said:

    Hello! Thanks for your post! 

     

    I am facing same issue you do but your solution doesnt work for me. 

     

    I edited etc/elogind/logind.conf same as you:

     

    I also deleted the line causing shutdown in etc/acpi/acpi_handler.sh

     

    However the powerdown button STILL shuts down the server. Dou you have any idea what I am doing wrong? 

     

    As far as i can tell there are 2 services that handle the button calls, logind and acpid, with the changes made to the logind config this should disable logind from handling the calls, take note though that the logind config file will be over written with each reboot so a script needs to be used to rewrite the chnages on each boot, this is a simple user script that is run on array start. It just copies a prewritten file from the usb to the system on array start.

     

    cp /boot/config/acpi_handler.sh /etc/acpi/acpi_handler.sh && chmod 755 /etc/acpi/acpi_handler.sh && /etc/rc.d/rc.acpid restart && cp /boot/config/logind.conf /etc/elogind/logind.conf && chmod 644 /etc/elogind/logind.conf && /etc/rc.d/rc.elogind restart

     

    (its all one line), also when you make changes to acpid or logind the service needs to be restarted, maybe you missed that step. Lastly im assuming the acpi_handler needs to have complete information, so the lines about the power button need to stay, but have nothing to run, maybe it defaults to bios if it cant see anything to do with the call.

     

    Tbh thats as far as my knowledge goes, youll have to practice some google fu like i did. I did a quick search and there are lots of discussions on disabling the power button.

    • Thanks 1
  2. $%^&$%^&*%&$%^&!!!    After all this time i finally figured it out!!!!!!

     

    For some reason after 6.10 both acpid and logind were activly fighting to handle the button calls, so both responded, acpid was working correctly and start my VM but then logind would chime in and shutdown the system.

     

    I modified logind.conf to the below

    HandlePowerKey=ignore
    HandleSuspendKey=ignore
    HandleSuspendKey=ignore
    HandleHibernateKey=ignore

     

    Kept acpi_handler.sh the same

     

    Then modified my array start up script to edit the logind.conf on startup just like the acpi_handler.sh.

     

    • Thanks 1
  3. WOW this is reallly starting to piss me off now, even if I fully nuke the scripts and make it as simple as possible it still ignores the commands.

     

    First I made a dead simple event handler, /etc/acpi/events/power

    event=button/power
    action=/etc/acpi/VM.sh

     

    Copied the VM handling script into VM.sh and made sure it was executable.

    #! /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

     

    Reload acpid, press the power button and BAM FFS it still shuts down the system. I'm convinced this cant just be me now, it has to be a bug.

  4. 12 hours ago, BRiT said:

    I think there is a logical issue with your script. There are duplicate case statements [ button/power ]. Only the first one will be executed. I think you need to adjust your script so your customization is combined into the first case statement. Maybe something more like this:

     

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

    IFS=${IFS}/
    set $@

    case "$1" in
      button/power)
        case "$2" in
          PBTN) . /boot/config/plugins/user.scripts/scripts/VMStartStop/script
             ;;
          LNXPWRBN:00) . /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

    Hi

    Thanks for the idea, gave it a try and unfortunately nothing changed from the original issue, still ignores the acpi and goes straight to shutdown.

  5. After having some free time and no replies I decided to look into this more my self.

     

    After running acpi_listen and pressing the power button I was presented with 2 events.

     

    button/power LNXPWRBN:00 00000080 00000001

    button/power PBTN 00000080 00000000

     

    Not knowing why there was two I decided to modify acpi_handler.sh to reflect the two options. (I do not understand this script at all, had to piece one together from other examples) 

     

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

    IFS=${IFS}/
    set $@

    case "$1" in
      button/power)
        case "$2" in
          PBTN) . /boot/config/plugins/user.scripts/scripts/VMStartStop/script
             ;;
          *) logger "ACPI action $2 is not defined"
             ;;
        esac
        ;;
      button/power)
        case "$2" in
          LNXPWRBN:00) . /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
     

    So a bit more information but still no further ahead, still shuts down the system like there was no modification at all.

  6. Hi

     

    So I updated from 6.7.2 to rc3, most things worked quite fine except when accessing the GUI from a FQDN (via reverse proxy haproxy in pfSense), this would work fine once then fail every other time after closing the browser tab, accessing from IP works everytime. I have reverted back to 6.7.2 now because of the second issue, accessing SMB shares through Android Solid Explorer totally broke, I tried recreating the settings, clearing cache, clearing data, restarting, the lot, would just state network error each time. Now that I'm back on 6.7.2 it's still broken? Anyone have an idea?

     

    Edit: looking into it more I can access SMB thought smbv1 now but was previously setup to work with smbv2. 

    Edit 2: Dont worry fixed it, i screwed up when i was playing with the ident.cfg trying to give the server a domain name.

     

    unraid-diagnostics-20191018-2028.zip