0

when i am stop using the wi-fi connection. wi-fi is automatically disconnecting how to disable this.

verion:Linux 3.19.0-42-generic #48~14.04.1-Ubuntu SMP Fri Dec 18 10:24:49 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

ifconfig results: ifconfig eth0 Link encap:Ethernet HWaddr xxxxxxxxxxxxxxx
UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

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:7731 errors:0 dropped:0 overruns:0 frame:0 TX packets:7731 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:730184 (730.1 KB) TX bytes:730184 (730.1 KB)

wlan0 Link encap:Ethernet HWaddr f0:00:00:00:00:00
inet addr:192.168.2.42 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: xxxxxxxxxxxxxxxxxxxxx Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:97190 errors:0 dropped:0 overruns:0 frame:0 TX packets:89975 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:98994019 (98.9 MB) TX bytes:12565626 (12.5 MB)

  • 2
    Please edit questions with output of 'ifconfig' – DnrDevil Dec 20 '15 at 13:24
1

If I understand you right it's likely because the power management shuts down your WiFi interface. Try the following before it gets disconnected:

In a terminal window, enter the following command to disable power management for wlan0:

sudo iwconfig wlan0 power off

If it helps (and only if it helps) you can make this setting permanent as follows:

  1. With your favorite editor create and edit /etc/pm/power.d/wifi_pwr_off

    sudo gedit /etc/pm/power.d/wifi_pwr_off
    
  2. Add the following two lines on top of the empty file and save it

     #!/bin/sh 
     /sbin/iwconfig wlan0 power off
    
  3. Make the created file executable

    sudo chmod +x /etc/pm/power.d/wifi_pwr_off
    
  4. Restart your computer

For more detailed information about iwconfig and power management you can use the man pages:

man iwconfig

... and scroll down to the explanation of the power parameter.

I hope this helps.

  • This has probably been answered somewhere else but it was the only simple solution that helped me to fix a WLAN issue. As it does no harm it's the first thing to try. You can always delete the created file afterwards to make things acting like before. – Shy Robbiani Dec 20 '15 at 16:36

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.