All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1502613] [NEW] [Feature Request] Battery Status / Virtual Battery
@ 2015-10-04 13:12 Wolfgang Andreas
  2016-06-07 20:53 ` [Qemu-devel] [Bug 1502613] " Naftaly Avadiaev
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Wolfgang Andreas @ 2015-10-04 13:12 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

When using virtualization on notebooks heavily then virtual machines do
not realize that they're running on a notebook device causing high power
consumption because they're not switching into a optimized "laptop
mode". This leads to the circumstance that they are trying to do things
like defragmentation / virtus scan / etc. while the host is still
running on batteries.

So it would be great if QEMU / KVM would have support for emulating
"Virtual Batteries" to guests causing them to enable power-saving
options like disabling specific services / devices / file operations
automatically by OS.

Optionally a great feature would be to set virtual battery's status
manually. For example: Current charge rate / charging / discharging /
...

** Affects: qemu
     Importance: Undecided
         Status: New


** Tags: battery management power virtual

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1502613

Title:
  [Feature Request] Battery Status / Virtual Battery

Status in QEMU:
  New

Bug description:
  When using virtualization on notebooks heavily then virtual machines
  do not realize that they're running on a notebook device causing high
  power consumption because they're not switching into a optimized
  "laptop mode". This leads to the circumstance that they are trying to
  do things like defragmentation / virtus scan / etc. while the host is
  still running on batteries.

  So it would be great if QEMU / KVM would have support for emulating
  "Virtual Batteries" to guests causing them to enable power-saving
  options like disabling specific services / devices / file operations
  automatically by OS.

  Optionally a great feature would be to set virtual battery's status
  manually. For example: Current charge rate / charging / discharging /
  ...

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1502613/+subscriptions

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] [Bug 1502613] Re: [Feature Request] Battery Status / Virtual Battery
  2015-10-04 13:12 [Qemu-devel] [Bug 1502613] [NEW] [Feature Request] Battery Status / Virtual Battery Wolfgang Andreas
@ 2016-06-07 20:53 ` Naftaly Avadiaev
  2020-02-10 23:22 ` Sergey Nizovtsev
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Naftaly Avadiaev @ 2016-06-07 20:53 UTC (permalink / raw)
  To: qemu-devel

I'm trying to add virtual battery to QEMU. More specifically, if the
HOST is running on battery power [laptop] I want to pass this knowledge
to GUEST.

I have looked at ACPI folder within QEMU source code, however was unable
to find the specific place where I can add this functionality.

Can someone provide me with general roadmap of what should I do and
where I should start? I suspect that changing the QEMU source code will
not be enough and I will also have to implement a driver for the GUEST.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1502613

Title:
  [Feature Request] Battery Status / Virtual Battery

Status in QEMU:
  New

Bug description:
  When using virtualization on notebooks heavily then virtual machines
  do not realize that they're running on a notebook device causing high
  power consumption because they're not switching into a optimized
  "laptop mode". This leads to the circumstance that they are trying to
  do things like defragmentation / virtus scan / etc. while the host is
  still running on batteries.

  So it would be great if QEMU / KVM would have support for emulating
  "Virtual Batteries" to guests causing them to enable power-saving
  options like disabling specific services / devices / file operations
  automatically by OS.

  Optionally a great feature would be to set virtual battery's status
  manually. For example: Current charge rate / charging / discharging /
  ...

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1502613/+subscriptions

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 1502613] Re: [Feature Request] Battery Status / Virtual Battery
  2015-10-04 13:12 [Qemu-devel] [Bug 1502613] [NEW] [Feature Request] Battery Status / Virtual Battery Wolfgang Andreas
  2016-06-07 20:53 ` [Qemu-devel] [Bug 1502613] " Naftaly Avadiaev
@ 2020-02-10 23:22 ` Sergey Nizovtsev
  2020-05-17 20:10 ` mizz
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Sergey Nizovtsev @ 2020-02-10 23:22 UTC (permalink / raw)
  To: qemu-devel

