Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cfg80211: failed to load regulatory.db
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Semantika
n00b
n00b


Joined: 19 Feb 2018
Posts: 20

PostPosted: Fri May 04, 2018 10:21 pm    Post subject: cfg80211: failed to load regulatory.db Reply with quote

Hello fellow humans,

I am currently having trouble with my wireless card and I can't seem to find the problem. I followed the instrucctions in the iwlwifi gentoo wiki page, though there is something still missing. I have gone all the way until the module loading, but then when I list the kernel buffer for the network I get the message in the title,
Code:
cfg80211: failed to load regulatory.db
.

So here I leave the dmesg statu[/code]s in hope some godlike creature can help me in my endeavours:

Code:
 lspci -nnkv | sed -n '/Network/,/^$/p'


Code:
 03:00.0 Network controller [0280]: Intel Corporation Centrino Wireless-N 2230 [8086:0887] (rev c4)
   Subsystem: Intel Corporation Centrino Wireless-N 2230 BGN [8086:4062]
   Flags: bus master, fast devsel, latency 0, IRQ 36
   Memory at f7800000 (64-bit, non-prefetchable) [size=8K]
   Capabilities: [c8] Power Management version 3
   Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
   Capabilities: [e0] Express Endpoint, MSI 00
   Capabilities: [100] Advanced Error Reporting
   Capabilities: [140] Device Serial Number 68-5d-43-ff-ff-82-b5-18
   Kernel driver in use: iwlwifi
   Kernel modules: iwlwifi
 




Code:
  dmesg | grep -i -E '03:00.0|wlan0|iwl|80211' 


Code:
 [    0.359052] pci 0000:03:00.0: [8086:0887] type 00 class 0x028000
[    0.359052] pci 0000:03:00.0: reg 0x10: [mem 0xf7800000-0xf7801fff 64bit]
[    0.359052] pci 0000:03:00.0: PME# supported from D0 D3hot D3cold
[    1.058910] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    1.061516] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    1.064780] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    1.071941] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    1.566470] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.568631] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    7.085687] iwlwifi 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
[    7.129618] iwlwifi 0000:03:00.0: loaded firmware version 18.168.6.1 op_mode iwldvm
[    7.160455] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUG enabled
[    7.160460] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUGFS enabled
[    7.160463] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEVICE_TRACING enabled
[    7.160468] iwlwifi 0000:03:00.0: Detected Intel(R) Centrino(R) Wireless-N 2230 BGN, REV=0xC8
[    7.197039] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
[   62.432073] cfg80211: failed to load regulatory.db
 




Code:
  zgrep CONFIG_IWL /proc/config.gz 


Code:
 CONFIG_IWLEGACY=m
CONFIG_IWL4965=m
CONFIG_IWL3945=m
CONFIG_IWLEGACY_DEBUG=y
CONFIG_IWLEGACY_DEBUGFS=y
CONFIG_IWLWIFI=m
CONFIG_IWLWIFI_LEDS=y
CONFIG_IWLDVM=m
CONFIG_IWLMVM=m
CONFIG_IWLWIFI_OPMODE_MODULAR=y
CONFIG_IWLWIFI_BCAST_FILTERING=y
CONFIG_IWLWIFI_DEBUG=y
CONFIG_IWLWIFI_DEBUGFS=y
CONFIG_IWLWIFI_DEVICE_TRACING=y
 



Code:
 zgrep 'IWLWIFI\|IWLDVM\|IWLMVM' /proc/config.gz 


Code:
 CONFIG_IWLWIFI=m
CONFIG_IWLWIFI_LEDS=y
CONFIG_IWLDVM=m
CONFIG_IWLMVM=m
CONFIG_IWLWIFI_OPMODE_MODULAR=y
CONFIG_IWLWIFI_BCAST_FILTERING=y
CONFIG_IWLWIFI_DEBUG=y
CONFIG_IWLWIFI_DEBUGFS=y
CONFIG_IWLWIFI_DEVICE_TRACING=y
 
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Sat May 05, 2018 7:28 am    Post subject: Reply with quote

I know I have seen a similar error having to do with possibly a kernel update and maybe you are needing to update your software for the the kernel drivers and other software related to the file that is regulatory.db
So that would probably be CRDA, from what I can tell it is in the kernel, but it may involve some further software installation as well.
Also another thing would be to make sure there are no conflicting kernel modules and if there are any blacklist those immediately.
For example my broadcom wireless card uses proprietary wl driver and I have to blacklist other conflicting kernel modules.
Basically on hardware that wasn't built for linux it is difficult to say whether this problem is completely able of being resolved or not. :(
But good luck, and the best way I have found to be learning about the compatibility is just to compare with information on different Linux websites.
However for isolating the exact problem with the regulatory database then I can hopefully help more once you’ve confirmed the correct kernel and hardware settings. Make sense?
https://www.linuxquestions.org/questions/linux-kernel-70/kernel-platform-regulatory-0-direct-firmware-load-for-regulatory-db-failed-with-error-2-a-4175622954-print/
https://forums.gentoo.org/viewtopic-t-963178-start-0.html

NOTE: edited down for more clear discussing

If you can confirm that everything is set correct in the kernel, which it looks like you provided the relevant info about, so now to check on those several other things like potentially having to blacklist a module or reinstall a CRDA package for the sofrtware to work for cfg80211...if that makes sense...not sure if it does but I think I can help if it isn't that clear!
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Sat May 05, 2018 9:00 am    Post subject: Reply with quote

Also by the way you mentioned following iwlwifi, but did you do this step:
Code:

root #emerge --ask sys-kernel/linux-firmware


Critical for getting the software to work with the kernel and the hardware!
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Sat May 05, 2018 9:09 am    Post subject: Reply with quote

If that doesn't do it, then I also suggest that given your maybe being new to Gentoo and linux that you actually skip the more vague description I provided in the first reply and we jump back to the question of what is causing a problem. Since your post mentioned that you are having problems, but the exact type of problem is not mentioned, other than a warning or error mesage which if you spend enough time on this forum you will learn to pretty much ignore (jk). But seriously, not every warning message is even a sign that anything is truly wrong. In this case this message is related to the networking, but it rather than let that dictate the direction, why don't you also provide a bit of information regarding what you've done (like specifically from the wiki) and what it is that doesn't seem to work (hardware connection issue, daemon or network service issues , can't connect to wifi, etc.)

Then what usually might work out better is to experiment with some non-trivial scripts and/or utilities that will help to test connections and you can see if it might be the linux sys firmware that is causing it, or else some other utility like software that needs installing, or a kernel related thing. But since that regulatory.db is just a file, and that file could be missing because of any number of things it is not really the best clue about what could be happening.

Other than maybe just realizing that for cfg80211 to work that is why I mentioned checking around about compatibility with your device, which appears like by following the instructions in the wiki and then explaining here what didn't work that you might get some help to figure this one out yet. Sorry if it doesn't seem immediately helpful, I'm trying to be more help but also it's late and I can't think straight.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat May 05, 2018 10:26 am    Post subject: Reply with quote

Semantika,

wifi is in several pieces and its got worse recently.

You need the kernel driver, Its firmware, the rest of the wifi stack and as you have discovered, a regulatory database.
The last bit sets the frequencies your wifi is allowed to use in different countries.

The kernel provides public keys to validate the database but not the database itself.

You need to turn off the DEBUG options. Often, they interfere with normal operation.
DEBUGFS options are mostly harmless but may be security risk as the kernel exposes things in debugfs that are not needed for normal operation.

You will need
Code:
CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y
as the regulatory database is required to keep your wifi operating legally.

The database itself is provided by net-wireless/wireless-regdb, so you need that.
It installs /lib/firmware/regulatory.db, which is probably where the kernel module looks for it.
_________________
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
Semantika
n00b
n00b


Joined: 19 Feb 2018
Posts: 20

PostPosted: Mon May 07, 2018 6:14 pm    Post subject: Reply with quote

Hey, thaks a lot Neddy, I have tried what you told me, though not with much success. I disabled all the options for wifi debugging, even the debfs, and I rebuilt the database but could not get the card to respond. The following text is the output for the
Code:
dmesg | grep -i -E '03:00.0|wlp3s0|iwl|80211'
command:

Code:

[    0.413903] pci 0000:03:00.0: [8086:0887] type 00 class 0x028000
[    0.413957] pci 0000:03:00.0: reg 0x10: [mem 0xf7800000-0xf7801fff 64bit]
[    0.414223] pci 0000:03:00.0: PME# supported from D0 D3hot D3cold
[    0.414280] pci 0000:03:00.0: System wakeup disabled by ACPI
[    0.583131] pci 0000:03:00.0: Signaling PME through PCIe PME interrupt
[    1.358058] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    1.360749] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    1.364827] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    1.380851] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    7.991438] iwlwifi 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
[    8.040956] iwlwifi 0000:03:00.0: loaded firmware version 18.168.6.1 op_mode iwldvm
[    8.043441] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUG disabled
[    8.043443] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUGFS disabled
[    8.043444] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEVICE_TRACING disabled
[    8.043445] iwlwifi 0000:03:00.0: Detected Intel(R) Centrino(R) Wireless-N 2230 BGN, REV=0xC8
[    8.045546] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
[    8.068269] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
[    8.346914] iwlwifi 0000:03:00.0 wlp3s0: renamed from wlan0
[   15.664323] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
[   15.671839] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
[   15.671941] iwlwifi 0000:03:00.0: Radio type=0x2-0x0-0x0
[   15.930470] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
[   15.938009] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
[   15.938112] iwlwifi 0000:03:00.0: Radio type=0x2-0x0-0x0
[   16.009639] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready

Back to top
View user's profile Send private message
Semantika
n00b
n00b


Joined: 19 Feb 2018
Posts: 20

PostPosted: Mon May 07, 2018 6:38 pm    Post subject: Reply with quote

Hello LIsLinuxIsSogood,

I noticed the kernel modules do not load. Though when loading them manually one by one with modprobe I didn't get any conflicting reports. I followed the instructions in https://wiki.gentoo.org/wiki/Iwlwifi and the output for
Code:
 dmesg | grep -i -E '03:00.0|wlp3s0|iwl|80211'
just states that there is no link ready for wlp3s0 which, by the way, I don't quite grasp the meaning of that.
Code:

[    0.413903] pci 0000:03:00.0: [8086:0887] type 00 class 0x028000
[    0.413957] pci 0000:03:00.0: reg 0x10: [mem 0xf7800000-0xf7801fff 64bit]
[    0.414223] pci 0000:03:00.0: PME# supported from D0 D3hot D3cold
[    0.414280] pci 0000:03:00.0: System wakeup disabled by ACPI
[    0.583131] pci 0000:03:00.0: Signaling PME through PCIe PME interrupt
[    1.358058] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    1.360749] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    1.364827] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    1.380851] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    7.991438] iwlwifi 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
[    8.040956] iwlwifi 0000:03:00.0: loaded firmware version 18.168.6.1 op_mode iwldvm
[    8.043441] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUG disabled
[    8.043443] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUGFS disabled
[    8.043444] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEVICE_TRACING disabled
[    8.043445] iwlwifi 0000:03:00.0: Detected Intel(R) Centrino(R) Wireless-N 2230 BGN, REV=0xC8
[    8.045546] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
[    8.068269] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
[    8.346914] iwlwifi 0000:03:00.0 wlp3s0: renamed from wlan0
[   15.664323] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
[   15.671839] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
[   15.671941] iwlwifi 0000:03:00.0: Radio type=0x2-0x0-0x0
[   15.930470] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
[   15.938009] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
[   15.938112] iwlwifi 0000:03:00.0: Radio type=0x2-0x0-0x0
[   16.009639] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready


About the firmware I rebuilt the sys-kernel/linux-firmware and built the kernel driver for the
Code:
03:00.0 Network controller: Intel Corporation Centrino Wireless-N 2230 (rev c4)
wireless card.

I also followed your advice on ignoring it so I kept going and installed wpa_supplicant along with its GUI using the wpa_supplicant gentoo wiki, but the interface is not able to find any wireless networks.

Finally, I copied all the modules used by the SystemRescueCD on to my kernel but the effect kept being the same output as before.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon May 07, 2018 7:30 pm    Post subject: Reply with quote

Semantika,

Please don't filter dmesg.

So far, the kernel looks good. The next step is to establish the radio link.
If your system tried, dmesg will show it. Look for lines with associated ... authenticated.

