Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] net.wlp2s0 has started, but is inactive
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Torpus
Apprentice
Apprentice


Joined: 20 Aug 2023
Posts: 184

PostPosted: Sun Sep 03, 2023 9:54 am    Post subject: Reply with quote

@pietinger

dnsmasq is obsolete now. It won't start until NetworkManager does as it says on boot.

@NeddySeagoon

When I changed wpa_supplicant to NetworkManager (I had them both so I removed one), I assumed that NetworkManager will find SSIDs for me and choose whichever WiFi to connect to unlike wpa_supplicant that's manually configured.

It sounds also like NetworkManager has changed the name from wlp2s0 to wlan0 even when I attempted preventing it to do so:

Code:
# nmcli dev status
DEVICE  TYPE      STATE                   CONNECTION
lo      loopback  connected (externally)  lo
wlan0   wifi      unavailable             --


There is also this (on hardware Gentoo):

Code:
# nmcli radio wifi
enabled
# nmcli dev wifi list
IN-USE  BSSID  SSID  MODE  CHAN  RATE  SIGNAL  BARS  SECURITY # No networks shown here!!
# nmcli con show
NAME  UUID                          TYPE      DEVICE
lo    (some looooong string lol)    loopback  lo


Also whenever I turn on Gentoo it adds this text next to login:

Code:
genbox login: ModemManager[1859]: <info>  [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:02.4/0000:02:00.0': not supported by any plugin


Here's my kernel config anyways (and yes, I update GRUB and sometimes even linux-kernel everytime). Note that I had to change some things in crypto configuration in a text editor since NetworkManager complained about it while it's installing, these configs had no path in make menuconfig and that's why I did that on a text editor.

(It sounds like it'll take over a month to finally have Gentoo with everything working with it, without even trying to start cusomizing it as I wish, but I'm still learning! :wink: I might probably need to stay with another stable OS to do my chores instead of just a Live USB)
_________________
Illegitimi non carborundum.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5906
Location: Bavaria

PostPosted: Sun Sep 03, 2023 10:35 am    Post subject: Reply with quote

Torpus wrote:
[...] Note that I had to change some things in crypto configuration in a text editor since NetworkManager complained about it while it's installing, these configs had no path in make menuconfig and that's why I did that on a text editor.


Torpus,

as I already told you: NEVER edit your .config ! If you dont find something search with / and use "z" for hidden options. I have also already given you the link to this article:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Never_edit_.config

Unless you dont know which modules DEPENDS on other modules you will always miss something. For example, you miss this:
Code:
# CONFIG_CRYPTO_USER is not set

It is here:
Code:
-*- Cryptographic API  --->
    Crypto core or helper  --->
        -*- Cryptographic algorithm manager
        [*] Userspace cryptographic algorithm configuration

... AND ... it SELECTS (== enables) - automatically - CRYPTO_MANAGER [=y] ... LOOK into the <Help> of this option.

There exists options you cannot enable directly - ONLY by enabling other options.


Now, yes I know, the descritption in our wiki for iwd is outdated ... because kernel developer made submenus into Cryptographic API ---> (there was no submenu in older kernels) ... please go back to your latest working kernel .config and throw away this.

@Neddy: Please go on - this was only short wink as kernel man.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Sep 03, 2023 10:53 am    Post subject: Reply with quote

Torpus,

Your dmesg has no sign of any wlan entries at all. Bring it up in your browser and Ctl-F wlan.
Now try it on an older dmesg.

Whatever your chose to manage networking stick with it. Swapping or having multiple 'managers' in use is worse than none at all.

The wifi process startup is the same for them all ...

The kernel does its thing, loads the driver and firmware as required then advertises the interface as wlan0 (if its the first one).
udev sees wlan0 being created and renames it unless you tell it not to.

At thin point, the interface exists and can be started. That's a two step process.
First, the radio link must be established.
That requires getting authenticated and associated with an access point.
Once that step is complete, the wifi behaves tike a wired interface, so the normal wired interface tools work to complete the setup.

You had been getting authenticated and associated, then you rebuilt your kernel and wlan0 vanished. That's a step backwards.

Looking at your kernel
Code:
CONFIG_WEXT_CORE=y
CONFIG_CFG80211=m
CONFIG_MAC80211=m
Thats ll the Wifi stacks

Code:
# Debugging Options
#
# CONFIG_IWLWIFI_DEBUG is not set
CONFIG_IWLWIFI_DEVICE_TRACING=y

That DEVICE_TRACING under Debugging Options is scary. The help says
Code:
  ┌─────────────────────────────── iwlwifi device access tracing ────────────────────────────────┐
  │ CONFIG_IWLWIFI_DEVICE_TRACING:                                                               │ 
  │                                                                                              │ 
  │ Say Y here to trace all commands, including TX frames and IO                                 │ 
  │ accesses, sent to the device. If you say yes, iwlwifi will                                   │ 
  │ register with the ftrace framework for event tracing and dump                                │ 
  │ all this information to the ringbuffer, you may need to                                      │ 
  │ increase the ringbuffer size. See the ftrace documentation                                   │ 
  │ for more information.                                                                        │ 

Kernel debug options are allowed to interfere with normal device operation. They are intended to help debug the kernel code, when normal device operation is not possible anyway.
That's not here. It should work but its not.
Turn that option off and see if wlan0 reappears. │

Nothing can start your wifi while your kernel cannot show it to user space.
_________________
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
Torpus
Apprentice
Apprentice


Joined: 20 Aug 2023
Posts: 184

PostPosted: Sun Sep 03, 2023 11:56 am    Post subject: Reply with quote

@pietinger

Alright alright I got it. These "features" would be turned on automatically as they are all dependent on CONFIG_CRYPTO_USER. I just turned that on and saw something slightly different when I boot Gentoo up:

Code:
 * Starting NetworkManager ...
Connecting....                        1sModemManager[1868]: <info>  ModemManager (version 1.20.6) starting in system bus...

Connecting.................... 0s [offline]
 * Marking NetworkManager as inactive. It will automatically be marked
 * as started after a network connection has been established.


It continues with the same errors again.

I don't know if the main issue is with udev changing the name from wlp2s0 to wlan0 when I didn't know how to really do it or it's something else missing in the kernel after switching to NetworkManager.

The only reason why I did that was because iwd wikipage mentioned it instead of wpa_supplicant.

@NeddySeagoon

Here's dmesg from the browser OS. I guess Mint still recognizes it as wlp2s0 and not wlan0. Because "wlan0" is ONLY mentioned here:

Code:
[    6.419052] iwlwifi 0000:02:00.0 wlp2s0: renamed from wlan0


dmesg on the Gentoo system neither mentions wlp2s0 nor wlan0. Is it unrecognized?

I did turn off DEVICE_TRACING but I don't see any changes.

Did I mess everything up just as I did with the kernel before at my first time here? Do I have to start installing Gentoo from scratch and re-read my old threads to do it? This is really frustrating. :cry:
_________________
Illegitimi non carborundum.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Sep 03, 2023 1:49 pm    Post subject: Reply with quote

Torpus,

Reinstalling won't fix anything. It will only give you opportunities to make different mistakes.
It will also rob us all of the learning opportunity this problem provides.

Lets sidestep this for now. Make Gentoo work the way you want, then come back to the kernel.
The sidestep is
Code:
emerge sys-kernel/gentoo-kernel-bin


There are no user serviceable parts inside.

I think that the emerge does it all.
You will have several kernel in the boot loader menu. Do pick the right one.

With that under your Gentoo we can fix the wifi setup if needed.
That will fix a lot of your frustration too.

Your own kernel can be a future project ... days, weeks whenever.
We will still be here.

If you have ever used a text editor on the kernel config, just throw it away and start again.
It can produce kernels where everything looks ok but it doesn't work.
Rather like your missing wlan0.
_________________
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
Torpus
Apprentice
Apprentice


Joined: 20 Aug 2023
Posts: 184

PostPosted: Sun Sep 03, 2023 3:02 pm    Post subject: Reply with quote

Hmm... seems like nothing really happened.

I installed the package and updated GRUB. There was a new kernel called gentoo-dist. It gave me the exact same errors as in my original kernel.

Here's the dmesg of it.

I have to give everything for this system to work. :x
_________________
Illegitimi non carborundum.


Last edited by Torpus on Sun Sep 03, 2023 5:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Sep 03, 2023 3:23 pm    Post subject: Reply with quote

Torpus,

That really makes my head hurt.
iwlwifi is there, it appears to start with no errors but the kernel wlan0 interface is never created.
The kernel command line contains net.ifnames=0 which prevents udev renaming the interface. That's OK.

So ... is wlan0 really missing?

What interfaces does
Code:
ifconfig -a

lo: and sit0: can be ignored.
_________________
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
Torpus
Apprentice
Apprentice


Joined: 20 Aug 2023
Posts: 184

PostPosted: Sun Sep 03, 2023 3:40 pm    Post subject: Reply with quote

Sorry for all of this confusion Neddy, it's probably all a naming issue:

I get this on hardware Gentoo:

Code:
wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether <some mac address>  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


On my Linux Mint which is also installed on the same computer, there's a different one:

Code:
wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet (ip address)  netmask 255.255.255.0  broadcast (another ip)
        inet6 (another mac)  prefixlen 64  scopeid 0x20<link>
        ether (same mac displayed on gentoo)  txqueuelen 1000  (Ethernet)
        RX packets 561  bytes 146128 (146.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 649  bytes 129399 (129.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


I believe the main issue here is because udev changed the interface name to wlan0 (within the Gentoo system, any other distro install would recognize it as "wlp2s0" just like how Linux Mint did)
_________________
Illegitimi non carborundum.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5906
Location: Bavaria

PostPosted: Sun Sep 03, 2023 3:48 pm    Post subject: Reply with quote

Torpus wrote:
[...] There was a new kernel called gentoo-defi. [...]

... gentoo-dist ... 8)

Torpus wrote:
[...] It gave me the exact same errors as in my original kernel.

No errors. All is okay - it must be okay because it is our "user" kernel. See below.

Maybe you already know what I am telling you now - then, please do not be offended:

Most people dont like to configure manually a kernel ... because it can be difficult ... in every case it is time consuming ... and it is error prone ;-)

But there is a "little" problem: The Linux kernel MUST have all modules to be able to acces the root partition. These are many modules: For PCI, AHCI (and/or NVMe), GPT partitions and last but not least the filesystem (EXT4, XFS, ...). But the kernel can LOAD these modules only (from disk) AFTER kernel has ACCESS to disk ... So there exists two options:

1. You configure all these necessary modules static <*> into your kernel, OR
2. Kernel has an initramfs, which does all jobs and actions to enable the kernel accessing its root partition. This means: Every possible kernel module is here integrated as <M>odul and initramfs checks the hardware and loads EVERY necessary module.

EVERY bootable LinuxLiveCD - and of course also our GentooLiveCD / GentooMinimalCD - MUST use option 2 ... and also our dist-kernel uses option 2. A kernel with such an initramfs has (almost) EVERY module "in it" and therefore is able to do every job (e.g. ALL crypto modules are available). With such a kernel you have to change something only in very rare cases ... but it is not a "slim" kernel ... and it is not a hardened kernel ...


Back to your dmesg - This is all fine ...
Code:
[    5.374094] Asymmetric key parser 'pkcs8' registered
[    5.374641] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    5.386673] Loading firmware: regulatory.db
[    5.387736] Loading firmware: regulatory.db.p7s
[    5.468579] Intel(R) Wireless WiFi driver for Linux
[    5.468688] iwlwifi 0000:02:00.0: enabling device (0000 -> 0002)
[    5.470854] iwlwifi 0000:02:00.0: Detected crf-id 0xbadcafe, cnv-id 0x10 wfpm id 0x80000000
[    5.470875] iwlwifi 0000:02:00.0: PCI dev 24fd/0110, rev=0x230, rfid=0xd55555d5
[    5.473805] Loading firmware: iwlwifi-8265-36.ucode
[    5.491946] iwlwifi 0000:02:00.0: loaded firmware version 36.ca7b901d.0 8265-36.ucode op_mode iwlmvm
[    6.541537] iwlwifi 0000:02:00.0: Detected Intel(R) Dual Band Wireless AC 8265, REV=0x230
[    6.600581] iwlwifi 0000:02:00.0: base HW address: b8:9a:2a:33:98:89, OTP minor version: 0x0
[   11.080552] iwlwifi 0000:02:00.0: Registered PHC clock: iwlwifi-PTP, with index: 0