I've started working on this issue and have some progress. Fedora 31
guest is already able to see a battery device but its state currently
hardcoded. I think i will finish this in a few weeks.

** Attachment added: "qemu-battery-poc.png"
   https://bugs.launchpad.net/qemu/+bug/1502613/+attachment/5327136/+files/qemu-battery-poc.png

** Changed in: qemu
     Assignee: (unassigned) => Sergey Nizovtsev (snizovtsev)

** Changed in: qemu
       Status: New => In Progress

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1502613

Title:
  [Feature Request] Battery Status / Virtual Battery

Status in QEMU:
  In Progress

Bug description:
  When using virtualization on notebooks heavily then virtual machines
  do not realize that they're running on a notebook device causing high
  power consumption because they're not switching into a optimized
  "laptop mode". This leads to the circumstance that they are trying to
  do things like defragmentation / virtus scan / etc. while the host is
  still running on batteries.

  So it would be great if QEMU / KVM would have support for emulating
  "Virtual Batteries" to guests causing them to enable power-saving
  options like disabling specific services / devices / file operations
  automatically by OS.

  Optionally a great feature would be to set virtual battery's status
  manually. For example: Current charge rate / charging / discharging /
  ...

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1502613/+subscriptions


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 1502613] Re: [Feature Request] Battery Status / Virtual Battery
  2015-10-04 13:12 [Qemu-devel] [Bug 1502613] [NEW] [Feature Request] Battery Status / Virtual Battery Wolfgang Andreas
  2016-06-07 20:53 ` [Qemu-devel] [Bug 1502613] " Naftaly Avadiaev
  2020-02-10 23:22 ` Sergey Nizovtsev
@ 2020-05-17 20:10 ` mizz
  2020-05-18  8:06 ` Philippe Mathieu-Daudé
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mizz @ 2020-05-17 20:10 UTC (permalink / raw)
  To: qemu-devel

Has there been any progress? I'm using KVM for ubuntu 20.04 and would
love to have this feature.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1502613

Title:
  [Feature Request] Battery Status / Virtual Battery

Status in QEMU:
  In Progress

Bug description:
  When using virtualization on notebooks heavily then virtual machines
  do not realize that they're running on a notebook device causing high
  power consumption because they're not switching into a optimized
  "laptop mode". This leads to the circumstance that they are trying to
  do things like defragmentation / virtus scan / etc. while the host is
  still running on batteries.

  So it would be great if QEMU / KVM would have support for emulating
  "Virtual Batteries" to guests causing them to enable power-saving
  options like disabling specific services / devices / file operations
  automatically by OS.

  Optionally a great feature would be to set virtual battery's status
  manually. For example: Current charge rate / charging / discharging /
  ...

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1502613/+subscriptions


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 1502613] Re: [Feature Request] Battery Status / Virtual Battery
  2015-10-04 13:12 [Qemu-devel] [Bug 1502613] [NEW] [Feature Request] Battery Status / Virtual Battery Wolfgang Andreas
                   ` (2 preceding siblings ...)
  2020-05-17 20:10 ` mizz
@ 2020-05-18  8:06 ` Philippe Mathieu-Daudé
  2020-05-18  9:45 ` Sergey Nizovtsev
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-18  8:06 UTC (permalink / raw)
  To: qemu-devel

The implementation could be similar to the temperature sensor interface proposed here:
https://www.mail-archive.com/qemu-block@nongnu.org/msg65192.html

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1502613

Title:
  [Feature Request] Battery Status / Virtual Battery

Status in QEMU:
  In Progress