If it keeps recurring in dmesg, you have several network control tools fighting over wpa_supplicant.
Once you are both associated and authenticated. The Wifi link behaves just like wired.

Show us all of dmesg - it needs to be on a pastebin.
_________________
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
Semantika
n00b
n00b


Joined: 19 Feb 2018
Posts: 20

PostPosted: Tue May 08, 2018 1:24 am    Post subject: Reply with quote

Hello Neddy!

Well I checked the whole dmesg log but I can't find which modules are authenticated and which are not. This is the bpaste link for the dmesg output.

https://bpaste.net/show/d954e08f1d0a

By the way, I thought it would be a good idea to downgrade gentoo-sources to a more stable version, so I tried version 4.9.95 and tried all your recommendations again, the result remained the same: No link. So now I am starting to guess the problem is with the hardware, ha, brilliant. With Gentoo there is no way but the hard way, ha.

Thank you very much for your concern.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Tue May 08, 2018 1:35 am    Post subject: Reply with quote

Possibly something in this thread will help: https://forums.gentoo.org/viewtopic-t-1078162-start-0.html
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Tue May 08, 2018 2:54 am    Post subject: What init system is user being on? Reply with quote

OP, I'm not sure if you have provided this info already, but what init system are you using?

Also what Neddy said with the different wireless software systems (if there is a conflict) the other thing you mentioned already having done was to install the regulatory db so is that no longer part of your concern at this point, and you need to make sure the wireless package references the correct portion of the database file, with some setting for country or something like that.

What other comprehensive logs might you provide in terms of during the boot cycle or whenever the issue is occurring later?

Can you take a second to provide more information about the services that are active/enabled and if you don't know how to do that just post back here, it is slightly different for the two different systems (openrc vs. systemd).

Bye, k
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Tue May 08, 2018 3:04 am    Post subject: Reply with quote

https://wiki.gentoo.org/wiki/Handbook:AMD64/Networking/Wireless#Troubleshooting_wireless_tools

In case it comes to the situation of more debugging later.

From reviewing Tony0904's what solved the user error there was that your not pinging the router by the correct wireless hostname, so what about this situation makes it seem similar not sure.

But I will (uptick) idea of the link since the problem is likely not with a faulty hardware or software, but the specific configuration of the two working together. If OP can start by answering the last post about the init system then maybe soon after provide the correct debug log for the wifi connection then there are plenty on this forum who are more experienced than me with reviewing the proper debugging info. Give it a try!
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Veteran
Veteran


Joined: 13 Feb 2016
Posts: 1179

PostPosted: Tue May 08, 2018 3:25 am    Post subject: Reply with quote

One more try...good job at rebuilding the firmware and installing the regulatory db those are musts to have a working network-ready device. If you are not getting any other messages except for an the inactive link then I would say that you are probably just missing a minimal thing with one of the many steps involved did you fail to load all the modules, or possibly in starting services too soon, or something like that. The order of the steps for wifi to take hold is particular to the software but also troubleshoot based on hardware and software being correct. A result like this, no link available just means software isn't able to perform any function with the hardware, but the hardware is possibly configured correctly since otherwise that message would be different something like a missing device error or unknown category.

I wouldn't rule out the kernel yet completely, because wireless modules are many and have you thought to post full kernel configuration for us to see in addition to your network card information that you posted already?

But I doubt you will need to make changes to the kernel, if you did then you should make sure to rebuild any software for the network after making changes to the drivers since that could be a check performed at the time of installation for something like wpa_supplicant or standard networking programs like wext, and iw. That is my attempt at a technical description and I am sure I will be wrong about at least 10% is not more like 75% of what I said because I am not a network engineer and only have some limited troubleshooting experience for this problem. At least in the meantime your initial problem has been dealt with (thanks to Ned and his suggestion to install).
Back to top
View user's profile Send private message
Semantika
n00b
n00b


Joined: 19 Feb 2018
Posts: 20

PostPosted: Thu May 10, 2018 5:01 am    Post subject: Reply with quote

Hello LIsLinuxIsSogood,

Well, I still haven't managed to make it work, I have been working with the cable and managing my frustration by letting it rest for one day, now I am back on track.

The init system I am using is OpenRC, and the initializacion log content is in this link: https://bpaste.net/show/e2d2b403d4fd

