ControlBlock Power Switch Issue
-
@m312 that's defeats the purpose of adding a switch tho. Sigh
-
@dantropie Yeah sure, it should be fixed, but for me personally, I don't mind as switching on was the thing I wanted it for anyway
-
Try:
git clone https://github.com/petrockblog/PowerBlock.git insteadthe https made the difference with the Controlblock (which wasn't working at all before)
-
@m312 yea you're right. i guess i can quit thru ES, but sometimes it's nice to just be able to press the button from anywhere in the game. i also have a main switch for the main system (pi, monitor, marquee light, and speakers) so i guess i dont really need a switch for the power.
ALso, i installed mine with the https, but still have the issue so dont think it's that. It did however make the buttons work.hopefully a fix is made.
-
Hey thanks for the tip. I uninstalled then re-installed with that link and the issue remains.
I mean it's not a huge deal, it does shut off, just takes 3 minutes. Kind of a quirky bug.
-
Hey so I (think?) I've got it fixed.
I uninstalled the service, went into the actual src files ("/root/PowerBlock/src/powerblock/") and edited line 54 of PowerSwitch.cpp to instead of say "shutdown -t 3 -h now" it's set to "shutdown -h now". I reinstalled the service and rebooted--works! Shuts down in about 30 seconds, I see the verbose shutdown, and no echo warning. I have no LED set up so I'm not sure how that responds.
So maybe not a bug but a deliberate 3 minute timer on shutdown? Not sure why.
-
Thanks for the heads up. I will release a version with a fix for that during this day!
-
@BakedGoods awesome thanks!!! I'm still new to this stuff. Is there a way to make an edit without uninstalling and reinstalling things?
-
@petrockblog said in ControlBlock Power Switch Issue:
The location of the configuration file has also changed with the recent driver update. It is now located at
/usr/local/etc/controlblockservice.cfg
.That change has been reverted. The config file is located at its original location at
/etc/controlblockservice.cfg
. -
Is there a way to edit the powerswitch.cpp without uninstalling and reinstalling anything?
-
@dantropie is there a way to edit the cpp file from the command prompt?
-
@dantropie so I did sudo nano on the PowerSwitch.cpp file and edited the line to shut down now. But it still takes 3-4 min to shut down. Any help?
-
You can download and install the latest revision of the PowerBlock driver. You can control the shutdown action now with a shutdown script, see https://github.com/petrockblog/PowerBlock#shutdown-script.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.