When I use Ubuntu in my notebook, Wi-Fi is always off-line, and the solution is to look at the option/etc/ppp/under the hood.
PPP is a point-to-Point protocol, and all files related to PPP configuration are placed in this directory
Then sudo vim/etc/ppp/option.
In more than 210 lines where there is such a paragraph
# If This option is given, PPPD would send an LCP echo-request frame to the# peer every n seconds. Normally the peer should respond to the echo-request# by sending an echo-reply. This option can be used with the# lcp-echo-failure option to detect that the peer is no longer connected.lcp-echo-interval 4# If this option is given, PPPD would presume the peer to being dead If n# LCP echo-requests is sent without receiving a VA Lid LCP echo-reply.# If This happens, PPPD would terminate the connection. Use of this# option requires a Non-zero value for the Lcp-echo-interval parameter.# This option can is used to enable PPPD To terminate after the physical# connection have been broken (e.g., the modem has hung up) in# situations where no Hardwar E Modem control lines is available.lcp-echo-failure 30
The following paragraph means that lcp-echo-failure this value is set, our dial-up client PPPD will send a request frame to your peer and wait for him to reply,lcp-echo-failure Set to 30 that is, if PPPD sent 30 request frames, your peer doesn't return, he thinks your link is broken. And the above that Lcp-echo-interval is you each time waiting for a reply, the default is set to 4, if the net is not very strong, it is easy to time out, is considered to be re-connected, so the frequent disconnection is annoying. Now change the wait time to a bit, set to 30, and then it will not be so easy to drop.
# If This option is given, PPPD would send an LCP echo-request frame to the# peer every n seconds. Normally the peer should respond to the echo-request# by sending an echo-reply. This option can be used with the# lcp-echo-failure option to detect that the peer is no longer connected.lcp-echo-interval <span style= "color: #FF0000;" >30</span># If this option is given, PPPD would presume the peer to being dead If n# LCP echo-requests is sent Witho UT receiving a valid LCP echo-reply.# If This happens, PPPD would terminate the connection. Use of this# option requires a Non-zero value for the Lcp-echo-interval parameter.# This option can is used to enable PPPD To terminate after the physical# connection have been broken (e.g., the modem has hung up) in# situations where no Hardwar E Modem control lines is available.lcp-echo-failure 30
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Resolve Wi-Fi connection instability in Ubuntu