Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/linux-surface/surface-control
Control various aspects of Microsoft Surface devices on Linux from the Command-Line.
https://github.com/linux-surface/surface-control
linux linux-surface
Last synced: 5 days ago
JSON representation
Control various aspects of Microsoft Surface devices on Linux from the Command-Line.
- Host: GitHub
- URL: https://github.com/linux-surface/surface-control
- Owner: linux-surface
- License: mit
- Created: 2019-04-13T13:16:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-14T15:58:47.000Z (3 months ago)
- Last Synced: 2024-12-07T16:33:51.174Z (16 days ago)
- Topics: linux, linux-surface
- Language: Rust
- Size: 278 KB
- Stars: 65
- Watchers: 8
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Linux Surface Control
![CI](https://github.com/linux-surface/surface-control/workflows/CI/badge.svg)
Control various aspects of Microsoft Surface devices on Linux from the Command-Line.
Aims to provide a unified front-end to the various sysfs-attributes and special devices.## Usage
```
USAGE:
surface [FLAGS]FLAGS:
-h, --help Prints help information
-q, --quiet Keep output quiet
-V, --version Prints version informationSUBCOMMANDS:
dgpu Control the discrete GPU
dtx Control the latch/dtx-system on the Surface Book 2
help Prints this message or the help of the given subcommand(s)
profile Control or query the current platform profile
status Show an overview of the current system status
```See `surface help` for more details.
_Hint:_ You can specify the subcommand by any unabiguous prefix of it, i.e. `surface perf` and `surface p` will both evaluate to `surface performance`.
## Prequisites
For this tool to work, you need a recent version of the [surface-sam module][surface-sam] e.g. via the [linux-surface kernel][surface-kernel].
## Installing
Have a look at the [releases](https://github.com/linux-surface/surface-control/releases) page.
Pre-built packages are available for Debian (Ubuntu, ...), whereas PKGBUILDs for Arch Linux are in the AUR (`surface-control`).## Building from Source
Building this application from source follows the standard rust procedure, i.e. simply call `cargo build --release --locked` for a release-ready executable.
Completion files are automatically generated and can be found in the corresponding `target/release/build/surface-/out/` directory.### Arch Linux
Simply install `surface-control` from AUR or have a look at its PKGBUILD.
### Debian-based Distributions (Ubuntu, ...)
Generating a Debian package can be done via [`cargo deb`](https://github.com/mmstick/cargo-deb).
Specifically, you need to run
```
env CARGO_TARGET_DIR=target CARGO_INCREMENTAL=0 cargo deb
```
where setting `CARGO_TARGET_DIR` is required to output the generated auto-completion files at the correct location for cargo-deb to pick up.The final package can be found in `target/debian`.
[surface-sam]: https://github.com/linux-surface/surface-aggregator-module
[surface-kernel]: https://github.com/linux-surface/linux-surface