... There is only ONE "small" difference ...
Code:
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-6.4.12-gentoo-dist root=UUID=487a6fe3-e0f7-43b4-9bbb-b5dc47b981c0 ro net.ifnames=0 amd-pstate=passive acpi_osi=Linux

In the default kernel command line for a dist-kernel there is an additional paramter: "net.ifnames=0". This parm prevents renaming of all interfaces ... ;-)

Just do a
Code:
ip a

(later do also an "ip r" and "ip n" ... and look into manpage of ip)

Now - Back to Neddy ;-)


Sidenote - Hint:
Save this dmesg, because you can use it for your manual kernel configuration. You will see some modules you might have forgot to enable ... Exampole:
Code:
[    5.375625] asus_wmi: ASUS WMI generic driver loaded
[    5.377122] asus_wmi: Initialization: 0x1
[    5.377622] AMD-Vi: AMD IOMMUv2 loaded and initialized
[    5.377656] asus_wmi: BIOS WMI version: 9.0
[    5.377747] asus_wmi: SFUN value: 0x21
[    5.377759] asus-nb-wmi asus-nb-wmi: Detected ATK, not ASUSWMI, use DSTS
[    5.377768] asus-nb-wmi asus-nb-wmi: Detected ATK, enable event queue
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5906
Location: Bavaria

PostPosted: Sun Sep 03, 2023 3:55 pm    Post subject: Reply with quote

P.S.: Haha, Neddy was faster ... :lol:
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Sep 03, 2023 3:55 pm    Post subject: Reply with quote

Torpus

wlan0: :)))

Its there but not in dmesg. Ewww.

Choose your poison for network management. Nothing tried to start wlan0: so it didn't start.
That's expected, its a design feature.

I'm not a NetworkManager guy but point it at wlan0 and see what happens.

As I say, I do it the old way with netifrc and a net file and a hand crafted wpa_supplicant.conf file.
As the Royal Navy say ... "it was good enough for Nelson".

Now you are looking in dmesg for associated and authenticated messages.
_________________
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
Torpus
Apprentice
Apprentice


Joined: 20 Aug 2023
Posts: 184

PostPosted: Sun Sep 03, 2023 6:18 pm    Post subject: Reply with quote

@pietinger

To be honest I had (and still have) no idea what are the differences between <*> and a <M>odule, I just choosed one and wanted to configure the kernel manually instead of genkernel (it's considered cheating by some) so that I can gain more control and remove everything I don't need. When I choosed <M>odules I had to add an initramfs to make the kernel boot up, yet it's been a while since I updated it since I believe that this thing can be made just once and keep working regardless of how the kernel changes.

I added the parameter "net.ifnames=0". specifically to stop udev from changing the interface name from wlp2s0 to wlan0, but foolishly it did that already because NetworkManager, iwd and dnsmasq qere installed before GRUB got updated. :lol:

Code:
ip a


Gave me this:

Code:
2: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
       link/ether (mac address) brd ff:ff:ff:ff:ff:ff


While

Code:
ip r && ip n


printed nothing.

@NeddySeagoon

I really didn't care about either of them but just make Gentoo work in any way possible. What I have right now is *almost* entirely different from what I desire. I did wanted dhcpcd, wpa_supplicant and netifrc as they are more minimal (and there were other things like switching from GRUB to Das U-Boot and repartitioning the disk, hell even make Gentoo BSD-based). The only reason why I removed these is for iwd (specifically designed for my Intel interface for "optimization" but it made things worse (the wiki had no netifrc guide for iwd). Even when Gentoo is literally the solution to every computer problem, the purpose of this installation was mainly to educate myself a little more.

I feel like I'd rather play around Gentoo in a VM/or rather creating a 10GB partition to install it on hardware) while having another out-of-the-box system temporarily and lurk for what I'll want and what I won't instead of blindly following some guides to result me in a system I'm not comfy with much. Expect more threads from me after lurking a little while. :lol:

Thank you guys for all the help, but I still have to understand Gentoo a little more to finally build my "dream OS". 8)
_________________
Illegitimi non carborundum.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Sep 03, 2023 6:50 pm    Post subject: Reply with quote

Torpus,

Configuring a kernel option as <*> means to include the code in the kernel binary that will be loaded by the boot loader.
If the same option is configured as <M> the code is stored in /lib/modules/ and can be loaded and unloaded as required.

/lib/modules is on the root filesystem, so cannot be read until root is mounted.
Its a verybadthing to need to read /lib/modules to load a module to mount the root filesystem to be able read /lib/modules.
We have all done it, several times :)
If you need a kernel module to mount root, it can go in the initrd. To reduce the initrd to user space tools only, it must not contain any kernel modules.
In turn, that means the kernel code to be able to mount root must be configured as <*>, so that its all in the kernel binary.

Back to Wifi

Make up your mind if you will use net.ifnames=0 or not. It will affect the names you use later. It makes no functional difference.

ip is a replacement for some of the older ethernet tools. I tend to use the old tools for IPv4 and the new tools for IPv6.
The new tools make IPv6 easier but both work.

If you want dhcpcd, wpa_supplicant and netifrc, install them now and we will make it work like that.
As long as NetworkManager is not started, it can stay installed but remove it if you like.

iwd was championed by Intel but its a general purpose tool. Its not Intel only.

Post back with your decisions. They affect what comes next.
No chopping and changing after your next post please.
_________________
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
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5906
Location: Bavaria

PostPosted: Sun Sep 03, 2023 8:11 pm    Post subject: Reply with quote

Torpus wrote:
I did wanted dhcpcd, wpa_supplicant and netifrc as they are more minimal [...] The only reason why I removed these is for iwd [...] the wiki had no netifrc guide for iwd


Torpus,

I was surprised that you changed from netifrc to networkmanager (I have not recommended this) ... and I would have preferred you to stay on netifrc (I like netifrc and have it too). I have recommended the iwd over the wpa_supplicant because in my opinion it is much easier (and MORE minimal) ... no extra dhcpcd is needed if USE-flag "standalone" is enabled for the package "iwd". Together with netifrc it's only easier ... because it's explained in our wiki after all:
https://wiki.gentoo.org/wiki/Iwd#Netifrc

With this solution you will need only netifrc (is installed by default) ... and iwd ... and nothing else ... ;-)
Back to top
View user's profile Send private message
Torpus
Apprentice
Apprentice


Joined: 20 Aug 2023
Posts: 184

PostPosted: Sun Sep 03, 2023 10:57 pm    Post subject: Reply with quote

@NeddySeagoon

I just installed all these three and reconfigured them again, yet Gentoo didn't recognize the wlp2s0 and said it doesn't exist. Probably because of the naming issue udev has caused when it changed it to wlan0.

