-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add vulkan setup and uninstall scripts
- Loading branch information
Showing
8 changed files
with
185 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# These are supported funding model platforms | ||
|
||
github: wheaney | ||
patreon: # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: wheaney | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/vulkan/build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,42 @@ | ||
# breezy-desktop | ||
# Breezy Desktop | ||
|
||
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/U7U8OVC0L) | ||
|
||
## What is this? | ||
|
||
This repo will eventually contain a collection of tools to enable virtual desktop environments for gaming and productivity on Linux using XREAL Air glasses. | ||
|
||
As of now, only a Vulkan implementation is available, primarily for gaming but could theoretically be used for anything that uses Vulkan rendering. | ||
|
||
## Breezy Vulkan | ||
|
||
### Setup | ||
|
||
#### Steam Deck via Decky Loader | ||
|
||
This is still a work in progress... star this repo or check back later. | ||
|
||
#### Manual installation | ||
|
||
1. [Download the setup script](https://github.com/wheaney/breezy-desktop/releases/latest/download/breezy_vulkan_setup) and set the execute flag (e.g. from the terminal: `chmod +x ~/Downloads/breezy_vulkan_setup`) | ||
2. Run the setup script as root (e.g. `sudo ~/Downloads/breezy_vulkan_setup`) | ||
|
||
### Usage | ||
|
||
Once installed, you should be able to launch any Vulkan game, plug in your glasses (at any point, not just after launching), and see a floating screen. Note that the initial centering of the screen is based on pre-calibrated values, so it may not actually start out where you're looking, or you may even see it move around for 10+ seconds after you've plugged in your glasses. | ||
|
||
To re-center the screen, I've implemented an experimental double-tap feature: you'll want to give two decent taps on the top of the glasses. I tend to do this on the corner, right on top of the hinge. It should be a firm, sharp tap, and wait just a split second to do the second tap, as it needs to detect a slight pause in between (but it also shouldn't take more than a half a second between taps so don't wait too long). | ||
|
||
Framerate is really important here, because individual frames are static, so if you're moving your head and the next frame hasn't rendered yet, you'll see the screen move with you for just tiny fraction of a second (e.g. 30Hz, the screen follows you for 33ms) which produces a kind of "dragging" effect. I've found 60Hz to be the best experience, though there is still some dragging that I'd like to try to resolve; I expect 120Hz would work even better if you have the firmware version to support it. | ||
|
||
### Disabling | ||
|
||
To disable the floating screen effect, either unplug the glasses or hit the `Home` key (you'll need to bind this to your controller on Steam Deck). | ||
|
||
### Updating | ||
|
||
Rerun the `breezy_vulkan_setup` script. No need to redownload this script, as it will automatically download the latest installation binary for you. | ||
|
||
### Uninstalling | ||
|
||
If you wish to completely remove the installation, run the following script as root: `~/bin/breezy_vulkan_uninstall`. This won't uninstall the base driver package, following the instructions at the end of the uninstallation to do this manually. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
for_install=0 | ||
if [[ -n "$1" ]] && [[ "$1" == "--for-install" ]]; then | ||
for_install=1 | ||
fi | ||
|
||
# we don't want the uninstall script to be able to cause a failure if being triggered by the setup script | ||
[ "$for_install" -eq 0 ] && set -e | ||
|
||
# Make sure only root can run our script | ||
if [ "$(id -u)" != "0" ]; then | ||
echo "This script must be run as root" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
USER=${SUDO_USER:-$USER} | ||
USER_HOME=$(getent passwd $USER | cut -d: -f6) | ||
|
||
[ "$for_install" -eq 0 ] && echo "Removing vkBasalt binaries from $USER_HOME/.local/lib[32]/" | ||
rm $USER_HOME/.local/lib/libvkbasalt.so | ||
rm $USER_HOME/.local/lib32/libvkbasalt.so | ||
|
||
[ "$for_install" -eq 0 ] && echo "Removing vkBasalt vulkan layer configs from $USER_HOME/.local/share/vulkan/implicit_layer.d/" | ||
rm $USER_HOME/.local/share/vulkan/implicit_layer.d/vkBasalt.json | ||
rm $USER_HOME/.local/share/vulkan/implicit_layer.d/vkBasalt.x86.json | ||
|
||
[ "$for_install" -eq 0 ] && echo "Removing vkBasalt config at $USER_HOME/.config/vkBasalt/vkBasalt.conf" | ||
rm $USER_HOME/.config/vkBasalt/vkBasalt.conf | ||
|
||
[ "$for_install" -eq 0 ] && echo "SKIPPING xrealAirLinuxDriver uninstall to keep mouse/joystick driver functionality." | ||
[ "$for_install" -eq 0 ] && echo "To manually uninstall xrealAirLinuxDriver, do: \"sudo ~/bin/xreal_driver_uninstall\"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script gets packaged with the release and should do the bulk of the setup work. This allows this setup to be tied | ||
# to a specific release of the code, and guarantees it will never run along-side newer or older binaries. | ||
|
||
USER=${SUDO_USER:-$USER} | ||
USER_HOME=$(getent passwd $USER | cut -d: -f6) | ||
if [ -e "$USER_HOME/bin/breezy_vulkan_uninstall" ]; then | ||
echo "Cleaning up the previous installation" | ||
|
||
# ` || true` will ensure that this can't cause a failure, even with `set -e` | ||
$USER_HOME/bin/breezy_vulkan_uninstall --for-install || true | ||
fi | ||
|
||
echo "Copying the breezy_vulkan scripts to ${USER_HOME}/bin" | ||
if [ ! -d "$USER_HOME/bin" ]; then | ||
mkdir $USER_HOME/bin | ||
fi | ||
cp bin/breezy_vulkan_uninstall $USER_HOME/bin | ||
|
||
echo "Installing vkBasalt; copying binaries, configs, and shader files to ${USER_HOME}/.local and ${USER_HOME}/.config" | ||
|
||
# much of the setup below was informed by https://github.com/simons-public/steam-deck-vkbasalt-install | ||
# copy the vkBasalt binaries and configs | ||
mkdir -p ${USER_HOME}/.local/{lib,lib32,share/vulkan/implicit_layer.d} | ||
mkdir -p ${USER_HOME}/.config/{vkBasalt,reshade} | ||
cp vkBasalt.64/libvkbasalt.so $USER_HOME/.local/lib/ | ||
cp vkBasalt.32/libvkbasalt.so $USER_HOME/.local/lib32/ | ||
|
||
# there is only one vkBasalt.json file, use the 64-bit directory for both, copy and make replacements | ||
if grep -q SteamOS /etc/os-release ; then | ||
sed -e "s|libvkbasalt.so|${USER_HOME}/.local/lib/libvkbasalt.so|" -e "s/ENABLE_VKBASALT/SteamDeck/" vkBasalt.64/vkBasalt.json > $USER_HOME/.local/share/vulkan/implicit_layer.d/vkBasalt.json | ||
sed -e "s|libvkbasalt.so|${USER_HOME}/.local/lib32/libvkbasalt.so|" -e "s/ENABLE_VKBASALT/SteamDeck/" vkBasalt.64/vkBasalt.json > $USER_HOME/.local/share/vulkan/implicit_layer.d/vkBasalt.x86.json | ||
else | ||
sed -e "s|libvkbasalt.so|${USER_HOME}/.local/lib/libvkbasalt.so|" vkBasalt.64/vkBasalt.json > $USER_HOME/.local/share/vulkan/implicit_layer.d/vkBasalt.json | ||
sed -e "s|libvkbasalt.so|${USER_HOME}/.local/lib32/libvkbasalt.so|" vkBasalt.64/vkBasalt.json > $USER_HOME/.local/share/vulkan/implicit_layer.d/vkBasalt.x86.json | ||
fi | ||
|
||
# copy the vkBasalt.conf file and make replacements | ||
sed -e "s|/path/to/reshade-shaders|${USER_HOME}/.config/reshade|" -e "s|/path/to/sombrero|${USER_HOME}/.config/reshade/Shaders/IMUAdjust.fx|" config/vkBasalt.conf > $USER_HOME/.config/vkBasalt/vkBasalt.conf | ||
|
||
# set up the XREAL driver using the local binary | ||
echo "Installing xrealAirLinuxDriver" | ||
echo "BEGIN - xreal_driver_setup" | ||
bin/xreal_driver_setup $(pwd)/xrealAirLinuxDriver.tar.gz | ||
echo "END - xreal_driver_setup" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
effects = sombrero | ||
|
||
sombrero = /path/to/sombrero | ||
reshadeTexturePath = "/path/to/reshade-shaders/Textures" | ||
reshadeIncludePath = "/path/to/reshade-shaders/Shaders" | ||
depthCapture = off | ||
|
||
#toggleKey toggles the effects on/off | ||
toggleKey = Home | ||
|
||
#enableOnLaunch sets if the effects are enabled when started | ||
enableOnLaunch = True |