1

I have a strange problem on Toshiba Satellite NB and Ubuntu 12.04 on it. This system is working flawlessly a couple of months now already, but since last week I am getting a strange problem.

I put my NB to sleep/hibernate > Wake up > Wifi/LAN connects to network again > IP is assigned > no internet. After wakeup I can ping only local IPs like the gateway IP 192.168.1.1 or other PCs in my local network, but I can't ping servers like 8.8.8.8 or other public IPs. The only solution is to reboot the system. Afterwards internet works. With the same IP assigned.

One week ago it worked, I am sure. I suspect some latest updates which I did install on wednesday 16.7. I didn't do any dramatic software changes in the recent days. How can I list all the recent updates I have installed? Can I roll back to test the "last working state"?

As for the investigation I have done a bit x-testing with following results:

  1. disabled networking before putting to sleep and enabling after wakeup > same thing
  2. connecting to either a WiFi or LAN cable > same on both
  3. just disabling networking without sleep > enabling networking > same thing
  4. sudo service networking restart > same as No. 3
  5. made custom script in /etc/pm/sleep.d/ with different commands to stop networking on sleep|hibernate and start upon wakeup > same as 3.
  6. sudo modprobe -r iwlwifi > then modprobe iwlwifi > same
  7. boot into windows 7 on 2nd partition > connect to wifi > sleep > wake > internet works
  8. compared ifconfig before and after sleep > same

It is ridiculous, that local lan works. If a networking kernel module would be "dead" i wouldn't ping anything, or I wouldn't connect to a network at all, or not? On Windows I would try to do something like

ipconfig -release / -renew / -flushdns

Is there any similar function in Ubuntu ?

There is definitely something to restart to get it working, because a complete system restart helps, but I wasn't able to identify what. Maybe somebody could help?

I fount another thread on askubuntu with exact the same questions, but nobody answered.. What's weird, it's a Satellite there as well. https://askubuntu.com/questions/454370/12-04-wireless-is-connected-but-is-not-functional-after-suspend

  • I have tried now to completely remove --purge network-manager and deleting the /etc/NetworkManager dir and reinstall again from deb packages... but no help. Something dies at the moment when disconnecting from network. After reconnecting LAN/Wifi I can only reach local network. I have ruled out ROUTER issue by connecting to a Wifi Hotspot on my smartphone, where it looks the same.. – praet0ri4n Jul 23 '14 at 7:37
  • Hi, sorry, I won't :) thanks for info and updating.. – praet0ri4n Jul 25 '14 at 11:26
1

I should feel bad..

After digging into another similar threads I found an advise to try traceroute. This is where I found my problem. After a fresh reboot i did traceroute google.com and I clearly recognized the first IP after my GW as that of my home's ISP (i am abroad now) and I quickly found out, that I am "auto"connected to my VPN, which I have set up a week ago. whatsmyip.org proved it.

As for the fact, that OpenVPN autoconnects every entry found in /etc/openvpn/xyz.conf I was very supprised, because I have configured it via network-manager and the checkbox "Autoconnect" there is UN-CHECKED! But /etc/default/openvpn says different.

# Start only these VPNs automatically via init script.
# Allowed values are "all", "none" or space separated list of
# names of the VPNs. If empty, "all" is assumed.
# The VPN name refers to the VPN configutation file name.
# i.e. "home" would be /etc/openvpn/home.conf
#
#AUTOSTART="all"
#AUTOSTART="none"
#AUTOSTART="home office"

..argh.. There is definitely a possible point of confusion for other Ubuntu users in this config file vs. network-manager setting.

OK. SOLUTION.

uncomment

AUTOSTART="none"

and reboot

I assume that when a system is connected to vpn and put to sleep/hibernate it won't disconnect correctly and reconnect after resume. Instead the connection turns into an dead end. That is what caused "no internet" probably. Now SUSPEND and RESUME > internet works!

0

You can try with this

sudo systemctl restart network-manager.service

If works, you can add the script in

/etc/systemd/system/wifi-resume.service

as

#/etc/systemd/system/wifi-resume.service
#sudo systemctl enable wifi-resume.service
[Unit]
Description=Restart networkmanager at resume
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target

[Service]
Type=oneshot
ExecStart=/bin/systemctl restart network-manager.service

[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target

This works for me after update update ubuntu 16.04 LTS on March 17

  • I don't think it will work on 12.04 though - no systemd ;) maybe you can find a more appropriate place for this answer. – Zanna Mar 19 '17 at 5:33
  • A upstart job would be in order... – George Udosen Mar 19 '17 at 15:11

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.