S&box Wiki
Home
/
Edit Proton
View
Edit
History
No Category
Developer Overview
The Project System
Publishing To Asset Party
Getting Started With Hammer
Mapping Basics
Mapping Entities
Advanced Mapping Techniques
Getting Started with Modeldoc
Animgraph & Animation
Physics
Modeldoc Nodes
Advanced Modelling
UI Basics
Styles & Stylesheets
Razor Templates
Game Menus
Materials
Built In Shaders
Shaders
Shader Reference
Sounds & Audio
Particles
Getting Started
Making Games
Input
Networking
Physics
Rendering
Editor & Tools
VR
Misc
Playing Guides
Console Commands & Variables
Dedicated Server
Preview
Log in to edit
Proton
<cat>Play.Intro</cat> <title>Proton</title> # Proton All information regarding running and developing S&Box on Linux will described here. # Running To run s&box you need to set Proton to recent version. To do so, right click s&box in Library and click `Properties`: <upload src="9831e/8d9d38bda11273e.png" size="36050" name="asdf.png" /> Choose `Compatibility` > click `Force the use of a specific Steam Play compatibility tool` > Select `Proton Experimental`. Currently `Proton Experimental` works best; depending on Proton and s&box updates newer versions of `GE-Proton` may also work. <upload src="9831e/8d9d38c4b3de597.png" size="107372" name="image.png" /> To load in any map you'll have to increase maximum number of memory map areas a process can access. To do so temporarily (until next reboot) run in terminal: ``` sudo sysctl -w vm.max_map_count=16777216 ``` You can also apply this setting permanently by running in terminal: ``` sudo bash -c 'echo "vm.max_map_count = 16777216" > /etc/sysctl.d/20-sbox-max_map_count.conf && sysctl --system' ``` In case of s&box not launching, you may also need to set Windows version reported to s&box by Proton to Windows 10. To do so install protontricks either by your distro package manager or by flatpak. If you don't have flatpak installed you can learn how to setup [here](https://flatpak.org/setup/) Then run the following command in the terminal: ``` flatpak install flathub com.github.Matoking.protontricks ``` Run protontricks (shortcut or `protontricks --gui` from terminal) and choose s&box prefix: <upload src="b4b73/8db92c85f5f77d7.png" size="44665" name="sboxss01.png" /> Then select `Select the default wineprefix` and subsequently `Run winecfg`. In the new window choose desired reported Windows version: <upload src="b4b73/8db92c8bcf27eca.png" size="61643" name="sboxss02.png" /> You can also do so from the terminal. In case of system-installed protontricks run: ``` protontricks 590830 win10 ``` Or, in case of flatpak installation: ``` flatpak run --branch=stable com.github.Matoking.protontricks 590830 win10 ``` # Activating Vulkan API Apart from DirectX, s&box does also have experimental support for Vulkan API. Vulkan offers better performance with Proton, especially on weaker devices (such as PCs with iGPUs and Steam Deck), but there are currently problems with rendering of textures, water and UI elements. To turn on Vulkan API add the following to your s&box launch options. ``` -vulkan ``` When run first time with Vulkan, game may stutter quite considerably, or even not run at all (there will be only black screen). It happens when necessary shaders are built in the background and saved to disk. You may either wait until shader compilation is complete or turn off this functionality - this will result in smoother gameplay for the price of slightly higher GPU utilization. To do so add the following to your s&box launch options. ``` -vulkan_disable_graphics_pipeline_library ``` # Developing ## Creating your first addon ``` cd ~/.local/share/Steam/steamapps/common/sbox/addons git clone https://github.com/Facepunch/sbox-minimal.git my-addon cd my-addon rm -rf .git ``` ## sbox-dev At the time of writing *(Jan 2022)* you can launch s&box development executable. Please note this is unstable and you will likely crash or have random issues. Steam > Library > Right Click S&Box > Click Properties > General > Add `-tools` to Launch Options <upload src="9831e/8d9d38d29c48c70.png" size="146265" name="image.png" /> To run s&box developer mode, you will need to set-up Proton prefix: ### System-wide protontricks (from package manager): 1. Install DirectX dependency by running in terminal: ``` protontricks 590830 d3dcompiler_47 ``` 2. Run sbox-dev.exe: ``` protontricks --no-runtime --no-bwrap -c "wine sbox-dev.exe" 590830 ``` ### Flatpak protontricks: 1. If you don't have flatpak installed you can learn how to setup [here](https://flatpak.org/setup/) ``` flatpak install flathub com.github.Matoking.protontricks ``` 2. Install a DirectX dependency with ``` flatpak run --branch=stable com.github.Matoking.protontricks 590830 d3dcompiler_47 ``` 3. Run sbox-dev.exe: ``` flatpak run --branch=stable com.github.Matoking.protontricks --no-runtime --no-bwrap -c "wine sbox-dev.exe" 590830 ``` S&box dev mode should start and stay open until you close it (or it crashes). After closing, should Steam still display s&box as running, you have to exit out of steam completely to stop it. # Troubleshooting ## How to use the proton logs Proton logs sometimes could help solve issues with games not launching or working properly under proton. Proton logging can be enabled inside the launch options of s&box: ``` PROTON_LOG=1 %command% ``` If you want smaller log files but still keep useful information use this launch option: ``` WINEDEBUG=+error+threadname+debugstr+loaddll+mscoree PROTON_LOG=1 %command% ``` By default it should generate a file inside your home directory `$HOME/steam-590830.log` but it can be modified as well: ``` PROTON_LOG=1 PROTON_LOG_DIR='/path/to/log' %command% ``` ## Game is randomly crashing or locking up after playing for an amount of time This is an unknown cause, but adding `PROTON_NO_ESYNC=1 PROTON_NO_FSYNC=1` to your launch options seems to fix the problem ## Input (e.g. movement) does not work This is probably caused by having multiple keyboard layouts, adding `-input_button_code_is_scan_code` to your launch options fixes the problem # Useful Resources: 1. [S&box proton github issues](https://github.com/ValveSoftware/Proton/issues/4940) 2. [Proton parameters guide](https://github.com/ValveSoftware/Proton#runtime-config-options)
S&box Wiki
Development
Developer Overview
6
Editor Overview
General FAQ
System Requirements
The s&box wiki
Troubleshooting
Useful Links
The Project System
4
Adding Assets
Creating a Game Project
Project Settings Window - Games
Project Types
Publishing To Asset Party
2
Uploading assets
Uploading projects
Hammer
Getting Started With Hammer
3
Getting Started With Hammer
Making Your First Map
Mapping Resources
Mapping Basics
7
Cordons
Hotspot Materials
Selection Sets
Standard Mapping Dimensions
Tool Materials
Tools Visualisation Modes
Using Entities That Require a Mesh
Mapping Entities
2
Creating a Door
Light Entities
Advanced Mapping Techniques
8
Collaborating With Prefabs and Git
Instances
Prefabs
Quixel Bridge Plugin
Tilesets
Tilesets-Advanced
Tilesets-Proxies
VIS Optimizations
Models & Animation
Getting Started with Modeldoc
7
Automatic Model Setup
Breakpieces
Creating a Model
Guide to Models
Importing Rust Weapons
LODs
ModelDoc FAQ & best practices
Animgraph & Animation
3
Animations without Animgraph
AnimEvents, AnimGraph Tags, Attachments
Animgraph
Physics
3
Cloth Physics
Collisions, Physics & Surface Types
Jiggle Bones
Modeldoc Nodes
1
Custom ModelDoc nodes
Advanced Modelling
6
Bodygroups
Citizen
First Person
IKChains and Stride Retargeting
Morphs
Vertex Normals
User Interface
UI Basics
6
Custom Fonts
Embedding Websites
Enabling Pointer Events
Events and Input
Localization
UI Basics
Styles & Stylesheets
2
Custom Style Properties
Supported Style Properties
Razor Templates
3
A Razor Overview
Generic Components
Templates
Game Menus
0
Materials & Shaders
Materials
5
Guide to Materials
Material Attributes
Material Resources
Texture Settings
Using Dynamic Expressions
Built In Shaders
2
Foliage Shader
Glass Shader
Shaders
4
Compute Shaders
Constant Buffers
Material API
Shading Model
Shader Reference
5
Anatomy of Shader Files
Getting rid of Tex2D macros
Shader Reference
Shader States
Texture Format Cheat-Sheet
Other Assets
Sounds & Audio
3
Guide to Sounds
Sound Events
Soundscapes
Particles
5
Creating animated sprites
Creating your first particle effect
Understanding Particle Editor
Using custom sprites
Using particle systems from C#
Coding
Getting Started
6
Cheat Sheet
Debugging
Learning Resources
Setting up Rider
Setting up Visual Studio
Setting up Visual Studio Code
Making Games
2
Components
GameObjects
Input
4
Commands
ConVars
Input System
Speech Recognition
Networking
7
Auth Tokens
Http Requests
Networked Types
Networking Basics
RPCs
Setting Up Networking
WebSockets
Physics
4
Collisions
Hitboxes
Traces
Triggers
Rendering
3
Render Tags
RenderHooks
Scenes
Editor & Tools
7
Creating a Tool
Custom Asset Types
Guide to Widgets
Hammer API
Hammer Gizmos
Hotload Performance
Widget Docking
VR
3
Getting Started
VR Input
VR Overlays
Misc
13
Asset Types
Attributes and Component Properties
Backend API
Cloud Assets in code
Code Accesslist
CPU Performance Profiling
DisplayInfo
FileSystem
Mounting assets at runtime
package/find
Setting Up A Navigation Mesh
Threaded Tasks
TypeLibrary
Playing
Playing Guides
3
Default Keybinds
Proton
s&box on macOS (Experimental)
Console Commands & Variables
1
Launch Arguments
Dedicated Server
1
Dedicated Servers