Re: strange problem with usb wifi adapter

2021-12-15 Thread Long Wind
i've been able to find out why official debian installer needn't non-freeware, 
thanks for David's explanation
  
run linux and set up my adapter with non-free mt7601u.bin
then reboot to start debian installer
this time installer can use my adapter without non-free firmware 
firmware loaded can survive reboot, as David explains



Re: strange problem with usb wifi adapter

2021-12-15 Thread Long Wind
Curt, i have some good news, i try buster and bullseye *netinst.iso today, both 
ask me for  mt7601u.bin

it's not easy for me to explain why they don't last time

maybe installer find firmware somewhere in my PC
(i have installed linux before)
but why they don't install firmware to my target device?
maybe firmware happen to be in partition where debian 10/11 are to be installed

but installer has other bugs, it can't detect my netgear adapter though kernel 
support it, it can't proceed just because it's on 1st device.

i think i've been very unproductive bothering with these issues



Re: strange problem with usb wifi adapter

2021-12-15 Thread Andrew M.A. Cater
On Wed, Dec 15, 2021 at 11:32:05AM -, Curt wrote:
> On 2021-12-15, Long Wind  wrote:
> > On Sunday, December 12, 2021, 8:31:17 AM EST, Curt  wrote: 
> > Does this mean the official Buster netinstall kernel contains a free driver 
> > for your wireless card but the subsequently installed Buster user kernel 
> > does not?
> >
> >
> > Sorry, Curt, I see your reply today, it's too late  
> >
> > i think official buster debian-10.11.0-i386-netinst.iso has non-free 
> > firmware, but it isn't installed to user's target device
> >
> > apparently both use non-free mt7601u firmware
> >
> > if they have free driver for my adapter, surely they shall install to my 
> > target device
> >
> 
> No problem; I was thinking later my remark was actually pretty stupid
> (ruining my stellar reputation here), but I'd seen this (believing if
> there was a kernel driver that meant it was open source or something)
> 
>  https://cateee.net/lkddb/web-lkddb/MT7601U.html
> 
> and also experienced mild incredulity in discovering the official netinstaller
> might contain a non-free entity (that it inexplicably deprives the
> obliviously "tainted" user once its job is done), which got me to
> wondering what in heaven's sake the *unofficial* netinstaller was for,
> the official one already being a little bit pregnant anyway, as it were.
> 
> 

So: if it works - you need firmware-linux-nonfree which pulls in 
firmware-misc-nonfree [For Bullseye]

  * MediaTek MT7601U firmware, version 34 (mt7601u.bin)

is in firmware-misc-nonfree.

If you use the unofficial non-free installer, that would be found on
boot, I think. If you then install a desktop environment, you would get
the ability to configure it with network-manager or whatever other utility.

Hope this helps, all the very best, as ever,

Andy Cater



Re: strange problem with usb wifi adapter

2021-12-15 Thread Curt
On 2021-12-15, Long Wind  wrote:
> On Sunday, December 12, 2021, 8:31:17 AM EST, Curt  wrote: 
> Does this mean the official Buster netinstall kernel contains a free driver 
> for your wireless card but the subsequently installed Buster user kernel does 
> not?
>
>
> Sorry, Curt, I see your reply today, it's too late  
>
> i think official buster debian-10.11.0-i386-netinst.iso has non-free 
> firmware, but it isn't installed to user's target device
>
> apparently both use non-free mt7601u firmware
>
> if they have free driver for my adapter, surely they shall install to my 
> target device
>

No problem; I was thinking later my remark was actually pretty stupid
(ruining my stellar reputation here), but I'd seen this (believing if
there was a kernel driver that meant it was open source or something)

 https://cateee.net/lkddb/web-lkddb/MT7601U.html

and also experienced mild incredulity in discovering the official netinstaller
might contain a non-free entity (that it inexplicably deprives the
obliviously "tainted" user once its job is done), which got me to
wondering what in heaven's sake the *unofficial* netinstaller was for,
the official one already being a little bit pregnant anyway, as it were.




Re: strange problem with usb wifi adapter

2021-12-15 Thread Long Wind
On Sunday, December 12, 2021, 8:31:17 AM EST, Curt  wrote: 
Does this mean the official Buster netinstall kernel contains a free driver for 
your wireless card but the subsequently installed Buster user kernel does not?


Sorry, Curt, I see your reply today, it's too late  

i think official buster debian-10.11.0-i386-netinst.iso has non-free firmware, 
but it isn't installed to user's target device

apparently both use non-free mt7601u firmware

if they have free driver for my adapter, surely they shall install to my target 
device




Re: strange problem with usb wifi adapter

2021-12-12 Thread tomas
On Sun, Dec 12, 2021 at 01:03:31PM +, Long Wind wrote:
> Thanks to all! i take tomás's advice and manage to copy buster installer's 
> kernel message:
> 
> [   68.255616] usb 1-1.1: reset full-speed USB device number 6 using ehci-pci
> [   68.474958] mt7601u 1-1.1:1.0: ASIC revision: 76010001 MAC revision: 
> 76010500
> [   68.531583] mt7601u 1-1.1:1.0: EEPROM ver:0d fae:00
> [   68.784552] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
> [   68.785518] usbcore: registered new interface driver mt7601u
> [   68.792412] mt7601u 1-1.1:1.0 wlx502b73d50a69: renamed from wlan0
> 
> and compare with buster's /var/log/messages:
> 
> [   86.341256] mt7601u 1-1.1:1.0: ASIC revision: 76010001 MAC revision: 
> 76010500
> [   86.351154] mt7601u 1-1.1:1.0: firmware: direct-loading firmware 
> mt7601u.bin
> [   86.351172] mt7601u 1-1.1:1.0: Firmware Version: 0.1.00 Build: 7640 Build 
> time: 201302052146
> [   86.739115] mt7601u 1-1.1:1.0: EEPROM ver:0d fae:00
> [   87.021000] usbcore: registered new interface driver mt7601u
> [   87.066835] mt7601u 1-1.1:1.0 wlx502b73d50a69: renamed from wlan0
> 
> it seems to me that buster installer include non-free firmware, but it isn't 
> installed to user's target device

That sounds plausible. What I miss in the comparison is the complaint
that it couldn't load the firmware, like in my case:

 [   54.996555] iwlwifi :03:00.0: firmware: failed to load 
iwl-debug-yoyo.bin (-2)

But perhaps this driver is silent? I don't know.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: strange problem with usb wifi adapter

2021-12-12 Thread Curt
On 2021-12-12, Long Wind  wrote:
> Thanks to all! i take tomás's advice and manage to copy buster installer's 
> kernel message:
>
> [   68.255616] usb 1-1.1: reset full-speed USB device number 6 using ehci-pci
> [   68.474958] mt7601u 1-1.1:1.0: ASIC revision: 76010001 MAC revision: 
> 76010500
> [   68.531583] mt7601u 1-1.1:1.0: EEPROM ver:0d fae:00
> [   68.784552] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
> [   68.785518] usbcore: registered new interface driver mt7601u
> [   68.792412] mt7601u 1-1.1:1.0 wlx502b73d50a69: renamed from wlan0
>

Does this mean the official Buster netinstall kernel contains a free driver for 
your
wireless card but the subsequently installed Buster user kernel does not?



Re: strange problem with usb wifi adapter

2021-12-12 Thread Curt
On 2021-12-12, Andrew M.A. Cater  wrote:
>
> The fact of having trouble installing via wifi is one of the reasons why
> installer doesn't configure it - though you do get a prompt saying something 

The fact here, though, is the OP's wireless card was "configured" during
the installation process and worked perfectly. What we're trying to
discover is how and why his wireless worked with the official Debian
installer if it requires non-free firmware to function after a hard
reboot. 



Re: strange problem with usb wifi adapter

2021-12-12 Thread Brian
On Sun 12 Dec 2021 at 09:58:29 +0100, Andrei POPESCU wrote:

> On Sb, 11 dec 21, 14:57:42, Joe wrote:
> > 
> > I did my first netinstall without asking for expert mode (I assumed it
> > would do a decent job by itself, and I did not consider myself an
> > expert) and this was when I had only a couple of computers and used
> > hosts files and static addressing. Under those conditions, the
> > installer did not install Ethernet networking in the installed system,
> > despite having used it itself in order to make the installation. 
> > 
> > I reported this behaviour as a bug and was rather tersely told that it
> > was a feature. No expert + no DHCP = no Ethernet. OK, I could have been
> > building an isolated certificate authority machine, but surely then I'd
> > have used expert mode...
> > 
> > I don't know if installers still do that, it's many years since I ran a
> > network without DHCP, and I *always* use expert mode, even for routine
> > throwaway installations.
> 
> The configuration used during the installation is passed on to the final 
> system. It has been like this since at least sarge.

These days an exception to this is when the installation is done over a
wireless link and a DE is not selected. See the bug reports for netcfg.

