RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    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

    Gamecon driver fails to build on Kernel 4.19.x

    Scheduled Pinned Locked Moved Help and Support
    retropie-setupgamecongamecon driver
    38 Posts 4 Posters 6.3k 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.
    • mituM
      mitu Global Moderator
      last edited by

      Looks like the change that breaks the driver is in 4.15, when setup_timer was replaced by timer_setup in the Linux kernel internal API (https://kernel.googlesource.com/pub/scm/linux/kernel/git/kees/linux/+/for-linus-timers-conversion-final-v4.15-rc1, https://lwn.net/Articles/735887/).

      BuZzB 1 Reply Last reply Reply Quote 1
      • BuZzB
        BuZz administrators @mitu
        last edited by

        @mitu Ah. Nice work. Should be an easy IFDEF fix then. No way I know of though of contacting author (maybe email in package info?), but worst case we could fix this ourselves.

        This would be better on a GitHub repo also imho. Maybe they would upload their unpackaged files if they don't already have a repository somewhere (if we can contact them).

        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

        DarksaviorD 1 Reply Last reply Reply Quote 0
        • DarksaviorD
          Darksavior @BuZz
          last edited by Darksavior

          @BuZz The developer "marqs" sometimes posts on the raspberry pi forums. https://www.raspberrypi.org/forums/viewtopic.php?t=15787

          This is his github repo: https://github.com/marqs85/

          BuZzB mituM 2 Replies Last reply Reply Quote 1
          • BuZzB
            BuZz administrators @Darksavior
            last edited by BuZz

            @Darksavior thanks! :-)

            To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

            1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator @Darksavior
              last edited by mitu

              @Darksavior If you're willing to try a patched version (since I have don't have the hardware setup), you can clone from my fork and give it try with the new 4.19.x kernel.

              # clone & setup
              git clone https://github.com/cmitu/gamecon_gpio_rpi
              cd gamecon_gpio_rpi
              sudo cp -r gamecon_gpio_rpi-1.3/ /usr/src/
              
              # build the kernel
              sudo dkms add gamecon_gpio_rpi/1.3
              sudo dkms build gamecon_gpio_rpi/1.3
              sudo dkms install gamecon_gpio_rpi/1.3
              
              DarksaviorD 1 Reply Last reply Reply Quote 1
              • DarksaviorD
                Darksavior @mitu
                last edited by

                @mitu This works. Thanks! Thought I had to wait a few months like the last time the driver broke.

                mituM 2 Replies Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @Darksavior
                  last edited by mitu

                  @Darksavior Alright, thanks for testing and reporting.
                  I'll submit the patches upstream - the repo(s) you indicated, maybe we should change also the scriptmodule to pull the sources from there.

                  1 Reply Last reply Reply Quote 1
                  • mituM
                    mitu Global Moderator @Darksavior
                    last edited by

                    @Darksavior The changes have been pushed upstream and also added to the RetroPie's package. If you want, you can update your RetroPie-setup script and then re-install the gamecon driver package to see if it works.

                    DarksaviorD 1 Reply Last reply Reply Quote 1
                    • DarksaviorD
                      Darksavior @mitu
                      last edited by Darksavior

                      @mitu Gamecon driver no longer working when using the retropie fkms_rpi4 branch on a pi4. Might be too early for support. I'm asking before I go making a new topic or if it's ok in here.

                      mituM 1 Reply Last reply Reply Quote 0
                      • mituM
                        mitu Global Moderator @Darksavior
                        last edited by

                        @Darksavior Is the compilation not working or the module loads but the controller doesn't work ?

                        DarksaviorD 1 Reply Last reply Reply Quote 0
                        • DarksaviorD
                          Darksavior @mitu
                          last edited by Darksavior

                          @mitu This time it's different. It seems to compile fine? ES sees both pads and gives me the option to configure them but they won't work. Jstest also sees both pads but no response. Not sure how to check if the module is loaded properly.
                          https://pastebin.com/fZXz6E7F

                          mituM 1 Reply Last reply Reply Quote 0
                          • mituM
                            mitu Global Moderator @Darksavior
                            last edited by

                            @Darksavior Yes, looks different than on a Pi3. The fact that pads are seen by ES and jstest seems to indicate that the driver is loaded, but you can also check with

                            lsmod | grep gamecon_gpio_rpi
                            

                            Since this is the same Linux kernel version as on Stretch - 4.19, when you reported the issue - I think the problem is with either the GPIO configuration or the module compatibility with to the new PI model.

                            DarksaviorD 1 Reply Last reply Reply Quote 0
                            • DarksaviorD
                              Darksavior @mitu
                              last edited by

                              @mitu I ran that command and got 45056 0
                              At first I thought the controller ports weren't properly connected or maybe something desoldered, but it works fine on a pi3.

                              1 Reply Last reply Reply Quote 0
                              • mituM
                                mitu Global Moderator
                                last edited by

                                The module is loaded alright, I think is just not compatible with the RPI4 model.
                                I've looked at the bcm2835 GPIO library and - at the very least - the BCM2708_PERI_BASE is different on the PI4.
                                I can add a patch if you'd like to test - do you have the possibility to test on both RPI3/RPI4 models ?

                                DarksaviorD 1 Reply Last reply Reply Quote 0
                                • DarksaviorD
                                  Darksavior @mitu
                                  last edited by Darksavior

                                  @mitu Yes. I soldered an snes controller connector to an old ide cable so I can easily remove it and test on a pi3 or pi4.
                                  On the pi3, would you like me to test with the latest retropie stretch weekly or use raspbian lite buster with the pi4 branch?

                                  1 Reply Last reply Reply Quote 0
                                  • mituM
                                    mitu Global Moderator
                                    last edited by

                                    Seems someone already reported this upstream https://github.com/marqs85/gamecon_gpio_rpi/issues/3.

                                    DarksaviorD 1 Reply Last reply Reply Quote 1
                                    • DarksaviorD
                                      Darksavior @mitu
                                      last edited by Darksavior

                                      @mitu Thanks! Time for someone else to figure it out how to build it because I can't compile.

                                      mituM 1 Reply Last reply Reply Quote 0
                                      • mituM
                                        mitu Global Moderator @Darksavior
                                        last edited by mitu

                                        @Darksavior If you're still willing to test, I've made a few adjustments to the gamecon_gpio_rpi module to work on PI4 also (while still being compatible with previous RPI models).

                                        All you have to do is replace the contents of $HOME/RetroPie-Setup/scriptmodules/supplementary/gamecondriver.sh with http://ix.io/1UaI and then reinstall - remove and install again - the driver. It will pull the sources from my repository instead of the upstream project.

                                        DarksaviorD 1 Reply Last reply Reply Quote 1
                                        • DarksaviorD
                                          Darksavior @mitu
                                          last edited by Darksavior

                                          @mitu Success! Works on my pi4. Many thanks.

                                          mituM 1 Reply Last reply Reply Quote 0
                                          • mituM
                                            mitu Global Moderator @Darksavior
                                            last edited by mitu

                                            @Darksavior That's great to hear, since the modifications to the driver are not so trivial this time. Can you try to see if the driver is still compatible with the RPI3, by installing with the same procedure on a PI3 system ?

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