On Thursday, 1 June 2023 19:54:08 BST Philip Webb wrote:
> 230531 Michael wrote:
> > It seems you have the correct module for the mediatek driver installed,
> > since lshw on gentoo shows it being used. What is not shown is the
> > firmware. Now, to bottom out the firmware issue.
> > You need to specify the firmware path in your kernel, as explained here.
> > By default this would be under /lib/firmware/ :
> > https://wiki.gentoo.org/wiki/Linux_firmware
> 
> /lib/firmware/ is the dir with firmware files.
> 
> > Hopefully, the requisite firmware file blobs will be present
> > in the latest stable 'sys-kernel/linux-firmware' package,
> > once you install it.
> 
> It is already installed (230404) , presumably as part of Stage 3.
> That date shouldn't be too old.

The current stable version is:

sys-kernel/linux-firmware-20230515

I suggest you run an update to fetch this version - see below.


> > dmesg will reveal if these are/not being loaded.
> 
> 'dmesg | grep firmware' shows  10  identical lines :
> 
>   Loading firmware : mediatek/WIFI_MT7921_patch_mcu_1_2_hdr.bin :
>    failed with error-2 .

Oops!  This is rather ominous and the cause of your problems - see below.


> > you could keyword the trunk version hoping it contains what you need:
> >        **   99999999  *l^bstd       [compress-xz compress-zstd initramfs
> > 
> > +redistributable savedconfig unknown-license]       ["initramfs? (
> > redistributable ) ?? ( compress-xz compress-zstd )"]
> 
> I don't understand these lines (smile).

This is the bleeding edge version of the package, but you may not need to 
install it (yet).


> > Or, you could compare what firmware files are loaded in Mint/SR ISOs
> > and copy these over to your Gentoo system for now
> 
> SR shows no record of loading via 'dmesg' ;
> Mint ends with a lot of Bluetooth + mt7921e references.
> Mint mentions a firmware " ____010000 " ( 4 underlines ).

Hmm ... Mint seems to be using an older version, which according to this post 
has since been patched:

https://lore.kernel.org/lkml/3198471.FQF0JACdhR@ripper/


> > or you could fish around the Mediatek website for approp firmware files.
> 
> no sign of firmware files.

OK.

I had a look in the latest stable version sys-kernel/linux-firmware-20230515 
for the file you reported an error on:

$ find /lib/firmware -iname WIFI_MT7961_patch_mcu_1_2_hdr.bin
/lib/firmware/mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin
$ ls -la /lib/firmware/mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin
-rw-r--r-- 1 root root 92192 May 18 16:16 /lib/firmware/mediatek/
WIFI_MT7961_patch_mcu_1_2_hdr.bin

Do you get the same result?  I'd update to the latest linux-firmware version 
first, just in case.

> > Finally, set up a symlink from '/etc.init.d/net.wlp5s0'
> > to '/etc/init.d/net.lo' or whatever your card is detected, if not wlp5s0.
> 
> i've created that link, but how is it supposed to help ?

This is merely to bring up the interface and establish your wireless network 
service at boot time, if you add it to the default run level:

rc-update add net.wlp5s0 default

but until you get it working, you can use this service to start/stop your 
wireless connection manually.


> > https://wiki.gentoo.org/wiki/Handbook:AMD64/Networking/Introduction
> > 
> > and bring up your wireless network service:
> >  'rc-service -v net.wlp5s0 start'
> 
> it gives "ERROR : fails to start".

Yes, because there is the previous problem with the firmware.


> > Besides wpa_supplicant, other packages required like 'net-misc/netifrc',
> > 'net-misc/dhcpcd' should be installed,
> > if they have not been brought in as dependencies already.
> 
> I've installed 'netifrc' ; 'dhcpcd' was installed long ago.
> 
> > Please post back your dmesg and any terminal output,
> > if you are still having problems bringing up this wireless interface.
> > PS. This page which may or may not be still relevant
> > with the latest stable kernels, but you may want to take a look either
> > way:
> > https://wiki.gentoo.org/wiki/User:Chess/MT7921e
> 
> So no progress today.  I can try copying the firmware files from SR/Mint
> -- everything under  /lib/firmware/  in SR/Mint & see if it helps.

Not yet, let's see if the missing firmware file is available in your /lib/
firmware first.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to