-- 
Brian.



Re: strange problem with usb wifi adapter

2021-12-12 Thread tomas
On Sun, Dec 12, 2021 at 10:07:12AM +, Andrew M.A. Cater wrote:
> On Sun, Dec 12, 2021 at 12:18:52AM +, Long Wind wrote:
> > 
> > Thank David!
> > 
> >  if this theory is correct, how does debian installer configure it? 
> > official image i use is supposed to be without non-free firmware 
> > 
> 
> If it's a particular Mediatek chipset, then the firmware for it may be
> in the firmware-linux-nonfree metapackage - which also pulls in 
> firmware-misc-nonfree which is the package where the actual driver is. 
> 99% of current wireless chips need additional firmware to operate correctly.
> https://packages.debian.org/bullseye/firmware-linux-nonfree 

As another hint to debugging, you may look into dmesg's output (do, e.g.
"sudo dmesg | less") for clues. An idea to clear the above question
would be to compare dmesg's output while the installer is running with
the one after the installed system boots.

Here's "my" kernel's output to dmesg while it's trying to feed "my" WiFi
hardware its firmware, to give you a rough idea on what to look for.
Searching for "wifi", or for your wifi's kernel module's name seem to be
good approaches:

  [   54.906353] Intel(R) Wireless WiFi driver for Linux
  [   54.906565] iwlwifi :03:00.0: can't disable ASPM; OS doesn't have ASPM 
control
  [   54.996363] iwlwifi :03:00.0: firmware: direct-loading firmware 
iwlwifi-6000g2a-6.ucode
  [   54.996531] iwlwifi :03:00.0: loaded firmware version 18.168.6.1 
6000g2a-6.ucode op_mode iwldvm
  [   54.996555] iwlwifi :03:00.0: firmware: failed to load 
iwl-debug-yoyo.bin (-2)
  [   54.996617] firmware_class: See https://wiki.debian.org/Firmware for 
information about missing firmware

So it seems to load some iwlwifi-6000g2a-6.ucode, which seems to work
But that one "...-yoyo.bin". What that "-2" means is anyone's guess, but
my gues would be "No such file or directory" (keeping with the good old
ERRNO tradition, why should the kernel folks break that?).

Happy digging :)
-- 
tomás


signature.asc
Description: PGP signature


Re: strange problem with usb wifi adapter

2021-12-12 Thread Andrew M.A. Cater
On Sun, Dec 12, 2021 at 12:18:52AM +, Long Wind wrote:
> 
> Thank David!
> 
>  if this theory is correct, how does debian installer configure it? official 
> image i use is supposed to be without non-free firmware 
> 

If it's a particular Mediatek chipset, then the firmware for it may be
in the firmware-linux-nonfree metapackage - which also pulls in 
firmware-misc-nonfree which is the package where the actual driver is. 
99% of current wireless chips need additional firmware to operate correctly.
https://packages.debian.org/bullseye/firmware-linux-nonfree 

The fact of having trouble installing via wifi is one of the reasons why
I've started suggesting that people should use the unofficial installer which
includes non-free firmware for wifi chipsets. If anyone wants to use the 
official image to install - it will generally work for wired connection 
over Ethernet - which would also allow you then to add the non-free firmware
for the wifi card. [For a virtual machine, the official image is ideal because 
that then  depends on the host machine anyway.] 

If your card needs firmware, then it's quite possible that the official 
installer doesn't configure it - though you do get a prompt saying something 
close to "Your device may need nno-free firmware. Use non-free or load 
firmware now"

Hope this helps, with every good wish, as ever

Andy Cater



Re: strange problem with usb wifi adapter

2021-12-12 Thread Andrei POPESCU
On Sb, 11 dec 21, 14:57:42, Joe wrote:
> 
> I did my first netinstall without asking for expert mode (I assumed it
> would do a decent job by itself, and I did not consider myself an
> expert) and this was when I had only a couple of computers and used
> hosts files and static addressing. Under those conditions, the
> installer did not install Ethernet networking in the installed system,
> despite having used it itself in order to make the installation. 
> 
> I reported this behaviour as a bug and was rather tersely told that it
> was a feature. No expert + no DHCP = no Ethernet. OK, I could have been
> building an isolated certificate authority machine, but surely then I'd
> have used expert mode...
> 
> I don't know if installers still do that, it's many years since I ran a
> network without DHCP, and I *always* use expert mode, even for routine
> throwaway installations.

