You are not logged in.

#1 2019-03-27 19:30:38

scindix
Member
From: Germany
Registered: 2013-05-07
Posts: 48
Website

Gnome super slow after resuming from suspend

Hi all,
my Gnome Shell DE works fine until I suspend my Laptop (via closing the lid) and resuming it. After that everything is super sluggish to a point that actual work becomes difficult. If I suspend and resume it again it occasionally works again. But this "self-repairing" behavior is rare and quite erratically. I couldn't make out any patterns or correlations. At first I ignored it and rebooted every time it appeared hoping that it would get fixed by an update soon. But it gets really annoying now so I started investigating the issue.
All this started a few months ago so I can't tell exactly what caused this issue, but it appeared after some updates I made.
The thing is that my CPU cores are mostly idle, my RAM is largely unused and I don't use any Swap. Also I have to add that my Laptop has an Intel HD GPU as well as a dedicated NVIDIA card which I utilize via optirun. However I'm using the NVIDIA card rarely, my Laptop usually runs super smooth with the Intel HD alone and I'm not running any optimus applications while this issue occurs.
This is what top gives me:

Tasks: 235 total,   1 running, 234 sleeping,   0 stopped,   0 zombie
%Cpu(s):  3,3 us,  1,3 sy,  0,1 ni, 89,6 id,  5,0 wa,  0,5 hi,  0,3 si,  0,0 st
MiB Mem :   7887,9 total,   4099,0 free,   1613,8 used,   2175,1 buff/cache
MiB Swap:      0,0 total,      0,0 free,      0,0 used.   5665,4 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                 
  927 cedric    20   0 2890448 202152  80616 S   7,3   2,5   1:02.88 gnome-shell                                                             
  508 avahi     20   0   11532   4736   3424 S   3,3   0,1   0:18.04 avahi-daemon                                                            
  872 cedric    20   0  293736  93948  73284 S   3,3   1,2   0:57.06 Xorg                                                                    
 1791 cedric    20   0 1435776 171192 108688 S   1,0   2,1   0:23.72 Web Content                                                             
 1992 cedric    20   0 1443256 158452  98740 S   1,0   2,0   0:45.30 Web Content                                                             
 2229 cedric    20   0 1391800 132128  86224 S   0,7   1,6   0:18.03 Web Content                                                             
 2308 cedric    20   0  483524  44396  31964 S   0,7   0,5   0:05.26 gnome-terminal-                                                         
  426 root     -51   0       0      0      0 S   0,3   0,0   0:03.58 irq/16-iwlwifi                                                          
 1009 cedric    20   0  323008  12140   9744 S   0,3   0,2   0:01.39 mission-control                                                         
 1086 cedric    20   0  385912   9168   7356 S   0,3   0,1   0:01.28 gsd-sharing                                                             
 1088 cedric    20   0  310712   7096   6364 S   0,3   0,1   0:00.10 gsd-housekeepin                                                         
 1704 cedric    20   0 2273760 408348 187788 S   0,3   5,1   3:26.84 firefox-bin                                                             
 1837 cedric    20   0 1454256 163736 105812 S   0,3   2,0   0:21.79 Web Content                                                             
 1849 cedric    20   0 1434260 170904 109008 S   0,3   2,1   0:18.37 Web Content                                                             
 2505 cedric    20   0 1411268 124028  93420 S   0,3   1,5   0:05.78 Web Content                                                             
 2897 cedric    20   0 1381792 128880  99056 S   0,3   1,6   0:08.07 Web Content                                                             
 2986 root      20   0       0      0      0 I   0,3   0,0   0:00.07 kworker/0:0-events                                                      
 2989 root      20   0       0      0      0 I   0,3   0,0   0:00.16 kworker/u16:0-events_unbound                                            
 3055 root      20   0       0      0      0 I   0,3   0,0   0:00.01 kworker/u16:1-iwlwifi                                                   
 3060 root      20   0   13760   3984   3280 R   0,3   0,0   0:00.14 top

I've also issued "journalctl -b" before suspending and checked afterwards if there were any noteworthy logs. But there were only some success messages and a bunch of lines with "Ignoring excess values in shadow definition" spewed out by gnome-shell. Most importantly there aren't any ongoing warnings or errors (like some service that keeps crashing or so).
I've installed cpupower to inspect the power profile of my CPU. This is after suspending and resuming:

$ sudo cpupower frequency-info
analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 800 MHz - 3.10 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 800 MHz and 3.10 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 1.64 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    2900 MHz max turbo 4 active cores
    2900 MHz max turbo 3 active cores
    2900 MHz max turbo 2 active cores
    3100 MHz max turbo 1 active cores

The CPU frequency resides at somewhat medium frequencies. Just as expected. The governor is set to "powersave". I thought that this might be the issue, however setting it to "performance" didn't make my system fast again.
The next thing I tried was what was suggested on this post.
I made sure the msr module was loaded:

# modprobe msr

And I checked the registers. However they stayed at zero after suspending:

# rdmsr -a 0x19a
0
0
0
0

I should add that I updated the microcode to the most recent version and that my Arch is up to date.

Last edited by scindix (2019-03-27 19:37:49)

Offline

#2 2019-03-27 21:34:17

summerer
Member
From: Germany
Registered: 2014-01-25
Posts: 54

Re: Gnome super slow after resuming from suspend

Any chance of it being related to the issue mentioned here https://bbs.archlinux.org/viewtopic.php?id=244995 ?

Last edited by summerer (2019-03-27 21:34:52)

Offline

#3 2019-03-29 11:29:06

scindix
Member
From: Germany
Registered: 2013-05-07
Posts: 48
Website

Re: Gnome super slow after resuming from suspend

I doubt that because my issue is a bit older than Gnome 3.32 which supposedly introduced the issue you are linking to. However I didn't want to report back until I found some time to test the patch from Gnome's Gitlab page.

The thing is I've applied patches before and even wrote and merge requested patches myself. But I never did something gnome-shell or Xserver related.

I've successfully cloned and compiled the branch containing that patch.
What do I do now? Is there a special terminal option to start gnome-shell with the patched version of mutter? Or do I have to write my own PKGBUILD in order to replace the mutter libs and bins on my system?

Offline

#4 2019-03-29 11:46:15

summerer
Member
From: Germany
Registered: 2014-01-25
Posts: 54

Re: Gnome super slow after resuming from suspend

I would suggest taking the PKGBUILD from the mutter package in the repo and modify it to your needs.

Then you can easily swap out mutter using pacman.

Offline

#5 2019-03-29 14:13:12

scindix
Member
From: Germany
Registered: 2013-05-07
Posts: 48
Website

Re: Gnome super slow after resuming from suspend

Thanks for the advice. I did that. Unfortunately the last 3 of the tests after compilation are failing. I didn't run any tests before, but the PKGBUILD from the repo does. Is it safe to ignore those? If not how do I fix them?
testlog.txt

Offline

#6 2019-03-29 14:44:14

summerer
Member
From: Germany
Registered: 2014-01-25
Posts: 54

Re: Gnome super slow after resuming from suspend

I had that too. Logging out of Gnome and running makepkg on a real tty (which you should be able to access with e.g. Ctrl Alt F2) should work.

Offline

#7 2019-03-29 15:32:34

scindix
Member
From: Germany
Registered: 2013-05-07
Posts: 48
Website

Re: Gnome super slow after resuming from suspend

Thanks mate. That totally worked.
In case anyone is wondering here is my PKGBUILD

Unfortunately my issue persists. Thanks for the tip though.

Offline

Board footer

Powered by FluxBB