Skip to content

Commit

Permalink
fix: updated defaults with latest hot-plug requirements
Browse files Browse the repository at this point in the history
fixes #55
  • Loading branch information
ABeltramo committed Feb 4, 2024
1 parent 0aba499 commit 1dbb931
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 72 deletions.
52 changes: 16 additions & 36 deletions src/moonlight-server/state/default/config.include.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ R"for_c++_include(
hostname = "Wolf"
# Set to false if this host doesn't support HEVC
support_hevc = true
# Set to true if this host supports AV1 (EXPERIMENTAL)
support_av1 = false
# The version of this config file
config_version = 3

Expand All @@ -22,7 +24,7 @@ image = "ghcr.io/games-on-whales/firefox:edge"
mounts = []
env = [
"MOZ_ENABLE_WAYLAND=1",
"GOW_REQUIRED_DEVICES=/dev/uinput /dev/input/event* /dev/dri/* /dev/nvidia*",
"GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*",
]
devices = [
]
Expand All @@ -32,13 +34,8 @@ base_create_json = """
"HostConfig": {
"IpcMode": "host",
"Privileged": false,
"DeviceRequests": [{
"Driver": "",
"Count": -1,
"DeviceIDs": null,
"Capabilities": [["gpu"]],
"Options": {}
}]
"CapAdd": ["NET_RAW", "MKNOD", "NET_ADMIN"],
"DeviceCgroupRules": ["c 13:* rmw"]
}
}
\
Expand All @@ -55,7 +52,7 @@ image = "ghcr.io/games-on-whales/retroarch:edge"
mounts = []
env = [
"RUN_GAMESCOPE=true",
"GOW_REQUIRED_DEVICES=/dev/input/event* /dev/dri/* /dev/nvidia*",
"GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*",
]
devices = [
]
Expand All @@ -64,15 +61,9 @@ base_create_json = """
{
"HostConfig": {
"IpcMode": "host",
"CapAdd": ["SYS_ADMIN", "SYS_NICE"],
"CapAdd": ["NET_RAW", "MKNOD", "NET_ADMIN", "SYS_ADMIN", "SYS_NICE"],
"Privileged": false,
"DeviceRequests": [{
"Driver": "",
"Count": -1,
"DeviceIDs": null,
"Capabilities": [["gpu"]],
"Options": {}
}]
"DeviceCgroupRules": ["c 13:* rmw"]
}
}
\
Expand All @@ -90,7 +81,7 @@ mounts = []
env = [
"PROTON_LOG=1",
"RUN_GAMESCOPE=true",
"GOW_REQUIRED_DEVICES=/dev/input/event* /dev/dri/* /dev/nvidia*",
"GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*",
]
devices = [
]
Expand All @@ -99,15 +90,10 @@ base_create_json = """
{
"HostConfig": {
"IpcMode": "host",
"CapAdd": ["SYS_ADMIN", "SYS_NICE"],
"CapAdd": ["SYS_ADMIN", "SYS_NICE", "SYS_PTRACE", "NET_RAW", "MKNOD", "NET_ADMIN"],
"SecurityOpt": ["seccomp=unconfined"],
"Privileged": false,
"DeviceRequests": [{
"Driver": "",
"Count": -1,
"DeviceIDs": null,
"Capabilities": [["gpu"]],
"Options": {}
}]
"DeviceCgroupRules": ["c 13:* rmw"]
}
}
\
Expand All @@ -133,15 +119,9 @@ base_create_json = """
{
"HostConfig": {
"IpcMode": "host",
"CapAdd": ["SYS_ADMIN", "SYS_NICE"],
"CapAdd": ["NET_RAW", "MKNOD", "NET_ADMIN", "SYS_ADMIN", "SYS_NICE"],
"Privileged": false,
"DeviceRequests": [{
"Driver": "",
"Count": -1,
"DeviceIDs": null,
"Capabilities": [["gpu"]],
"Options": {}
}]
"DeviceCgroupRules": ["c 13:* rmw"]
}
}
\
Expand Down Expand Up @@ -393,8 +373,8 @@ pulsesrc device="{sink_name}" server="{server_name}"
default_audio_params = "audio/x-raw, channels={channels}"

default_opus_encoder = """
opusenc bitrate={bitrate} bitrate-type=cbr frame-size={packet_duration} bandwidth=fullband audio-type=generic
max-payload-size=1400
opusenc bitrate={bitrate} bitrate-type=constrained-vbr frame-size={packet_duration} bandwidth=fullband
audio-type=restricted-lowdelay max-payload-size=1400
\
"""

Expand Down
52 changes: 16 additions & 36 deletions src/moonlight-server/state/default/config.v2.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
hostname = "Wolf"
# Set to false if this host doesn't support HEVC
support_hevc = true
# Set to true if this host supports AV1 (EXPERIMENTAL)
support_av1 = false
# The version of this config file
config_version = 3

Expand All @@ -21,7 +23,7 @@ image = "ghcr.io/games-on-whales/firefox:edge"
mounts = []
env = [
"MOZ_ENABLE_WAYLAND=1",
"GOW_REQUIRED_DEVICES=/dev/uinput /dev/input/event* /dev/dri/* /dev/nvidia*",
"GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*",
]
devices = [
]
Expand All @@ -31,13 +33,8 @@ base_create_json = """
"HostConfig": {
"IpcMode": "host",
"Privileged": false,
"DeviceRequests": [{
"Driver": "",
"Count": -1,
"DeviceIDs": null,
"Capabilities": [["gpu"]],
"Options": {}
}]
"CapAdd": ["NET_RAW", "MKNOD", "NET_ADMIN"],
"DeviceCgroupRules": ["c 13:* rmw"]
}
}
\
Expand All @@ -54,7 +51,7 @@ image = "ghcr.io/games-on-whales/retroarch:edge"
mounts = []
env = [
"RUN_GAMESCOPE=true",
"GOW_REQUIRED_DEVICES=/dev/input/event* /dev/dri/* /dev/nvidia*",
"GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*",
]
devices = [
]
Expand All @@ -63,15 +60,9 @@ base_create_json = """
{
"HostConfig": {
"IpcMode": "host",
"CapAdd": ["SYS_ADMIN", "SYS_NICE"],
"CapAdd": ["NET_RAW", "MKNOD", "NET_ADMIN", "SYS_ADMIN", "SYS_NICE"],
"Privileged": false,
"DeviceRequests": [{
"Driver": "",
"Count": -1,
"DeviceIDs": null,
"Capabilities": [["gpu"]],
"Options": {}
}]
"DeviceCgroupRules": ["c 13:* rmw"]
}
}
\
Expand All @@ -89,7 +80,7 @@ mounts = []
env = [
"PROTON_LOG=1",
"RUN_GAMESCOPE=true",
"GOW_REQUIRED_DEVICES=/dev/input/event* /dev/dri/* /dev/nvidia*",
"GOW_REQUIRED_DEVICES=/dev/input/* /dev/dri/* /dev/nvidia*",
]
devices = [
]
Expand All @@ -98,15 +89,10 @@ base_create_json = """
{
"HostConfig": {
"IpcMode": "host",
"CapAdd": ["SYS_ADMIN", "SYS_NICE"],
"CapAdd": ["SYS_ADMIN", "SYS_NICE", "SYS_PTRACE", "NET_RAW", "MKNOD", "NET_ADMIN"],
"SecurityOpt": ["seccomp=unconfined"],
"Privileged": false,
"DeviceRequests": [{
"Driver": "",
"Count": -1,
"DeviceIDs": null,
"Capabilities": [["gpu"]],
"Options": {}
}]
"DeviceCgroupRules": ["c 13:* rmw"]
}
}
\
Expand All @@ -132,15 +118,9 @@ base_create_json = """
{
"HostConfig": {
"IpcMode": "host",
"CapAdd": ["SYS_ADMIN", "SYS_NICE"],
"CapAdd": ["NET_RAW", "MKNOD", "NET_ADMIN", "SYS_ADMIN", "SYS_NICE"],
"Privileged": false,
"DeviceRequests": [{
"Driver": "",
"Count": -1,
"DeviceIDs": null,
"Capabilities": [["gpu"]],
"Options": {}
}]
"DeviceCgroupRules": ["c 13:* rmw"]
}
}
\
Expand Down Expand Up @@ -392,8 +372,8 @@ pulsesrc device="{sink_name}" server="{server_name}"
default_audio_params = "audio/x-raw, channels={channels}"

default_opus_encoder = """
opusenc bitrate={bitrate} bitrate-type=cbr frame-size={packet_duration} bandwidth=fullband audio-type=generic
max-payload-size=1400
opusenc bitrate={bitrate} bitrate-type=constrained-vbr frame-size={packet_duration} bandwidth=fullband
audio-type=restricted-lowdelay max-payload-size=1400
\
"""

Expand Down

0 comments on commit 1dbb931

Please sign in to comment.