this post was submitted on 07 Feb 2025
20 points (95.5% liked)

Linux

50370 readers
1309 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Solved: thanks to u/dbkblk@lemmy.world; remember to add these USE flags to wpa_supplicant

net-wireless/wpa_supplicant wps wep ap fasteap eap-sim tkip uncommon-eap-types

I am facing this peculiar issue that i can connect to every WiFi connection except my router, it's a recent gentoo install with no display server, i am using a D-link WiFi USB card

What I have tried:

  • using iw dev (device) scan to list the ssid and try connecting with wpa_supplicant
    • dhcpcd waits for connection then times out (does connect succesfully to my phones hotspot)
  • gave up and spent 3 hours compiling NetworkManager
    • every ssid shows up in nmcli dev wifi list except my router
    • forcing a connection passing bssid shows id not found
    • manually setting the connection using nmcli add also does not work
    • iw dev (device) scan lists my routers ssid along with others
    • nothing is blocked in NetworkManager and I spent hours going back and forth with chatgpt trying to force a connection to no avail
  • tried changing router setting(including changing broadcasting channels verifying, black lists etc)

What i have ruled out

  • its not the dlink wifi card or the laptop, I can connect to my router just fine using nmcli in a live fedora instance on the same laptop

I have tried every conceivable thing and I cant find what the issue is, it's like my router and Gentoo have some bad blood between them

top 21 comments
sorted by: hot top controversial new old
[–] dbkblk@lemmy.world 10 points 2 weeks ago* (last edited 2 weeks ago) (2 children)

Have you checked the flags in wpa_supplicant? Some routers have non-default encryption schemes.

From my notes, use these USE flags as a test: net-wireless/wpa_supplicant wps wep ap fasteap eap-sim tkip uncommon-eap-types

I'm pretty sure this is your problem :)

[–] Artemis_Mystique@lemmy.ml 4 points 2 weeks ago (1 children)

Thank you so much it just worked now!!

[–] dbkblk@lemmy.world 4 points 2 weeks ago

I'm glad that it has fixed your problem. Enjoy :)

[–] Artemis_Mystique@lemmy.ml 2 points 2 weeks ago* (last edited 2 weeks ago)

I added the use flags,

compiled wpa_supplicant again with --newuse,

restarted NM and wpa,

~~and still the same issue :(~~

did a killall wpa_supplicant and now my ssid shows up and i can connect to it :)

[–] inutt@lemm.ee 2 points 2 weeks ago (1 children)

When you say you changed the channel, are you using a channel above 11 (for 2.4ghz)?

I had a WiFi card once that refused to use channels 12 and 13 due to having a built in regulatory database that was incorrect for my region.

[–] Artemis_Mystique@lemmy.ml 3 points 2 weeks ago* (last edited 2 weeks ago)

it auto brodcasts at channel 11, i manually changed it to 1-6 rescanning each time

also i dont think the channel or blacklists are the issue because it showed up and connected on live usb broadcasting at channel 11

i also changed the region from global to my region

[–] NegativeLookBehind@lemmy.world 1 points 2 weeks ago (1 children)

Have you tried these troubleshooting techniques with NetworkManager not running? NM will fuck you up sometimes because it will change things with no indication of what it changes.

[–] Artemis_Mystique@lemmy.ml 1 points 2 weeks ago (1 children)

before I gave up and installed NM i tried it the manual way, (including trouble shooting steps), then i spent some time compiling wireless-tools package and tried with them, same issue, then spent hours compiling NM for some hope(I disabled the relevant background services before trying NM) only for the ssid to not even show up

[–] NegativeLookBehind@lemmy.world 1 points 2 weeks ago (1 children)

Have you tried using Debian instead 😂

[–] Artemis_Mystique@lemmy.ml 1 points 2 weeks ago (1 children)

sunk cost fallacy is a thing and i am falling for it

[–] NegativeLookBehind@lemmy.world 1 points 2 weeks ago* (last edited 2 weeks ago)

Have you used dmesg to see what the interface is doing?

Have you tried reloading the kernel module used by the interface?

Tried using a different kernel module?

Is SELinux enabled?

Run a packet capture to see what connection attempts are being made, if any?

Just spitballing.

[–] eldavi@lemmy.ml 1 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

does your router have logs and are you able to see the authentication requests or connection attempts? (you could also try setting up another ap with the same bssid and settings to see if it also ignores that too).

without that and in your shoes; i would exactly duplicate the configuration and versions of your networking stack in your gentoo configuration; everything from the exact kernel version, to the module & firmware version; and onto the nmcli version and configuration. i would even compile the module along with the kernel if that's what the live fedora was using.

[–] Artemis_Mystique@lemmy.ml 0 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

I have 2 cores with 2 threads, compiling anything again is not an option for me, atleast right now: My router only has system logs unfortunately it doesnt show any logging for connection attempts

[–] eldavi@lemmy.ml 2 points 2 weeks ago (1 children)

it's funny that you're using gentoo and want to avoid recompiling since the last time i used gentoo was on a single core, first generation imac and it literally took me 3 days to compile the kernel along with the drivers that i needed to get the apple/ppc architecture to work correctly

it got so hot that i couldn't even touch it for another day. lol

[–] Artemis_Mystique@lemmy.ml 1 points 2 weeks ago (1 children)

its the 3rd day for me, so as I said i don't want to recompile anything right now

[–] eldavi@lemmy.ml 1 points 2 weeks ago

yes, exhaust all of the the other troubleshooting advice that the others gave you in this post before going down this rabbit hole; i only suggested it because it worked for me the last time i used gentoo, in my example.

[–] just_another_person@lemmy.world 0 points 2 weeks ago (1 children)
  1. What is the exact model or chipset on the card?
  2. Have you confirmed it works on other liveusb distros?
  3. Is your network using WPA3 by chance?
[–] Artemis_Mystique@lemmy.ml 1 points 2 weeks ago (1 children)
  1. DWA-131: RTL8192EU
  2. it also works on my pop-os system
  3. no it was using WPA/WPA2, I changed it to use WPA2 only
[–] just_another_person@lemmy.world 0 points 2 weeks ago (1 children)

Then it sounds like a config or version issue with your networking stack. The driver and hardware is fine, and if that same card works fine on another machine, then your network stack is missing something.

If you really want to keep trying with this distro, get some debug logs for us to look at.

[–] Artemis_Mystique@lemmy.ml 0 points 2 weeks ago (1 children)

it works fine with literally, anyother wifi accesspoint, do you have any tips on waht I should do for the relevant logs to show up? I dont have journalctl but would dmesg work fine?

[–] just_another_person@lemmy.world 1 points 2 weeks ago* (last edited 2 weeks ago)

https://wiki.gnome.org/Projects/NetworkManager/Debugging

Just a simple command to change logging level to debugging should do it. Make sure to change it back though!

Also, make sure you try different USB ports on whatever this machine is. There may be interference depending on where you're plugging this in.