Closed sh1sh1n11 closed 2 years ago
Any help in resolving this issue would be awesome! Thank you :)
As a guess, the 4.9 kernel is not compatible with OpenRazer's 3.2.0 codebase, so it cannot be compiled.
It looks like this device uses a custom kernel. 4.9.253-tegra
that's running doesn't seem to use a generic kernel like linux-headers-4.15.0-166-generic
which is what it installed but probably can't use.
Some suggestions:
.tar.xz
download, there is a script ./scripts/build_debs.sh
you can use to build packages.Thank you so much @lah7 for such a quick response! Means a lot :) And I hear what you're saying about the kernel being custom.
Here's part of the output of 'dpkg-query -l | grep -i headers'.
nvidia-l4t-kernel-headers 4.9.253-tegra-32.6.1-20210726122000 arm64 NVIDIA Linux Tegra Kernel Headers Package
According to Nvidia's documentation for Jetson Nano, under the Preparing to Build External Kernel Modules section, it is specified that the following kernel directory should be used in order to build external kernel modules.
/usr/src/linux-headers-$(uname -r)-ubuntu18.04_aarch64
or
/lib/modules/$(uname -r)/build
I checked, and the above mentioned 4.9.253-tegra kernel indeed sits in the below directory.
/usr/src/linux-headers-4.9.253-tegra-ubuntu18.04_aarch64/kernel-4.9
I tried following Nvidia's instructions on Building External Kernel Modules, and ran similar commands as so. But got the same result as mentioned above in the make.log output.
$ cd <path_to_module_source>
$ make ARCH=arm64 –C <kernel_directory> M=$(pwd)
As this is the first time I am building kernel modules, I'm really not sure about my approach. Based on the above mentioned 'make.log' that openrazer generated at the time of installation, I found that the openrazer script created four files in the below folder.
pwd
/lib/modules/4.15.0-166-generic/updates/dkms
ls -ahl
total 420K
drwxr-xr-x 2 root root 4.0K Jan 16 10:00 .
drwxr-xr-x 3 root root 4.0K Jan 16 10:00 ..
-rw-r--r-- 1 root root 87K Jan 16 10:00 razeraccessory.ko
-rw-r--r-- 1 root root 122K Jan 16 10:00 razerkbd.ko
-rw-r--r-- 1 root root 29K Jan 16 10:00 razerkraken.ko
-rw-r--r-- 1 root root 160K Jan 16 10:00 razermouse.ko
Can these files be somehow used to build the kernel modules against the 4.9.253-tegra kernel?
Sadly, I don't think I can make use of any other kernel with this device. But I may be wrong.
Also, are you suggesting that since Nvidia uses a quite old (4.9.253-tegra) version of the linux kernel, it is not supported by the new openrazer-driver-dkms (and other relevant openrazer tools)?
If so, I can give the old versions thing a try also. Please let me know what you think. And thanks much for your help once again :)
You can try reverting commit https://github.com/openrazer/openrazer/commit/dbd0d90aa90bb8a8ab905cfe6d033270cc4cef29 or just disable compilation of the razeraccessory module as that doesn't seem to be compatible with your old kernel.
Thank you @z3ntu for the detailed analysis on this. Much appreciated! :) And how would I go about doing either of those? Reverting the commit or disabling the compilation of the razeraccessory module altogether. I understand if it's something very basic and probably not the right place to ask. Maybe you could just give me a couple of pointers to get started?
PS: I do understand that I will need to build openrazer tools from source in doing so.
You can either manually edit/patch the installed source files in /usr/src/ (e.g. remove razeraccessory from this file https://github.com/openrazer/openrazer/blob/master/driver/Makefile) or patch the razeraccessory_driver.c file there.
Or clone this repo, revert the mentioned commit and follow https://github.com/openrazer/openrazer/wiki/Building-a-package#ubuntu--linux-mint
Thank much @z3ntu, I will give that a try! And feel free to close this issue. Although, I wish that Nvidia Jetson and other such soc devices in the Nvidia lineup are at some point added to the supported list for OpenRazer. Thanks again, and have a great weekend! :)
Thanks much @lah7 and @z3ntu. And apologies for the late response. I went ahead and manually patched the file in question. Then ran the compilation once again, and this time everything went through successfully, thus generating the binaries. Everything now runs perfectly! Thank you!
Distribution
uname -a output
Issue
I am using Nvidia Jetson Nano B01 4GB soc arm64 (aarch64) board. Also, I currently run the 4.9.253-tegra kernel.
When I try to install the 'openrazer-driver-dkms' package it gives me the following output.
Output of make.log
(The make.log file sitting in the /var/lib/dkms/openrazer-driver/3.2.0/build/ folder.)
Output of lsusb | grep 1532
sudo journalctl -b | grep -i razer_mount output
sudo dkms status
dmesg output