Why does a wifi card need udev when an ethernet card doesn't?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Why does a wifi card need udev when an ethernet card doesn't?
I've recently had a lot of trouble on my laptop because of the failure of udev to start up properly. There's a thread on it in the AntiX/MX forum for anyone who's interested. My wifi didn't come up either. But strangely enough ethernet did. That is to say, there was an eth0 device. It just wasn't functioning because I have no ethernet connection upstairs.
But wlan0 didn't appear at all. There was no such interface. It didn't show up in /sys/class/net and wasn't found by ip link show. I would like to know why not. Why can the kernel not recognise a wifi interface without help from udev?
implying that at some point udev worked and wifi did too.
My guess is that ethernet is more hardware based and just works in the presence of a driver. Where wifi needs more things like firmware, which might not be installed by default. If there's no firmware then it doesn't matter if there is a driver as it will not work. So no device found and no interface assigned. Or udev loads the kernel module for the hardware, where without it the module does not get loaded.
# lspci -nnk
# lsusb
If the device doesn't show up there, then you have bigger issues.
No firmware load is needed for this wifi chip. It's not one of those Broadcom ones. I think it's Atheros.
That udev is needed to load the kernel driver sounds like a reasonable explanation, but it just raises the same question over again. The Linux kernel is normally very good at identifying the hardware it is running on and loading the drivers required. It can do so for almost any ethernet card without needing any help from user space. What is so different about wifi?
btw I have everything working on that machine now. Once udevd is running, the interface is brought up without any problems.
Although more likely that udev loads usb to load the wifi driver which loads the firmware. Where ethernet tends to be on the PCI(e) bus. But I haven't exactly run without udev to find out if that breaks things. Although I remember a time before udev. Where using mknod / MAKEDEV was not uncommon if you had uncommon hardware or special needs.
While linux is good at auto-loading modules as needed, you might find that much of that is scripted and part of a distro. And if you look at some of those scripts you might find that it basically bounces off enough walls until it kind of works in most cases. Locations for which vary on some distros, but basically /etc/modprobe.d/ /lib/udev/ /etc/X11/*.d/ and various other efforts.
Although more likely that udev loads usb to load the wifi driver which loads the firmware. Where ethernet tends to be on the PCI(e) bus.
istr that wifi dongles work like that. The dongle is first recognised as a usb storage device and firmware is loaded from it, then it switches mode and becomes a network device.
But this is an internal wifi card. I'll have to check what bus it's on next time I have the laptop switched on.
I think but am not sure Anti covered this glitch already.
Code:
Permissions /etc/udev folder
Submitted by anticapitalista on Sat, 11/25/2017 - 08:53
Permissions of /etc/udev folder is wrong (777) which means user cannot even read contents
Read more about Permissions /etc/udev folder
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.