This is a working WIP Rust port of switcheroo-control, a Linux hybrid graphics manager. It provides a daemon and a CLI to list GPUs and launch applications on the discrete GPU (e.g. switcherooctl launch --gpu 1 glmark2).
The original tool works fine so I didn't start this project to solve any particular problems. I mostly built it because I wanted to see how a system-level Linux tool like this would look in Rust. It was a fun learning exercise in working with udev, ioctl calls and zbus for D-Bus communication. I expected it to be a struggle, but I was pleasantly surprised by how painless it actually was. I didn’t expect to find such mature abstractions for low-level Linux components.
Also, since it implements the same D-Bus interface (net.hadess.SwitcherooControl) as the original project, the components are fully interoperable. This means the Rust daemon works with the original Python client and the Rust client works with the original C daemon.
I hope you like it!