LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-10-2022, 02:40 AM   #1
Matthew Wai
Member
 
Registered: Jul 2019
Location: China
Distribution: UnionTech OS Desktop Home (64-bit)
Posts: 200

Rep: Reputation: Disabled
Internet connection fails after UnionTech OS wakes from suspension.


I am running UnionTech OS (often abbreviated to "UOS"), which is based on Deepin.

I have set up a PPPoE connection, which works fine after UOS has started. However, it does not work after UOS has woken from suspension. It will not work again even after I have run "pon dsl-provider". It will work again only after a reboot. How can I get it to work without a reboot?
A screenshot: https://www.linuxquestions.org/quest...p;d=1654869298
Attached Thumbnails
Click image for larger version

Name:	1 Connecting.png
Views:	13
Size:	25.2 KB
ID:	39039   Click image for larger version

Name:	2 Connection fails after waking up.png
Views:	8
Size:	17.8 KB
ID:	39040  

Last edited by Matthew Wai; 06-10-2022 at 09:15 AM.
 
Old 06-10-2022, 08:15 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,503

Rep: Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375
Can you stop the network as part of the suspension procedure? With dhcp, it's easier as the server assigns an ip and the dhcp program can ask "Am I still good with that IP?"

Stop the network manually first then restart it after. You can get to automating it later.
 
Old 06-10-2022, 08:55 AM   #3
Matthew Wai
Member
 
Registered: Jul 2019
Location: China
Distribution: UnionTech OS Desktop Home (64-bit)
Posts: 200

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
Can you stop the network as part of the suspension procedure?
I just did the following test:
I stopped networking and then suspended UOS. I woke it up and started networking. It was still unable to connect "Wired Connection".
Code:
Matthew_Wai@MatthewWai:~$ sudo /etc/init.d/networking stop
[sudo] password for Matthew_Wai: 
Verification successful
[ ok ] Stopping networking (via systemctl): networking.service.
Matthew_Wai@MatthewWai:~$ /etc/init.d/networking status
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Fri 2022-06-10 21:32:29 CST; 1min 42s ago
     Docs: man:interfaces(5)
  Process: 770 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
  Process: 18457 ExecStop=/sbin/ifdown -a --read-environment --exclude=lo (code=exited, status=0/SUCCESS)
 Main PID: 770 (code=exited, status=0/SUCCESS)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
Matthew_Wai@MatthewWai:~$ sudo /etc/init.d/networking start
[ ok ] Starting networking (via systemctl): networking.service.
Matthew_Wai@MatthewWai:~$ /etc/init.d/networking status
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: active (exited) since Fri 2022-06-10 21:35:43 CST; 18s ago
     Docs: man:interfaces(5)
  Process: 19806 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
 Main PID: 19806 (code=exited, status=0/SUCCESS)
Matthew_Wai@MatthewWai:~$ ifconfig -a
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::ebb8:dcde:c545:31fc  prefixlen 64  scopeid 0x20<link>
        ether e0:d5:5e:cc:65:a3  txqueuelen 1000  (Ethernet)
        RX packets 20155  bytes 5894685 (5.6 MiB)
        RX errors 0  dropped 6  overruns 0  frame 0
        TX packets 46543  bytes 17961096 (17.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 28  base 0xd000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 33344  bytes 2464508 (2.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 33344  bytes 2464508 (2.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Matthew_Wai@MatthewWai:~$
Attached Thumbnails
Click image for larger version

Name:	Unable to connect.png
Views:	7
Size:	78.6 KB
ID:	39043  

Last edited by Matthew Wai; 06-10-2022 at 08:58 AM.
 
Old 06-10-2022, 02:37 PM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,503

Rep: Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375
You'll probably have to go through the palaver of stopping every program, flushing the address & bringing down the interface, etc before a restart.
 
Old 06-10-2022, 11:23 PM   #5
Matthew Wai
Member
 
Registered: Jul 2019
Location: China
Distribution: UnionTech OS Desktop Home (64-bit)
Posts: 200

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
You'll probably have to go through the palaver of stopping every program, flushing the address & bringing down the interface, etc before a restart.
How can I flush the address? What interface do you mean?
 
Old 06-11-2022, 11:20 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,503

Rep: Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375
Quote:
Originally Posted by Matthew Wai View Post
How can I flush the address? What interface do you mean?
This way
Code:
  /sbin/ip address flush dev eth0
and adjust 'eth0' if your network device is different.
 
Old 06-14-2022, 01:29 AM   #7
Matthew Wai
Member
 
Registered: Jul 2019
Location: China
Distribution: UnionTech OS Desktop Home (64-bit)
Posts: 200

Original Poster
Rep: Reputation: Disabled
My PPPoE connection just failed again after suspension.
I opened Terminal and ran the following commands to re-enable the network adapter:
Code:
sudo ip link set enp2s0 down && sudo ip link set enp2s0 up
However, the connection still failed.
Then, I opened Device Manager, manually disabled the network adapter and re-enabled it. Then, the connection worked again.

Quote:
Originally Posted by business_kid View Post
You can get to automating it later.
How can I automate it via commands? What commands can be used instead of "ip link set"?
 
Old 06-14-2022, 06:11 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,503

Rep: Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375
I don't have Union Tech OS. There's a problem with less well known distros. Developers are few, experience is limited, an when it come to something like suspend & restart working on ALL laptops, they can't compete.

Your best bet is to develop the suspend script yourself. In this case shut down the network before suspend, & resume afterwards. Then, when it's working, submit the changes.
 
Old 06-14-2022, 11:38 PM   #9
Matthew Wai
Member
 
Registered: Jul 2019
Location: China
Distribution: UnionTech OS Desktop Home (64-bit)
Posts: 200

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
I don't have Union Tech OS. There's a problem with less well known distros.
I asked the same question on the official forum of UnionTech OS. A member there has provided the following commands, which have solved my problem:
Code:
sudo rmmod -fv r8168 && sudo modprobe -v r8168
"r8168" refers to the kernel module of the Ethernet controller.

The members on the forum there write in Chinese, while I write in English. That is a problem.

I just found that the option "f" can be removed from the above commands. There is no need to force it.

Last edited by Matthew Wai; 06-15-2022 at 12:39 AM.
 
Old 06-15-2022, 06:31 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,503

Rep: Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375Reputation: 2375
So I was fairly close telling you to shut down the network. Removing the module disturbs things a bit more, but it might need that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PC Immediately Wakes Up After Suspend After Replacing Button Battery larrymeditates Linux - Software 10 03-08-2022 11:23 PM
LCD off: during boot/after waking up from inactivity/after suspension geladynata Linux - Laptop and Netbook 2 12-14-2018 01:49 AM
no /dev/sr0 (DVD/CDROM) detected after resume from suspension brobr Slackware 1 03-21-2013 06:57 AM
Function keys only start working after suspension in Linux Mint pableski Linux - Laptop and Netbook 0 10-16-2012 02:26 PM
Resuming from suspension fails- lenovo s10-3 TimmyTurner Linux - Laptop and Netbook 3 06-07-2011 12:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration