RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    ControlBlock Power Switch Issue

    Scheduled Pinned Locked Moved ControlBlock, PowerBlock & Co.
    controlblockpowerswitch
    26 Posts 7 Posters 7.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Townsperson
      last edited by

      I just finished hooking up a ControlBlock to an RPi3. I have an inidicator LED wired up, as well as a toggle switch for power. Installed the software and everything seemed to go OK.

      Anyway, I have an issue with this where the switch will turn on my RPi, but won't shut it down. Also, the LED will light, but will remain flashing for as long as the system is booted. Any ideas?

      Also, quick thing to note, after installation of the ControlBlockService, I did not have config file at /etc/controlblockconfig.cfg. Ended up making the file and matching the default config.

      1 Reply Last reply Reply Quote 0
      • M
        maudio
        last edited by maudio

        UPDATE : Installing the "PowerBlock" git brings functionallity to the switch! On and Off switching works... but the ControlBlock itself not. There must be a script problem. Just installing it now again. Seems the git is updated now

        Same Problem here...

        Installed and Uninstalled ControlBlockService but nothing. I can switch the Rpi3 on but can't shut down. The LED is slowly fading all the time, no matter if the system is running or not.

        I have a ControlBlock V2.1 and just followed the manual at the Pet Rock Blog Site and also on github.
        If i check "service --status-all" , the ControlBlockService shows an "-" for not running. Manually starting the service dont work.

        Tested on RetroPie and Raspian Image

        My Config File was empty too, so i have copied the whole from github into it but still the same
        Googled around but no answer found.

        0_1484423817493_20170114_205343.jpg

        1 Reply Last reply Reply Quote 0
        • M
          maudio
          last edited by

          @Townsperson : Have tested a little :)
          Just install ControlBlock1... after that install ControlBlock2.

          Now the switch work and the LED does it thing BUT no recognizing of buttons or something :(

          T 1 Reply Last reply Reply Quote 0
          • T
            Townsperson @maudio
            last edited by

            @maudio

            Same thing here. I guess something is broken in ControlBlockService2. Hopefully it gets fixed at some point, but until then, at least the switch and LED are working.

            Thanks for the help.

            1 Reply Last reply Reply Quote 0
            • M
              m312
              last edited by

              Yup same problem, ControlBlockService2 seems to not be working. Or controlblock 2.1....

              Thinking of just sending the control block back, unless someone can find out why, it isn't working for whatever reason.

              1 Reply Last reply Reply Quote 0
              • P
                petrockblog Global Moderator
                last edited by

                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!

                1 Reply Last reply Reply Quote 0
                • R
                  RetroShark
                  last edited by

                  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.

                  1 Reply Last reply Reply Quote 0
                  • R
                    RetroShark
                    last edited by

                    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
                    }
                    ]
                    }

                    1 Reply Last reply Reply Quote 0
                    • P
                      petrockblog Global Moderator
                      last edited by

                      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 and powerswitchOn are working as intended.

                      P 1 Reply Last reply Reply Quote 0
                      • D
                        dantropie
                        last edited by

                        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?

                        D 1 Reply Last reply Reply Quote 0
                        • D
                          dantropie @dantropie
                          last edited by

                          @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

                          B 1 Reply Last reply Reply Quote 0
                          • B
                            BakedGoods @dantropie
                            last edited by BakedGoods

                            @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?

                            M 1 Reply Last reply Reply Quote 0
                            • M
                              m312
                              last edited by

                              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.

                              D 1 Reply Last reply Reply Quote 0
                              • D
                                dantropie @m312
                                last edited by

                                @m312 that's defeats the purpose of adding a switch tho. Sigh

                                M 1 Reply Last reply Reply Quote 0
                                • M
                                  m312 @dantropie
                                  last edited by m312

                                  @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

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    m312 @BakedGoods
                                    last edited by m312

                                    @BakedGoods

                                    Try:
                                    git clone https://github.com/petrockblog/PowerBlock.git instead

                                    the https made the difference with the Controlblock (which wasn't working at all before)

                                    D B 2 Replies Last reply Reply Quote 0
                                    • D
                                      dantropie @m312
                                      last edited by

                                      @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.

                                      B 1 Reply Last reply Reply Quote 0
                                      • B
                                        BakedGoods @m312
                                        last edited by

                                        @m312

                                        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.

                                        1 Reply Last reply Reply Quote 0
                                        • B
                                          BakedGoods @dantropie
                                          last edited by BakedGoods

                                          @dantropie @m312

                                          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.

                                          D 1 Reply Last reply Reply Quote 0
                                          • P
                                            petrockblog Global Moderator
                                            last edited by

                                            Thanks for the heads up. I will release a version with a fix for that during this day!

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            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.