[SOLVED] System sluggish after resume from suspend

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[SOLVED] System sluggish after resume from suspend

Postby MagicD3VIL » Dec 2nd, '20, 00:31

Greetings,
I've recently tried putting my desktop installation to sleep (suspend) via KDE "start" menu the system is really slow after waking up.

When I try to open any application through the taskbar, desktop icon, or "start menu" it takes almost a minute to start the said program. Restarting fixes the issue but then suspending loses its purpose. I've seen someone suggest that turning off and back on swap could help so I've tried checking if this might be a swap issue but my swap partition is empty, so that didn't help.

I've already tried looking for the same issue online but the reason why people always had this problem was that cpupower kept their CPU clock low as it would be still asleep. I have the cpupower service disabled (because it was throwing errors at the startup that it cannot start) and when I check the current CPU clock after resuming from suspend the cpu clock rate is nominal. I'm really out of ideas what can be causing this issue.

Thanks in advance for your replies
Cheers
Last edited by MagicD3VIL on Dec 11th, '20, 22:29, edited 1 time in total.
User avatar
MagicD3VIL
 
Posts: 40
Joined: Jun 2nd, '19, 00:25
Location: Ostrava, Czech Republic

Re: System sluggish after resume from suspend

Postby doktor5000 » Dec 2nd, '20, 18:35

Would be helpful if you could add at least the output of
Code: Select all
free -ltm


Next time your box wakes up from suspend, please start such an affected application via terminal via strace, and post the output here.
As an example for e.g. kwrite - this will write the strace output to kwrite.log
Code: Select all
strace -Ttt -o kwrite.log kwrite

After kwrite has started, simply close it, and then later upload the resulting logfile here.

Apart from that, In general I can't reproduce - usually I also suspend my box, and nothing is slow after waking up again.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16225
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: System sluggish after resume from suspend

Postby MagicD3VIL » Dec 10th, '20, 04:02

Greetings,
sorry for the late response, somehow I completely missed the notification email. Anyway I ran the commands you suggested so here are the outputs.

Code: Select all
magicd3vil@localhost ~> free -ltm
              total        used        free      shared  buff/cache   available
Mem:          24091        8312         527         745       15251       14644
Low:          24091       23564         527
High:             0           0           0
Swap:          8191           0        8191
Total:        32283        8312        8719


Code: Select all
magicd3vil@localhost ~> strace -Ttt -o kwrite.log kwrite
_IceTransSocketUNIXConnect: Cannot connect to non-local host linux.local
_IceTransSocketUNIXConnect: Cannot connect to non-local host linux.local
Qt: Session management error: Could not open network socket


Cheers
Attachments
kwrite.log
(1.45 MiB) Downloaded 8 times
User avatar
MagicD3VIL
 
Posts: 40
Joined: Jun 2nd, '19, 00:25
Location: Ostrava, Czech Republic

Re: System sluggish after resume from suspend

Postby doktor5000 » Dec 10th, '20, 17:52

FWIW, you may want to set a proper hostname instead of linux.local. From what I can see the delays may be due to hostname change during/after suspending.

Apart from that, did you change any VMM or swappiness-related settings? Looks strange that from 24GB RAM only 8GB are used but only 512MB is actually free.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16225
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: System sluggish after resume from suspend

Postby MagicD3VIL » Dec 10th, '20, 18:17

I've set the swap for 8GB manually because as far as I've seen the swap is not being really used anymore because I have enough RAM.

I have no idea why is my hostname set to linux.local instead of localhost. Not only I don't like it but I had a few issues in the past because of it too. I did not set the hostname manually so it must have come in like that with the install. Any tips on how to change it?

Code: Select all
magicd3vil@linux ~> cat /etc/hostname
localhost.localdomain
magicd3vil@linux ~> cat /etc/hosts
127.0.0.1       localhost.localdomain   localhost
::1         localhost
magicd3vil@linux ~>
User avatar
MagicD3VIL
 
Posts: 40
Joined: Jun 2nd, '19, 00:25
Location: Ostrava, Czech Republic

Re: System sluggish after resume from suspend

Postby doktor5000 » Dec 11th, '20, 17:25

Check whether you obtain your hostname via DHCP, if not you can simply set it to what you want as root via hostnamectl set-hostname
Afterwards reboot once.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16225
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: System sluggish after resume from suspend

Postby MagicD3VIL » Dec 11th, '20, 22:28

Okay I've been getting the hostname from DHCP so I've set hostname-mode=none in /etc/NetworkManager/NetworkManager.conf and now I finally have "localhost" as my hostname again. Matter of fact it also fixed the sluggishness of the system after waking up. Thanks, Dok!

The only problem with suspending I have now is that the Network Manager does not show any connections (even cable-connected) after waking up and it takes around a minute or two for it to reconnect. Any suggestions?
User avatar
MagicD3VIL
 
Posts: 40
Joined: Jun 2nd, '19, 00:25
Location: Ostrava, Czech Republic

Re: [SOLVED] System sluggish after resume from suspend

Postby doktor5000 » Dec 12th, '20, 20:08

What network manager frontend do you use? Default should be plasma-applet-nm which works just fine here after returning from suspend.
It immediately shows that wireless has been disconnected, and then reconnects a few seconds later.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16225
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [SOLVED] System sluggish after resume from suspend

Postby MagicD3VIL » Dec 12th, '20, 21:01

I'm using plasma-applet-nm and I'm setting my networks up via the "Connections - System Settings Module" (System monitor says "Command: /usr/bin/kcmshell5 kcm_networkmanagement"). I hope that helps. :)
User avatar
MagicD3VIL
 
Posts: 40
Joined: Jun 2nd, '19, 00:25
Location: Ostrava, Czech Republic

Re: [SOLVED] System sluggish after resume from suspend

Postby doktor5000 » Dec 13th, '20, 02:30

Well, you could let a terminal run with
Code: Select all
journalctl -u NetworkManager.service -f

as root and post the output after resuming from suspend, but please mention the timestamp when you suspend/resumed and when the network connection actually comes back (or when you see the indicator for that).
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16225
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [SOLVED] System sluggish after resume from suspend

Postby MagicD3VIL » Dec 13th, '20, 14:26

Suspend: 13:20
Wake-up: 13:21
Reconnected: 13:22

It took around a minute for the connection to be re-established.
Attachments
NetworkManager.service.log
(17.35 KiB) Downloaded 6 times
User avatar
MagicD3VIL
 
Posts: 40
Joined: Jun 2nd, '19, 00:25
Location: Ostrava, Czech Republic

Re: [SOLVED] System sluggish after resume from suspend

Postby doktor5000 » Dec 13th, '20, 16:43

Well, there's nothing in the logs inbetween, suspend starts at 13:20:40 and next timestamp is directly wakeup at 13:22:32.

pro 13 13:20:40 localhost NetworkManager[2110]: <info> [1607862040.2357] manager: NetworkManager state is now ASLEEP
pro 13 13:20:40 localhost NetworkManager[2110]: <info> [1607862040.2359] device (enp4s0): state change: activated -> deactivating (reason 'sleeping', sys-iface-state: 'managed')
pro 13 13:20:40 localhost NetworkManager[2110]: <info> [1607862040.2405] device (enp4s0): state change: deactivating -> disconnected (reason 'sleeping', sys-iface-state: 'managed')
pro 13 13:20:40 localhost NetworkManager[2110]: <info> [1607862040.2407] dhcp4 (enp4s0): canceled DHCP transaction
pro 13 13:20:40 localhost NetworkManager[2110]: <info> [1607862040.2407] dhcp4 (enp4s0): state changed bound -> done
pro 13 13:20:40 localhost NetworkManager[2110]: <info> [1607862040.2672] device (enp4s0): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
pro 13 13:20:40 localhost NetworkManager[2110]: <info> [1607862040.2790] device (tun0): state change: activated -> unmanaged (reason 'connection-assumed', sys-iface-state: 'external')
pro 13 13:20:40 localhost nm-openvpn[6345]: event_wait : Interrupted system call (code=4)
pro 13 13:20:40 localhost NetworkManager[2110]: <info> [1607862040.3128] vpn-connection[0xc58160,fc2b43f9-2ce0-4bad-b820-4e67a3b82db3,"michael",0]: VPN plugin: state changed: stopping (5)
pro 13 13:20:40 localhost NetworkManager[2110]: <info> [1607862040.3130] vpn-connection[0xc58160,fc2b43f9-2ce0-4bad-b820-4e67a3b82db3,"michael",0]: VPN plugin: state changed: stopped (6)
pro 13 13:20:40 localhost nm-openvpn[6345]: SIGTERM[hard,] received, process exiting
pro 13 13:20:40 localhost NetworkManager[2110]: <warn> [1607862040.3259] dns-sd-resolved[0xbcb460]: send-updates failed to update systemd-resolved: GDBus.Error:org.freedesktop.resolve1.NoSuchLink: Link 3 not known
pro 13 13:22:32 localhost NetworkManager[2110]: <info> [1607862152.4459] manager: sleep: wake requested (sleeping: yes enabled: yes)