Bug description:
  When using virtualization on notebooks heavily then virtual machines
  do not realize that they're running on a notebook device causing high
  power consumption because they're not switching into a optimized
  "laptop mode". This leads to the circumstance that they are trying to
  do things like defragmentation / virtus scan / etc. while the host is
  still running on batteries.

  So it would be great if QEMU / KVM would have support for emulating
  "Virtual Batteries" to guests causing them to enable power-saving
  options like disabling specific services / devices / file operations
  automatically by OS.

  Optionally a great feature would be to set virtual battery's status
  manually. For example: Current charge rate / charging / discharging /
  ...

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1502613/+subscriptions


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 1502613] Re: [Feature Request] Battery Status / Virtual Battery
  2015-10-04 13:12 [Qemu-devel] [Bug 1502613] [NEW] [Feature Request] Battery Status / Virtual Battery Wolfgang Andreas
                   ` (3 preceding siblings ...)
  2020-05-18  8:06 ` Philippe Mathieu-Daudé
@ 2020-05-18  9:45 ` Sergey Nizovtsev
  2020-08-05  6:17 ` Nahuel Pastorale
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Sergey Nizovtsev @ 2020-05-18  9:45 UTC (permalink / raw)
  To: qemu-devel

mizz,

I'm worked on it and got a working draft on pre-5.0 codebase. It can
react on QMP property changes to trigger ACPI events on x86 and arm-
virt.

However i've stuck on frontend/backend split. Keep calm, i'm still
working on the task and will complete this soon.

Philippe, thanks for advice!

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1502613

Title:
  [Feature Request] Battery Status / Virtual Battery

Status in QEMU:
  In Progress

Bug description:
  When using virtualization on notebooks heavily then virtual machines
  do not realize that they're running on a notebook device causing high
  power consumption because they're not switching into a optimized
  "laptop mode". This leads to the circumstance that they are trying to
  do things like defragmentation / virtus scan / etc. while the host is
  still running on batteries.

  So it would be great if QEMU / KVM would have support for emulating
  "Virtual Batteries" to guests causing them to enable power-saving
  options like disabling specific services / devices / file operations
  automatically by OS.

  Optionally a great feature would be to set virtual battery's status
  manually. For example: Current charge rate / charging / discharging /
  ...

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1502613/+subscriptions


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 1502613] Re: [Feature Request] Battery Status / Virtual Battery
  2015-10-04 13:12 [Qemu-devel] [Bug 1502613] [NEW] [Feature Request] Battery Status / Virtual Battery Wolfgang Andreas
                   ` (4 preceding siblings ...)
  2020-05-18  9:45 ` Sergey Nizovtsev
@ 2020-08-05  6:17 ` Nahuel Pastorale
  2021-05-09 15:52 ` Philippe Mathieu-Daudé
  2021-05-09 16:06 ` Philippe Mathieu-Daudé
  7 siblings, 0 replies; 9+ messages in thread
From: Nahuel Pastorale @ 2020-08-05  6:17 UTC (permalink / raw)
  To: qemu-devel

I just wanted to add that this would (probably) help solve the error 43 on mobile Nvidia GPU passthrough scenarios. While facing this myself I was able to get it working by simulating a battery and attaching it via an ACPI table.
Your work is greatly appreciated Sergey.
Thank you very much!

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1502613

Title:
  [Feature Request] Battery Status / Virtual Battery

Status in QEMU:
  In Progress

Bug description:
  When using virtualization on notebooks heavily then virtual machines
  do not realize that they're running on a notebook device causing high
  power consumption because they're not switching into a optimized
  "laptop mode". This leads to the circumstance that they are trying to
  do things like defragmentation / virtus scan / etc. while the host is
  still running on batteries.

  So it would be great if QEMU / KVM would have support for emulating
  "Virtual Batteries" to guests causing them to enable power-saving
  options like disabling specific services / devices / file operations
  automatically by OS.

  Optionally a great feature would be to set virtual battery's status
  manually. For example: Current charge rate / charging / discharging /
  ...

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1502613/+subscriptions


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 1502613] Re: [Feature Request] Battery Status / Virtual Battery
  2015-10-04 13:12 [Qemu-devel] [Bug 1502613] [NEW] [Feature Request] Battery Status / Virtual Battery Wolfgang Andreas
                   ` (5 preceding siblings ...)
  2020-08-05  6:17 ` Nahuel Pastorale
@ 2021-05-09 15:52 ` Philippe Mathieu-Daudé
  2021-05-09 16:06 ` Philippe Mathieu-Daudé
  7 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-05-09 15:52 UTC (permalink / raw)
  To: qemu-devel

** Changed in: qemu
     Assignee: Sergey Nizovtsev (snizovtsev) => (unassigned)

** Changed in: qemu
       Status: In Progress => New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1502613

Title:
  [Feature Request] Battery Status / Virtual Battery

Status in QEMU:
  New

Bug description:
  When using virtualization on notebooks heavily then virtual machines
  do not realize that they're running on a notebook device causing high
  power consumption because they're not switching into a optimized
  "laptop mode". This leads to the circumstance that they are trying to
  do things like defragmentation / virtus scan / etc. while the host is
  still running on batteries.

  So it would be great if QEMU / KVM would have support for emulating
  "Virtual Batteries" to guests causing them to enable power-saving
  options like disabling specific services / devices / file operations
  automatically by OS.

  Optionally a great feature would be to set virtual battery's status
  manually. For example: Current charge rate / charging / discharging /
  ...

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1502613/+subscriptions


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug 1502613] Re: [Feature Request] Battery Status / Virtual Battery
  2015-10-04 13:12 [Qemu-devel] [Bug 1502613] [NEW] [Feature Request] Battery Status / Virtual Battery Wolfgang Andreas
                   ` (6 preceding siblings ...)
  2021-05-09 15:52 ` Philippe Mathieu-Daudé
@ 2021-05-09 16:06 ` Philippe Mathieu-Daudé
  7 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-05-09 16:06 UTC (permalink / raw)
  To: qemu-devel

This is an automated cleanup. This bug report has been moved to QEMU's
new bug tracker on gitlab.com and thus gets marked as 'invalid' now.
Please continue with the discussion here:

 https://gitlab.com/qemu-project/qemu/-/issues/242


** Changed in: qemu
       Status: New => Invalid

** Bug watch added: gitlab.com/qemu-project/qemu/-/issues #242
   https://gitlab.com/qemu-project/qemu/-/issues/242

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1502613

Title:
  [Feature Request] Battery Status / Virtual Battery

Status in QEMU:
  Invalid

Bug description:
  When using virtualization on notebooks heavily then virtual machines
  do not realize that they're running on a notebook device causing high
  power consumption because they're not switching into a optimized
  "laptop mode". This leads to the circumstance that they are trying to
  do things like defragmentation / virtus scan / etc. while the host is
  still running on batteries.

  So it would be great if QEMU / KVM would have support for emulating
  "Virtual Batteries" to guests causing them to enable power-saving
  options like disabling specific services / devices / file operations
  automatically by OS.

  Optionally a great feature would be to set virtual battery's status
  manually. For example: Current charge rate / charging / discharging /
  ...

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1502613/+subscriptions


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-05-09 16:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-04 13:12 [Qemu-devel] [Bug 1502613] [NEW] [Feature Request] Battery Status / Virtual Battery Wolfgang Andreas
2016-06-07 20:53 ` [Qemu-devel] [Bug 1502613] " Naftaly Avadiaev
2020-02-10 23:22 ` Sergey Nizovtsev
2020-05-17 20:10 ` mizz
2020-05-18  8:06 ` Philippe Mathieu-Daudé
2020-05-18  9:45 ` Sergey Nizovtsev
2020-08-05  6:17 ` Nahuel Pastorale
2021-05-09 15:52 ` Philippe Mathieu-Daudé
2021-05-09 16:06 ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.