vampyre_masquerade
-
Posts
18 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Store
Gallery
Bug Reports
Documentation
Landing
Report Comments posted by vampyre_masquerade
-
-
Changed Status to Solved
-
$%^&$%^&*%&$%^&!!! 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=ignoreKept 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.
- 1
-
As far as i can tell this has never been looked at by the developers as an issue, is it because this is now a defunct feature, or is it been addressed in 6.11.0? Either way knowledge is key.
- 1
-
Is this going to be confirmed as a bug or not, is this a feature that no longer exists? its been almost a month.
-
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.shCopied 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"
fiReload 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.
-
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 actionsIFS=${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"
;;
esacHi
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.
-
Still no change with 6.10.2
-
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 actionsIFS=${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.
-
Update: No change in the latest 6.10.1, system is still ignoring acpi_handler.sh.
-
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.
[6.10.0] acpi_handler.sh modifications been ignored/duplicated.
in Stable Releases
Posted
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.