Skip to content
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

(solved) Installation error - cannot find kernel headers #21

Open
DarumasLegs opened this issue Jan 8, 2022 · 26 comments
Open

(solved) Installation error - cannot find kernel headers #21

DarumasLegs opened this issue Jan 8, 2022 · 26 comments

Comments

@DarumasLegs
Copy link

Running install-driver.sh version 20211212
Starting installation...
Copying source files to: /usr/src/rtl8821au-5.12.5.2
Copying 8821au.conf to: /etc/modprobe.d

Creating symlink /var/lib/dkms/rtl8821au/5.12.5.2/source ->
/usr/src/rtl8821au-5.12.5.2

DKMS: add completed.
Error! echo
Your kernel headers for kernel 5.10.17-v7+ cannot be found at
/lib/modules/5.10.17-v7+/build or /lib/modules/5.10.17-v7+/source.
An error occurred. dkms build error = 1
Please report this error.
You will need to run the following before reattempting installation.
$ sudo ./remove-driver.sh

@morrownr
Copy link
Owner

morrownr commented Jan 8, 2022

Hi @DarumasLegs

The problem is that the kernel headers are either not installed or are in an unexpected place.

What distro are you using?

Regards

@DarumasLegs
Copy link
Author

5.10.17-v7+

@DarumasLegs
Copy link
Author

DarumasLegs commented Jan 8, 2022 via email

@morrownr
Copy link
Owner

morrownr commented Jan 8, 2022

I know the kernel version. I want to the distro... Ubuntu, Debian, Manjaro...

@morrownr
Copy link
Owner

morrownr commented Jan 8, 2022

I do have several folders under /lib/modules/ - could the headers be in the wrong folder? How can I tell, and can I just move them to that folder it is looking for them in?

Hold on... don't do that.

@DarumasLegs
Copy link
Author

DarumasLegs commented Jan 8, 2022 via email

@morrownr
Copy link
Owner

morrownr commented Jan 8, 2022

Did you mean to say Raspberry Pi OS?

Is it the regular 32 bit version or the 64 bit beta?

@DarumasLegs
Copy link
Author

DarumasLegs commented Jan 8, 2022 via email

@morrownr
Copy link
Owner

morrownr commented Jan 8, 2022

Run:

$ uname -m

If it says aarch64 then it is 64 bit. If it says armv7l then it is 32 bit.

If it is the 32 bit version run the following:

$ sudo apt update
$ sudo apt full-upgrade
$ sudo apt install -y raspberrypi-kernel-headers bc build-essential dkms git

Tell me what that last line gives us...

@DarumasLegs
Copy link
Author

DarumasLegs commented Jan 8, 2022 via email

@DarumasLegs
Copy link
Author

DarumasLegs commented Jan 8, 2022 via email

@morrownr
Copy link
Owner

morrownr commented Jan 8, 2022

raspberrypi-kernel-headers is already the newest version
(1:1.20211201~buster-1).

Hmmm... that tells us the kernel headers are installed.

I have a spare Pi right now so give me some time to install and see what is going on.

For what it is worth: The installation script has not been changed in any way that would affect this for at least several months and it is used on 5 different drivers here that are installed thousands of times per week... however I am seeing the exact same report over in the 88x2bu repo so all I can say is please give me some time to duplicate this so I can figure it out.

Regards

@DarumasLegs
Copy link
Author

DarumasLegs commented Jan 8, 2022 via email

@DarumasLegs
Copy link
Author

DarumasLegs commented Jan 8, 2022 via email

@DarumasLegs
Copy link
Author

DarumasLegs commented Jan 8, 2022 via email

@morrownr
Copy link
Owner

morrownr commented Jan 8, 2022

By the way, what is the best way to tell if the RPi is using the USB WiFi adapter or the internal WiFi radio? Perhaps running "iw dev" and checking the Mac address?

Well, interesting question. I guess i've been doing this long enough that I can just tell. The iw dev output will be different for the internal radio and I think the reason is that the driver for the internal radio is now a mac80211 driver that has been up-steamed into the kernel, which is what we want. I can post some samples after I get this new test install going.

@morrownr
Copy link
Owner

morrownr commented Jan 8, 2022

Just to let you know, I move show stoppers to the top of my priority list and this is a show stopper, however, I have other things that may make tracking this down today not likely to happen. We'll see.

@DarumasLegs
Copy link
Author

DarumasLegs commented Jan 8, 2022 via email

@DarumasLegs
Copy link
Author

DarumasLegs commented Jan 8, 2022 via email

@morrownr
Copy link
Owner

morrownr commented Jan 8, 2022

That is great! To confirm what you say fixed things"

$ sudo apt update; sudo apt install --reinstall raspberrypi-bootloader raspberrypi-kernel; sudo reboot

Is that what fixed things?

I guess we owe the RasPi Foundations thanks for messing things up. It happens. Are you planning on checking to see if this bug has been reported?

Now, back to business: Run the following and post the results:

$ iw dev

...and I show you the things I look for to tell the difference.

Regards

@DarumasLegs
Copy link
Author

DarumasLegs commented Jan 8, 2022 via email

@morrownr
Copy link
Owner

morrownr commented Jan 8, 2022

I assume wlan1 is the usb adapter, right?

That is correct. There are some differences and you will never see your usb adapter with a txpower of 31.

I'd like to also be able to tell if the AP that I'm broadcasting from this pi is going through the USB adapter or the on-board one. It looks like it's still using the onboard one, right?

Well, since you are settings up an AP, you might want to do what I do when I set up an AP on a Pi. I shut the onboard radio down:

$ sudo nano /boot/config.txt

Add:

# turn off onboard WiFi
dtoverlay=disable-wifi

Are you using my AP guide that is in the /docs folder here?

@DarumasLegs
Copy link
Author

DarumasLegs commented Jan 8, 2022 via email

@morrownr
Copy link
Owner

morrownr commented Jan 9, 2022

Question about the txpower - is 31 low or high?

That is higher than most but it is likely because the Pi's wifi is in a little box inside the Pi.

What range should the USB adapter txpower be?

Oh, 14 to 23 but likely the default is around 20. Most adapters these days come with txpower fixed in firmware so it can't be changed.

@DarumasLegs
Copy link
Author

DarumasLegs commented Jan 9, 2022 via email

@morrownr
Copy link
Owner

morrownr commented Jan 9, 2022

And I guess lower numbers actually mean greater power?

Not in this case. It would probably be a good idea to not use the txpower number of any specific adapter or card to judge its range.

A good place to get information about USB WiFi adapters is:

https://github.com/morrownr/USB-WiFi

There are some pretty knowledgeable people that stop in Discussions/Issues there and there is a lot to read about adapters as well.

@morrownr morrownr changed the title Installation error - cannot find kernel headers (solved) Installation error - cannot find kernel headers Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants