You should enable power saving (auto suspend) for virutal machine!

Open
#413 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
desktop

Research direction

Start with plugins/power/csd-power-manager.c at lines 3011-3015 and reproduce the behavior in a LinuxMint KVM guest using the Cinnamon or MATE desktop. Trace how automatic suspend is disabled for virtual machines and inspect the power settings UI. Done means the behavior is configurable for VMs or the UI clearly explains the restriction.

Written by the indexing model from the issue text.

Description

I am running LinuxMint in KVM virtual machine. I have the need to put VM in sleep/suspend mode if no activity.
It works pretty fine for KDE desktop in the VM. However, in Cinnamon/MATE desktop, it never auto suspends. If I click the suspend button in the UI, or run systemctl suspend manually, it actually works.

After spending one whole day to debug this problem, I noticed this code:
https://github.com/linuxmint/cinnamon-settings-daemon/blob/789b2ee5908f1b186a29cbd6d0accd31c3c1bf97/plugins/power/csd-power-manager.c#L3011-L3015

You just force disable auto suspend for all VMs. This is very stupid, as sometimes someone may really need auto suspend. It is the end user rather than you developers that is responsible to decide how to save the power.

You should at least provide an option to enable this feature for VMs. Or you should note the user about this point in the settings UI. Adding some weird "feature" without notifying the end user is really bad! It wasted everyone's time!

Dominant language
C
Stars
71
Forks
75
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from linuxmint/cinnamon-settings-daemon

All issues in linuxmint/cinnamon-settings-daemon

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.