/winesapOS

winesapOS - Game with Linux anywhere, no installation required!

Primary LanguageShellGNU General Public License v3.0GPL-3.0

winesapOS

Game with Linux anywhere, no installation required!

winesapOS_3_Desktop_Screenshot 720p

winesapOS makes it easy to setup Linux and play games off an external drive.

This project provides an opinionated installation of Linux. It can be used on a flash drive, SD card, HDD, SSD, or any other storage device. Both internal and external devices are supported. The release images are based on SteamOS 3 and the KDE Plasma desktop environment to align with what Valve's Steam Deck uses. Software for various games launchers are pre-installed. Additional drivers are installed to support Macs with Intel processors.

TABLE OF CONTENTS

macOS Limitations

These are reasons why macOS is inferior compared to Linux when it comes to gaming.

  • No 32-bit support. The latest version is now 64-bit only. As of November 2021, there are 1,263 full PC games (i.e., not apps) on macOS that are available as 64-bit. That number is only 2% of the 59,368 games available on Steam.
  • As of November 2021, 83% of reported Steam games run on Linux.
  • Macs in 2020 have started the move from Intel to Arm-based processors, further lowering the amount of full games it supports natively to almost zero.
  • The Apple M1 Arm-based processor has limited graphics capabilities and that are comparable to integrated graphics offered by AMD and Intel. These Macs are not designed to be gaming computers.
  • Steam Play's Proton is only supported on Linux (not macOS).
  • Old and incomplete implementation of OpenGL.
  • No native Vulkan support.
  • Linux has better gaming support because it supports 32-bit applications, DirectX (via Wine with WineD3D, DXVK, and/or Vkd3d), OpenGL, and Vulkan.
  • CrossOver Mac, a commercial Wine product, is one of the few ways to run games on macOS but has some limitations.
    • It costs money and usually requires a new license yearly.
    • 32-bit Windows application support on 64-bit only macOS versions is still buggy.
    • It is always based on a old stable Wine version that is at least one year behind upstream Wine version.
    • Vulkan support via MoltenVK is incomplete due to missing functionality in Apple's Metal API.
    • DXVK (DirectX 9-11), via a modified version of MoltenVK, has limited support.
      • MoltenVK does not expose all of the features in Vulkan required by DXVK.
      • MoltenVK only exposes 64-bit Vulkan support. This means that DirectX 11 games that use 32-bit libraries will not work via DXVK.
    • Vkd3d (DirectX 12) will not be supported until at least 2023.
    • Linux has kernel-level optimizations for Wine.

Features

General

  • Any computer with an AMD or Intel processor can run winesapOS.
  • Portability. The flash drive is bootable on both BIOS and UEFI systems.
  • Persistent storage. Unlike traditional Linux live media, all storage is persistent and kept upon reboots.
    • Upon the first boot, the root partition is expanded to utilize all available space.
  • Supportability. Linux is easy to troubleshoot remotely.
    • Access:
    • Tools:
      • ClamAV, and the GUI front-end Clamtk, is an open source anti-virus scanner.
      • QDirStat provides a graphical user interface to view storage space usage.
  • Usability. Software for typical day-to-day use is provided.
  • Gaming support out-of-the-box.
    • Game launchers:
    • Wine:
      • Wine Staging for running Windows applications and games without a game launcher.
      • Proton GE is installed along with the ProtonUp-Qt package manager for it. This provides better Windows games compatibility in Steam.
    • GameMode is available to be used to speed up games.
    • Gamescope for helping play older games with frame rate or resolution issues.
    • MangoHUD for benchmarking OpenGL and Vulkan games.
    • GOverlay is a GUI for managing Vulkan overlays including MangoHUD, ReplaySorcery, and vkBasalt.
    • Ludusavi is a game save files manager.
    • ProtonUp-Qt for managing Steam Play compatibility tools.
    • ZeroTier VPN can be used to play LAN-only games online with friends.
    • Open source OpenGL and Vulkan drivers are installed for AMD and Intel graphics.
  • Minimize writes to the flash drive to improve its longevity.
    • Root file system is mounted with the options noatime and nodiratime to not write the access times for files and directories.
    • Temporary directories with heavy writes (/tmp/, /var/log/, and /var/tmp/) are mounted as RAM-only file systems.
    • systemd-journald is configured to use volatile (RAM-only) storage for all system logs.
    • Swappiness level is set to 10% (down from the default of 60%).
  • Full backups via Btrfs.
    • Snapper takes 12 monthly and 1 annual snapshots.
    • Snapper takes a backup whenever the pacman package manager is used.
    • grub-btrfs automatically generates a GRUB menu entry for all of the Btrfs backups.
  • No automatic operating system updates. Updates should always be intentional and planned.
  • Most file systems supported. Access any storage device, anywhere.
    • APFS
    • Btrfs
    • ext2, ext3, and ext4
    • exFAT
    • FAT12, FAT16, and FAT32
    • HFS and HFS+
    • NTFS
    • XFS
    • ZFS
  • Battery optimizations.
    • The auto-cpufreq service provides automatic power management.
  • Fully automated installation.

Mac Support

All Intel Macs are supported. Linux works on most Macs out-of-the-box these days. Drivers are pre-installed for newer hardware where native Linux support is missing.

Hardware Supported Third-Party Driver(s)
Keyboard Yes mbp2018-bridge-drv
Mouse Yes mbp2018-bridge-drv
NVMe Yes mbp2018-bridge-drv
Sound Yes mbp2018-bridge-drv, snd_hda_macbookpro, and snd-hda-codec-cs8409
Touch Bar Yes mbp2018-bridge-drv and macbook12-spi-driver
Bluetooth No None
WiFi No None

The mbp2018-bridge-drv driver provides support for the Apple T2 security chip found on newer Macs. Without this, no hardware would work on Linux.

Although we do not provide any additional drivers for wider support of Bluetooth and WiFi for Macs, the built-in Linux kernel drivers does support them for some devices.

For more information about Linux support on Macs, refer to the Linux on MacBook Pro compatibility guide.

Comparison with SteamOS

Features SteamOS 3 winesapOS 3
SteamOS packages and graphics drivers Yes Yes
Read-only file system Yes No
File system backup type A/B partitions Btrfs snapshots
Number of possible file system backups 1 Unlimited
Package managers (CLI) pacman, yay, flatpak pacman, yay, flatpak, snap
Package manager (GUI) Discover Pamac
Update type Image-based Package manager
Number of installed packages Small Large
Game launchers Steam Steam, Heroic Games Launcher, and Lutris
Linux kernels Neptune Neptune and Linux LTS
Additional Mac drivers No Yes
Desktop environment Plasma Plasma
Desktop theme Vapor Vapor
AMD FSR Global Per-game
Gamescope Global Per-game
Proton Official Official and GE-Proton
Game controller support* Large Small
exFAT flash drive storage No Yes (16 GB)

*A future minor release of winesapOS 3 is planned to expand controller compatibility.

Usage

Requirements

Minimum:

  • Processor = Dual-core AMD or Intel processor.
  • RAM = 4 GiB.
  • Graphics = AMD or Intel integrated graphics.
  • Storage = 32 GB USB 3.2 Gen 1 (originally called USB 3.0) flash drive.

Recommended:

  • Processor = Quad-core AMD or Intel processor.
  • RAM = 16 GiB.
  • Graphics = AMD discrete graphics card.
  • Storage = 512 GB external USB 3.2 Gen 2 (originally called USB 3.1) SSD.

Setup

  1. Download the latest release image archive files:
    • Performance (recommended):
      • winesapos-performance-<VERSION>.img.zip
      • winesapos-performance-<VERSION>.img.z01
      • winesapos-performance-<VERSION>.img.z02
      • winesapos-performance-<VERSION>.img.z03
      • winesapos-performance-<VERSION>.img.z04
    • Secure (for advanced users only):
      • winesapos-secure-<VERSION>.img.zip
      • winesapos-secure-<VERSION>.img.z01
      • winesapos-secure-<VERSION>.img.z02
      • winesapos-secure-<VERSION>.img.z03
      • winesapos-secure-<VERSION>.img.z04
      • winesapos-secure-<VERSION>.img.z05
      • winesapos-secure-<VERSION>.img.z06
  2. Extract the winesapos-<VERSION>.img.zip archive. This will automatically extract all of the other zip file parts.
    • Linux:
      • GUI: Use PeaZip.
      • CLI: 7z x winesapos-<VERSION>.img.zip
    • macOS: Use PeaZip or Keka.
    • Windows: Use PeaZip.
  3. Use balenaEtcher to flash the image to an external storage device. WARNING: This will delete any existing data on that storage device.

Default accounts have a password set that mirror the username:

  • winesapOS (major version >= 3)
Username Password
winesap winesap
root root
  • Mac Linux Gaming Stick (major version <= 2)
Username Password
stick stick
root root

Secure Image

If using the secure image, the default LUKS encryption key is password which should be changed after the first boot. Do not do this before the first boot as the default password is used to unlock the partition for it be resized to fill up the entire storage device. Change the LUKS encryption key for the fifth partition.

$ sudo cryptsetup luksChangeKey /dev/<DEVICE>5

The user account passwords for winesap (or stick on older versions) and root are set to expire immediately. Upon first login, you will be prompted to enter a new password.

Differences

These are the main differences between the performance secure images. The performance is focused on speed and ease-of-use. The secure image is recommended for advanced Linux users.

Feature Performance Secure
CPU Mitigations No Yes
Encryption No Yes (LUKS)
Firewall No Yes (Firewalld)
Linux Kernel Updates No Yes
Passwords Require Reset No Yes

Mac Boot

Boot the Mac into the flash drive by pressing and releasing the power button. Then hold down the OPTION key (or the ALT key on a Windows keyboard) to access the Mac bootloader. Select the "EFI Boot" device.

IMPORTANT Any Mac with an Apple T2 Security Chip, which are all Macs made in and after 2018, needs to allow booting from external storage:

  1. Turn on the Mac and immediately hold both the COMMAND and r keys to enter recovery mode.
  2. Utilities > Startup Security Utility
    • Secure Boot = No Security (Does not enforce any requirements on the bootable OS.)
    • External Boot = Allow booting from external media (Does not restrict the ability to boot from any devices.)

Upgrades

Upgrades are supported between all minor releases via an upgrade script. USE AT YOUR OWN RISK! For example, it is supported to go from 2.0.0 to 2.1.0 but not from 2.2.0 to 3.0.0. This will make major changes to the operating system and could lead to data loss. Where it makes sense, features are backported from newer versions of winesapOS. This script is completely optional.

$ curl https://raw.githubusercontent.com/LukeShortCloud/winesapOS/3.1.0/scripts/winesapos-upgrade.sh | sudo zsh

Tips

Getting Started

  • Test booting up the flash drive first before buying speakers, a Bluetooth adapter, a WiFi adapter, and/or other hardware. Depending on the Mac, the built-in hardware may work out-of-the-box.

  • Temporarily allow the brcmfmac and brcmutil drivers to see if the built-in WiFi will work. Remove the relevant entries from /etc/modprobe.d/winesapos.conf and then use modprobe to manually load the drivers.

  • Plug additional hardware into a USB hub. Connect the USB hub to the computer before booting.

  • Do NOT move the USB hub after plugging it in and booting up Linux. It can easily disconnect leading to a corrupt file system.

  • Consider buying an external SSD instead of a flash drive for a longer life-span, more storage, and faster speeds.

  • Avoid using Flatpak and Snap packages. These use a lot of additional space compared to native system packages. Programs packaged this way are also slower.

  • Delete old Btrfs backups when the flash drive is running low on storage space.

    $ sudo snapper list
    $ sudo snapper delete <SNAPSHOT_NUMBER>
    
  • Enable Proton for all Windows games. This will allow them to run in Linux. For more information about Proton, read this starter guide. Check the compatibility rating for games on Steam by using ProtonDB.

    Settings > Steam Play > Enable Steam Play for Support Titles > Use this tool instead of game-specific selections from Steam > Compatibility tool: > (select the latest "Proton" version available) > OK
    

No Sound (Muted Audio)

