power: Add LowPowerMode1 service

Add a new service to limit the platform TDP while handles are still held. This
feature is currently limited to the Steam Deck.
This commit is contained in:
Vicki Pfau 2024-08-21 22:35:57 -07:00
parent e7d2d63ac8
commit 65a81cee47
10 changed files with 666 additions and 56 deletions

View file

@ -0,0 +1,27 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.LowPowerMode1`
//!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`.
//!
//! You may prefer to adapt it, instead of using it verbatim.
//!
//! More information can be found in the [Writing a client proxy] section of the zbus
//! documentation.
//!
//!
//! [Writing a client proxy]: https://dbus2.github.io/zbus/client.html
//! [D-Bus standard interfaces]: https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces,
use zbus::proxy;
#[proxy(
interface = "com.steampowered.SteamOSManager1.LowPowerMode1",
default_service = "com.steampowered.SteamOSManager1",
default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true
)]
pub trait LowPowerMode1 {
/// EnterDownloadMode method
fn enter_download_mode(&self, identifier: &str) -> zbus::Result<zbus::zvariant::OwnedFd>;
/// ListDownloadModeHandles method
fn list_download_mode_handles(&self) -> zbus::Result<std::collections::HashMap<String, u32>>;
}

View file

@ -22,6 +22,7 @@ mod fan_control1;
mod gpu_performance_level1;
mod gpu_power_profile1;
mod hdmi_cec1;
mod low_power_mode1;
mod manager2;
mod performance_profile1;
mod storage1;
@ -39,6 +40,7 @@ pub use crate::proxy::fan_control1::FanControl1Proxy;
pub use crate::proxy::gpu_performance_level1::GpuPerformanceLevel1Proxy;
pub use crate::proxy::gpu_power_profile1::GpuPowerProfile1Proxy;
pub use crate::proxy::hdmi_cec1::HdmiCec1Proxy;
pub use crate::proxy::low_power_mode1::LowPowerMode1Proxy;
pub use crate::proxy::manager2::Manager2Proxy;
pub use crate::proxy::performance_profile1::PerformanceProfile1Proxy;
pub use crate::proxy::storage1::Storage1Proxy;