Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

ControlBlock service won't start with v1.6 board



  • I filed an issue on the ControlBlock driver GitHub site as well : https://github.com/petrockblog/ControlBlockService/issues/10

    Not trying to do anything fancy at all - Stock Pi 3 B+, RetroPie 4.5, ControlBlock board v1.6 followed install instructions on ControlBlockService GH site, and at the end of the install process it says the service isn't running.

    I try installing the ControlBlock service using the RetroPie setup program, but it appears to only know how to install ControlBlockService2 (which is not what I need for my v1.6 board). It did, however, work, in the sense that after I installed it that way I could then power up and down the Pi using the ControlBlock power switch. But of course none of the inputs worked since it was using SPI rather than I2C.

    So, any ideas how to debug this service not starting problem for ControlBlockService?

    *Brian


  • Global Moderator

    First, you need to make sure that the ControlBlockService2 is uninstalled. You can use the RetroPie Setup for.

    Then, you can install the driver for ControlBlock 1.x with the quick installation command from https://github.com/petrockblog/ControlBlockService#quick-installation.

    Hope that helps!



  • Right. So I started with a completely fresh image download of RetroPi v4.5. Put it on an SD card, put that in my Pi, booted it up. I checked in the RetroPi Setup, and the ControlBlock driver was not installed, so it wouldn't let me uninstall anything there.

    I then followed all of the instructions at https://github.com/petrockblog/ControlBlockService#quick-installation and as per the GH issue, the service will not start.

    So, what should my next steps be? How do I figure out why the service won't start when I'm following the instructions correctly? (Or, at least, I assume I'm following them correctly. I type in each of the commands the quick-installation says: i.e. first the update and upgrade and install of git, cmake, etc. Then the running of the install.sh script via wget. At the end of that process I get the "[ERROR] The ControlBlock service is not running" error)



  • @petrockblog Any ideas? I'm happy to debug this on my own, I just need a shove in the right direction to start looking. Is there an error log stored somewhere that would give the reason that the service can't start?


  • Global Moderator

    You can change into the build directory and run make, sudo make install, and sudo make installservice as three separate commands. Maybe you can see from there at which step an error occurs.

    Another thought. : Maybe the activation of the I2C interface does not work for some reason. You could try and manually activate it with the tool raspi-config. You call it from the command line with sudo raspi-config.


  • Global Moderator

    Also, you can call controlblock service from within the build directory directly. That should also give you an error output.



  • OK, those are great suggestions. The commands "make", "sudo make install", "sudo make installservice" all run just fine with zero errors or warnings of any type.

    The I2C interface was not enabled (at least according to raspi-config), so I enabled it, and then rebooted. Still "service --status-all" showed that controlblockservice was not started. So that didn't work. (Note that "sudo make installservice" reported : "Making sure that the ARM I2C Interface is enabled via /boot/config.txt . . ." even though the I2C interface was not turned on when I ran it.

    When I ran "sudo controlblock" from the build directory I got no error messages of any type. I just got the following:

    [ControlBlock] Gamepadtype = ARCADE gamepads
    [ControlBlock] Single gamepade mode DEACTIVATED
    [ControlBlock] Shutdown is ACTIVATED

    Any other ideas?



  • @EmbeddedMan @petrockblog Any other ideas for what things to check? I'm an embedded C guy, and Linux isn't my primary environment so I'm not exactly sure what to check next.


  • Global Moderator

    Sorry for this delayed reply.

    I would start and step-by-step go through the non-quick installation steps that are described at https://github.com/petrockblog/ControlBlockService/blob/master/README.md

    it would be interesting to see at which of the step something goes wrong.


  • Global Moderator

    Thinking about it — if you can start the controlblock service manually with ‘controlblockservice &’, you should be able to see test the controlblock with the jstest tool as described at https://github.com/petrockblog/ControlBlockService2/blob/master/README.md#troubleshooting (that also works works with the ControlBlock 1.x).



  • @petrockblog said in ControlBlock service won't start with v1.6 board:

    Sorry for this delayed reply.

    I would start and step-by-step go through the non-quick installation steps that are described at https://github.com/petrockblog/ControlBlockService/blob/master/README.md

    it would be interesting to see at which of the step something goes wrong.

    And, unfortunately, when I do this, I get the exact same result as what I've listed above and in the GH issue. There are no error messages until the very end when I get

    [ERROR] The ControlBlock service is not running

    That's it.

    *Brian



  • @petrockblog When I type "controlblockservice &" on the command line, I get "-bash: controlblockservice: command not found" error. Is there some specific directory I need to be in to run the service that way?



  • @petrockblog I found the controlblockservice script : in /etc/init.d/controlblockservice. When I do "sudo /etc/init.d/controlblockservice &", I don't get any error message (just "[1] 690") but then the next command that I type (no matter what it is) I get "[1]+ Done sudo /etc/init.d/controlblockservice" which I think means that the service started but then immediately exited?



  • @petrockblog Well, I think I've found something : /usr/local/bin is completely empty. The service script (controlblockservice) exits immediately after executing this line:

    [ -x "$DAEMON" ] || exit 0

    And since $DAEMON is /usr/local/bin/controlblockservice, it exits.

    So why does the 'install' process not generate any errors for me (either using the install.sh script, or doing it all manually) but yet it doesn't copy anything over into /user/local/bin?



  • @petrockblog It appears that I can get the service running by commenting out the line "[ -x "$DAEMON" ] || exit 0" and then starting the service. This also allows the service to run on boot.

    So, why does this line need to be commented out? I'm confused why this would work for everyone else and not my setup (even though I started from a completely fresh RetroPi 4.5).



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.