The configuration used during the installation is passed on to the final 
system. It has been like this since at least sarge.


Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: strange problem with usb wifi adapter

2021-12-11 Thread David Wright
On Sun 12 Dec 2021 at 00:18:52 (+), Long Wind wrote:

>  if this theory is correct, how does debian installer configure it? official 
> image i use is supposed to be without non-free firmware 

It's not a theory, it's a hypothesis based on what you have told us.
Each new fact that you reveal can be used to refine or reject it.
You can of course do this more easily than I can, as I don't have
access to a device like that.

Every step matters in your research: power changes, booting,
un/plugging, choice of socket, etc, and their precise sequence,
if you want to get past just posting anecdotes.

I'm not even certain whather your OP was actually
a strange problem, or just a strange phenomenon.

Cheers,
David.



Re: strange problem with usb wifi adapter

2021-12-11 Thread David Wright
On Sat 11 Dec 2021 at 22:03:41 (+), Long Wind wrote:

> David is right, lsusb:
> Bus 002 Device 004: ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless 
> Adapter
> 
> i do some interesting test, am able to reproduce my problem,
> it reaffirm my suspicion that it's related to power cutoff,
> something i can't explain because of my limited hardware knowledge  
> 
> i think my adapter uses mt7601u.bin in /lib/firmware
> i remove firmware-misc-nonfree, wifi works even after reboot
> though /lib/firmware/mt7601u.bin is gone
> 
> then i shutdown and unplug power cord and wait for half minute
> i  plug power cord and boot, same problem arise
>  lsusb can list my adapter, but "ip link" doesn't show it
> and i have to install firmware-misc-nonfree to solve it

Firmware isn't like most software, where it's read from the
filesystem whenever it's needed. It's not even like heavily
used software, where it's kept in cache in memory to avoid
having to read the filesystem so frequently.

What you appear to be describing is a case where the kernel
module loads some firmware into the chips inside the device,
making it work correctly. And until the power is removed
from those chips, the firmware remains in the chips.

In days of yore, many people had to initialise some internal
devices in PCs using DOS, and then perform what was termed
a warm/soft reboot to load linux without losing the effects
of the initialisation.

Cheers,
David.



Re: strange problem with usb wifi adapter

2021-12-11 Thread David Wright
On Sat 11 Dec 2021 at 12:13:23 (+), Andrew M.A. Cater wrote:
> On Sat, Dec 11, 2021 at 05:33:05AM +, Long Wind wrote:
> > buster installer can configure my usb wifi adapter without non-freeware
> > it works well after installation, i install many packages by wifi
> > i shutdown and power disconnect from pc
> > then power return and i boot buster, 
> > buster can't recognize wifi adapter, though i try many usb ports
> > i install  firmware-misc-nonfree, wifi adapter works now
> > 
> > i bet bullseye has same problem
> 
> 1. Which Wifi adapter? - lusb may tell you. This is important: because
> one works without firmware, it doesn't mean they all will. Firmware is
> specific to chipset from the manufacturer.

Ralink MT7601U Wireless Adapter type: USB driver: mt7601u according to:
https://lists.debian.org/debian-user/2021/02/msg00286.html

> 2. How are you bringing up the interface for the Wifi adapter to connect?
> 
> 3. Is the Wifi adapter permanently plugged in or are you removing it and 
> replugging it.
> 
> If you can give clear answers - it is especially helpful if you can
> show approaches you have tried / commands you have run / logs - we 
> can help you better.

I don't know whether the problem is firmware, or a regression in the
kernel, or what. Googling led to:

https://github.com/kuba-moo/mt7601u/issues/64#issuecomment-352250127

but I could probably only make sense of this page if I were
in posession of the item.

Cheers,
David.



Re: strange problem with usb wifi adapter

2021-12-11 Thread Joe
On Sat, 11 Dec 2021 05:33:05 + (UTC)
Long Wind  wrote:

> buster installer can configure my usb wifi adapter without
> non-freeware it works well after installation, i install many
> packages by wifi i shutdown and power disconnect from pc
> then power return and i boot buster, 
> buster can't recognize wifi adapter, though i try many usb ports
> i install  firmware-misc-nonfree, wifi adapter works now
> 
> i bet bullseye has same problem
> 

This kind of problem is fairly normal with installers: they often use
features within their own code which they do not necessarily install in
the target system. The installer will have loaded the necessary firmware
for its own use, but will not assume that the installed system also
needs it, especially if you don't ask for non-free software.

