Wifi keeps asking for password

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
dvxv
Level 1
Level 1
Posts: 6
Joined: Sat Apr 17, 2021 3:20 pm

Wifi keeps asking for password

Post by dvxv »

Everytime I suspend or reboot or switch between networks I have to enter the password again. And also maybe at random times as well.

I've already tried:
-rebooting
-turning off powersave
-going to network configuration, edit the connection, go to security tab and enter the password there (instead of just entering it in the popup when I connect)

Please don't suggest doing anything with the router. I don't have control over it.

inxi -Fxzd

Code: Select all

System:    Kernel: 5.4.0-72-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Xfce 4.14.2 Distro: Linux Mint 20 Ulyana 
           base: Ubuntu 20.04 focal 
Machine:   Type: Laptop System: Dell product: Latitude E5550 v: N/A serial: <filter> 
           Mobo: Dell model: 0JPRM5 v: A00 serial: <filter> UEFI [Legacy]: Dell v: A10 date: 09/01/2015 
Battery:   ID-1: BAT0 charge: 26.7 Wh condition: 26.7/62.0 Wh (43%) model: LGC-LGC4.20 DELL WTG3T status: Full 
CPU:       Topology: Dual Core model: Intel Core i5-5300U bits: 64 type: MT MCP arch: Broadwell rev: 4 L2 cache: 3072 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 18356 
           Speed: 2295 MHz min/max: 500/2900 MHz Core speeds (MHz): 1: 2295 2: 2295 3: 2295 4: 2295 
Graphics:  Device-1: Intel HD Graphics 5500 vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 
           Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa resolution: 1600x900~60Hz 
           OpenGL: renderer: Mesa Intel HD Graphics 5500 (BDW GT2) v: 4.6 Mesa 20.0.8 direct render: Yes 
Audio:     Device-1: Intel Broadwell-U Audio vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:03.0 
           Device-2: Intel Wildcat Point-LP High Definition Audio vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
           Sound Server: ALSA v: k5.4.0-72-generic 
Network:   Device-1: Intel Ethernet I218-LM vendor: Dell driver: e1000e v: 3.2.6-k port: f080 bus ID: 00:19.0 
           IF: eno1 state: down mac: <filter> 
           Device-2: Intel Wireless 7265 driver: iwlwifi v: kernel port: f040 bus ID: 02:00.0 
           IF: wlp2s0 state: up mac: <filter> 
           IF-ID-1: wg-mullvad state: unknown speed: N/A duplex: N/A mac: N/A 
Drives:    Local Storage: total: 238.47 GiB used: 340.99 GiB (143.0%) 
           ID-1: /dev/sda vendor: SanDisk model: X300 2.5 7MM 256GB size: 238.47 GiB 
           Message: No Optical or Floppy data was found. 
Partition: ID-1: / size: 231.54 GiB used: 170.35 GiB (73.6%) fs: ext4 dev: /dev/dm-1 
           ID-2: /boot size: 703.5 MiB used: 302.8 MiB (43.0%) fs: ext4 dev: /dev/sda5 
           ID-3: swap-1 size: 976.0 MiB used: 0 KiB (0.0%) fs: swap dev: /dev/dm-2 
Sensors:   System Temperatures: cpu: 56.0 C mobo: 46.0 C sodimm: 34.0 C 
           Fan Speeds (RPM): cpu: 0 
Info:      Processes: 246 Uptime: 15m Memory: 7.67 GiB used: 2.98 GiB (38.9%) Init: systemd runlevel: 5 Compilers: gcc: 9.3.0 
           Shell: bash v: 5.0.17 inxi: 3.0.38 
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
JoeFootball
Level 13
Level 13
Posts: 4673
Joined: Tue Nov 24, 2009 1:52 pm
Location: /home/usa/mn/minneapolis/joe

Re: Wifi keeps asking for password

Post by JoeFootball »

dvxv wrote: Please don't suggest doing anything with the router. I don't have control over it.
Unfortunately, that was going to be my suggestion, as it sounds like the DHCP lease expiration for the IPs are set for a short time period, and/or perhaps set to expire when there's no traffic for X minutes.
dvxv
Level 1
Level 1
Posts: 6
Joined: Sat Apr 17, 2021 3:20 pm

Re: Wifi keeps asking for password

Post by dvxv »

JoeFootball wrote: Sat Apr 17, 2021 5:56 pm
dvxv wrote: Please don't suggest doing anything with the router. I don't have control over it.
Unfortunately, that was going to be my suggestion, as it sounds like the DHCP lease expiration for the IPs are set for a short time period, and/or perhaps set to expire when there's no traffic for X minutes.
But it asks for the password every time I suspend and then log in. If I suspend, log in, enter the password and then immediately (within a few seconds) suspend and log in again, it will ask for the password yet again. So it doesn't seem to be based on a time limit.

Also I've connected to a bunch of different networks and this always seem to happen.
User avatar
JoeFootball
Level 13
Level 13
Posts: 4673
Joined: Tue Nov 24, 2009 1:52 pm
Location: /home/usa/mn/minneapolis/joe

Re: Wifi keeps asking for password

Post by JoeFootball »

dvxv wrote: But it asks for the password every time I suspend and then log in. If I suspend, log in, enter the password and then immediately (within a few seconds) suspend and log in again, it will ask for the password yet again. So it doesn't seem to be based on a time limit.
Then perhaps the router is configured to expire the IP lease when the device is disconnected?

