Really Slick Screensavers use 100% CPU

Bug #129142 reported by Brian Pitts
20
Affects Status Importance Assigned to Milestone
rss-glx (Debian)
Fix Released
Unknown
rss-glx (Ubuntu)
Fix Released
High
Unassigned
Hardy
Won't Fix
High
Unassigned
Intrepid
Won't Fix
High
Unassigned

Bug Description

Binary package hint: rss-glx

These screensavers use all available processor cycles. This is undesirable from a power consumption and heat standpoint. This behavior can be changed by using both the --maxfps and --nice arguments.

Related branches

Brian Pitts (bpitts)
description: updated
Revision history for this message
Richard Birks (richard-birks) wrote :

Happened to my gutsy (tribe 3) install on several screensavers after updating this morning. No problems previously. Xorg seems to be burning the CPU cycles at the same too.

Suspect it's nothing to do with the default screensaver settings.

Revision history for this message
Brian Pitts (bpitts) wrote :

Richards issue sounds like a different one to me. WIthout --maxfps set to a reasonable number and --nice, "really slick screensavers" have always used 100% CPU for me at full-screen resolutions.

       --maxfps number
               Set maximum frame rate.
       --nice Idle between frames using select(), or, if --maxfps is speci‐
               fied, idle in the fps limiting delay loop.

Revision history for this message
Richard Birks (richard-birks) wrote :

Possibly, but may be the same underlying cause, just that today's update exacerbated the problem.

I'm now seeing 100% CPU even in the preview Window - I was previously using Matrixview full screen (1680 x 1050) without any problems, but now the framerate has dropped right off and the screensaver stutters quite badly and as I'm only single-core it can take several seconds to get back to desktop once the screensaver kicks in.

Was digging around to see if Update-manager logs to a file somewhere, that might give a hint as to what update borked performance today.

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

Same issue here, except this is a dualcore and it's hogging them at 50%, even in the preview window. Ubuntu 8.04 64bit RC.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

What graphic cards and drivers are you all using? Please paste in the output from these commands:
 grep /usr/lib/xorg/modules/drivers/ /var/log/Xorg.0.log
to get the driver, and:
 lspci -nn|grep VGA
to get the exact card model. Thanks.

Revision history for this message
Brian Pitts (bpitts) wrote :

I've experienced this with the open-source radeon and intel drivers.

Revision history for this message
Vadim Peretokin (vperetokin) wrote : Re: [Bug 129142] Re: Really Slick Screensavers use 100% CPU
  • unnamed Edit (311 bytes, text/html; charset=ISO-8859-1)

vadi@ubuntu-laptop:~$ grep /usr/lib/xorg/modules/drivers/
/var/log/Xorg.0.log
(II) Loading /usr/lib/xorg/modules/drivers//nvidia_drv.so
vadi@ubuntu-laptop:~$ lspci -nn|grep VGA
01:00.0 VGA compatible controller [0300]: nVidia Corporation GeForce 8600M
GT [10de:0407] (rev a1)
vadi@ubuntu-laptop:~$

Revision history for this message
Jussi Kivilinna (jukivili) wrote :

Here's patch for rss-glx 0.8.1 that enables frame limiter (50fps) by default and fixes frame limiter code. Also expands --max-fps and --nice parameters so they can used to disable frame limiter, not just turn it on.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

evilspy, thanks! Can you please make a debdiff against the current intrepid version?

Changed in rss-glx:
status: New → Confirmed
Revision history for this message
Jussi Kivilinna (jukivili) wrote :

Here's debdiff against intrepid version, split changes into three separate patches and made use of dpatch.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Fabulous. Can you please also send it upstream, and to Debian if you haven't already?

Revision history for this message
Jussi Kivilinna (jukivili) wrote :

I will.

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

Thanks evilspy, I hope this means it'll be fixed in 8.10 then

Revision history for this message
Jussi Kivilinna (jukivili) wrote :

Small bug in 0.8.1-10ubuntu2jk1, --nice doesn't work without argument.

So here's new version 0.8.1-10ubuntu2jk2 (debdiff against 0.8.1-10ubuntu2)

Revision history for this message
Gene Caldwell (gene-caldwell) wrote :

everyone seems to know what to do with this attachment, however I only know about .deb packages, someone kindly help out the clueless ?

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Please make a new "real" ubuntu version in the changelog, i.e. ubuntu3, so that your patch can be applied and uploaded as is.

A few comments and questions (I just had a quick look at the patch and haven't checked the code, and you're definitely more proficient at c++ than I am):
- it's easier to see what you change on the Build-Depends line if you just add dpatch to the end.
- the changelog entry might need a colon after LP, like "LP: #bug number".
- there's two variables "now", one double, one timeval.
- the boolean expression "optarg != NULL" might as well be written "optarg" (question of taste I guess)
- if you define DEFAULT_FPS to 50, do you need the ==0 logic guarding just after it?

Revision history for this message
Gene Caldwell (gene-caldwell) wrote :

ok, here we go again, I think I know what it is. but more importantly I know that its not an installable update. why can't we get fixes for bug in .deb packages guys ? common, I'm not a developer, I'm a user and I use hardy right now, its beyond me how a fix for a problem this big is only being talked about in terms of intrepid.....can we get a fix for the current release of ubuntu in a form that can be installed and can we get it sent to backports so that it gets distributed through the package management system ????

Revision history for this message
Oliver Grawert (ogra) wrote :

well, if it goes/went to debian, we can more esily sync it .... i'm fine supporting a freeze exception for it

Revision history for this message
Oliver Grawert (ogra) wrote :

i have nominated it for hardy, lest see what the release managers and QA say ....

Revision history for this message
Jussi Kivilinna (jukivili) wrote :

Quoting "Tormod Volden" <email address hidden>:

> Please make a new "real" ubuntu version in the changelog, i.e. ubuntu3,
> so that your patch can be applied and uploaded as is.
>

Oh, ok. First time sending deb package updates :)

> A few comments and questions (I just had a quick look at the patch
> and haven't checked the code, and you're definitely more proficient
> at c++ than I am):
> - it's easier to see what you change on the Build-Depends line if
> you just add dpatch to the end.

Ok.

> - the changelog entry might need a colon after LP, like "LP: #bug number".

Ok.

> - there's two variables "now", one double, one timeval.

Renamed 'now' in the new function getSeconds.

> - the boolean expression "optarg != NULL" might as well be written
> "optarg" (question of taste I guess)

Ok, should follow code style of project, omitted "!= NULL".

> - if you define DEFAULT_FPS to 50, do you need the ==0 logic
> guarding just after it?

In case some user wants to change DEFAULT_FPS and sets it to zero, so guard
against division by zero.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Gene, patience :) It should go into Intrepid for testing first, and then it can be backported to Hardy. This is the standard QA practice. And since the developer resources are limited, it's more important to fix problems in the next version than in the old, otherwise the releases would become worse and worse. I share your frustration that things don't get fixed in the release that people are actually using, but this has improved in Hardy - you've probably noticed the flow of software updates.

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

Gene: this "patch" thing means that it'll be fixed in Ubuntu, and generally
the fix, seeing as it's not that important, will be available in the next
version of Ubuntu (8.10). Or if you'd like it now, someone needs to either
make a .deb, or "backport" the fixed package from 8.10.

I'll let you know when there's an installable solution available for 8.04
though.

Revision history for this message
Gene Caldwell (gene-caldwell) wrote :

lol, ok guys, I'll be patient....do you think it will be ready in the next hour or so ? *grin* ( thanks for letting me know.)

Revision history for this message
Oliver Grawert (ogra) wrote :

https://wiki.ubuntu.com/StableReleaseUpdates explains how an update to hardy (or any other released version of ubuntu) works ...