I did my first netinstall without asking for expert mode (I assumed it
would do a decent job by itself, and I did not consider myself an
expert) and this was when I had only a couple of computers and used
hosts files and static addressing. Under those conditions, the
installer did not install Ethernet networking in the installed system,
despite having used it itself in order to make the installation. 

I reported this behaviour as a bug and was rather tersely told that it
was a feature. No expert + no DHCP = no Ethernet. OK, I could have been
building an isolated certificate authority machine, but surely then I'd
have used expert mode...

I don't know if installers still do that, it's many years since I ran a
network without DHCP, and I *always* use expert mode, even for routine
throwaway installations.

-- 
Joe



Re: strange problem with usb wifi adapter

2021-12-11 Thread Andrew M.A. Cater
On Sat, Dec 11, 2021 at 05:33:05AM +, Long Wind wrote:
> buster installer can configure my usb wifi adapter without non-freeware
> it works well after installation, i install many packages by wifi
> i shutdown and power disconnect from pc
> then power return and i boot buster, 
> buster can't recognize wifi adapter, though i try many usb ports
> i install  firmware-misc-nonfree, wifi adapter works now
> 
> i bet bullseye has same problem
> 

Hi Long Wind,

1. Which Wifi adapter? - lusb may tell you. This is important: because
one works without firmware, it doesn't mean they all will. Firmware is
specific to chipset from the manufacturer.

2. How are you bringing up the interface for the Wifi adapter to connect?

3. Is the Wifi adapter permanently plugged in or are you removing it and 
replugging it.

If you can give clear answers - it is especially helpful if you can
show approaches you have tried / commands you have run / logs - we 
can help you better.

With every good wish, as ever,

Andy Cater



Re: strange problem with usb wifi adapter

2021-12-11 Thread Andrei POPESCU
On Sb, 11 dec 21, 08:49:00, Long Wind wrote:
> 
> now i can't run lsmod in past unless i have time machine
> but i might install bullseye in future, i'll have same problem
> do you have suggestion on trouble-shooting ?

We don't have time machines, but we do have logs ;)

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: strange problem with usb wifi adapter

2021-12-11 Thread tomas
On Sat, Dec 11, 2021 at 08:11:04AM +, Long Wind wrote:
> 
> tomas, glad you are back, i think you've  been for long time

thanks for the warm welcome :)

Actually, just a trivial technical problem: while upgrading my server,
Debian's mailer got too many bounces and (rightfully) kicked me out.
Combined with the hot mess I'm currently in, I didn't notice at first.
Now I'm resubscribed.

> i wonder if my wifi adapter really needs nonfreeware

If it doesn't work without, you have at least some evidence towards
that. I'm currently too distracted to look deeper, but there is sure a
way to see what the kernel is doing while pushing the firmware to your
WiFi adapter. I'd expect to get a hint in the logs.

> after all , debain disclaimer is true, it's not bug-free, use it at your own 
> risk

I don't think there is any bug-free complex system. Commercial systems
will tell you that in the small print only ;-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: strange problem with usb wifi adapter

2021-12-11 Thread Cindy Sue Causey
On 12/11/21, Long Wind  wrote:
>
> tomas, glad you are back, i think you've  been for long time
>
> i wonder if my wifi adapter really needs nonfreeware


That's what I was wondering. What's it using to successfully function
before you have to install the nonfree package after the next boot up?
Would comparing something like lsmod before and after provide any
insight?

Just thinking out loud.. :)

Cindy :)
-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA
* runs with birdseed *



Re: strange problem with usb wifi adapter

2021-12-11 Thread Long Wind


tomas, glad you are back, i think you've  been for long time

i wonder if my wifi adapter really needs nonfreeware

after all , debain disclaimer is true, it's not bug-free, use it at your own 
risk



Re: strange problem with usb wifi adapter

2021-12-10 Thread tomas
On Sat, Dec 11, 2021 at 05:33:05AM +, Long Wind wrote:
> buster installer can configure my usb wifi adapter without non-freeware
> it works well after installation, i install many packages by wifi
> i shutdown and power disconnect from pc
> then power return and i boot buster, 
> buster can't recognize wifi adapter, though i try many usb ports
> i install  firmware-misc-nonfree, wifi adapter works now
> 
> i bet bullseye has same problem

That's correct: many (most?) wifi hardware these days needs non-free
firmware. If you want to avoid that, having a look at [1] *before buying
anything* might be helpful.

Cheers

[1] https://wiki.debian.org/WiFi

-- 
t


signature.asc
Description: PGP signature