Does this behavior exhibit the same on other routers as well?
User avatar
hglee
Level 6
Level 6
Posts: 1422
Joined: Fri Jun 22, 2018 4:31 pm

Re: Wifi keeps asking for password

Post by hglee »

dvxv wrote: Sat Apr 17, 2021 3:29 pm Everytime I suspend or reboot or switch between networks I have to enter the password again. And also maybe at random times as well.

Even while you're logged in, NetworkManager periodically scans for new Access Points, which is when it may lose its connection to your AP.

You could try configuring NetworkManager to lock onto the IP address of your AP (wifi router), rather than scanning needlessly.

Follow these steps in my other post. You need to be connected to the wifi router to set the BSSID in Step #3.


Linux Mint 21 Vanessa, MATE 1.26.0, kernel 5.15.0*, Dell 2-in-1
AMD Ryzen 7 5825U / Barcelo iGPU - 14" WUXGA Touchscreen
MediaTek MT7921 WiFi-6 BT-5.2; 32GB DDR4@3200MHz; XPG 2TB-NVMe
dvxv
Level 1
Level 1
Posts: 6
Joined: Sat Apr 17, 2021 3:20 pm

Re: Wifi keeps asking for password

Post by dvxv »

JoeFootball wrote: Sat Apr 17, 2021 6:54 pm
dvxv wrote: But it asks for the password every time I suspend and then log in. If I suspend, log in, enter the password and then immediately (within a few seconds) suspend and log in again, it will ask for the password yet again. So it doesn't seem to be based on a time limit.
Then perhaps the router is configured to expire the IP lease when the device is disconnected?

Does this behavior exhibit the same on other routers as well?
I think so. I didn't test it systematically with the other routers, but I do remember having to type the password a lot.

I don't understand though. I've never had this problem on my android phone or on a windows computer. Why can't it work the same way on linux?
dvxv
Level 1
Level 1
Posts: 6
Joined: Sat Apr 17, 2021 3:20 pm

Re: Wifi keeps asking for password

Post by dvxv »

hglee wrote: Sat Apr 17, 2021 6:59 pm
dvxv wrote: Sat Apr 17, 2021 3:29 pm Everytime I suspend or reboot or switch between networks I have to enter the password again. And also maybe at random times as well.

Even while you're logged in, NetworkManager periodically scans for new Access Points, which is when it may lose its connection to your AP.

You could try configuring NetworkManager to lock onto the IP address of your AP (wifi router), rather than scanning needlessly.

Follow these steps in my other post. You need to be connected to the wifi router to set the BSSID in Step #3.


I will look into this later. I have to travel a lot though (i.e. connect to different routers). So I'm not sure this is a good solution if I have to go through that process each time I connect to a different router.
User avatar
JoeFootball
Level 13
Level 13
Posts: 4673
Joined: Tue Nov 24, 2009 1:52 pm
Location: /home/usa/mn/minneapolis/joe

Re: Wifi keeps asking for password

Post by JoeFootball »

dvxv wrote: I've never had this problem on my android phone or on a windows computer.
If those devices are indeed disconnecting and reconnecting without prompt for password, then that is evidence towards disproving my hypothesis. :?
sleeper12
Level 21
Level 21
Posts: 14593
Joined: Thu May 25, 2017 3:22 pm

Re: Wifi keeps asking for password

Post by sleeper12 »

Are you sure power management is off? Check:

Code: Select all

 iwconfig 
If it's On, do:

Code: Select all

 sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf 
Reboot
dvxv
Level 1
Level 1
Posts: 6
Joined: Sat Apr 17, 2021 3:20 pm

Re: Wifi keeps asking for password

Post by dvxv »

sleeper12 wrote: Sun Apr 18, 2021 9:26 pm Are you sure power management is off? Check:

Code: Select all

 iwconfig 
If it's On, do:

Code: Select all

 sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf 
Reboot
It is off.

Code: Select all

lo        no wireless extensions.

eno1      no wireless extensions.

wlp2s0    IEEE 802.11  ESSID:"xxxxxxxxxx"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: xxxxxx
          Bit Rate=86.7 Mb/s   Tx-Power=22 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=38/70  Signal level=-72 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:45   Missed beacon:0
sleeper12
Level 21
Level 21
Posts: 14593
Joined: Thu May 25, 2017 3:22 pm

Re: Wifi keeps asking for password

Post by sleeper12 »

dvxv
Level 1
Level 1
Posts: 6
Joined: Sat Apr 17, 2021 3:20 pm

Re: Wifi keeps asking for password

Post by dvxv »

sleeper12 wrote: Mon Apr 19, 2021 12:17 am Try Disable IPv6:
https://easylinuxtipsproject.blogspot.c ... html#ID2.2
Didn't work. However, I have resolved the issue. Here's how:
Go to advanced network configuration -> edit connection -> wireless security tab -> enter password, but importantly click on the users symbol on the right and select "save password for all users". Then save.
Now I can reboot or suspend without having to enter the password again.
sleeper12
Level 21
Level 21
Posts: 14593
Joined: Thu May 25, 2017 3:22 pm

Re: Wifi keeps asking for password

Post by sleeper12 »

Glad you found a solution. :)
Locked

Return to “Networking”