mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-05 06:00:30 -04:00
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:
parent
e7d2d63ac8
commit
65a81cee47
10 changed files with 666 additions and 56 deletions
|
@ -15,7 +15,7 @@ use tokio::sync::oneshot;
|
|||
use tracing::{error, info};
|
||||
use zbus::object_server::SignalEmitter;
|
||||
use zbus::zvariant::{self, Fd};
|
||||
use zbus::{fdo, interface, Connection};
|
||||
use zbus::{fdo, interface, proxy, Connection};
|
||||
|
||||
use crate::daemon::root::{Command, RootCommand};
|
||||
use crate::daemon::DaemonCommand;
|
||||
|
@ -91,6 +91,15 @@ impl SteamOSManager {
|
|||
}
|
||||
}
|
||||
|
||||
#[proxy(
|
||||
interface = "com.steampowered.SteamOSManager1.RootManager",
|
||||
default_service = "com.steampowered.SteamOSManager1",
|
||||
default_path = "/com/steampowered/SteamOSManager1"
|
||||
)]
|
||||
pub(crate) trait RootManager {
|
||||
fn set_tdp_limit(&self, limit: u32) -> zbus::Result<()>;
|
||||
}
|
||||
|
||||
#[interface(name = "com.steampowered.SteamOSManager1.RootManager")]
|
||||
impl SteamOSManager {
|
||||
async fn prepare_factory_reset(&self, kind: u32) -> fdo::Result<u32> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue