Unity slow after resume from suspend

Bug #892544 reported by Mario
46
This bug affects 9 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

After resuming from suspend unity feels like it is very slow.

How to play:

Go to Unity Dash, show all applications, move icons up and down with the scroll bar, suspend and resume, perform the same operation and notice that is very slow.

This already happens with the (cd or usb) of installation.

This bug only happens with free radeon driver with driver fglrx does not happen.

This only happens in unity, this does not happen in either Gnome Shell or Unity 2D.

I do not know if it's a bug in Unity or compiz, but "unity --reset" solves the problem until the next suspend / resume.

I do not know if this bug may be related to #782810 or #803943, but I did not notice any increase in CPU consumption.

This bug occurs on a clean install of 11.10 [64 bits] with a ATI Radeon 5770 graphics card, Asus P6T Deluxe V2 Motherboard, Micro Intel Core™ i7-950 y SSD OCZ Vertex2.

Revision history for this message
Mario (mariodopico) wrote :

I'm still doing testing and with 11.04 this bug did not occur

In 11.04 radeon driver used mesa, in 11.10 used gallium

May be related with gallium?

Revision history for this message
Chris Schoeny (iliveoffroad) wrote :

i have had the issue when running my laptop on battery that when i try to wake up the computer after suspending it it will freeze at the login page and i will have to shut down and restart. And when on AC power it does seem fairly slower after awaking from being suspended.

Im using 11.10 dual booting with Windows Visa.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity (Ubuntu):
status: New → Confirmed
Revision history for this message
Mario (mariodopico) wrote :

Hi Gris,

you have the same problem with the previous version (11.04)?

Revision history for this message
Omer Akram (om26er) wrote :

I have added the related driver as "affects" to this bug

Changed in unity:
status: New → Confirmed
Revision history for this message
Mario (mariodopico) wrote :

I still performing tests.

I tried on a laptop with intel graphics card and this problem does not occur.

Revision history for this message
Omer Akram (om26er) wrote :

When reporting bug please make sure you report them using the command 'ubuntu-bug unity' command so that they are more usable and workable. Which GPU do you use ? and alot of your system information is auto uploaded with that method.

Changed in unity:
status: Confirmed → Incomplete
Changed in unity (Ubuntu):
status: Confirmed → Incomplete
Changed in xserver-xorg-video-ati (Ubuntu):
status: New → Incomplete
Changed in unity:
status: Incomplete → New
Changed in unity (Ubuntu):
status: Incomplete → New
Changed in xserver-xorg-video-ati (Ubuntu):
status: Incomplete → New
Revision history for this message
Omer Akram (om26er) wrote :

Not confirming unless someone else using Radeon confirm of the issue.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I have tried testing this with radeon today. Unfortunately radeon failed to resume from suspend, and I did try several times. So can't confirm. :(

Revision history for this message
Mario (mariodopico) wrote :

Thanks Daniel,

I am still making test:

  vblank_mode=0 glxgears

Gnome Shell - First boot:

37288 frames in 5.0 seconds = 7457.507 FPS
37056 frames in 5.0 seconds = 7411.085 FPS
35598 frames in 5.0 seconds = 7119.455 FPS

Gnome Shell - After the suspend/resume:

18456 frames in 5.0 seconds = 3691.127 FPS
19916 frames in 5.0 seconds = 3983.031 FPS
18973 frames in 5.0 seconds = 3794.592 FPS

Gnome Shell - After the "ALT-F2 r" :

20734 frames in 5.0 seconds = 4146.746 FPS
20553 frames in 5.0 seconds = 4110.542 FPS
19407 frames in 5.0 seconds = 3881.215 FPS

Unity - First boot

16186 frames in 5.0 seconds = 3237.179 FPS
17110 frames in 5.0 seconds = 3421.557 FPS
19193 frames in 5.0 seconds = 3838.410 FPS
16229 frames in 5.0 seconds = 3245.769 FPS

Unity - After the suspend/resume

417 frames in 5.0 seconds = 83.148 FPS
299 frames in 5.0 seconds = 59.721 FPS
299 frames in 5.0 seconds = 59.721 FPS
299 frames in 5.0 seconds = 59.719 FPS

Unity - After the "unity --reset"

16186 frames in 5.0 seconds = 3127.236 FPS
17110 frames in 5.0 seconds = 3380.789 FPS
19193 frames in 5.0 seconds = 3689.324 FPS

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

To clarify, the number "59.7" FPS is not just a random number. It's probably the refresh rate of your monitor, indicating that glxgears (or the radeon driver) is indeed ignoring vblank_mode=0. Most people want a frame rate of about 60, because they want sync-to-vblank support ON to avoid screen tearing :)

Revision history for this message
Mario (mariodopico) wrote :

Hi Daniel,

I have done a lot of test on different hardware and I think the problem is in compiz or unity, a unity --reset or compiz --replace fixes the problem until next suspend resume, I think this problem is the same as the bug Bug #861061, with 11.04 this bug did not occur, I will wait for the correction the Bug #861061, to see if the problem goes away.

Thanks.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I don't think the fix for bug 861061 will help you, but I will be making it available for testing some time today. So check back soon :)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity (Ubuntu):
status: New → Confirmed
Changed in xserver-xorg-video-ati (Ubuntu):
status: New → Confirmed
Omer Akram (om26er)
Changed in unity (Ubuntu):
status: Confirmed → New
Changed in xserver-xorg-video-ati (Ubuntu):
status: Confirmed → New
Omer Akram (om26er)
Changed in unity:
importance: Undecided → Medium
Changed in xserver-xorg-video-ati (Ubuntu):
importance: Undecided → Medium
Changed in unity (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Mario (mariodopico) wrote :

Hi Daniel

I tried your ppa compiz and unity and unity works much better even after the a suspend resume, everything runs smoother, but not as well as in 11.04.

I made ​​some test with glxspheres64 and in Unity i get half the FPS than Gnome Shell or Unity 2D.

Unity --> 32 FPS
Gnome Shell y Unity 2D --> 60 FPS

Thanks for your work

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Is the low frame rate still only after resume from suspend?

Revision history for this message
Mario (mariodopico) wrote :

With your ppa suspend resume has greatly improved, but not going as smooth as in 11.04, very noticeable when displaying (Super - s) Mode Expo

I have checked with glxspheres64 in 11.04 and also get 32 FPS, but in 11.04 everything goes very smooth

I'm not sure, but I believe that unity in 11.10 when you turn on the system everything goes very smooth, but after a while gives the impression that the FPS decreases, this does not happen in either Gnome Shell or Unity 2D.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Is the low frame rate only after resume or does the frame rate degrade even when you have never suspended?

Also, please try doing a system update because I think your issue with expo slowing down was fixed in version "vv3" in my PPA...

compiz (1:0.9.6+bzr20110929-0ubuntu6vv4) oneiric; urgency=low

  * Fix timer scheduling priority. It was set too high, which starved compiz'
    own event loop of X and GLX events. This caused all sorts of tearing,
    stuttering and hang-related bugs.

 -- Daniel van Vugt <email address hidden> Mon, 05 Dec 2011 15:34:10 +0800

compiz (1:0.9.6+bzr20110929-0ubuntu6vv3) oneiric; urgency=low

  * Improved the frame timing fix (previous commit) to also avoid excessive
    lag when doing fullscreen repaints. This means you can once again use the
    compiz workaround "Force full screen redraws (buffer swap) on repaint" if
    you want.

 -- Daniel van Vugt <email address hidden> Mon, 05 Dec 2011 14:41:03 +0800

Revision history for this message
Mario (mariodopico) wrote :

Hi Daniel,

I have updated your ppa to the version --> 0.9.6+bzr20110929-0ubuntu6vv5, and now glxspheres64 always kept in 60 FPS even after the suspend resume, and I think that expo now works well.

>> Is the low frame rate only after resume or does the frame rate degrade even when you have never suspended?

I'm not sure does the frame rate degrade without suspended resume, but I am sure that after a suspend resume the frame rate degrade.

My English is not the good that I would like and I made a video and have uploaded to youtube, for if you want to see it.

The video starts after a suspend resume, look especially when I show the Dash, the delay between the mouse cursor and icon selected, also note the delay between the cursor and scroll bar when I move the icons from top to bottom, looks like half the video I do a "unity --reset" and then this delay disappears

I see nothing relevant in the log files, but if you want I can upload the logs files.

Link to video (is best viewed in 720p) --> http://youtu.be/fY6UxR3D_pQ

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Mario, do you have "Force full screen redraws (buffer swap) on repaint" enabled in CCSM > Workarounds?

If so then that would explain the lag in your video. And it should be fixed in the PPA version "vv3" and later, as your comments suggests it seems to be.

Revision history for this message
Mario (mariodopico) wrote :

Hi Daniel

Mi conf CCSM:

Vsync --> Enable
Force full screen redraws (buffer swap) on repaint --> Disable

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity (Ubuntu):
status: New → Confirmed
Changed in xserver-xorg-video-ati (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Bug 774094 sounds very similar, except that regression apparently happened between 10.10 and 11.04. Whereas this one seems to have happened between 11.04 and 11.10.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 887993, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.

penalvch (penalvch)
no longer affects: unity (Ubuntu)
no longer affects: xserver-xorg-video-ati (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Revision history for this message
penalvch (penalvch) wrote :

Mario, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please confirm this issue exists with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ . If the issue remains, could you please run the following command from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p linux <replace-with-bug-number>

If reproducible, could you please provide the information following https://wiki.ubuntu.com/DebuggingKernelSuspend ?

If reproducible, could you also please test the latest upstream kernel available (not the daily folder) following https://wiki.ubuntu.com/KernelMainlineBuilds ? It will allow additional upstream developers to examine the issue. Once you've tested the upstream kernel, please comment on which kernel version specifically you tested. If this bug is fixed in the mainline kernel, please add the following tags:
kernel-fixed-upstream
kernel-fixed-upstream-VERSION-NUMBER

where VERSION-NUMBER is the version number of the kernel you tested. For example:
kernel-fixed-upstream-v3.3.13-rc6

This can be done by clicking on the yellow circle with a black pencil icon next to the word Tags located at the bottom of the bug description. As well, please remove the tag:
needs-upstream-testing

If the mainline kernel does not fix this bug, please add the following tags:
kernel-bug-exists-upstream
kernel-bug-exists-upstream-VERSION-NUMBER

As well, please remove the tag:
needs-upstream-testing

Once testing of the upstream kernel is complete, please mark this bug's Status as Confirmed. Please let us know your results. Thank you for your understanding.

Changed in linux (Ubuntu):
status: New → Confirmed
penalvch (penalvch)
affects: unity → linux (Ubuntu)
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
penalvch (penalvch)
no longer affects: systemd (Ubuntu)
Revision history for this message
Samir M (samir-menon-cs) wrote :

Bug is still present in Ubuntu 16.04 as of:
Linux 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

As a note, the solution here fixes the slowdown:
http://askubuntu.com/questions/792605/ubuntu-16-04-lts-too-slow-after-suspend-and-resume

Seems like some problem with resetting the msr register after a suspend. More here :
https://bbs.archlinux.org/viewtopic.php?id=199922

Revision history for this message
penalvch (penalvch) wrote :

Samir M (samir-menon-cs), it will help immensely if you filed a new report with Ubuntu, using the default repository kernel (not mainline/upstream/3rd party) via a terminal:
ubuntu-bug linux

Please feel free to subscribe me to it.

For more on why this is helpful, please see https://wiki.ubuntu.com/ReportingBugs.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.