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
.
I just retested the driver with the options you posted above.onlyOneGamepad
andpowerswitchOn
are working as intended. -
The power switch on my control block was working fine. It would turn on then turn off quickly. But my buttons weren't working. So I reinstalled everything and my buttons are working now. However now when I turn off the power switch it blinks for a long time. Almost 4 min before shutting down. Anyone have any ideas?
-
@dantropie correction, it takes 3 min. I feel it used to take like 20 seconds before. And it opens a command line saying "the system is going down to power off at date n time" or something like that. It repeats that 3x hen shuts off in 3 min. Any help would be appreciated.
I checked the config file and powerswitch is set to true
-
@dantropie said in ControlBlock Power Switch Issue:
@dantropie correction, it takes 3 min. I feel it used to take like 20 seconds before. And it opens a command line saying "the system is going down to power off at date n time" or something like that. It repeats that 3x hen shuts off in 3 min. Any help would be appreciated.
I checked the config file and powerswitch is set to true
I'm having the exact same issue, it broadcasts a message that in 3 minutes it will power off, then it does. I'm actually fine with the delay but I'm concerned it's just stopping power to the raspberry pi rather than properly shutting down linux.
I'm using the PowerBlock and I installed the latest driver (as of today) by following the blog's directions (ie. "git clone git://github.com..." etc.) How do I check the version number?
Any help?
-
Same problem, not sure mine even powers off, but I'm fine with that, no accidental shut downs. I can power up fine with the button and shut down with ES, so might not change it even if there's a fix.
-
@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.