Wireless Daemon for Linux
 help / color / mirror / Atom feed
* WiFi interface stuck in 'Powered off' (link down) mode after suspend
@ 2022-04-25 21:58 
  0 siblings, 0 replies; 2+ messages in thread
From:  @ 2022-04-25 21:58 UTC (permalink / raw)
  To: iwd 

[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]

Hi everyone

I am encountering a strange problem with my WiFi not coming back after a
suspend. Specifically, after a suspend-resume cycle, iwd will report,
when issuing a 'station list' in iwctl:

  No devices in Station mode available.

But when issuing a 'device list' it shows up:

  wlan0               7a:e2:f0:31:a5:ae   off        phy0      station   

which is a bit confusing, IMO. Issuing a 'device wlan0 show' gets me:

            Name                wlan0
            Mode                station
            Powered             off
            Address             7a:e2:f0:31:a5:ae
            Adapter             phy0                                           

And issuing a 'device wlan0 set-property Powered on' restores the device
to working order and reconnects.

I went looking in the iwd source code, and it looks like that 'Powered'
in iwd lingo translates to 'link up' in the kernel, right? Indeed,
issuing an 'ip link up' on the wlan device after coming back from
suspend is enough to get me back online.

I'm honestly not really sure if this is a bug in the kernel, or in iwd.
I mean, it seems like iwd should be able to just set 'link up' and
continue on its merry way (and indeed if I restart iwd entirely it will
do this). But am also fairly sure it used to work on previous kernels,
so maybe the kernel behaviour changed? (I have not had a chance to test
this as bisecting is a bit cumbersome on my daily driver laptop; so
figured I'd ask y'all's opinion first).

This happens on a 5.17 kernel with an Intel AX201 device (using the
iwlwifi) driver.

Hoping someone can help me get this fixed, whether that be by fixing iwd
or telling me to go bisect the kernel :)

-Toke

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: WiFi interface stuck in 'Powered off' (link down) mode after suspend
@ 2022-04-28 16:06 Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2022-04-28 16:06 UTC (permalink / raw)
  To: iwd 

[-- Attachment #1: Type: text/plain, Size: 2678 bytes --]

Hi Toke,

On 4/25/22 16:58, Toke Høiland-Jørgensen wrote:
> Hi everyone
> 

This message somehow went into spam, so only seeing this now.

> I am encountering a strange problem with my WiFi not coming back after a
> suspend. Specifically, after a suspend-resume cycle, iwd will report,
> when issuing a 'station list' in iwctl:
> 
>    No devices in Station mode available.
> 
> But when issuing a 'device list' it shows up:
> 
>    wlan0               7a:e2:f0:31:a5:ae   off        phy0      station
> 
> which is a bit confusing, IMO. Issuing a 'device wlan0 show' gets me:

iwctl just shows the available 'Station' interfaces.  iwd removes the station 
interfaces when the device is powered off (there's nothing to show).  'device 
list' shows the Device interfaces which correspond to the actual netdev.  That 
is why you're seeing wlan0 in 'device list' but not in 'station list'

> 
>              Name                wlan0
>              Mode                station
>              Powered             off
>              Address             7a:e2:f0:31:a5:ae
>              Adapter             phy0
> 
> And issuing a 'device wlan0 set-property Powered on' restores the device
> to working order and reconnects.

iwd doesn't do anything on suspend, it isn't even aware of suspend.  This looks 
like a kernel bug to me? Is the driver crashing by any chance?

> 
> I went looking in the iwd source code, and it looks like that 'Powered'
> in iwd lingo translates to 'link up' in the kernel, right? Indeed,
> issuing an 'ip link up' on the wlan device after coming back from
> suspend is enough to get me back online.

Device.Powered means IFF_UP, yes.  But as I said above, this shouldn't be 
necessary if the kernel driver is doing the right thing...

> 
> I'm honestly not really sure if this is a bug in the kernel, or in iwd.
> I mean, it seems like iwd should be able to just set 'link up' and
> continue on its merry way (and indeed if I restart iwd entirely it will
> do this). But am also fairly sure it used to work on previous kernels,
> so maybe the kernel behaviour changed? (I have not had a chance to test
> this as bisecting is a bit cumbersome on my daily driver laptop; so
> figured I'd ask y'all's opinion first).
> 
> This happens on a 5.17 kernel with an Intel AX201 device (using the
> iwlwifi) driver.
> 
> Hoping someone can help me get this fixed, whether that be by fixing iwd
> or telling me to go bisect the kernel :)
> 

There have been no iwd changes in this area in quite some time, so if the kernel 
is the only thing that changed, then I would look there.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-28 16:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-25 21:58 WiFi interface stuck in 'Powered off' (link down) mode after suspend 
  -- strict thread matches above, loose matches on Subject: below --
2022-04-28 16:06 Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox