initial gaming server with manjaro
This commit is contained in:
109
infrastructure/graduated/manjaro/gaming_server.md
Normal file
109
infrastructure/graduated/manjaro/gaming_server.md
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
# Manjaro Gaming Server
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
Tested on Truenas with libvirt.
|
||||||
|
|
||||||
|
1. Do not boot the instance with a virtual display
|
||||||
|
2. Pass through usb mouse/keyboard
|
||||||
|
3. Pass through the graphics card
|
||||||
|
4. Walk through the installer as normal
|
||||||
|
5. Reboot into the installation
|
||||||
|
6. Settings -> Screen Locking -> Never
|
||||||
|
7. Settings -> Power Management -> When power button pressed: Shut Down
|
||||||
|
8. Settings -> Power Management -> Turn off screen: Never
|
||||||
|
9. Settings -> Session -> Desktop Session -> On login, launch apps that were open: Start with an empty session
|
||||||
|
10. `sudo systemctl enable --now sshd`
|
||||||
|
|
||||||
|
## SSH
|
||||||
|
|
||||||
|
Make sure you forward 127.0.0.1:47990. That way you can access sunshine on your local machine
|
||||||
|
at <https://127.0.0.1:47990> for entering the pin.
|
||||||
|
|
||||||
|
```conf
|
||||||
|
Host gamebox2
|
||||||
|
HostName gamebox2.reeselink.com
|
||||||
|
User gamer
|
||||||
|
KeepAlive yes
|
||||||
|
IdentityFile ~/.ssh/id_gamebox_rsa
|
||||||
|
LocalForward 47990 127.0.0.1:47990
|
||||||
|
```
|
||||||
|
|
||||||
|
## Basic Apps
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pacman -S vim
|
||||||
|
flatpak install io.missioncenter.MissionCenter
|
||||||
|
```
|
||||||
|
|
||||||
|
## Install Sunshine
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Update the system
|
||||||
|
sudo pacman -Syu
|
||||||
|
|
||||||
|
# Install nvidia drivers
|
||||||
|
sudo mhwd -i pci video-nvidia
|
||||||
|
|
||||||
|
# Install sunshine
|
||||||
|
#The flatpak seems to work well. The arch package keeps breaking due to
|
||||||
|
#deps. See boost-libs and then libicuuc.so.76.
|
||||||
|
#<https://docs.lizardbyte.dev/projects/sunshine/latest/md_docs_2getting__started.html#install-system-level>
|
||||||
|
sudo flatpak install --system flathub dev.lizardbyte.app.Sunshine
|
||||||
|
flatpak run --command=additional-install.sh dev.lizardbyte.app.Sunshine
|
||||||
|
systemctl --user enable --now sunshine
|
||||||
|
sudo reboot
|
||||||
|
```
|
||||||
|
|
||||||
|
If you need to uninstall
|
||||||
|
|
||||||
|
```bash
|
||||||
|
systemctl --user disable --now sunshine
|
||||||
|
sudo flatpak uninstall --system --delete-data dev.lizardbyte.app.Sunshine
|
||||||
|
```
|
||||||
|
|
||||||
|
## Install Steam
|
||||||
|
|
||||||
|
<https://wiki.archlinux.org/title/Official_repositories#multilib>
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pacman -S steam
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Settings -> Autostart -> Add New -> Steam (Runtime)
|
||||||
|
|
||||||
|
### mangohud
|
||||||
|
|
||||||
|
Start steam with mangohud
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo pacman -S mangohud lib32-mangohud
|
||||||
|
cp /usr/share/applications/steam.desktop ~/.local/share/applications/steam.desktop
|
||||||
|
```
|
||||||
|
|
||||||
|
Edit ~/.local/share/applications/steam.desktop
|
||||||
|
|
||||||
|
```conf
|
||||||
|
Exec=/usr/bin/mangohud /usr/bin/steam-native %U
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir ~/.config/MangoHud
|
||||||
|
cp /usr/share/doc/mangohud/MangoHud.conf.example ~/.config/MangoHud/MangoHud.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
## Snapshot
|
||||||
|
|
||||||
|
I would recommend creating a "working install" snapshot you can roll back to.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Take a snapshot
|
||||||
|
zfs list -d 1 enc1/vms
|
||||||
|
export ZFS_VOL='enc1/vms/Gambox1-z4e0t'
|
||||||
|
zfs snapshot $ZFS_VOL@manual-$(date --iso-8601)
|
||||||
|
|
||||||
|
# Restore a snapshot
|
||||||
|
zfs list -t snapshot $ZFS_VOL
|
||||||
|
export ZFS_SNAPSHOT='enc1/vms/Gambox1-z4e0t@init-no-drivers-2025-03-03_05-35'
|
||||||
|
zfs rollback $ZFS_SNAPSHOT
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user