Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Firmware does not load
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
helmers
Guru
Guru


Joined: 16 Sep 2002
Posts: 553
Location: Stange, Norway

PostPosted: Sat May 07, 2022 8:53 am    Post subject: Firmware does not load Reply with quote

I have managed to build a booting system, but I still can't get wifi working. Looking at dmesg | grep firmware it seems like i915, iwlwifi and regulatory.db won't load (-2). I have the firmware loader as well as all relevant options ticked in my kernel. Network and drivers built as modules. I even bought a tiny TP-Link USB wifi card, thinking that was an easy shortcut. But that's not playing nice either. I have the firmware, and it is listed under /lib/firmware. However, both networking cards (and the i915) works when booting the LiveCD image.

The built-in card is Intel Wi-Fi 6 AX201, the USB network card I believe is TP-Link WN725N.

My kernel is built with gentoo-sources, like so:
Code:
make menuconfig
make -j4
make install modules_install
grub-mkconf -o /boot


Could I get some tips for troubleshooting?
_________________
C is for Cookies!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Sat May 07, 2022 9:04 am    Post subject: Reply with quote

helmers,

The firmware is loaded when the kernel code is initialised.
If that happens before root is mounted, the firmware must be included in the kernel. Listed in EXTRA_FIRMWARE
If it happens after root is mounted, it can be read from /lib/firmware.

That leads on to what determines the difference.
All built in code is initialised before root is mounted. All loadable modules are loaded (and initialised) after root is mounted.

Its easy to see in dmesg. Look for root, or the initrd being mounted.
Does WiFi try to start before or after that?

The firmware listed in EXTRA_FIRMWARE is copied from /lib/firmware into the kernel at kernel build time, so it needs to be there too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
helmers
Guru
Guru


Joined: 16 Sep 2002
Posts: 553
Location: Stange, Norway

PostPosted: Sat May 07, 2022 9:41 am    Post subject: Reply with quote

Thank you for taking the time to answer. Life without wifi is rough! :)

I have this, in order (but with omissions). I can extract a complete dmesg if it adds value.
Code:
Unpacking initramfs...
[...]
Freeing initrd memory: 9208K
i915 000:00:02.0: Direct firmware load for i915 [...] failed with error -2
iwlwifi 0000:00:14.3: Direct firmware load iwlwifi-QuZ-a0-hr-b0-66.ucode failed with error -2
[...iwlwifi then goes on to try different firmware, but they all fail]



  • Should I put "iwlwifi-QuZ-a0-hr-b0-66.ucode regulatory.db" in EXTRA_FIRMWARE?
  • Do I get warnings at compile time if items in EXTRA_FIRMWARE are not found?
  • How can I tell where it mounts /root? (I am using BTRFS and it seems to do that at the very end of the list - does this mean there are no modules loaded?)
  • Could you glance at my kernel compile steps in the first post to see if they are correct?

_________________
C is for Cookies!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Sat May 07, 2022 10:53 am    Post subject: Reply with quote

helmers,

The iwlwifi driver can use any of the listed versions of its microcode.
Add the most recent one that is in /lib/firmware. It can try to load versions that do not yet exist too. :)

Code:
Maintenance warning:
one day, whatever version you add to the kernel now, it will get dropped,
Then the kernel build process will shout at you about missing firmware :)

Code:
Direct firmware load for i915 ...
Thats your GPU power management firmware missing.
May as well add that too.

I get
Code:
$ dmesg | grep mount
[   12.611173] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Quota mode: disabled.
[   16.872807] EXT4-fs (dm-0): re-mounted. Quota mode: disabled.

Which is my root. The first mount is read only, so that rootfsck can be run. The remount is the read/write remount after rootfsck has passed.
I don't know what BTRFS does.

Things to add to EXTRA_FIRMWARE
Your iwlwifi firmware
The regulatory.db, so that WiFi does the right things for the region it finds itself in.
The i915 file(s) so you have GPU power management.
Your CPU microcode.
and anything else that dmesg says you are missing.

-- edit --

Your kernel build/install is missing two things,
1. a
Code:
mount /boot
before make_install.
2. After the reboot, the inspection of the date/time in
Code:
uname -a

uname -a shows the build date/time of the running kernel and its always good t check that you are running the kernel you think you are.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
helmers
Guru
Guru


Joined: 16 Sep 2002
Posts: 553
Location: Stange, Norway

PostPosted: Sat May 07, 2022 2:16 pm    Post subject: Reply with quote

NeddySeagoon wrote:
2. After the reboot, the inspection of the date/time in
Code:
uname -a

uname -a shows the build date/time of the running kernel and its always good t check that you are running the kernel you think you are.

It turns out I have not been loading new kernels after the initial one I got working*. :oops:

I seem to lack some understanding of how GRUB works, I was assuming that grub-mkconfig -o /boot/grub/grub.cfg would make the freshly built kernel the default choice. I did find previous kernels under the 2nd choice (advanced) in GRUB, and one of them worked (including firmware drivers).

This is probably enough to get me on the right path, thank you again. :)


*by working I mean got it to boot, I initially had issues with booting from eMMC storage.
_________________
C is for Cookies!
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2003

PostPosted: Sat May 07, 2022 6:46 pm    Post subject: Re: Firmware does not load Reply with quote

helmers wrote:
...
The built-in card is Intel Wi-Fi 6 AX201, the USB network card I believe is TP-Link WN725N.
...

I was about to report my experiences with TP WN725N network device, but yours is the later V2/V3 one, and mine was V1, which is completely different. I'm just posting this in case anyone else starts making the same mistake!
_________________
Greybeard
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum