You are Here:
Linux Lite 4.6 RC1 has been released. See the Release Announcements section for more information.



Major lag after wake up from suspend

Author (Read 859 times)

0 Members and 2 Guests are viewing this topic.

Major lag after wake up from suspend
« on: April 15, 2019, 06:59:45 AM »
 

scottlovejoy3687

  • New to Forums
  • *
  • 11
    Posts
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 4.4 64bit

  • CPU: Intel i7-4710HQ

  • MEMORY: 12Gb

  • VIDEO CARD: Intel integrated graphics/Nvidia GTX 860M
Iíve recently installed LL 4.4 on a circa 2014 gaming laptop. LL ran really smooth for the most part except when I would suspend the computer to put it to sleep.  When I woke up the computer, after unlocking, it becomes a lagging mess.  The usually smooth XFCE desktop lags when I try to switch between tabs and the mouse pointer is delayed when I move it around the screen. 

Iíve looked around the forums on askUbuntu and Ubuntu users have reported a problem with waking up from suspend.  It might be a problem with the kernel but Iím not sure.  The solutions on the forums have not worked for me.  One thing I have noticed though is that after waking my computer up, the fans in my laptop are running louder than usual and the xorg process is taking up more cpu than usual (15% - 50%).

Iíve installed the Nvidia proprietary drivers to play games, as the performance of Nouveau isnít there just yet.  I donít know if this might be the cause of the problem but I just wanted to give as much information as possible.  I hope Iím not the only one with this problem.


Thank you in advance.
 


Re: Major lag after wake up from suspend
« Reply #1 on: April 15, 2019, 08:12:56 AM »
 

TheDead

  • Gold Level Poster
  • *******
  • 565
    Posts
  • Country: ca
  • Reputation: 52
  • Linux Lite Worshipper
    • My OpenDesktop Projects

  • Linux Lite: 3.8 32bit

  • CPU: HAL9000

  • MEMORY: 1Gb

  • VIDEO CARD: Oculus Rift v.5
Hi,

Just in case the nouveau driver does not resume correctly and runs the video card at 100% on resume,
I would try installing the nVidia proprietary drivers first.
Second, I would go in the BIOS (using the DELETE, F10 or  F2 keys on boot, depends on computer brand) and checking the power options.
Either changing the S1, S3 / S5 powersaving mode and/or activating "Repost Video on resume" (lesser chance though) in the case the kernel/drivers are not able to handle the wake up process or the current configuraiton.

Good luck!
- TheDead (TheUxNo0b)

If my blabbering was helpful, please click my [Thank] link.
 

Re: Major lag after wake up from suspend
« Reply #2 on: April 15, 2019, 09:01:36 AM »
 

scottlovejoy3687

  • New to Forums
  • *
  • 11
    Posts
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 4.4 64bit

  • CPU: Intel i7-4710HQ

  • MEMORY: 12Gb

  • VIDEO CARD: Intel integrated graphics/Nvidia GTX 860M
I said in the question that I do have the proprietary drivers installed.  I will try what you have suggested and report back if it works or not.
 

Re: Major lag after wake up from suspend
« Reply #3 on: April 15, 2019, 10:01:06 AM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3185
    Posts
  • Country: 00
  • Reputation: 300

  • Linux Lite: 3.2 64bit
Hello scottlovejoy3687,

when you tried some solution on askUbuntu was this one of the ones you have tried yet? - https://askubuntu.com/questions/792605/ubuntu-16-04-lts-too-slow-after-suspend-and-resume

On this thread at reply #9 there is a different solution that you can try https://bbs.archlinux.org/viewtopic.php?pid=1548933#p1548933

and also some discussion in the same link of another way by turning swap off solving a similar issue.

For this problem these are the solutions on Dell community - https://www.dell.com/community/Inspiron/Suspend-resume-problems-on-Ubuntu-18-04/td-p/6072410

A similar but going further solution is - http://nu-one.blogspot.com/2017/09/slow-cpu-after-resume-ubuntu-1604-lts.html

If you are unsure about doing any of these please await for one of the advanced members to look over and review the links (as I am not sure of the best route) but they will know which is more likely to be the one, or if there is a better way, and save you time.

Last Edit: April 15, 2019, 10:10:46 AM by bitsnpcs
 

Re: Major lag after wake up from suspend
« Reply #4 on: April 16, 2019, 08:16:28 AM »
 

TheDead

  • Gold Level Poster
  • *******
  • 565
    Posts
  • Country: ca
  • Reputation: 52
  • Linux Lite Worshipper
    • My OpenDesktop Projects

  • Linux Lite: 3.8 32bit

  • CPU: HAL9000

  • MEMORY: 1Gb

  • VIDEO CARD: Oculus Rift v.5
Lots of different way to go.
Reading the links also mentions that turning off "SpeedStep" in my BIOS fixed the problem for some... but this seems to also disable TurboBoost I guess this would also consume more power because CPU would not clock down and stay at "default" frequency. I would try the other things first. ;)

Godd luck!
- TheDead (TheUxNo0b)

If my blabbering was helpful, please click my [Thank] link.
 

Re: Major lag after wake up from suspend
« Reply #5 on: April 16, 2019, 03:43:28 PM »
 

scottlovejoy3687

  • New to Forums
  • *
  • 11
    Posts
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 4.4 64bit

  • CPU: Intel i7-4710HQ

  • MEMORY: 12Gb

  • VIDEO CARD: Intel integrated graphics/Nvidia GTX 860M
Thank you all for the suggestions and solutions. The first solution I tried was the one that involved changing the cpu mode from powersave to performance.  That didn't solve the problem.  Turning sleepsafe or whatever in the bios didn't work either.  It actually made the problem worse.  Turning swap off didn't work either.  I tried the msr solution and wrote a script for a service like they did in the solution, but that didn't work either.  I'm honestly confused why my computer is doing this in the first place.  If I don't suspend my computer at all, Linux Lite is just fine.  I might just back up my files and do a clean install and see if that fixes anything.

I don't know if this helps, but the specific model of my laptop is an MSI Apache GE70-2PE.
Last Edit: April 16, 2019, 07:18:35 PM by scottlovejoy3687
 

Re: Major lag after wake up from suspend
« Reply #6 on: April 17, 2019, 08:49:31 AM »
 

TheDead

  • Gold Level Poster
  • *******
  • 565
    Posts
  • Country: ca
  • Reputation: 52
  • Linux Lite Worshipper
    • My OpenDesktop Projects

  • Linux Lite: 3.8 32bit

  • CPU: HAL9000

  • MEMORY: 1Gb

  • VIDEO CARD: Oculus Rift v.5
There was some mention in third (dell) link about problems not coming back at all from suspend because of of an nVidia video card.
This could be related... installing the nVidia driver was the first step but some command lines to manage hardware feature are also mentionned.

Also, in any case, I never tried it with Linux and this may be a questions for other member here.. I don't know how well Linux handles a Laptop with two videocards.
Some have special features activating the discrete (nVidia) card when using 3D/performance and using the "standard" integrated video card for "normal" desktop work.
This 'switching' even gave me trouble on a few Laptops with official manufacturer Windoze installations. :-S
- TheDead (TheUxNo0b)

If my blabbering was helpful, please click my [Thank] link.
 

Re: Major lag after wake up from suspend
« Reply #7 on: April 17, 2019, 02:04:16 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3185
    Posts
  • Country: 00
  • Reputation: 300

  • Linux Lite: 3.2 64bit
In the machine are you using an SSD ?

This link discusses how SSD are different speeds if booted from battery or AC power, and the percentage difference varies by the manufacturer of the SSD, there can be some work arounds possibly if it is after suspend or speed decreasing by #'s of read/writes re; (Trim ?) - https://askubuntu.com/questions/844459/ubuntu-ssd-was-fast-is-now-extremely-slow
Last Edit: April 17, 2019, 02:13:40 PM by bitsnpcs
 

Re: Major lag after wake up from suspend
« Reply #8 on: April 17, 2019, 05:45:18 PM »
 

scottlovejoy3687

  • New to Forums
  • *
  • 11
    Posts
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 4.4 64bit

  • CPU: Intel i7-4710HQ

  • MEMORY: 12Gb

  • VIDEO CARD: Intel integrated graphics/Nvidia GTX 860M
@bitsnpcs My laptop has a 7200 rpm hard drive, but no sad ( I wish ).  As for the dual GPUs, it does let me switch between the intel and Nvidia graphics. Iíll see if using the intel graphics makes any difference.  As I said before, the sad fix wonít work for me.
 

Re: Major lag after wake up from suspend
« Reply #9 on: April 17, 2019, 06:04:48 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3185
    Posts
  • Country: 00
  • Reputation: 300

  • Linux Lite: 3.2 64bit
@scottlovejoy3687 I have not managed to find any other info that may be about this yet, there were just some other links but they about overclocking and temperatures causing issues, they were to do with going in to suspend or shutdown, not waking from it though.
 

Re: Major lag after wake up from suspend
« Reply #10 on: April 17, 2019, 06:17:39 PM »
 

scottlovejoy3687

  • New to Forums
  • *
  • 11
    Posts
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 4.4 64bit

  • CPU: Intel i7-4710HQ

  • MEMORY: 12Gb

  • VIDEO CARD: Intel integrated graphics/Nvidia GTX 860M
So I donít know if this is a fix or not, but checking the box ďsave session for future loginsĒ before suspending  seems to fix the problem.  I donít know if this is a solution but it seems to work.

Edit: This improved it a little, by the lag is still there.
Last Edit: April 17, 2019, 06:23:49 PM by scottlovejoy3687
 

Re: Major lag after wake up from suspend
« Reply #11 on: April 17, 2019, 06:28:18 PM »
 

scottlovejoy3687

  • New to Forums
  • *
  • 11
    Posts
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 4.4 64bit

  • CPU: Intel i7-4710HQ

  • MEMORY: 12Gb

  • VIDEO CARD: Intel integrated graphics/Nvidia GTX 860M
I donít know if his helps, but it seems that the only parts that are lagging are parts of the xfce desktop ( the window manager, panel, menu, etc. ).  Navigating within applications seems to work fine.

When I open htop, the processes that seem to take up the most cpu % are:  "/usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch" and the second process is "/usr/lib/firefox/firefox -contentproc -childID 8 -isForBrowser -prefsLen 8301 -prefMapSize 182175 -parentBuildID 20190410105841".   The xorg is the process that can take up to 60% of my cpu.  It sporadically jumps all over the place.
Last Edit: April 17, 2019, 06:46:30 PM by scottlovejoy3687
 

Re: Major lag after wake up from suspend
« Reply #12 on: April 17, 2019, 06:57:36 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3185
    Posts
  • Country: 00
  • Reputation: 300

  • Linux Lite: 3.2 64bit
There was this bug - https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/838208

There are some discussions (other links/searches) about Compiz, and separately discussions about compositing, that in either when they were disabled it was solving it.
It was saying how where "fancy effects" were being used by desktop environment, or apps (only Firefox was specified in one post, but in others no apps were specified), then this was causing the spike in CPU useage from 60 til 100% and slowness/lag after suspend/sleep, not improving unless reboot was done. After which still being higher than usual until the feature was disabled. (summary info from a multiple links)

Have you tried -

Menu > ALL > Window Manager Tweaks

In the GUI select the Tab named "Compositor" untick the first item named "Enable display compositing" 
Click close.
Does this help it improve or not ?
Last Edit: April 17, 2019, 07:29:46 PM by bitsnpcs
 

Re: Major lag after wake up from suspend
« Reply #13 on: April 17, 2019, 07:33:24 PM »
 

scottlovejoy3687

  • New to Forums
  • *
  • 11
    Posts
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 4.4 64bit

  • CPU: Intel i7-4710HQ

  • MEMORY: 12Gb

  • VIDEO CARD: Intel integrated graphics/Nvidia GTX 860M
@bitsnpcs It does not improve it unfortunately.  When I try to use firefox after waking up from suspend, it starts to use up to 50% cpu as well.  It's happening as i type this.  I also tried using a slightly older kernel to see if that fixed the problem...no difference at all.
 

Re: Major lag after wake up from suspend
« Reply #14 on: April 17, 2019, 07:38:09 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3185
    Posts
  • Country: 00
  • Reputation: 300

  • Linux Lite: 3.2 64bit
Have you tried -

Menu > System > Lite Tweaks
select "zRam", and "Preload Apps", try this individually then at the same time.
 


 


Linux Lite 4.6 RC1 has been released. See the Release Announcements section for more information.