ControlBlock Power Switch Issue
-
There was a bug in the recent version of the driver. That is fixed now! Please pull the latest version of the driver and re-install it. Hope that helps!
-
I had the same issue, I finally got my RetroPie assembled after months of delay and ControlBlockService 2 would not start...at least would not look started from service --status-all. Glad to have found this message...updating to latest driver and will try.
pi@retropie:/var/log $ sudo service controlblockservice start
pi@retropie:/var/log $ sudo service controlblockservice status
● controlblockservice.service - LSB: ControlBlockService init script
Loaded: loaded (/etc/init.d/controlblockservice)
Active: active (exited) since Tue 2017-01-17 03:47:38 UTC; 1s ago
Process: 9596 ExecStop=/etc/init.d/controlblockservice stop (code=exited, status=0/SUCCESS)
Process: 9634 ExecStart=/etc/init.d/controlblockservice start (code=exited, status=0/SUCCESS)
Jan 17 03:47:38 retropie systemd[1]: Started LSB: ControlBlockService init script.
pi@retropie:/var/log $ sudo service --status-all | grep controlblockservice
[ - ] controlblockservice
pi@retropie:/var/log $ tail -10 /var/log/syslog
Jan 17 03:45:10 retropie systemd[1]: Started LSB: ControlBlockService init script.
Jan 17 03:46:07 retropie wpa_supplicant[401]: wlan0: WPA: Group rekeying completed with 14:22:db:30:1f:46 [GTK=CCMP]
Jan 17 03:47:22 retropie systemd[1]: Stopping LSB: ControlBlockService init script...
Jan 17 03:47:22 retropie systemd[1]: Stopped LSB: ControlBlockService init script.
Jan 17 03:47:38 retropie systemd[1]: Starting LSB: ControlBlockService init script...
Jan 17 03:47:38 retropie systemd[1]: Started LSB: ControlBlockService init script.
-
Ok, the latest version starts the service, however appears to ignore the powerswitchOn setting. It kept shutting down until I found a jumper and manually jumped the switch pins together. Not sure why (see config below).
Also /dev/input/js0 now works properly! It also creates a /dev/input/js1 despite not having any second controller connected. I thought the config below should disable this, but clearly not.
{
"controlblocks" : [
{
"enabled" : true, // Enables (=true) or disables (=false) the ControlBlock
"address" : { // The address information of the first ControlBlock
"SJ1" : 0, // The hardware address solder-jumper SJ1. Options: 0, 1
"SJ2" : 0 // The hardware address solder-jumper SJ2, Options: 0, 1
},
"gamepadtype" : "arcade", // Sets the gamepad type. Options: "arcade", "mame", "snes", "none"
"onlyOneGamepad" : true, // If true, registers only one gamepad instead of two
"powerswitchOn" : false // Enables (=true) the power switch functionality. Options: true, false
},
{
"enabled" : false, // Enables (=true) or disables (=false) the second ControlBlock
"address" : { // The address information of the second ControlBlock
"SJ1" : 1, // The hardware address solder-jumper SJ1. Options: 0, 1
"SJ2" : 0 // The hardware address solder-jumper SJ2, Options: 0, 1
},
"gamepadtype" : "arcade", // Sets the gamepad type. Options: "arcade", "mame", "snes", "none"
"onlyOneGamepad" : true // If true, registers only one gamepad instead of two
}
]
} -
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?
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.