When I tried to turn on "net.wlan0" it said that the service is not found (on Gentoo hardware)

Regarding reinstalling Gentoo again because of stupid reasons like putting more lightweight GRUB or whatever, you're right about that. It doesn't make sense to cause more potential issues just to save up a few hundred kilobytes AND wait for hours to compile everything once again. :lol: But really, maybe my WiFi configuration got messed up, especially when Gentoo calls my interface by wlan0 instead of wlp2s0.

Here's the new dmesg btw.

@pietinger

I was just scrolling on the wiki and chose randomly one (the bloated one) and then deleted the other :lol: I didn't even remember seeing netifrc there but it is!

And yep, I had the standalone USE flag anebled too.

Wait, do you mean that dhcpcd and wpa_supplicant are "useless" if netifrc and iwd are used??
_________________
Illegitimi non carborundum.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5906
Location: Bavaria

PostPosted: Mon Sep 04, 2023 12:08 am    Post subject: Reply with quote

Torpus wrote:
Wait, do you mean that dhcpcd and wpa_supplicant are "useless" if netifrc and iwd are used??

Yes ... ! 8)

More exactly: You can use only iwd OR wpa_supplicant ... one of them needs additionally dhcpcd ... it is not iwd ... :lol:

Remember the link I have given you:
https://wiki.gentoo.org/wiki/Network_management#Comparison_of_provided_functionality

Here you will see, you will need 1. One application for Network authentication: wpa_supplicant OR iwd

AND

2. One application for Network management: netifrc OR NetworkManager

AND

3. SOMEONE must ask for an IP address, if not configured static == senseless when using WLAN because of using WLAN in different locations, with different router addresses. So, SOMEONE must ask with DHCProtocol for an IP address. iwd can do it by itself - netifrc and networkmanager use external "dhcpcd" (dhcp client daemon)


P.S.: iwd likes the name "wlan0" ... so, dont change (delete) the kernel command line parameter "net.ifnames..."
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5906
Location: Bavaria

PostPosted: Mon Sep 04, 2023 12:52 am    Post subject: Reply with quote

P.P.S.: Here is something wrong:
Code:
[   10.627071] warning: `grep' uses wireless extensions which will stop working for Wi-Fi 7 hardware; use nl80211

(I suspect this comes from wpa-supplicant; maybe a typo in the configuration file ? I don't know about that though.)
Back to top
View user's profile Send private message
Torpus
Apprentice
Apprentice


Joined: 20 Aug 2023
Posts: 184

PostPosted: Mon Sep 04, 2023 5:21 am    Post subject: Reply with quote

Well, I did removed NetworkManager, wpa_supplicant and dhcpcd wanting only netifrc and iwd to work. But when I try to start net.wlan0 it just automatically start wpa_supplicant when I want iwd instead and wlan0 gives by itself these couple errors:

Code:
~ # rc-service net.wlan0 start
 * Bringing up interface wlan0
 *   Caching network module dependencies
 *   Running preup ...
 *   Starting wpa_supplicant on wlan0 ...
Successfully initialized wpa_supplicant
wlan0: Unsupported driver 'nl80211'
wlan0: CRTL-EVENT-DSCP-POLICY clear_all
 *   start-stop-daemon: failed to start '/usr/sbin/wpa_supplicant'
 * ERROR: net.wlan0 failed to start


That would definitely be some kernel issue again, right? Remember it booted from gentoo-dist kernel, not the one I made.

I know I messed things up a little more but we're pretty close to solve this.
_________________
Illegitimi non carborundum.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Sep 04, 2023 9:43 am    Post subject: Reply with quote

Torpus,

Code:
wlan0: Unsupported driver 'nl80211'
wlan0: CRTL-EVENT-DSCP-POLICY clear_all
 *   start-stop-daemon: failed to start '/usr/sbin/wpa_supplicant'
looks like a configuration error.
What do you have in your /etc/conf.d/net file?

What do you have in wpa_supplicant.conf?
Redact your passphrase if you like. The SSID is broadcast, so its not a sekrit.

It looks like your software is complete but dhcpcd won't be called until the radio link in up.

What is in dmesg after
Code:
rc-service net.wlan0 start
fails?
That may provide some hints.

What does
Code:
emerge -pv net-wireless/wpa_supplicant
tell?
I'm fairly sure that nl80211 is not a USE flag, so its not an optional extra.
_________________
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
Torpus
Apprentice
Apprentice


Joined: 20 Aug 2023
Posts: 184

PostPosted: Mon Sep 04, 2023 10:47 am    Post subject: Reply with quote

Here are:

/etc/conf.d/net
/etc/wpa_supplicant/wpa_supplicant.conf
dmesg (after trying to start net.wlan0)

Yeah, nl80211 wasn't set as a USE flag. I just set it up on make.conf.

That's what it says after changing the USE flag (on chroot of course)
Code:
emerge -pv net-wireless/wpa_supplicant
setlocale: unsupported locale setting
setlocale: unsupported locale setting

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 2.64 s.

[ebuild   R    ] net-wireless/wpa_supplicant-2.10-r3::gentoo  USE="ap dbus eap-sim eapol-test fasteap fils hs2-0 mbo mesh privsep readline tkip -broadcom-sta -macsec -p2p (-ps3) -qt5 (-selinux) -smartcard -tdls -uncommon-eap-types -wep (-wimax) -wps" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

 * IMPORTANT: 17 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

_________________
Illegitimi non carborundum.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Sep 04, 2023 11:53 am    Post subject: Reply with quote

Moved from Dustbin to Networking & Security.
I must be tired, I clicked the dustbin button instead of reply,

Abnormality is restored ... I think.
_________________
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
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Sep 04, 2023 12:29 pm    Post subject: Reply with quote

Torpus,

Your /etc/conf.d/net ... are you sure?

Code:
modules_lo="iwd debug"
modules_wlan0="iwd debug"
iwd_wlan0="lo debug"


Why is iwd listed if you want to use wpa_supplicant?
Don't use debug.

Code:
modules="iproute2"

modules_wlan0="wpa_supplicant"   
config_wlan0="dhcp"

Should be enough to bring up wlan0.

Leave all the others things out of it.

For a /etc/wpa_supplicant/wpa_supplicant.conf

Code:
ctrl_interface_group=0
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

###### Security Configuration ######
network={
        priority=50
        key_mgmt=NONE
        mode=0
        ssid="FOSDEM"
}

network={
        priority=50
        key_mgmt=WPA-PSK
        mode=0
        psk="<sekrit">
        ssid="RadioNet24"
}
network={
        priority=100
        key_mgmt=WPA-PSK
        mode=0
        psk="<sekrit>"
        ssid="RadioNet5"
}


That lets me connect to the open WiFi at FOSDEM and both my home wifi networks.

You cannot test this in the chroot, as services cannot be started there. The host provides all the services.

nl80211 is not a valid USE flag.
USE=tkip is a very bad thing. Its insecure. If you actually need it, fix your access point to use WPA2 or even WPA3.
Leave it for now.
USE=ap sets up net-wireless/wpa_supplicant to be able to work as a WiFi Access point. You don't want that. The configurations are quite different and you can only be one or the other at any time.
USE=mesh is probably a bad thing too. Lets keep it simple for now.
USE=eapol-test is not required, unless you know you need it.

Fix your net file, fix your /etc/wpa_supplicant/wpa_supplicant.conf

Turn off USE="ap mesh eapol-test" and rebuild net-wireless/wpa_supplicant. Keep USE=tkip for now as its already there. Its required for the broken WPA crypto but not for WPA2 or WPA3

Your dmesg
Code:
[    9.711270] warning: `iwconfig' uses wireless extensions which will stop working for Wi-Fi 7 hardware; use nl80211
should go away as iwconfig should not be being used.
_________________
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
Torpus
Apprentice
Apprentice


Joined: 20 Aug 2023
Posts: 184

PostPosted: Tue Sep 05, 2023 5:15 am    Post subject: Reply with quote

It's pretty normal for me messing everything up when I'm trying to fix an issue, that's just a part of my learning process.

Yes Neddy, that's my etc/conf.d/net. I wanted only for iwd and netifrc to work, but when I start net.wlan0 wpa_supplicant starts instead when I don't want to.

Yeah, debugs :lol: they're just bloat I forgot about them.

I do know that chroot and hardware are different in testing WiFi. All I was giving you was from me testing on hardware.

USE flags... that's another learning obstacle that I know almost nothing about. But I'll try following your suggestions.

iwconfig should not be there? If it's related to iwlwifi it MUST because that's the module connecting my interface.

If this possibly gave even other errors then it's probably best to start building Gentoo from scratch again while being careful in configuring the kernel and wlp2s0 (or as this faulty Gentoo claims it to be "wlan0") interface, just like how in the last time I messed things up even more when I was trying to fic the screen stuck at GRUB -until I started all over and it finally worked, I might have to reinstall ANOTHER time if I encountered issues with ficing the touchpad or knowing what USE flags do and handling its file collisions, then comes the ricing part and finally get comfy with my Gentoo.

Again, I didn't mean to confuse you. wpa_supplicant starts but I want iwd, I don't know why does it do that. iwd can also play the role of dhcpcd, that's why it is also pointless to exist there.
_________________
Illegitimi non carborundum.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5906
Location: Bavaria

PostPosted: Tue Sep 05, 2023 9:46 am    Post subject: Reply with quote

Torpus wrote:
[...] wpa_supplicant starts but I want iwd, I don't know why does it do that. iwd can also play the role of dhcpcd, that's why it is also pointless to exist there.

Then try to do only what https://wiki.gentoo.org/wiki/Iwd#Netifrc says:
1. This would be your (complete) /etc/conf.d/net (its okay to use "debug" here; ==more informations) =>
Code:
modules_phy0="iwd debug"
modules_wlan0="iwd debug"
iwd_wlan0="phy0 debug"

(in old installation it was neccessary to use additonally: !wpa_supplicant
=>
Code:
modules_phy0="iwd debug"
modules_wlan0="iwd debug !wpa_supplicant"
iwd_wlan0="phy0 debug"

but I dont know if it is still necessary today).
2. If you want use iwd's own DynamicHostConfigurationProtocol do the next chapter: https://wiki.gentoo.org/wiki/Iwd#iwd_native
Dont read the next chapters: "dhcpcd, NetworkManager, ConnMan and systemd-networkd" - because you dont need it :lol:
3. Check if you have only "net.wlan0" in your "rc-update" and no "wpa_supplicant" and no "dhcpcd"
4. Reboot
5. Configure your net for the first time with iwctl: https://wiki.gentoo.org/wiki/Iwd#Iwctl
This all should be sufficient. ;-)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Sep 05, 2023 10:04 am    Post subject: Reply with quote

Torpus,

Doesn't wireless-tools own iwconfig ?

It does here ...
Code:
$ equery f wireless-tools
 * Searching for wireless-tools ...
 * Contents of net-wireless/wireless-tools-30_pre9-r1:
/lib64
/lib64/libiw.so -> libiw.so.30
/lib64/libiw.so.30
/sbin
/sbin/ifrename
/sbin/iwconfig
...
wireless-tools is mostly useless today. It can set up an open, no encryption, network and a WEP, very badly broken encryption, network but not WPA, WPA2 or WPA3.
It does have some easy to use monitoring tools but they are available in other packages too.

Nobody needs net-wireless/wireless-tools any more. I still have it because I've always had 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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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