I have a fresh install of Ubuntu 12.04 32 bit on a Lenovo X220. I've bought this model on purpose as the hardware is known to perform well in 11.10 64 bit (see here) and indeed I did not have any issues so far but the one below.

If I start the laptop or I wake it up from suspend and I am running on battery power, the wifi network does not work.

Oddly enough, I do get the popup saying I connected successfully to my home's wifi, and I get a correct IP address from the DHCP on my home's access point (what I can see from ifconfig -a) but the network is dead, I can't even ping the access point. This is what I see, that is identical to when the network works.

giacecco@giaceccos-x220:~$ ifconfig -a
wlan0     Link encap:Ethernet  HWaddr 8c:70:5a:3e:f1:80  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::8e70:5aff:fe3e:f180/64 Scope:Link
          RX packets:87965 errors:0 dropped:0 overruns:0 frame:0
          TX packets:108083 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:33751259 (33.7 MB)  TX bytes:111481622 (111.4 MB)

giacecco@giaceccos-x220:~$ ping
PING ( 56(84) bytes of data.
--- ping statistics ---
77 packets transmitted, 0 received, 100% packet loss, time 76608ms

To make it work again I have noticed that it is sufficient to disable and enable wireless networking (not networking in general) from the global menu bar.

The issue cannot be reproduced by doing the same when plugged in, or using an ethernet cable.

Following the instructions here I have also amended the laptop's radio settings to be the correct ones (GB in my case).

Below is the output of lshw -C in case it was useful.

giacecco@giaceccos-x220:~$ sudo lshw -C network
[sudo] password for giacecco: 
       description: Wireless interface
       product: Centrino Advanced-N 6205
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: wlan0
       version: 34
       serial: 8c:70:5a:3e:f1:80
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=3.2.0-26-generic-pae firmware= build 42301 ip= latency=0 link=yes multicast=yes wireless=IEEE 802.11abgn
       resources: irq:44 memory:f2400000-f2401fff
  *-network DISABLED

This is incredibly annoying, as I am such a little step to have the perfect Linux laptop.

As a start, can you suggest what exact script is behind the "Enable Networking" menu item, and how its behaviour could change depending when being on battery power?


  • I have realised today that I cannot reproduce the issue away from home, which means that my wireless router, an usually trustworthy Draytek 2850Vn, is part of the problem. Both at a cafe in my home town and using my mobile phone's tethering (Samsung Galaxy S3) wifi works nicely after waking the laptop up from suspend. I am contacting Draytek hoping they could have a few ideas to explore. – giacecco Jul 17 '12 at 5:57
  • More updates. Together with the engineers at Draytek we are looking into syslog. At the moment it looks like it is the kernel disconnecting from the wifi network rather than the other way round. Two lines in the syslog I did not notice before are revealing and appear to say that wpa_supplicant disconnects me for 'reason=3'. – giacecco Jul 21 '12 at 10:18
  • Post rfkill list output – user3113723 May 7 '15 at 2:37

You could also try unloading the driver and then modprobe it back in.

Pasted for posterity (original reference):

Use the following script as /etc/pm/sleep.d/99_fixwifi.sh



        # Stop networking and network-manager
        stop network-manager
        service networking stop

        # Remove and reload the module for the wifi card
        # Change to the wifi driver of your choice.
        # You can probably find it by using
        #    `lspci | grep -i wireless`
        # and it's probably loaded somewhere in `modprobe -l`, 
        # maybe pipe modprobe's output to `grep iw`

        modprobe -r -f iwlwifi
        modprobe iwlwifi

        # Start networking and network-manager again
        service networking start
        start network-manager

case "$1" in
        *) exit $NA
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.