Also if you want to figure this out, better provide some more details around your network setup, and there are seemingly multiple wireless adapters, a wired adapter as you mentioned and also a VPN connection before suspend.
You might need to post what you currently have as /etc/sysconfig/network-scripts/ifcfg-* configs and also the networkmanager connections ( nmcli -p -f all con show )
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16225
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [SOLVED] System sluggish after resume from suspend

Postby MagicD3VIL » Dec 13th, '20, 19:32

Here you go! Hope that helps :) Btw I am not using any wireless connections, just wired ethernet cable and OpenVPN.

Code: Select all
======================================
  NetworkManager connection profiles
======================================
NAME            UUID                                  TYPE      TIMESTAMP   TIMESTAMP-REAL                      AUTOCONNECT  AUTOCONNECT-PRIORITY  READONLY  DBUS-PATH                                   ACTIVE  DEVICE  STATE      ACTIVE-PATH                                         SLAVE  FILENAME                                                   
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
michael         fc2b43f9-2ce0-4bad-b820-4e67a3b82db3  vpn       1607880224  Ne 13. prosince 2020, 18:23:44 CET  no           0                     no        /org/freedesktop/NetworkManager/Settings/3  yes     enp4s0  activated  /org/freedesktop/NetworkManager/ActiveConnection/2  --     /etc/NetworkManager/system-connections/michael.nmconnection
Ethernet Cable  b325fd44-30b3-c744-3fc9-e154b78e8c82  ethernet  1607880224  Ne 13. prosince 2020, 18:23:44 CET  yes          0                     no        /org/freedesktop/NetworkManager/Settings/1  yes     enp4s0  activated  /org/freedesktop/NetworkManager/ActiveConnection/1  --     /etc/sysconfig/network-scripts/ifcfg-enp4s0                 
tun0            3fe5eee6-7ff4-4831-b5f7-22ea49a94c33  tun       1607880224  Ne 13. prosince 2020, 18:23:44 CET  no           0                     no        /org/freedesktop/NetworkManager/Settings/4  yes     tun0    activated  /org/freedesktop/NetworkManager/ActiveConnection/3  --     /run/NetworkManager/system-connections/tun0.nmconnection   
System tun0     0519e245-81cf-1986-5daa-a824061bc6e8  ethernet  0           never                               no           0                     no        /org/freedesktop/NetworkManager/Settings/2  no      --      --         --                                                  --     /etc/sysconfig/network-scripts/ifcfg-tun0
Attachments
ifcfg.zip
(2.48 KiB) Downloaded 6 times
Last edited by doktor5000 on Dec 13th, '20, 21:14, edited 1 time in total.
Reason: added code tags, removed attachments
User avatar
MagicD3VIL
 
Posts: 40
Joined: Jun 2nd, '19, 00:25
Location: Ostrava, Czech Republic

Re: [SOLVED] System sluggish after resume from suspend

Postby doktor5000 » Dec 13th, '20, 21:18

If you don't use wireless connections, you should check why you have 2 wireless interfaces defined, wlp0s22f2u1 and wlp2s0u1 which also produce errors as seen in your logs.
You should try removing them as root via drakconnect --del

Also try first suspending / resuming without your VPN active. Apart from that, you would probably need to attach a full journalctl log excerpt starting shortly before you suspend, until the network is back after resuming.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16225
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Advanced support

Who is online

Users browsing this forum: Google [Bot] and 1 guest