diff --git a/CHANGELOG.md b/CHANGELOG.md index cdc8ddcc..bf322104 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Split out all aura functionality that isn't dependent on the daemon in to a new crate `rog-aura` +- Correctly enable compute mode for nvidia plus no-reboot or logout if switching + from vfio/integrated/compute. # [3.4.1] - 2021-04-11 ### Changed diff --git a/daemon/src/ctrl_gfx/gfx.rs b/daemon/src/ctrl_gfx/gfx.rs index 489b8d43..a98b5d59 100644 --- a/daemon/src/ctrl_gfx/gfx.rs +++ b/daemon/src/ctrl_gfx/gfx.rs @@ -282,10 +282,14 @@ impl CtrlGraphics { fn write_modprobe_conf(vendor: GfxVendors, devices: &[GraphicsDevice]) -> Result<(), RogError> { info!("GFX: Writing {}", MODPROBE_PATH); let content = match vendor { - GfxVendors::Nvidia | GfxVendors::Hybrid | GfxVendors::Compute => MODPROBE_BASE.to_vec(), + GfxVendors::Nvidia | GfxVendors::Hybrid => { + let mut base = MODPROBE_BASE.to_vec(); + base.append(&mut MODPROBE_DRM_MODESET.to_vec()); + base + }, GfxVendors::Vfio => Self::get_vfio_conf(devices), - // GfxVendors::Compute => {} GfxVendors::Integrated => MODPROBE_INTEGRATED.to_vec(), + GfxVendors::Compute => MODPROBE_BASE.to_vec(), }; let mut file = std::fs::OpenOptions::new() @@ -419,8 +423,8 @@ impl CtrlGraphics { fn logout_required(&self, vendor: GfxVendors) -> GfxRequiredUserAction { if let Ok(config) = self.config.lock() { let current = config.gfx_mode; - if matches!(current, GfxVendors::Integrated | GfxVendors::Vfio) - && matches!(vendor, GfxVendors::Integrated | GfxVendors::Vfio) + if matches!(current, GfxVendors::Integrated | GfxVendors::Vfio | GfxVendors::Compute) + && matches!(vendor, GfxVendors::Integrated | GfxVendors::Vfio | GfxVendors::Compute) { return GfxRequiredUserAction::None; } diff --git a/daemon/src/ctrl_gfx/mod.rs b/daemon/src/ctrl_gfx/mod.rs index 215f0325..12bf963e 100644 --- a/daemon/src/ctrl_gfx/mod.rs +++ b/daemon/src/ctrl_gfx/mod.rs @@ -26,6 +26,9 @@ static MODPROBE_BASE: &[u8] = br#"# Automatically generated by asusd blacklist nouveau alias nouveau off options nvidia NVreg_DynamicPowerManagement=0x02 +"#; + +static MODPROBE_DRM_MODESET: &[u8] = br#" options nvidia-drm modeset=1 "#;