screensaver is a cpu hog - causing waste of energy

Bug #2015979 reported by roland aus köln
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lubuntu-default-settings (Ubuntu)
Triaged
Low
Lubuntu Developers

Bug Description

i have installed lubuntu in a VM and default screensaver causing 70% of cpu load on a dual vcpu VM.

from an environmental perspective, this is sort of nogo in 2023, as it's wasting precious energy/ressources and also wasting peoples money ( we have prices more then 50ct/kwh here in germany).

furthermore, it will unnecessarily put stress on your hardware, which could be avoided.

please make screensaver defaults more cpu/energy friendly

http://codesqueeze.com/save-energy-kill-your-screensaver/

for example, on my macmini, with lubuntu VM idle in the background,
idle power consumtion is <10W and with the screensaver going active
it's increasing to 20W.

that's additional 10W (double in energy usage ) - or 7,2kWh in a month
- for a screen where nothing is to be "saved" and where you typically
don't often look at.

Revision history for this message
roland aus köln (devzero-c) wrote :
description: updated
description: updated
Revision history for this message
Chris Guiver (guiverc) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command only once, as it will automatically gather debugging information, in a terminal:

apport-collect 2015979

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :

I don't think this is so much of a bug in Lubuntu as it is a limitation of most VM software in general.

VM software is generally very good at virtualizing a computer's CPU and most other "normal" components (sound, motherboard, etc.). However, graphics hardware is much more difficult to virtualize most of the time due to limitations of the GPU hardware (only some GPUs allow you to "split" one physical GPU into multiple virtual GPUs), and so virtualization software will usually only provide relatively basic graphics capabilities to the VM by default.

XScreenSaver relies on having graphics hardware to display screensavers. When that hardware isn't available, it falls back to using the CPU to render the screensavers. And since the VM software doesn't provide good graphics acceleration to the VM, XScreenSaver puts a large load on the CPU, causing the resource usage spike you're seeing.