About the reg database error, that has been solved already yeiii!! :D But still, when I
Code:
 ./net.wlp3s0 start
, I get the following : https://bpaste.net/show/c1f0d8f8a555

The
Code:
rc-update -v
command outputs: https://bpaste.net/show/a954324c6299

And finally the kernel status in /usr/src/linux/.config is in : https://bpaste.net/show/a791bd4fd61b

So when I try to launch wpa_gui, I get the following message :
[code]
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-yiiiha'
QSystemTrayIcon::setVisible: No Icon set
[\code]

So I guess it must be something on the kernel though I have searched the menuconfig and can't find an option pointing towards a FAST variable, am I on the right track? Or is it something else?

Thank you very much.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu May 10, 2018 7:02 pm    Post subject: Reply with quote

Semantika,

Your firewall modules didn't load.
Code:
/etc/init.d/../conf.d/modules: line 35:  xt_mark nf_nat_sip nf_log_common xt_LOG nf_nat_ftp nf_nat_irc nf_nat xt_nat xt_addrtype nf_nat_ipv4 nf_nat_masquerade_ipv4 nf_log_ipv4 ipt_MASQUERADE nf_log_arp iptable_nat nf_log_ipv6 : command not found

Try
Code:
modprobe <module_name>
working your way through the list and see what fails.
ipt_MASQUERADE looks odd.

