Wifi doesn't work on Ubuntu 14.04 anymore!

I've been struggling with my wifi for a week now. Since we changed router and provider(O2 box 6431), the connection doesn't work on Ubuntu anymore, yet it does work on windows (and also on ubuntu with other connections). The crazy thing is that it sometimes randomly works and then just stop after sleep mode and doesn't recover. One of my last attempts was to install another firmware

sudo apt-get install linux-firmware-nonfree
sudo apt-get purge bcmwl-kernel-source broadcom-sta-common broadcom-sta-source && sudo apt-get install b43-fwcutter firmware-b43-installer

but now it fails connect to the router, while before I was connected but had internet didn't work. I add further information here:

mario@ThinkPadMG:~$ ifconfig
eth0  Link encap:Ethernet  HWaddr 3c:97:0e:66:d5:a9  
      inet addr:192.168.1.26  Bcast:192.168.1.255  Mask:255.255.255.0
      inet6 addr: fe80::3e97:eff:fe66:d5a9/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:2779028 errors:0 dropped:0 overruns:0 frame:0
      TX packets:1396404 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:4100463259 (4.1 GB)  TX bytes:105833025 (105.8 MB)
      Interrupt:20 Memory:f3a00000-f3a20000 

lo    Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:7830 errors:0 dropped:0 overruns:0 frame:0
      TX packets:7830 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:667794 (667.7 KB)  TX bytes:667794 (667.7 KB)

wlan0 Link encap:Ethernet  HWaddr 6c:88:14:f0:6a:28  
      inet6 addr: fe80::6e88:14ff:fef0:6a28/64 Scope:Link
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:50 errors:0 dropped:0 overruns:0 frame:0
      TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:6750 (6.7 KB)  TX bytes:7750 (7.7 KB)

mario@ThinkPadMG:~$ iwconfig
wwan0     no wireless extensions.

eth0      no wireless extensions.

lo        no wireless extensions.

wlan0     IEEE 802.11abgn  ESSID:off/any  
      Mode:Managed  Access Point: Not-Associated   Tx-Power=15 dBm   
      Retry  long limit:7   RTS thr:off   Fragment thr:off
      Power Management:off

mario@ThinkPadMG:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     1      0        0 eth0

mario@ThinkPadMG:~$ nmcli nm
RUNNING         STATE           WIFI-HARDWARE   WIFI       WWAN-HARDWARE   WWAN      
running         connected       enabled         enabled    enabled         enabled

mario@ThinkPadMG:~$ lspci -nn | grep 0280
03:00.0 Network controller [0280]: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] [8086:0085] (rev 34)

Please help!!

[Update] paste.ubuntu.com/9912617 dmesg | grep iwl gives no output

[Update2] I used the command echo "options iwlwifi bt_coex_active=N" | sudo tee -a /etc/modprobe.d/iwlwifi.conf and wifi was ok: I was on Mozilla, watched a video, did stuff and it worked. Then I didn't use my laptop for 10 minutes and now it only shows it's connected to the router, but no actual connection. Using the command again, connection is back.

This is the result of dmesg | grep -e iwl -e wlan0 : http://paste.ubuntu.com/9921077/

Wireless diagnostic script output: http://paste.ubuntu.com/9912617/


I wonder if the router might be wireless n only, if so the next command and a reboot should fix echo "options iwlwifi 11n_disable=8" | sudo tee -a /etc/modprobe.d/iwlwifi.conf

disable IPv6 in network manager by selecting ignore and add the terminal results for dmesg | grep iwl then add another change to the module echo "options iwlwifi bt_coex_active=N" | sudo tee -a /etc/modprobe.d/iwlwifi.conf

Reboot with ethernet cable unplugged


I think your Laptop switches off WI-FI to save power, when its idle.

You can try disabling "Switch off wifi" option in Power Saving Mode, if its a Dell Laptop.