Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Q: WiFi Disconnects When Lid Is Closed
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 637
Location: San Diego, CA

PostPosted: Wed Apr 29, 2015 4:12 am    Post subject: [Solved] Q: WiFi Disconnects When Lid Is Closed Reply with quote

When I close my laptop's lid, the WiFi disconnects. When I open the lid, WiFi resumes. I'm fairly sure it's just the WiFi (i.e. laptop isn't suspended), because if I do something like the following, the timer keeps going even the lid is closed.
Code:
while :; do date; sleep 1; done

So, how do I prevent the WiFi from going to sleep when the lid is closed?
__
sol


Last edited by solamour on Wed Apr 29, 2015 5:24 am; edited 1 time in total
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2512
Location: Canada

PostPosted: Wed Apr 29, 2015 4:23 am    Post subject: Re: Q: WiFi Disconnects When Lid Is Closed Reply with quote

solamour wrote:
When I close my laptop's lid, the WiFi disconnects. When I open the lid, WiFi resumes. I'm fairly sure it's just the WiFi (i.e. laptop isn't suspended), because if I do something like the following, the timer keeps going even the lid is closed.
Code:
while :; do date; sleep 1; done

So, how do I prevent the WiFi from going to sleep when the lid is closed?
__
sol


Well you need to find out who controls the action on lid closure - probably your desktop environment
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 637
Location: San Diego, CA

PostPosted: Wed Apr 29, 2015 4:41 am    Post subject: Re: Q: WiFi Disconnects When Lid Is Closed Reply with quote

dmpogo wrote:
Well you need to find out who controls the action on lid closure - probably your desktop environment

See, that's what I thought initially, but I'm not using any desktops; it's just console-based, and I noticed the problem even without X running at all.
__
sol
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2574

PostPosted: Wed Apr 29, 2015 5:08 am    Post subject: Reply with quote

Did you check the bios? I don't think any of my 3 laptops ever had any response to their lid closing under Gentoo. It might be a hardware "feature." I wouldn't put it past an engineer to think that any power save=good.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2512
Location: Canada

PostPosted: Wed Apr 29, 2015 5:22 am    Post subject: Re: Q: WiFi Disconnects When Lid Is Closed Reply with quote

solamour wrote:
dmpogo wrote:
Well you need to find out who controls the action on lid closure - probably your desktop environment

See, that's what I thought initially, but I'm not using any desktops; it's just console-based, and I noticed the problem even without X running at all.
__
sol


Im my case I have a custom acpid script that captures lid event and does something that I want. But even if you run acpid, I don't think that default event handler explcitly link lid to depowering radios. So it maybe happening at hardware (or bios) level. Check your bios settings
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 637
Location: San Diego, CA

PostPosted: Wed Apr 29, 2015 5:24 am    Post subject: Reply with quote

It turned out the way laptop's antenna is designed. When the lid is closed, (I think) the WiFi antenna isn't working optimally, so if I'm a little far from the access point, WiFi loses the connection. When I move the laptop close to the access point, WiFi keeps working even with the lid closed. Thanks everyone for taking time to respond.
__
sol
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2512
Location: Canada

PostPosted: Wed Apr 29, 2015 8:18 am    Post subject: Reply with quote

solamour wrote:
It turned out the way laptop's antenna is designed. When the lid is closed, (I think) the WiFi antenna isn't working optimally, so if I'm a little far from the access point, WiFi loses the connection. When I move the laptop close to the access point, WiFi keeps working even with the lid closed. Thanks everyone for taking time to respond.
__
sol


Perhaps antenna is in the lid, and so it is just the geometry of it lyng flat ? What if you put closed laptop veritcally, will result change ?
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2512
Location: Canada

PostPosted: Wed Apr 29, 2015 8:19 am    Post subject: Reply with quote

solamour wrote:
It turned out the way laptop's antenna is designed. When the lid is closed, (I think) the WiFi antenna isn't working optimally, so if I'm a little far from the access point, WiFi loses the connection. When I move the laptop close to the access point, WiFi keeps working even with the lid closed. Thanks everyone for taking time to respond.
__
sol


Also, since your laptop is running, perhaps if you can have wired connection as well, you could ssh into it and see what wireless is doing while lid is closed.
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 637
Location: San Diego, CA

PostPosted: Thu Apr 30, 2015 7:47 am    Post subject: Reply with quote

dmpogo wrote:
Perhaps antenna is in the lid, and so it is just the geometry of it lyng flat ? What if you put closed laptop veritcally, will result change ?

If I'm not right next to the AP and the lid is closed, WiFi is off no matter how I hold the laptop. I was hoping it would make a difference, but it didn't.
__
sol
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 637
Location: San Diego, CA

PostPosted: Thu Apr 30, 2015 7:50 am    Post subject: Reply with quote

dmpogo wrote:
Also, since your laptop is running, perhaps if you can have wired connection as well, you could ssh into it and see what wireless is doing while lid is closed.

When WiFi is up and running, this is the output of ifconfig.
Code:
wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.4  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::d324:d86:6f38:ecb8  prefixlen 64  scopeid 0x20<link>
        ether 70:18:8b:d8:ec:41  txqueuelen 1000  (Ethernet)
        RX packets 488  bytes 45327 (44.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 58  bytes 7690 (7.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

But when I close the lid, WiFi loses the connection. It comes back shortly after I open the lid.
Code:
wlo1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet6 fe80::d324:d86:6f38:ecb8  prefixlen 64  scopeid 0x20<link>
        ether 70:18:8b:d8:ec:41  txqueuelen 1000  (Ethernet)
        RX packets 488  bytes 45327 (44.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 59  bytes 7780 (7.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Let me know if there is any other commands I should run to see what's happening.
__
sol
Back to top
View user's profile Send private message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 203

PostPosted: Fri May 01, 2015 7:09 am    Post subject: Reply with quote

My HP envy 1130us has the same situation, although it seems that no matter how close to the AP I am it shuts off.

I think it has something to do with RF kill switch, since the LED indicating the state of the wireless card changes to the OFF color and when the lid opens changes back after 2-3 seconds.

Happens with kernel 3.2.65 and 3.18.9.
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 637
Location: San Diego, CA

PostPosted: Fri May 01, 2015 7:22 am    Post subject: Reply with quote

As for my case, rfkill shows nothing is blocked when the lid is closed.
Code:

# rfkill list
0: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no

It does feel somewhat strange, because when I *almost* close the lid (and leave just enough gap for my finger to hold the lid), WiFi is up and running. But WiFi goes off the moment I close the lid completely, as if it's waiting for me.
__
sol
Back to top
View user's profile Send private message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 203

PostPosted: Fri May 01, 2015 5:40 pm    Post subject: Reply with quote

I just ran some tests on my laptop and I guess my problem wasn't actually a problem. The wifi keeps on working, it just changes the STATE LED on the wifi button different colors when you open/close the lid which is no big deal.

Have you tried looking at the logs of "iwconfig" while opening/closing the lid?

Maybe it has something to do with power saving of the specific device. ""iwconfig wlan0 power off"
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 637
Location: San Diego, CA

PostPosted: Sat May 02, 2015 12:46 am    Post subject: Reply with quote

Not sure it's relevant, but here is the output. Perhaps I should try different commands (suggestions, please).
Code:
# iwconfig wlo1 power on
Error for wireless request "Set Power Management" (8B2D) :
    GET failed on device wlo1 ; Operation not supported.

__
sol
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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