another option would be a backport (https://help.ubuntu.com/community/UbuntuBackports) but that bug is serious enough to qualify for an SRU ....

Revision history for this message
Tormod Volden (tormodvolden) wrote :

There are test packages for Hardy with Jussi's patch in my PPA. From running them from the command line (a la https://wiki.ubuntu.com/X/Screensavers) I see massive improvements on my system, but half of them still consume almost 100% (attached CPU usage log).

Revision history for this message
Jussi Kivilinna (jukivili) wrote :
Download full text (4.2 KiB)

I made some tests, on my system hyperspace is worst offender.

GeForce 9800 GT and Core Duo 3.2Ghz with compiz 0.7.4, xserver 1.4.1 and mesa 7.0.3.

Default FPS 50:
jussi 18320 0.5 1.3 54224 28076 pts/0 SL 15:15 0:00 /usr/lib/xscreensaver/colorfire
jussi 18416 3.2 1.5 52152 31852 pts/0 RL 15:18 0:00 /usr/lib/xscreensaver/flux
jussi 18470 2.7 1.3 54612 28220 pts/0 SL 15:19 0:00 /usr/lib/xscreensaver/hufo_tunnel
jussi 18620 1.7 1.3 44076 27052 pts/0 SL 15:23 0:00 /usr/lib/xscreensaver/sundancer2
jussi 18666 6.2 1.5 54536 32604 pts/0 SL 15:25 0:01 /usr/lib/xscreensaver/euphoria
jussi 18378 6.3 1.5 51876 31532 pts/0 SL 15:17 0:01 /usr/lib/xscreensaver/fieldlines
jussi 18452 5.5 1.5 52036 31800 pts/0 SL 15:19 0:01 /usr/lib/xscreensaver/hufo_smoke
jussi 18506 4.0 1.6 55932 33080 pts/0 SL 15:20 0:01 /usr/lib/xscreensaver/lattice
jussi 18282 7.4 1.5 53468 31128 pts/0 SL 15:14 0:02 /usr/lib/xscreensaver/biof
jussi 18301 8.0 1.5 51884 31956 pts/0 SL 15:15 0:02 /usr/lib/xscreensaver/busyspheres
jussi 18526 8.8 1.6 91624 34808 pts/0 SL 15:21 0:02 /usr/lib/xscreensaver/matrixview
jussi 18582 7.8 1.5 52152 31920 pts/0 SL 15:22 0:02 /usr/lib/xscreensaver/solarwinds
jussi 18396 12.1 1.5 52432 32064 pts/0 SL 15:17 0:03 /usr/lib/xscreensaver/flocks
jussi 18546 12.9 1.1 56772 24512 pts/0 SL 15:21 0:03 /usr/lib/xscreensaver/plasma
jussi 18340 15.5 1.5 52152 31928 pts/0 SL 15:16 0:04 /usr/lib/xscreensaver/cyclone
jussi 18600 14.2 1.5 53276 31608 pts/0 SL 15:23 0:04 /usr/lib/xscreensaver/spirographx
jussi 18564 19.8 2.0 73772 42144 pts/0 SL 15:22 0:05 /usr/lib/xscreensaver/skyrocket
jussi 18432 21.5 1.8 59832 38276 pts/0 SL 15:18 0:06 /usr/lib/xscreensaver/helios
jussi 18490 52.3 2.8 92324 58268 pts/0 RL 15:20 0:15 /usr/lib/xscreensaver/hyperspace

Changing default FPS to 30 (ofcourse I could have used -x30 instead):
jussi 31992 0.3 1.0 54032 21744 pts/0 SL 15:31 0:00 /usr/lib/xscreensaver/colorfire
jussi 32031 2.1 1.5 54496 32732 pts/0 SL 15:32 0:00 /usr/lib/xscreensaver/euphoria
jussi 32090 2.6 1.5 52144 31924 pts/0 SL 15:34 0:00 /usr/lib/xscreensaver/flux
jussi 32144 1.5 1.5 54896 32660 pts/0 SL 15:35 0:00 /usr/lib/xscreensaver/hufo_tunnel
jussi 32182 2.9 1.6 56080 33380 pts/0 RL 15:36 0:00 /usr/lib/xscreensaver/lattice
jussi 32303 1.5 1.1 44072 22956 pts/0 RL 15:39 0:00 /usr/lib/xscreensaver/sundancer2
jussi 31974 5.0 1.5 51888 32020 pts/0 SL 15:31 0:01 /usr/lib/xscreensaver/busyspheres
jussi 32128 3.5 1.5 52040 31816 pts/0 SL 15:35 0:01 /usr/lib/xscreensaver/hufo_smoke
jussi 32202 5.8 1.6 91616 34804 pts/0 SL 15:37 0:01 /usr/lib/xscreensaver/matrixview
jussi 32256 4.9 1.5 52068 31772 pts/0 SL 15:38 0:01 /usr/lib/xscreensaver/solarwinds
jussi 31953 9.3 1.5 53140 31060 pts/0 SL 15:30 0:02 /usr/lib/xscreensaver/biof
jussi 32012 9.5 1.5 52152 31924 pts/0 SL 15:32 0:02 /usr/l...

Read more...

Revision history for this message
Jussi Kivilinna (jukivili) wrote :

Results on laptop with Celeron-M 1.4Ghz + VIA Unichrome IGP (fps 30):

jussi 22359 1.0 0.7 26848 5220 pts/0 S 18:04 0:00 /usr/lib/xscreensaver/colorfire -x30
jussi 22439 2.4 0.6 25180 4376 pts/0 S 18:12 0:00 /usr/lib/xscreensaver/sundancer2 -x30
jussi 22349 5.5 0.7 26728 5044 pts/0 R 18:03 0:01 /usr/lib/xscreensaver/biof -x30
jussi 22399 5.5 0.7 27244 5308 pts/0 S 18:08 0:01 /usr/lib/xscreensaver/hufo_tunnel -x30
jussi 22429 16.5 0.6 26732 4768 pts/0 S 18:11 0:04 /usr/lib/xscreensaver/solarwinds -x30
jussi 22356 18.9 0.7 26732 5028 pts/0 R 18:04 0:05 /usr/lib/xscreensaver/busyspheres -x30
jussi 22396 16.8 0.7 26888 4972 pts/0 R 18:08 0:05 /usr/lib/xscreensaver/hufo_smoke -x30
jussi 22376 21.2 0.6 26724 4764 pts/0 S 18:06 0:06 /usr/lib/xscreensaver/fieldlines -x30
jussi 22386 20.1 0.6 26736 4876 pts/0 S 18:07 0:06 /usr/lib/xscreensaver/flux -x30
jussi 22366 29.2 0.6 26736 4892 pts/0 R 18:05 0:08 /usr/lib/xscreensaver/cyclone -x30
jussi 22369 28.9 0.7 26908 5204 pts/0 R 18:05 0:08 /usr/lib/xscreensaver/euphoria -x30
jussi 22379 31.9 0.6 26732 4944 pts/0 R 18:06 0:09 /usr/lib/xscreensaver/flocks -x30
jussi 22416 31.1 0.9 32308 6400 pts/0 S 18:10 0:09 /usr/lib/xscreensaver/matrixview -x30
jussi 22436 32.7 0.6 28124 4840 pts/0 R 18:12 0:09 /usr/lib/xscreensaver/spirographx -x30
jussi 22409 35.3 0.7 27640 5336 pts/0 S 18:09 0:10 /usr/lib/xscreensaver/lattice -x30
jussi 22419 36.2 1.0 26736 7720 pts/0 R 18:10 0:10 /usr/lib/xscreensaver/plasma -x30
jussi 22426 64.4 1.2 31140 8560 pts/0 S 18:11 0:19 /usr/lib/xscreensaver/skyrocket -x30
jussi 22389 75.8 1.4 31788 10644 pts/0 R 18:07 0:22 /usr/lib/xscreensaver/helios -x30
jussi 22406 97.2 1.8 32448 13344 pts/0 R 18:09 0:29 /usr/lib/xscreensaver/hyperspace -x30

With some changes to defaults:
jussi 22503 56.7 2.1 34348 15244 pts/0 R 18:17 0:17 /usr/lib/xscreensaver/hyperspace --stars=200 --resolution=4 -x30

Helios runs much faster with '--no-surface' and by tweaking source for less resolution on surfaces CPU can be reduced greatly.

Revision history for this message
Jussi Kivilinna (jukivili) wrote :

New upstream version 0.8.2 available.

Changelog for 0.8.2:

    * Limit frame rate to vertical refresh by default if compiled with GLEW and GLX_SGI_swap_control is available. Otherwise, maxfps set to 30.
    * --nice eliminated and made default. nanosleep/usleep are much better behaved these days.
    * spirographx modified to use vertex arrays and GNU extension sincosf if available, dropping CPU usage significantly.
    * Minor updates to correct issues noted by newer compilers.
    * --disable-debug is now the default in configure.

Revision history for this message
Gene Caldwell (gene-caldwell) wrote :

nearly two months later and testing ubuntu 8.10 RC this new version of RSS-GLX 0.8.2 is still not showing up in the repos. The RC version of RSS-GLX is 0.8.1-10ubuntu2. How much longer before this critical fix is available ?

Bryce Harrington (bryce)
Changed in rss-glx:
importance: Undecided → High
status: Confirmed → Triaged
Changed in rss-glx:
status: New → Triaged
status: New → Triaged
importance: Undecided → High
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rss-glx - 0.8.2-1ubuntu1

---------------
rss-glx (0.8.2-1ubuntu1) jaunty; urgency=low

  * Merge from debian unstable, remaining changes:
    - Drop dependency on openal. It is not enabled by default anyway, and
      allows openal to migrate to universe. (LP: #243719)
    - reallyslick/cpp_src/skyrocket.{cpp,xml}: Disable sound by default.
      (LP #21507)
    - change maintainer field according to spec
  * Screensavers no longer take 100% CPU (LP: #129142)

rss-glx (0.8.2-1) unstable; urgency=low

  * New upstream release
    - Fixes screensavers consuming 100% CPU (Closes: #445204)
  * Add Homepage field to control file (Closes: #492338)

rss-glx (0.8.1-11) experimental; urgency=low

  * Apply patch to build with new ImageMagick in experimental
    (Closes: #485896)

 -- Sarah Hobbs <email address hidden> Sat, 22 Nov 2008 19:10:21 +1100

Changed in rss-glx:
status: Triaged → Fix Released
Changed in rss-glx:
status: Unknown → Fix Released
Revision history for this message
Fabiano Antunes (fabianoantunes) wrote :

I'm currently running Ubuntu Jaunty (9.04) in a Sony Vaio VGN-SR350A and it seems that the same problem is occurring again.
MatrixView screensaver starts and when you try to come back, the whole computer freezes.
Is there any way to fix it?
What command outputs I can provide to help solving this?

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Fabiano, please file a new bug with "ubuntu-bug rss-glx", and try Karmic if you have the chance.

Revision history for this message
Martin Pitt (pitti) wrote :

This does not really match the criteria for https://wiki.ubuntu.com/StableReleaseUpdates, and has a fairly intrusive patch.

Changed in rss-glx (Ubuntu Hardy):
status: Triaged → Won't Fix
Changed in rss-glx (Ubuntu Intrepid):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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