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

    Installation of Xpad driver failed.

    Scheduled Pinned Locked Moved Help and Support
    xpadxpad fail
    16 Posts 4 Posters 1.7k 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.
    • windgW
      windg
      last edited by windg

      -Pi 400
      -Official PSU
      -RetroPie 4.8 installed from Pi imager and updated to 4.8.4 (c28ddb7e)
      -Logitech F710

      I did an update of the system. I saw that some of the updates was about raspberry kernel. After that the controller didn't fuction correctly, it was like the mapping was broken. I try to reinstall from source the xpad driver but it's failing. If i try to configure again the controller it is working again but without the xpad driver. Thanks.

      Log started at: Sat 06 May 2023 08:01:44 PM EEST
      
      RetroPie-Setup version: 4.8.4 (c28ddb7e)
      System: rpi4 (aarch64) - Raspbian GNU/Linux 10 (buster) - Linux retropie 5.10.103-v8+ #1529 SMP PREEMPT Tue Mar 8 12:26:46 GMT 2022 aarch64 GNU/Linux
      
      = = = = = = = = = = = = = = = = = = = = =
      Installing dependencies for 'xpad' : Updated Xpad Linux Kernel driver
      = = = = = = = = = = = = = = = = = = = = =
      
      /home/pi/RetroPie-Setup/tmp/build/xpad /home/pi/RetroPie-Setup/tmp/build/usbromservice/usbmount
      
      = = = = = = = = = = = = = = = = = = = = =
      Getting sources for 'xpad' : Updated Xpad Linux Kernel driver
      = = = = = = = = = = = = = = = = = = = = =
      
      git clone --recursive --depth 1 --shallow-submodules --branch master "https://github.com/paroj/xpad.git" "/opt/retropie/supplementary/xpad"
      Cloning into '/opt/retropie/supplementary/xpad'...
      HEAD is now in branch 'master' at commit '51af0649c2926e8992b70ca1bb506db949c6d8d9'
      patching file xpad.c
      Hunk #1 succeeded at 78 with fuzz 2 (offset -8 lines).
      Hunk #2 succeeded at 2256 (offset 472 lines).
      Successfully applied patch: /home/pi/RetroPie-Setup/scriptmodules/supplementary/xpad/01_enable_leds_and_trigmapping.diff
      patching file dkms.conf
      Successfully applied patch: /home/pi/RetroPie-Setup/scriptmodules/supplementary/xpad/02_dkms_updates_folder.diff
      /home/pi/RetroPie-Setup/tmp/build/usbromservice/usbmount
      
      = = = = = = = = = = = = = = = = = = = = =
      Building 'xpad' : Updated Xpad Linux Kernel driver
      = = = = = = = = = = = = = = = = = = = = =
      
      
      Creating symlink /var/lib/dkms/xpad/0.4/source ->
                       /usr/src/xpad-0.4
      
      DKMS: add completed.
      Error! echo
      Your kernel headers for kernel 5.10.103-v8+ cannot be found at
      /lib/modules/5.10.103-v8+/build or /lib/modules/5.10.103-v8+/source.
      
      Kernel preparation unnecessary for this kernel.  Skipping...
      
      Building module:
      cleaning build area...(bad exit status: 2)
      make -j4 KERNELRELEASE=5.10.103-v7l+ KVERSION=5.10.103-v7l+...(bad exit status: 2)
      Error! Bad return status for module build on kernel: 5.10.103-v7l+ (aarch64)
      Consult /var/lib/dkms/xpad/0.4/build/make.log for more information.
      
      Kernel preparation unnecessary for this kernel.  Skipping...
      
      Building module:
      cleaning build area...(bad exit status: 2)
      make -j4 KERNELRELEASE=5.10.103-v7+ KVERSION=5.10.103-v7+...(bad exit status: 2)
      Error! Bad return status for module build on kernel: 5.10.103-v7+ (aarch64)
      Consult /var/lib/dkms/xpad/0.4/build/make.log for more information.
      
      Kernel preparation unnecessary for this kernel.  Skipping...
      
      Building module:
      cleaning build area...(bad exit status: 2)
      make -j4 KERNELRELEASE=5.10.103+ KVERSION=5.10.103+...(bad exit status: 2)
      Error! Bad return status for module build on kernel: 5.10.103+ (aarch64)
      Consult /var/lib/dkms/xpad/0.4/build/make.log for more information.
      Failed to install xpad
      
      Log ended at: Sat 06 May 2023 08:01:50 PM EEST
      Total running time: 0 hours, 0 mins, 6 secs
      
      

      This the log from the update : https://pastebin.com/xviu6GT4

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

        @windg said in Installation of Xpad driver failed.:

        System: rpi4 (aarch64)

        Seems the kernel is 64bit, while the the rest of the system is 32 bit. Add arm_64bit=0 to config.txt and reboot, then try again to install the driver.

        EDIT: did you add yourelf arm_64bit=1 to config.txt by any chance ?

        windgW M 2 Replies Last reply Reply Quote 2
        • windgW
          windg @mitu
          last edited by windg

          @mitu Thanks you, now the installation was succesful with arm_64bit=0. I didn't add anything to the config.txt file.
          It looks that something changed from the Raspberry OS.: https://forums.raspberrypi.com/viewtopic.php?t=349291

          Edit: i try with arm_64bit=1 and it's failing too.

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

            @windg said in Installation of Xpad driver failed.:

            It looks that something changed from the Raspberry OS.: https://forums.raspberrypi.com/viewtopic.php?t=349291

            Yes, that happened some time ago on the Raspi OS bullseye release when the kernel was upgraded to 6.1, but RetroPie uses the old (buster) release, which still uses the old LTS kernel (5.10.x).
            Seems like this change was added also to the legacy Raspi OS, which is unfortunate and a poor move for a system which should get only security updates.

            EDIT: I've asked in the RPI forums if the change was an error or the bootloader upgrade was intended. We'll see how we tackle this depending on the response.

            S 1 Reply Last reply Reply Quote 2
            • mituM mitu referenced this topic on
            • mituM mitu pinned this topic on
            • mituM mitu referenced this topic on
            • S
              stabicron @mitu
              last edited by

              @mitu I am not sure if this helps very much and yeah I am new but. Same issue and I think the issue is more that the recent update is failing to install the headers. When I look at the file system both folder /lib/modules/5.10.103-v8+/build or /lib/modules/5.10.103-v8+/source are not there. Attempting to reinstall the raspberrypi-kernel-headers package errors out (after a long time but it eventually gives up). Example error that happen are "Error! Bad return status for module build on kernel: 5.10.103-v8+ (aarch64)" and says to consult the make.log. Does this for both xpad and xpadneo. Other errors are the exact same however referencing different kernel numbers. When looking at the log for xpad that specially is for this kernel:

              IMG_1998.jpg

              The end result seems to be that after this retroarch no longer recognizes the old controller combos to both exit or go to retroarch menu (my controller still works thankfully). Workaround for that for me has been to manually set hotkey button combos inside of retroarch and save the config

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

                @stabicron said in Installation of Xpad driver failed.:

                Same issue and I think the issue is more that the recent update is failing to install the headers
                ...

                The headers are installed, but they're not properly configured for the 64bit kernel:

                pi@retropie:~ $ dpkg -l | grep kernel-headers
                ii  raspberrypi-kernel-headers           1:1.20230425~buster-1                    armhf        Header files for the Raspberry Pi Linux kernel
                
                pi@retropie:~ $ ls -ld /lib/modules/5.10.103-v8+/build
                ls: cannot access '/lib/modules/5.10.103-v8+/build': No such file or directory
                
                pi@retropie:~ $ ls -ld /lib/modules/5.10.103-v7l+/build
                lrwxrwxrwx 1 root root 36 Mar  8  2022 /lib/modules/5.10.103-v7l+/build -> /usr/src/linux-headers-5.10.103-v7l+
                

                Just apply the workaround I posted above and reboot, then the drivers can be installed without the build errors.

                S 1 Reply Last reply Reply Quote 0
                • windgW
                  windg
                  last edited by windg

                  It looks that is affect and the building of lr-swanstation from Retropie-Extra repo. So, if someone want to install this emulator add the arm_64bit=0 to config.txt file, reboot and then try again.

                  log from fail building : https://pastebin.com/yCkm9L2U

                  mituM 1 Reply Last reply Reply Quote 0
                  • S
                    stabicron @mitu
                    last edited by

                    @mitu Forgive me if this seems obvious but I do not see where the config.txt file is stored in this thread. Where is it?

                    windgW mituM 2 Replies Last reply Reply Quote 0
                    • windgW
                      windg @stabicron
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • mituM
                        mitu Global Moderator @stabicron
                        last edited by

                        @stabicron It's on the boot partition of the sdcard and you also can find it at /boot/config.txt from your running system. You can run

                        sudo nano /boot/config.txt
                        

                        to edit the file after you exit EmulationStation.

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

                          @windg said in Installation of Xpad driver failed.:

                          It looks that is affect and the building of lr-swanstation from Retropie-Extra repo

                          It's going to affect more than one package, there are quite a few emulators that use uname -m to determine if the system is 32 or 64bit and set the build parameters accordingly. There's no point in keeping track of them, since running a mixed 64/32bit kernel/userspace is not a very common configuration.

                          1 Reply Last reply Reply Quote 0
                          • S
                            stabicron @mitu
                            last edited by

                            @mitu Thank you. Just tried it and worked for xpad and a couple of the others that were running into the same thing

                            1 Reply Last reply Reply Quote 0
                            • M
                              MaXxOnRP @mitu
                              last edited by MaXxOnRP

                              @mitu Thanks for your help. Read it yesterday, tried it and it helped my build too. Best Regards

                              1 Reply Last reply Reply Quote 1
                              • windgW
                                windg
                                last edited by

                                It looks that the change that was added to Raspi Buster Lite, was a mistake. Soon an update will fix this.

                                M 1 Reply Last reply Reply Quote 2
                                • mituM mitu referenced this topic on
                                • mituM
                                  mitu Global Moderator
                                  last edited by

                                  @windg said in Installation of Xpad driver failed.:

                                  Soon an update will fix this

                                  The updated packages (kernel/firmware-bootloader) for have been released for Buster, the modifications suggested earlier to config.txt should not be needed anymore.

                                  1 Reply Last reply Reply Quote 2
                                  • M
                                    MaXxOnRP @windg
                                    last edited by

                                    @windg Nice.

                                    1 Reply Last reply Reply Quote 0
                                    • mituM mitu unpinned this topic on
                                    • 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.