Code:
Successfully initialized wpa_supplicant
is good but all the errors, down to
Code:
 Failed to read or parse configuration '/etc/wpa_supplicant/wpa_supplicant.conf'.
 * start-stop-daemon: failed to start `/usr/sbin/wpa_supplicant'
 * Failed to start WPA Supplicant Daemon

tell that your wpa_supplicant.conf is a source of problems.

There are some almost working examples in
Code:
man wpa_supplicant.conf

_________________
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
Semantika
n00b
n00b


Joined: 19 Feb 2018
Posts: 20

PostPosted: Fri May 11, 2018 2:57 am    Post subject: Reply with quote

Yeiii, thanks a lot Neddy!!!

Turns out I had a sintax problem in my wpa_supplicant.conf. I have another problem yet, but I am trying to fix it following with this thread: https://forums.gentoo.org/viewtopic-p-8218424.html#8218424 Turns out wpa_supplicant is not able to assign an IP address when being started as a non root user.

Thanks a lot
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri May 11, 2018 8:10 pm    Post subject: Reply with quote

Semantika,

wpa_supplicant does not assign IP addresses. Its function is to perform the association and authentication for your wifi.
Once that's complete, the. normal wired tools take care of the interface set up.
_________________
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
Semantika
n00b
n00b


Joined: 19 Feb 2018
Posts: 20

PostPosted: Fri May 11, 2018 8:55 pm    Post subject: Reply with quote

Hello Neddy,

I have finally made it work, the information you gave me was rather good, I was only missing dhcpcd service at the default runlevel and removing net.wlps30, I don't really understand why that works, shouldn't net.wlps30 be at the default runlevel?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat May 12, 2018 4:33 pm    Post subject: Reply with quote

Semantika,

My net file contains
Code:
modules="wpa_supplicant iproute2"

wpa_supplicant_wlan0="-Dnl80211"

config_wlan0="192.168.1.99/24"
routes_wlan0="default gw 192.168.1.254"

and net.wlan0 is in the default runlevel. dhcpcd is not.

If you remove the config_ and routes_ lines, I have a static setup, dhcpcd will be used to set up the interface by default.
You may use
Code:
config_wlan0="dhcpcd"
if you wish.
_________________
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
JustAnother
Apprentice
Apprentice


Joined: 23 Sep 2016
Posts: 184

PostPosted: Fri Jan 24, 2020 2:26 am    Post subject: Reply with quote

I too had the "can't load regulatory.db" problem with (via lspci)

Code:
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8191SEvB Wireless LAN Controller (rev 10)


The kernel switches for the REGDB were already set. The realtek 8192 driver was set to Module. But I had the regulatory.db problem.

Then I noticed that the cfg80211 driver was built in, and gave the dmesg error before the root fs was mounted. So I changed

Code:
CONFIG_CFG80211 to M,


and the dmesg error went away.

This is counterintuitive because one would think that if the wifi hardware is an inseparable part of the computer then it makes sense to build that driver into the kernel. But this idea seems to cause a lot of problems. Is there a way to do this without constantly chasing down files to stick in some initramfs file?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Fri Jan 24, 2020 4:11 pm    Post subject: Reply with quote

CFG80211 isn't hardware but it works the same as any other driver that requires firmware files - they have to be present at load time. Put regulatory.db and regulatory.db.p7s in CONFIG_EXTRA_FIRMWARE.
Back to top
View user's profile Send private message
JustAnother
Apprentice
Apprentice


Joined: 23 Sep 2016
Posts: 184

PostPosted: Sat Jan 25, 2020 3:45 am    Post subject: Reply with quote

I tried to drill down a bit into this subject, and find the firmware files inside the kernel, after the CONFIG_EXTRA_FIRMWARE additions.

The kernel docs in /usr/src don't say much, but this does:

[url]https://wiki.tizen.org/Usage_and_Mechanism_of_kernel_function_"request_firmware()"[/url]

I tried this (to toss out the decompress part):

Code:
od -A d -t x1 /boot/vmlinuz | grep '1f 8b 08 00'
0017120 48 8d 83 30 d4 81 00 ff e0 1f 8b 08 00 00 00 00


-> The magic number is at 17129

Code:
dd if=/boot/vmlinuz bs=1 skip=17129 | zcat > ./vmlinux

objdump -f vmlinux                                                 
vmlinux:     file format elf64-x86-64
architecture: i386:x86-64, flags 0x00000102:
EXEC_P, D_PAGED
start address 0x0000000001000000

objdump -h  vmlinux
  5 .builtin_fw   00000078  ffffffff8234bee0  000000000234bee0  0154bee0  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA


But this is a dead end after this point, because the symbols somehow got thrown out of ./vmlinux.

Instead, try this:

Code:
objdump -t -j .rodata /usr/src/linux-4.19.97-gentoo/vmlinux | less
objdump -t -j .builtin_fw /usr/src/linux-4.19.97-gentoo/vmlinux | less


and the symbols mentioned in the link above show up.

By the way, how does one dump the section of the elf file that belongs to a symbol? That should allow us to see the firmware file names and contents.

So this shows how firmware files are tucked away inside the kernel, and gives a fair amount of insight into how driver files are tucked away.

Just out of a general thirst for knowledge, I have a question, which is...

I remember reading -- somewhere -- the following:

-> The kernel always starts up with a trivial initramfs that just contains /dev/console, /dev/null, and little else.

-> If an initramfs is boot-time-specified, it gets mounted on top of trivial initramfs. Later on, the root fs gets mounted over the current initramfs.

-> It is somehow possible to store an initramfs inside the kernel that presumably -- I'm guessing -- mounts between the trivial initramfs and the boot-time-specified initramfs.

Is this the way it really works, and how would one build an initramfs into the kernel, and how would one dump it out of the kernel to verify this?
Back to top
View user's profile Send private message
vijayphadke
n00b
n00b


Joined: 17 Jun 2022
Posts: 3

PostPosted: Fri Jun 17, 2022 7:42 am    Post subject: Thank you, it worked for me. Reply with quote

JustAnother wrote:
I too had the "can't load regulatory.db" problem with (via lspci)

Code:
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8191SEvB Wireless LAN Controller (rev 10)


The kernel switches for the REGDB were already set. The realtek 8192 driver was set to Module. But I had the regulatory.db problem.

Then I noticed that the cfg80211 driver was built in, and gave the dmesg error before the root fs was mounted. So I changed

Code:
CONFIG_CFG80211 to M,


and the dmesg error went away.

This is counterintuitive because one would think that if the wifi hardware is an inseparable part of the computer then it makes sense to build that driver into the kernel. But this idea seems to cause a lot of problems. Is there a way to do this without constantly chasing down files to stick in some initramfs file?


Yes, I had exactly the same issue, and as per your suggestion I set
Code:
CONFIG_CFG80211 to M
and in addition I also set
Code:
 CONFIG_MAC80211 to M
and then wlan interface showed up after restarting NetworkManager and could connect to wifi and internet as well!

Thank you so much!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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