mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
RCC: disable vsync due to NoAvailablePixelFormat error:
This commit is contained in:
@@ -147,7 +147,7 @@ impl CtrlPlatform {
|
||||
) {
|
||||
self.set_gfx_mode(mode)
|
||||
.map_err(|err| {
|
||||
warn!("CtrlRogBios: set_asus_switch_graphic_mode {}", err);
|
||||
warn!("CtrlRogBios: set_gpu_mux_mode {}", err);
|
||||
err
|
||||
})
|
||||
.ok();
|
||||
@@ -156,7 +156,7 @@ impl CtrlPlatform {
|
||||
|
||||
fn gpu_mux_mode(&self) -> GpuMode {
|
||||
match self.platform.get_gpu_mux_mode() {
|
||||
Ok(m) => GpuMode::from_mux(m),
|
||||
Ok(m) => GpuMode::from_mux(m as u8),
|
||||
Err(e) => {
|
||||
warn!("CtrlRogBios: get_gfx_mode {}", e);
|
||||
GpuMode::Error
|
||||
|
||||
@@ -22,6 +22,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
print_versions();
|
||||
|
||||
let native_options = eframe::NativeOptions {
|
||||
vsync: false,
|
||||
decorated: false,
|
||||
transparent: false,
|
||||
min_window_size: Some(egui::vec2(840.0, 600.0)),
|
||||
|
||||
@@ -92,7 +92,8 @@ pub fn rog_bios_group(
|
||||
let mut changed = false;
|
||||
ui.group(|ui| {
|
||||
ui.vertical(|ui| {
|
||||
ui.horizontal_wrapped(|ui| ui.label("GPU MUX mode (reboot required)"));
|
||||
ui.horizontal_wrapped(|ui| ui.label("GPU MUX mode"));
|
||||
ui.horizontal_wrapped(|ui| ui.label("NOTE: Value does not change until rebooted"));
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
changed = ui
|
||||
.selectable_value(
|
||||
|
||||
@@ -58,7 +58,7 @@ impl AsusPlatform {
|
||||
attr_bool!("dgpu_disable", path);
|
||||
attr_bool!("egpu_enable", path);
|
||||
attr_bool!("panel_od", path);
|
||||
attr_u8!("gpu_mux_mode", path);
|
||||
attr_bool!("gpu_mux_mode", path);
|
||||
// This is technically the same as `platform_profile` since both are tied in-kernel
|
||||
attr_u8!("throttle_thermal_policy", path);
|
||||
// The acpi platform_profile support
|
||||
@@ -77,25 +77,25 @@ pub enum GpuMode {
|
||||
|
||||
impl GpuMode {
|
||||
/// For writing to `gpu_mux_mode` attribute
|
||||
pub fn to_mux_attr(&self) -> u8 {
|
||||
pub fn to_mux_attr(&self) -> bool {
|
||||
if *self == Self::Discrete {
|
||||
return b'0';
|
||||
return false;
|
||||
}
|
||||
b'1'
|
||||
true
|
||||
}
|
||||
|
||||
pub fn to_dgpu_attr(&self) -> u8 {
|
||||
if *self == Self::Integrated {
|
||||
return b'1';
|
||||
return 1;
|
||||
}
|
||||
b'0'
|
||||
0
|
||||
}
|
||||
|
||||
pub fn to_egpu_attr(&self) -> u8 {
|
||||
if *self == Self::Egpu {
|
||||
return b'1';
|
||||
return 1;
|
||||
}
|
||||
b'0'
|
||||
0
|
||||
}
|
||||
|
||||
pub fn from_mux(num: u8) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user