From 3252623f19663f3f28df5e3057ab64a894c8e486 Mon Sep 17 00:00:00 2001 From: Gabriele Musco Date: Fri, 6 Feb 2026 07:29:34 +0100 Subject: [PATCH] feat: check for xr-hardware udev rules and show warn card if missing --- src/depcheck/common.rs | 16 ++++++++++++++++ src/ui/main_view.rs | 11 ++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/depcheck/common.rs b/src/depcheck/common.rs index 4919311..0649e9f 100644 --- a/src/depcheck/common.rs +++ b/src/depcheck/common.rs @@ -351,3 +351,19 @@ pub fn dep_libc() -> Dependency { ]), } } + +pub fn dep_xr_hardware() -> Dependency { + Dependency { + name: "xr-hardware".into(), + dep_type: DepType::UdevRule, + filename: "70-xrhardware.rules".into(), + packages: HashMap::from([ + (LinuxDistro::Arch, "xr-hardware".into()), + (LinuxDistro::Debian, "xr-hardware".into()), + (LinuxDistro::Fedora, "xr-hardware".into()), + (LinuxDistro::Alpine, "xr-hardware".into()), + // (LinuxDistro::Gentoo, "".into()), + // (LinuxDistro::Suse, "".into()), + ]), + } +} diff --git a/src/ui/main_view.rs b/src/ui/main_view.rs index 4eae776..899a218 100644 --- a/src/ui/main_view.rs +++ b/src/ui/main_view.rs @@ -12,7 +12,7 @@ use super::{ }; use crate::{ config::Config, - depcheck::common::dep_pkexec, + depcheck::common::{dep_pkexec, dep_xr_hardware}, gpu_profile::{GpuPowerProfile, get_amd_gpu_power_profile}, paths::get_logs_dir, profile::{LighthouseDriver, Profile, XRServiceType}, @@ -420,6 +420,15 @@ impl AsyncComponent for MainView { }, }, }, + warn_card(None, concat!( + "The xr-hardware udev rules are missing. ", + "This might cause communication problems with your ", + "headset, please install it to ensure the best ", + "experience." + )) -> gtk::Box { + #[track = "model.changed(Self::selected_profile())"] + set_visible: !dep_xr_hardware().check(), + }, model.steam_launch_options_box.widget(), model.wivrn_wired_start_box.widget(), -- 2.51.2