By default, all sound is muted on boot because on newer Macs the experimental sound driver is extremely loud. This means that any sound volume changes will be reset on the next boot. Here is how the mute configuration can be disabled to allow the sound volume to be saved:

  • winesapOS (major version >= 3)
    • Disable and stop the user (not system) mute service.
    $ systemctl --user disable --now mute.service
    
  • Mac Linux Gaming Stick (major version <= 2)
    • Remove or delete the PulseAudio configuration.
    $ vim /home/stick/.config/pulse
    

Btrfs Backups

Both the root / and /home directory have automatic backups/snapshots configured by Snapper. A new backup will be taken every month for 12 months. Separately, a new backup will be taken once every year. The root directory will also have a backup taken whenever pacman is used to install or remove a package.

During boot, GRUB will have a "Arch Linux snapshots" section that will allow booting from a root directory snapshot. This will not appear on first boot because no backups have been taken yet. After a backup has been taken, the GRUB configuration file needs to be regenerated to scan for the new backups.

Manually rebuild the GRUB configuration file to load the latest snapshots:

$ sudo grub-mkconfig -o /boot/grub/grub.cfg

View the available backups:

$ sudo snapper -c root list
$ sudo snapper -c home list

Manually create a new backup:

$ sudo snapper -c <CONFIG> create

Manually delete a backup:

$ sudo snapper -c <CONFIG> delete <BACKUP_NUMBER>

Steam

Launch and prefer steam-runtime over steam-native. It bundles all of the libraries required for Steam to work. In case that has issues, steam-native is provided as an alternative for testing purposes. It will use the system libraries instead.

VPN (ZeroTier)

A VPN is required for LAN gaming online. Hamachi is reported to no longer work on newer versions of Arch Linux and Ubuntu. Instead, use the free and open source ZeroTier VPN service.

Host

  1. Only one person needs to create a ZeroTier account.
  2. They must then create a ZeroTier network.
    1. Log into ZeroTier Central.
    2. Select "Networks".
    3. Select "Create A Network".
    4. Select the "Network ID" or "Name" of the new network to modify the settings.
      • Either (1) set the "Access Control" to "Public" or (2) use this settings page to manually authorize connected clients to be able to communicate on the network.
      • Take note of the "Network ID". Send this string to your friends who will connect to the VPN.

Clients

  1. Start the ZeroTier VPN service.

    $ sudo systemctl enable --now zerotier-one
    
  2. Connect to the ZeroTier network.

    $ sudo zerotier-cli join <NETWORK_ID>
    

Frequently Asked Questions (FAQ)

  • What is the relevance of the word "winesap" in winesapOS?
    • It is a type of apple which signifies how we develop on Macs and ship drivers for them. It also has the word "wine" in it which is the name of the project used to enable Windows gaming on Linux.
  • Is this the Mac Linux Gaming Stick project?
    • Yes. Version 1 and 2 of the project were called Mac Linux Gaming Stick. In version 3, we rebranded to winesapOS.
  • What makes this different than adding persistent storage to a live CD with Universal USB Installer or YUMI?
    • Having persistent storage work via these hacky methods can be hit-or-miss depending on the distribution. winesapOS was built from the ground-up to have persistent storage. It also features automatic backups, various gaming tools, has support for Macs, and more.
  • Are Arm Macs supported?
    • No. In general, Linux support for them are still a work-in-progress.
  • Is winesapOS a Linux distribution?
    • No. The project takes an existing Arch Linux distribution and does an opinionated installation of it.
  • Do I have to install winesapOS?
    • No. No installation is required. Flash a release image to a drive and then boot from it. Everything is already installed and configured.
  • Can anyone build winesapOS?
  • Can winesapOS be built with a different Linux distribution?
    • Yes. We support Arch Linux, Manjaro, and SteamOS as build targets. As of winesapOS 3, SteamOS 3 is the default target that is used for our releases.

History

Release Version/Tag Project Name Operating System Desktop Environment Release Images
3.0.0-beta.0 winesapOS SteamOS 3 KDE Plasma Performance and Secure
3.0.0-alpha.0 winesapOS Arch Linux KDE Plasma Performance and Secure
2.2.0 Mac Linux Gaming Stick Manjaro Cinnamon Performance and Secure
2.0.0 Mac Linux Gaming Stick Manjaro Cinnamon Performance
1.0.0 Mac Linux Gaming Stick Ubuntu 20.04 Cinnamon None

License

GPLv3