The best way to get around this is probably to just disable the screensaver - you should be able to do this by opening the XScreenSaver settings (by going to the Application Menu, searching for "Screensaver", and then clicking "Screensaver). There's a menu on the left-hand side near the top where you can select "Disable Screen Saver", if I remember correctly.

The screensaver is (at least in all existing versions of Lubuntu) an important part of the Lubuntu experience, and disabling it by default in existing releases of Lubuntu would be a feature-breaking change that we would probably not be allowed to make (as Lubuntu is an official Ubuntu flavor and thus has to abide by Ubuntu's rules when it comes to how we do things). And the soon-to-be-released Lubuntu Lunar release has already passed Feature Freeze, so we're probably already stuck with the screensaver enabled by default there. However, we may be able to consider disabling the screensaver by default in a future release of Lubuntu, if we determine that the costs of the screensaver outweigh the benefits of having it enabled by default. For now, disabling it manually is probably the best solution.

Revision history for this message
roland aus köln (devzero-c) wrote (last edit ):

thank you for the long explanation. i can understand your point of view and i respect that.

but please understand my point of view

lubuntu is a distro used by hundreds of thousands people, and it's especially being a ressource-saving distro for not so fast or ressource constrained hardware and very likely for virtual environments. it's not that "eye candy bloated" distro as many others.

nowadays, virtualization is very popular and i bet there are much more linux installations running on virtual machines then on real hardware.

trying to minimize energy consumption at such scale DOES make a difference.

it's not a matter of a couple of kWh or some dollars, we are probably speaking of thousands of kWh , which cost a large amount of money and produce a large amount of CO2 and pollutants.

you (and me and us all) have some responsibility, as we can easily make some change via some git commit, which enables people using their electricity and money for more sensible stuff.

regarding "but you can switch it off":
many people don't care, especially where energy prices are low. some may switch to a different screensaver. but many many don't. most likeley because they simply can't easily see, that it's causing significant additional energy consumption.

please, let's care for their bill and for the environment instead of persisting on "eyecandy".

i have checked, how things behave in ubuntu and xubuntu.

in ubuntu, there is no screensaver by default - only black/blank screen .cpu is idling at <1% in a VM :
https://www.debugpoint.com/install-change-autostart-setup-screensaver-ubuntu-linux/

same for xubuntu.

same for kubuntu.

same for linux mint (which is also ubuntu based).

will lubuntu please follow that "strategy" ?

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote (last edit ):

I don't have the authority to decide if Lubuntu will follow that "strategy" by default all by myself, so I can't say what Lubuntu will and won't do in the future. It's definitely something we can consider and change in future releases, but whether we will or not isn't in my power to decide on my own.

However, it's not as simple as a Git commit. There is a process enforced by the Ubuntu development community for changing anything in an already-released version of any official Ubuntu flavor (Lubuntu included). This process reduces the chances of accidental or detrimental changes being made to Ubuntu as a whole. (You can take a look at it at https://wiki.ubuntu.com/StableReleaseUpdates)

This process is very strict, and it prohibits us from making changes like you are suggesting unless we can make a very strong argument that the current behavior is a "bug" in the strict sense (i.e., an error in how software functions that results in an outcome other than what the developer intended or that could cause significant damage even if it is intended behavior). Certainly it can be argued that the needless use of electricity is damaging, but if an update were to be released that disabled the screensaver by default, it would result in many (if not most) existing users of Lubuntu having their screensaver stop working. Having worked with the Stable Release Updates team, they are likely to consider the screensaver vanishing to be more disruptive than the use of excess power.

This is a design decision that needed to be made before a release of Lubuntu went into Feature Freeze. For released versions of Lubuntu, Feature Freeze is long past, and for Lubuntu Lunar (23.04), Feature Freeze hit about a month or so ago. We are free to make a different design decision for whatever version of Lubuntu comes after Lubuntu Lunar (23.04), but the decision is made now and undoing it isn't within our power.

Again, we may consider only blanking the screen (and not displaying a screensaver) in future releases of Lubuntu (23.10 and higher). Whether we will or not isn't something I decide by myself.

(By the way, this is a good discussion, but it may be better if we had this discussion on our Discourse forum at https://discourse.lubuntu.me/. A bug report isn't really the best place to discuss this.)

Revision history for this message
roland aus köln (devzero-c) wrote (last edit ):

ok. it doesn't matter if it isn't fixed for the current release . if it's
such problematic, i'd be also fine if it's fixed in the next release.

>Certainly it can be argued that the needless use of electricity is
>damaging, but if an update were to be released that disabled the
>screensaver by default, it would result in many (if not most) existing
>users of Lubuntu having their screensaver stop working

i never told that the screensaver should be disabled by default. it should
only be switched to something cpu/energy friendly and if there is no
 better alternative for flurry, you could simply set it to "mode: blank" in
/usr/lib/X11/app-defaults/XScreensaver and leave it up to the end-user
 to change it to his favourite one.

here is the change that introduced flurry as the default screensaver:

https://phab.lubuntu.me/rDEFAULTSETTINGS0169ba6e57beddd7a519a2dd678b1b652f659b86

does anybody have an estimate/guess how many lubuntu installations
are out there in this world?

description: updated
description: updated
description: updated
Revision history for this message
roland aus köln (devzero-c) wrote :

@wxl, i have added you to this bug to ping you, because i see you had committed/reviewed that change and i don't know how to contact the original author. hope that's ok. i know that's not the best way to contact people. feel free to unsubscribe again.

description: updated
Revision history for this message
roland aus köln (devzero-c) wrote (last edit ):

manjaro linux: <1% cpu after installation and going idle. no cpu/gpu heavy use screensaver
opensuse leap: <2% cpu

Revision history for this message
roland aus köln (devzero-c) wrote :

default xscreensaver in lxde desktop in debian11 is "random" and thus may also lead to excessive cpu usage in virtual machine. will do debian reportbug for this

Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

I know we've made some changes. Still an issue?

Changed in lubuntu-default-settings (Ubuntu):
status: New → Incomplete
Revision history for this message
roland aus köln (devzero-c) wrote :

what has been changed?

I installed fresh lubuntu 23.10 and appended all updates, then created a new user and logged in this one.

screensaver is gl-matrix for this new user and it's still hogging the CPU when in a VM

Revision history for this message
roland aus köln (devzero-c) wrote :

found it:

http://changelogs.ubuntu.com/changelogs/pool/universe/l/lubuntu-default-settings/lubuntu-default-settings_24.04.6/changelog

" * Changed the default screensaver to GL Matrix to avoid using the sometimes
    glitchy-looking Flurry screensaver. (LP: #1855220)"

:-/

B-|

Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

Ok, well, patches welcome. How would you suggest we change it?

Revision history for this message
roland aus köln (devzero-c) wrote :

what about "blank screen" ?

Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

Sounds fine. We'll deal with it next cycle.

Once Wayland comes around we likely won't have a screensaver anyways.

Changed in lubuntu-default-settings (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → Low
assignee: nobody → Lubuntu Developers (lubuntu-dev)
milestone: none → later
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.