-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't install xpadneo on OSMC Raspberry-Pi 4 version #296
Comments
Do you have any more context, e.g. the build log? |
`osmc@osmc:~/xpadneo$ sudo ./install.sh
Creating symlink /var/lib/dkms/hid-xpadneo/v0.9-63-gf17a4e2/source -> DKMS: add completed. Kernel preparation unnecessary for this kernel. Skipping... Building module: |
DKMS make.log for hid-xpadneo-v0.9-63-gf17a4e2 for kernel 5.10.32-1-osmc (aarch64) |
As far as I know, this isn't an option that we do set. Which gcc version are you using? |
|
Please try |
Hi, this did something. Installation now gives no error message. I should mention there is a second make.log in /var/lib/dkms/hid-xpadneo/kernel-5.10.32-1-osmc-aarch64/log |
Maybe
You're not trying to make the module from a cross-compilation environment, or are you? (that is, compiling on a different host than the target) |
I installed osmc with the official windows app as outlined here: https://discourse.osmc.tv/t/testing-kodi-v19-builds-for-raspberry-pi-2-3-4/89152 I just noticed that it is mentioned that buster-devel is the default repository for that build, is this maybe the source of error? |
Try with |
Trying |
I'd guess that this is a bug in OSMC then... We don't do anything special, we just use existing kernel build infrastructure, and that seems to be broken. We could maybe work around it from xpadneo somehow, but TBH, that approach doesn't look right. If the guys from OSMC suggest a way to properly work around that issue, I'm willing to put it into xpadneo, but without access to a real physical system, I don't think there's much I can help with currently, other than suggesting to upgrade to a newer gcc version, or trying |
Ok, the people at OSMC mentioned that the problem seems to be building a 64-bit kernel module in a 32-bit userspace. |
Okay, we can add that to the documentation then. |
@SchwingMC any luck in building xpadneo under OSMC? I'm facing exactly the same issue, still trying to figure out how to proceed. |
@SchwingMC I have created a makefile to cover all steps required in order to build kernel module in chrooted environment under OSMC (https://gist.github.com/defanator/5535f0acfba6aaaa222a5439da582886), but unfortunately I'm still unable to get everything working as expected. Currently I'm stuck with the following:
I'm seeing the following files matching to required pattern:
However, it doesn't work in a way I'm trying to run the build (I took the guidance for "generic distributions" as dkms does not work in OSMC). Tagging @kakra and @samnazarko to collect their input (hopefully). |
Does OSMC run a 64 bit kernel but only 32 bit user-space? That's certainly possible (and even recommended to use 2 GB+ RAM more effectively) but that's still a little strange if they don't provide a usable build environment for that... I'd probably get some RPi image with a 64-bit user-space, build the kernel there, then copy it over to the other system. Actually, you could USB-mount that image and use chroot to build from within the chroot |
@kakra my understanding was that the
I think I'm missing something simple in order to get things finally work. BTW, is there a kernel configuration file for xpadneo available? Maybe we would use that to run e.g. |
Well, in the makefile, I see no obvious problems but the error indicates that the headers should probably be installed or mapped into the chroot - it looks like you install those outside of the chroot, and symlinks won't cross chroot, bind mounts do. |
@kakra I do exactly bind mounts: https://gist.github.com/defanator/5535f0acfba6aaaa222a5439da582886#file-makefile-xpadneo-osmc-aarch64-L21 Here's what I see in chroot:
The https://gist.github.com/defanator/5535f0acfba6aaaa222a5439da582886#file-makefile-xpadneo-osmc-aarch64-L28 workaround is for xpadneo as it explicitly sets |
FWIW, I copied kernel config from /boot/ to corresponding source directory and tried to run
The only differences from #296 (comment) is that there appeared another
|
Hi @defanator, I'm sorry, I have not much to report. I'm that Cillit guy from the OSMC forums. As far as I understand you are going in the right direction. The OSMC guys told me that the OSMC toolchain is needed and it may be troublesome to make DKMS work with that, but you already figured that out. I don't know if that helps but I'm using a custum Libreelec-RR build from SupervisedThinking that can be found here: https://forum.libreelec.tv/thread/23644-libreelec-rr-10-x-brave-spotify-moonlight-emulationstation-retroarch-pegasus/?pageNo=1 Copyright (C) 2021-present Frank Hartung (supervisedthinking (@) gmail.com)PKG_NAME="xpadneo" make_target() { makeinstall_target() { Install modprobe.d config filescp -PRv ${PKG_DIR}/config/* ${INSTALL} |
Ok, the following action fixed
Kernel source package does not seem to include the script in question:
Here's how it goes for me now:
I have updated the makefile to include workaround for (cc/ @samnazarko) |
@SchwingMC in fact what I'm doing is one-time action with the goal of getting working .ko for a single kernel version; I gave up on DKMS under OSMC already, it doesn't seem like a reliable option. Good news though - I made some success here, see #296 (comment). Could you please check whether it works on your side as well? (My current guess is that it won't work in case of clean installation of |
I'm following this. |
I managed to find a correct way to bring both required headers and Also I have tested this on a clean system (no toolchain / kernel headers / kernel sources installed) and attached a full output log for the reference: https://gist.github.com/defanator/5535f0acfba6aaaa222a5439da582886#file-install-log-rpi4-txt Hope this could make life easier for folks dealing with the same stuff. |
Perhaps it's too early to celebrate. I was able to build .ko but I can't load it:
The above was done in chroot with
But it can't be loaded:
Any hints? |
Had to do this:
and in chroot:
After this everything seems to be fine:
On host:
|
xpadneo ships with a non-dkms build makefile I'm using on Gentoo during development. It's used from the project root by running The makefile linked here for OSMC already resembles some of the steps I'm doing there. The version file needs some special handling and needs to be marked "intermediate" to have it clean up after the build (otherwise you won't see the new version number after a git pull). All it needs are the dependencies, some working kernel config, and probably running All of the above steps seem to have been figured out by now - I just wanted to summarize. |
Yep, that's somewhat Gentoo specific. A more general approach is outlined in kakra@4b9cff0 but I didn't cherry-pick that yet as it was causing me problems sometimes and doesn't seem to work in the CI environment. |
It's not necessary -- but it'll give you the same toolchain that we use to build the kernel you're using with. It's best to keep the toolchain the same. You can't use build-essential and the tools that package provides from the armhf package however. We have some hacks for how we package headers -- and they may not be sufficient. But make headers_install on kernel source wasn't providing us with complete headers that allowed any modules to be built, so we took a more manual approach. If anything is missing, I'm happy to get some pointers or even a PR https://github.com/osmc/osmc/blob/master/package/kernel-osmc/build.sh#L175 Cheers Sam |
@kakra @samnazarko thanks for your input on some details, it's very helpful to have it all here in a single thread. My suggestion would be to include at least pre-generated arm64 headers - I can't see how it may harm anything given that both
Obviously, I may miss some knowledge of OSMC internals, especially in regards to platforms other than Raspberries, so I don't think I'm in a good position to propose this as a PR. @kakra I think though that the proposed helper makefile (https://gist.github.com/defanator/5535f0acfba6aaaa222a5439da582886#file-makefile-xpadneo-osmc-aarch64) could be used as a reference in FAQ/docs covering possible way of building xpadneo under OSMC. It still needs some generalization in terms of using correct kernel/source prefixes (currently it's using hardcoded one for RPI4). |
Yes, I could think of the following (and already had that idea but wanted to wait until everything works):
|
I was also trying to install the xpadneo on osmc, but without any success. It seems like @defanator managed to get it installed and running. I followed your instructions step by step but unfortunately I am unable to get it running properly. Tbh I am also not very faimilar with building things in linux, so I just understand half what you did. What I did so far to get it running:
It seems like you did something here #296 (comment) that I did not understand (especially the part with running in chroot). Could you please describe that part a bit more detailed (and more understandable for newbies 😄) |
hi got it working. first, make sure do "redo" the steps mentioned in the readme for osmc, due to an overwriting error while installing the kernel sources in the makefile:
after that, just in a random folder:
after that, the controller vibrates upon connecting like it should, key mapping is correct and everything works! |
I did what you suggested, but apparently it did not work. I tried to connect my xbox series x controller via the my osmc interface and also tried via bluetoothctl. I also disable executed
after that the controller is still flashing.. |
Does |
Did not find anything in dmesg, but bluetoothctl shows me the following, while the controller keeps flashing;
|
Is your controller running the latest firmware? you need a windows pc for that. |
thank you very much for your suggestion. I updated the controller and now it works! Thanks everyone for the detailed explanation and your help! |
I ran into the bluetooh not connecting issue when i tried to pair it with my steam link. Older firmware versions seem to not work correctly with standard bluetooth. |
Yes, that's exactly the issue. Even on Windows, the Bluetooth connection is very unstable with some Bluetooth chipset drivers when using the older firmwares. This is why I added a log line for dmesg to xpadneo recommending to upgrade the firmware: |
running this on a clean osmc install and replacing the numbers to match my versions: I also just today got my hands on a windows machine (becuase I dont have any at home and dont want any) at a friends house and did the firmware update on the controller |
Keep in mind, this method doesn't create modprobe configs or other files. As you may see in: xpadneo/hid-xpadneo/dkms.post_install Lines 7 to 23 in 2900363
The option to disable ERTM may not be set, depending on your kernel (assuming you're here for osmc, you need this), so you need to do it manually with echo "options bluetooth disable_ertm=Y" > /etc/modprobe.d/bluetooth.conf
I also had issued with input lag, so you may want to have a look at https://atar-axis.github.io/xpadneo/#high-latency-or-lost-button-events-with-bluetooth-le also |
liek I said it worked for me like described |
with not flaws |
Unfortunately this doesn't work anymore... Its a little bit tricky, userland stuff seems to be armhf, installing gcc-10:arm64 gets rid of the |
Did anybody make it work recently? I did not manage to make it build on my rpi400 on osmc. I am stuck on |
Version of xpadneo
v0.9-63-gf17a4e2
Severity / Impact
Describe the bug
During installation the error message "Error! Bad return status for module build on kernel: 5.10.32-1-osmc (aarch64)" is given.
lsmod | grep hid_xpadneo
returns nothing.sudo modprobe hid_xpadneo
gives error message "modprobe: FATAL: Module hid_xpadneo not found in directory /lib/modules/5.10.32-1-osmc"Steps to Reproduce
I followed the installation instruction for osmc as outlined on the front page.
Expected behavior
Screenshots/Gifs
System information
# uname -a
Linux osmc 5.10.32-1-osmc #1 SMP PREEMPT Wed Apr 28 05:45:57 UTC 2021 aarch64 GNU/Linux
# xxd -c20 -g1 /sys/module/hid_xpadneo/drivers/hid:xpadneo/0005:045E:*/report_descriptor | tee >(cksum)
xxd: /sys/module/hid_xpadneo/drivers/hid:xpadneo/0005:045E:*/report_descriptor: No such file or directory
Controller and Bluetooth information
Additional context
The text was updated successfully, but these errors were encountered: