You are not logged in.

#1 2025-03-27 12:58:30

edge33
Member
Registered: 2023-01-29
Posts: 25

Wake from sleep sluggishness

Hello, I installed Arch with KDE on my Thinkpad t14S, it looks like everything is working, but I am noticing that after waking from sleep the system is slow/sluggish for a couple minutes, after this time, it starts working as usual. I am looking for ways to troubleshoot this issue, in order to apply a potential fix, can someone chime in to help me logging what might cause it?

I was not sure where to post this thread, I do apologize if I opened it in the wrong section

Offline

#2 2025-03-27 16:18:44

seth
Member
Registered: 2012-09-03
Posts: 62,370

Re: Wake from sleep sluggishness

You should first and foremost isolate the "sluggish" component, https://wiki.archlinux.org/title/Benchmarking
CPU, GPU, Disk IO? Network?

Also check top/iotop to ee whether there's maybe an explanation.
Obvious contender would be https://wiki.archlinux.org/title/CPU_frequency_scaling

Offline

#3 2025-04-01 14:04:26

edge33
Member
Registered: 2023-01-29
Posts: 25

Re: Wake from sleep sluggishness

thanks for the support, I ran ubench and got the following

 BYTE UNIX Benchmarks (Version 5.1.3)

   System: : GNU/Linux
   OS: GNU/Linux -- 6.13.8-arch1-1 -- #1 SMP PREEMPT_DYNAMIC Sun, 23 Mar 2025 17:17:30 +0000
   Machine: x86_64 (unknown)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (5222.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 1: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (5222.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 2: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (5222.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 3: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (5222.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 4: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (5222.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 5: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (5222.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 6: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (5222.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 7: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (5222.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   15:04:28 up 7 days, 2 min,  1 user,  load average: 1.26, 0.99, 0.92; runlevel 

------------------------------------------------------------------------
Benchmark Run: Tue Apr 01 2025 15:04:28 - 15:32:29
8 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables              0.1 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                    10275.8 MWIPS (9.9 s, 7 samples)
Execl Throughput                               5416.1 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks       1882761.3 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          533346.3 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       3813231.6 KBps  (30.0 s, 2 samples)
Pipe Throughput                             3082122.2 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 242637.5 lps   (10.0 s, 7 samples)
Process Creation                               5185.1 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   5188.2 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   4138.4 lpm   (60.0 s, 2 samples)
System Call Overhead                        2391764.0 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0          0.1      0.0
Double-Precision Whetstone                       55.0      10275.8   1868.3
Execl Throughput                                 43.0       5416.1   1259.6
File Copy 1024 bufsize 2000 maxblocks          3960.0    1882761.3   4754.4
File Copy 256 bufsize 500 maxblocks            1655.0     533346.3   3222.6
File Copy 4096 bufsize 8000 maxblocks          5800.0    3813231.6   6574.5
Pipe Throughput                               12440.0    3082122.2   2477.6
Pipe-based Context Switching                   4000.0     242637.5    606.6
Process Creation                                126.0       5185.1    411.5
Shell Scripts (1 concurrent)                     42.4       5188.2   1223.6
Shell Scripts (8 concurrent)                      6.0       4138.4   6897.3
System Call Overhead                          15000.0    2391764.0   1594.5
                                                                   ========
System Benchmarks Index Score                                        1282.1

------------------------------------------------------------------------
Benchmark Run: Tue Apr 01 2025 15:32:29 - 16:01:00
8 CPUs in system; running 8 parallel copies of tests

Dhrystone 2 using register variables              0.8 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                    52661.4 MWIPS (12.6 s, 7 samples)
Execl Throughput                              17187.6 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks       4898189.1 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks         1387661.9 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks      13423996.1 KBps  (30.0 s, 2 samples)
Pipe Throughput                             9537508.0 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                1369209.8 lps   (10.0 s, 7 samples)
Process Creation                              44247.4 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                  29738.5 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   4177.1 lpm   (60.0 s, 2 samples)
System Call Overhead                        9349770.7 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0          0.8      0.0
Double-Precision Whetstone                       55.0      52661.4   9574.8
Execl Throughput                                 43.0      17187.6   3997.1
File Copy 1024 bufsize 2000 maxblocks          3960.0    4898189.1  12369.2
File Copy 256 bufsize 500 maxblocks            1655.0    1387661.9   8384.7
File Copy 4096 bufsize 8000 maxblocks          5800.0   13423996.1  23144.8
Pipe Throughput                               12440.0    9537508.0   7666.8
Pipe-based Context Switching                   4000.0    1369209.8   3423.0
Process Creation                                126.0      44247.4   3511.7
Shell Scripts (1 concurrent)                     42.4      29738.5   7013.8
Shell Scripts (8 concurrent)                      6.0       4177.1   6961.8
System Call Overhead                          15000.0    9349770.7   6233.2
                                                                   ========
System Benchmarks Index Score                                        1539.0

I will rerun the benchamrk when the I feel the system slow, after waking up from sleep.

I saw that when it feels sluggy, it has got no hogging processes, but in system monitor I can see the cpu being loaded. I believe it has something to do with the cpu scheduler/power profile

Offline

#4 2025-04-01 14:08:22

seth
Member
Registered: 2012-09-03
Posts: 62,370

Re: Wake from sleep sluggishness

it has got no hogging processes, but in system monitor I can see the cpu being loaded

Check "top" for what actually uses the CPU - cpu load after waking up sound udev-related.

Offline

#5 2025-04-02 20:18:01

edge33
Member
Registered: 2023-01-29
Posts: 25

Re: Wake from sleep sluggishness

here's a top dump when the problem appeared, it's randomic

top - 22:16:40 up 8 days,  7:14,  1 user,  load average: 2.45, 0.90, 0.59
Tasks: 341 total, 3 running, 337 sleep, 1 d-sleep, 0 stopped, 0 zombie
top - 22:17:04 up 8 days,  7:14,  1 user,  load average: 2.18, 0.97, 0.62
Tasks: 342 total, 2 running, 340 sleep, 0 d-sleep, 0 stopped, 0 zombie
%Cpu(s):  5.4 us,  3.4 sy,  0.0 ni, 90.3 id,  0.0 wa,  0.5 hi,  0.4 si,  0.0 st 
MiB Mem :  15691.0 total,    994.5 free,   7503.2 used,   8662.2 buff/cache     
MiB Swap:   4096.0 total,   4096.0 free,      0.0 used.   8187.8 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                       
2976777 edge33    20   0   23.1g 566408 170428 S  13.8   3.5  12:29.02 Isolated Web Co                               
 130147 edge33    20   0  231616   6524   6140 S  12.5   0.0  20:57.90 ksgrd_network_h                               
2976628 edge33    20   0   11.8g 855256 449576 S   6.3   5.3  33:26.71 firefox                                       
 130074 edge33    20   0 2248804 326060 214648 S   4.3   2.0  19:16.01 plasma-systemmo                               
2988985 edge33    20   0 2698148 287180 175604 S   3.6   1.8   3:32.55 Isolated Web Co                               
    921 edge33    20   0 5896456 568640 191456 S   3.3   3.5  23:52.09 plasmashell                                   
3014528 edge33    20   0 2953600 573516 194792 S   3.3   3.6   1:35.67 Isolated Web Co                               
2978983 edge33    20   0 3013716 627496 188152 S   3.0   3.9   3:20.68 Isolated Web Co                               
 144571 edge33    20   0 4912812 352416 192864 S   2.6   2.2   2:30.86 spotify                                       
    743 edge33    -2   0 2562712 272736 176888 S   2.3   1.7  93:04.83 kwin_wayland                                  
    992 edge33    20   0  258488  38056  31656 S   2.3   0.2  10:14.05 ksystemstats                                  
2978947 edge33    20   0 2558336 210516 149284 S   2.3   1.3   0:03.91 Isolated Web Co                               
2976900 edge33    20   0   22.9g 359964 148048 S   1.3   2.2   1:12.98 WebExtensions                                 
3019412 edge33    20   0 1053100 223788 206184 S   1.3   1.4   0:02.31 konsole                                       
2976773 edge33    20   0 2913352 415204 180884 S   1.0   2.6   1:22.96 Isolated Web Co                               
3019882 edge33    20   0   10904   7844   5668 R   1.0   0.0   0:00.24 top                                           
    532 root      20   0  414768  24820  21364 S   0.7   0.2   1:55.98 NetworkManager                                
3014352 edge33    20   0 2658052 260136 167720 S   0.7   1.6   0:05.03 Isolated Web Co                               
     19 root      -2   0       0      0      0 I   0.3   0.0   3:24.43 rcu_preempt                                   
     82 root     -51   0       0      0      0 S   0.3   0.0   5:27.63 irq/9-acpi 

Offline

#6 2025-04-02 20:29:05

seth
Member
Registered: 2012-09-03
Posts: 62,370

Re: Wake from sleep sluggishness

firefox - and google throws a lot of "temporary cpu hogging" at me when I ask for "ksgrd_network_helper", seems to be part of ksysguard.
Edit: maybe also part of plasma-systemonitor?

Another thing is that you're getting short-ish on RAM, maybe zswap/zram related?

Last edited by seth (2025-04-02 20:29:36)

Offline

#7 2025-04-02 20:51:51

edge33
Member
Registered: 2023-01-29
Posts: 25

Re: Wake from sleep sluggishness

seth wrote:

firefox - and google throws a lot of "temporary cpu hogging" at me when I ask for "ksgrd_network_helper", seems to be part of ksysguard.
Edit: maybe also part of plasma-systemonitor?

Another thing is that you're getting short-ish on RAM, maybe zswap/zram related?

not sure about cpu hogging, seems pretty normal to me,
about zswap, I don't know, how would I troubleshoot? I see In the screnshot 900 Mb free but half is buff/cache, I have 4096 MB of swap partition

Offline

#8 2025-04-03 07:12:32

seth
Member
Registered: 2012-09-03
Posts: 62,370

Re: Wake from sleep sluggishness

Disable it (it's enabled by default, but I think the archinstall script disables it and uses zram instead, so have a look at your situation)
https://wiki.archlinux.org/title/Zswap#Toggling_zswap

zswap can explode when decompressed onto the physical swap (though it would indeed be odd if that ran you OOM and killing the offending process would wipe the *entire* swap)
The "ksgrd_network_helper" cpu hogging is reported to be temporarily, so it might be in decline when you ran top, but 12% cpu load from a process that reads the network traffic stats is rather not "normal" tbw (unless your computer is potato)

Do you have the benchmark results from when the system is "sluggish" so we can look for the bottleneck?

Offline

#9 2025-04-03 10:33:59

edge33
Member
Registered: 2023-01-29
Posts: 25

Re: Wake from sleep sluggishness

here's the result, I started benchamrking when system was sluggy:

   BYTE UNIX Benchmarks (Version 5.1.3)

   System: : GNU/Linux
   OS: GNU/Linux -- 6.13.8-arch1-1 -- #1 SMP PREEMPT_DYNAMIC Sun, 23 Mar 2025 17:17:30 +0000
   Machine: x86_64 (unknown)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (5222.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 1: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (5222.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 2: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (5222.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 3: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (5222.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 4: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (5222.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 5: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (5222.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 6: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (5222.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 7: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (5222.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   11:14:39 up 8 days, 20:12,  1 user,  load average: 3.34, 1.90, 1.23; runlevel 

------------------------------------------------------------------------
Benchmark Run: Thu Apr 03 2025 11:14:39 - 11:50:55
8 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables              0.1 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                    10037.6 MWIPS (10.1 s, 7 samples)
Execl Throughput                               5334.0 lps   (29.7 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks       1880822.4 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          531483.5 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       3692367.1 KBps  (30.0 s, 2 samples)
Pipe Throughput                             3093669.6 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 240114.5 lps   (10.0 s, 7 samples)
Process Creation                               5593.7 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   1856.9 lpm   (305.9 s, 2 samples)
Shell Scripts (8 concurrent)                   4457.2 lpm   (60.0 s, 2 samples)
System Call Overhead                        2386692.5 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0          0.1      0.0
Double-Precision Whetstone                       55.0      10037.6   1825.0
Execl Throughput                                 43.0       5334.0   1240.5
File Copy 1024 bufsize 2000 maxblocks          3960.0    1880822.4   4749.6
File Copy 256 bufsize 500 maxblocks            1655.0     531483.5   3211.4
File Copy 4096 bufsize 8000 maxblocks          5800.0    3692367.1   6366.2
Pipe Throughput                               12440.0    3093669.6   2486.9
Pipe-based Context Switching                   4000.0     240114.5    600.3
Process Creation                                126.0       5593.7    443.9
Shell Scripts (1 concurrent)                     42.4       1856.9    438.0
Shell Scripts (8 concurrent)                      6.0       4457.2   7428.6
System Call Overhead                          15000.0    2386692.5   1591.1
                                                                   ========
System Benchmarks Index Score                                        1183.4

------------------------------------------------------------------------
Benchmark Run: Thu Apr 03 2025 11:50:55 - 12:32:22
8 CPUs in system; running 8 parallel copies of tests

Dhrystone 2 using register variables              0.8 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                    52501.1 MWIPS (12.6 s, 7 samples)
Execl Throughput                              16924.5 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks       4925928.2 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks         1377608.1 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       5316261.1 KBps  (30.0 s, 2 samples)
Pipe Throughput                            10403652.1 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                1342376.6 lps   (10.0 s, 7 samples)
Process Creation                              41667.0 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                  28540.6 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   4057.2 lpm   (60.0 s, 2 samples)
System Call Overhead                        9002509.4 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0          0.8      0.0
Double-Precision Whetstone                       55.0      52501.1   9545.7
Execl Throughput                                 43.0      16924.5   3935.9
File Copy 1024 bufsize 2000 maxblocks          3960.0    4925928.2  12439.2
File Copy 256 bufsize 500 maxblocks            1655.0    1377608.1   8323.9
File Copy 4096 bufsize 8000 maxblocks          5800.0    5316261.1   9166.0
Pipe Throughput                               12440.0   10403652.1   8363.1
Pipe-based Context Switching                   4000.0    1342376.6   3355.9
Process Creation                                126.0      41667.0   3306.9
Shell Scripts (1 concurrent)                     42.4      28540.6   6731.3
Shell Scripts (8 concurrent)                      6.0       4057.2   6761.9
System Call Overhead                          15000.0    9002509.4   6001.7
                                                                   ========
System Benchmarks Index Score   

Offline

#10 2025-04-04 07:55:17

seth
Member
Registered: 2012-09-03
Posts: 62,370

Re: Wake from sleep sluggishness

"System Benchmarks Index Score" ?

However:

good wrote:

Shell Scripts (1 concurrent)                     42.4       1856.9    438.0
File Copy 4096 bufsize 8000 maxblocks      13423996.1 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks          5800.0   13423996.1  23144.8

bad wrote:

Shell Scripts (1 concurrent)                     42.4       5188.2   1223.6
File Copy 4096 bufsize 8000 maxblocks       5316261.1 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks          5800.0    5316261.1   9166.0

The single-shell script run between 15:00 and 15:30 and the 4k file copying between 15:30 and 16:00 are the only drop-offs in that benchmark

I started benchamrking when system was sluggy

And was it all throughout (or just the first couple of minutes)?
Because w/ the massive timeframe that benchmark spans, it would become a rather useless tool for this hmm

Did you try to disable the network indicators?

Offline

#11 2025-04-04 12:43:17

edge33
Member
Registered: 2023-01-29
Posts: 25

Re: Wake from sleep sluggishness

seth wrote:

"System Benchmarks Index Score" ?

However:

good wrote:

Shell Scripts (1 concurrent)                     42.4       1856.9    438.0
File Copy 4096 bufsize 8000 maxblocks      13423996.1 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks          5800.0   13423996.1  23144.8

bad wrote:

Shell Scripts (1 concurrent)                     42.4       5188.2   1223.6
File Copy 4096 bufsize 8000 maxblocks       5316261.1 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks          5800.0    5316261.1   9166.0

The single-shell script run between 15:00 and 15:30 and the 4k file copying between 15:30 and 16:00 are the only drop-offs in that benchmark

I started benchamrking when system was sluggy

And was it all throughout (or just the first couple of minutes)?
Because w/ the massive timeframe that benchmark spans, it would become a rather useless tool for this hmm

Did you try to disable the network indicators?

it was slow only for the first couple minutes, so yeah, I was thinking maybe is not the right tool.

how would I disable network indicators? would putting airplane mode work from the network manager kde panel?

Offline

#12 2025-04-04 14:49:26

seth
Member
Registered: 2012-09-03
Posts: 62,370

Re: Wake from sleep sluggishness

The helper is likely invoked from ksysguard or some plasma widget-thingy/network indicator.
Your goal is to make the "ksgrd_network_helper" process disappear.

Please avoid bloating the thread w/ full quotes, the previous posts are readily available right above the last one.

Offline

Board footer

Powered by FluxBB