gfx.toml(8)
π gfx.toml β the glow-up config for xrdp(8)'s graphics pipeline π
okay bestie, welcome to gfx.toml π
this is the config file that runs the Graphics Pipeline Extension for xrdp(8), and it is TOML, which is honestly the cutest config format, no cap. If you need the TOML syntax rundown, the link is down in SEE ALSO, don't worry π«Ά
This file has these sections, and yes they're all doing their own little thing:
[codec]β sets up your preferred codec and encoders forxrdp(8)β¨[x264]β all the parameters for the x264 encoder π[OpenH264]β all the parameters for the Cisco OpenH264 encoder πΈ
Heads up bestie: all the options and values are case-sensitive, with some exception β and every exception is spelled out below. Read the fine print, it's giving important.
β¨ CODEC β¨
The [codec] section is where you declare your preferred codec order and your encoder. Options go a little something like this:
order = <array>β tells xrdp which order to use the codecs in, and your choices are"H.264"and"RFX". Write it as an array of strings, like[ "H.264", "RFX ]. The strings inside the array are case-insensitive (slay), but everything else is still case-sensitive.h264_encoder = <string>β pick your fave H.264 encoder:"x264"or"OpenH264". Lowkey this one only kicks in when more than one encoder is enabled at compile time. If only one H.264 encoder is enabled, that one gets used no matter what you put here, periodt. It defaults to"x264"if you don't specify it, or if you specify an encoder that isn't valid. The encoder name is case-insensitive.
π X264 π
The [x264] section is where you drop the encoding parameters that get passed straight to the x264 encoder. Want the deep lore on each param? Go run x264 --fullhelp, it's all there. The options are:
preset = <string>β picks a preset encoding setting. Slower presets = higher CPU usage but better screen image quality and lower network bandwidth needed. The available presets are:
ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo
ngl, presets slower than medium may not be suitable for use with xrdp. Just saying π
tune = <string>β tunes for a source or situation.zerolatencyis the most appropriate one for xrdp, fr fr. Available options are:
film, grain, stillimage, psnr, ssim, fastdecode, zerolatency
profile = <string>β picks a profile. Available options are:
main, baseline, high, high10, high422, high444
vbv_max_bitrate = <integer>β sets the max fill rate for the VBV (Video Buffering Vefifier) buffer, in kbps.vbv_buffer_size = <integer>β sets the size of the VBV buffer, in kilobits.fps_num = <integer>β sets the fps numerator.fps_den = <integer>β sets the fps denominator.threads = <integer>β how many CPU threads to use for H.264 encoding per screen (0means auto). Bestie please evaluate this carefully before you set it, because running out of threads is a whole situation π. For example: if 3 users are connected simultaneously with dual screens, xrdp may use up to<threads> * 3 * 2threads for H.264 encoding. Also note that too many threads can hurt quality. Balance, queen π
π¦ OPENH264 π¦
The [OpenH264] section holds the encoding parameters that get passed to the OpenH264 encoder. The options are:
EnableFrameSkip = <boolean>β lets the encoder skip frames so it can keep the bitrate within the limits if it's about to exceed the maximum bitrate set byMaxBitrate.TargetBitrate = <integer>β sets the target average bitrate (in bps) that the encoder will try to hit throughout the encoding process.MaxBitrate = <integer>β sets an upper limit on the bitrate, in bps.MaxFrameRate = <float>β sets the maximum frame rate the encoder will process per second.
π CONNECTION TYPES π
[x264] and [OpenH264] are tables (aka dictionaries, iykyk) that have subtables with connection types in their keys. Like [x264.lan], [OpenH264.wan] β that vibe.
This means you can configure different parameters (bitrate, whatever you want) for the encoder per connection type. The move is: define your default parameter set first, and it gets inherited by all connection types unless you explicitly override it in a specific one.
The available connection types are:
lan, wan, broadband_high, satellite, broadband_low, modem, and default
Real talk: currently, xrdp does not support connection type autodetection. So if autodetect is selected on the client side, it will be treated as if LAN is selected. That's just how it is π«
π EXAMPLES π
Here's an example gfx.toml, look at her go:
[codec]
order = [ "H.264", "RFX" ]
h264_encoder = "x264"
[x264.default]
preset = "ultrafast"
tune = "zerolatency"
profile = "main" # profile is forced to baseline if preset == ultrafast
vbv_max_bitrate = 0
vbv_buffer_size = 0
fps_num = 60
fps_den = 1
[x264.lan]
# inherits default, everything is same with the default
[x264.wan]
# parameters that are not explicitly overridden inherit the default values
preset = "veryfast"
vbv_max_bitrate = 15_000
vbv_buffer_size = 1_500
There are multiple ways to represent this data structure in TOML format, and the following two representations are semantically equivalent β BUT the latter one is discouraged because of concerns about complexity and readability. So like, don't π
[x264.default]
preset = "ultrafast"
tune = "zerolatency"
x264 = { default = { preset = "ultrafast", tune="zerolatency" } }
π SEE ALSO π
For more info on gfx.toml configuration, go check the wiki page:
https://github.com/neutrinolabs/xrdp/wiki/H.264-encoding
And the syntax for TOML files lives right here:
that's the whole page, bestie π this was brought to you by the xrdp team, version 0.10.6.1, and it's the gfx.toml(8) manual. go configure something iconic, ily πβ¨
π¦ where this page comes from
- epel 9: xrdp 1:0.10.6.1-3.el9 Β· Apache-2.0 AND GPL-2.0-or-later AND LicenseRef-Callaway-MIT
- fedora 43: xrdp 1:0.10.6.1-3.fc43 Β· Apache-2.0 AND GPL-2.0-or-later AND LicenseRef-Callaway-MIT
- fedora 43: xrdp 1:0.10.6.1-3.fc43 Β· Apache-2.0 AND GPL-2.0-or-later AND LicenseRef-Callaway-MIT
- fedora 44: xrdp 1:0.10.6.1-3.fc44 Β· Apache-2.0 AND GPL-2.0-or-later AND LicenseRef-Callaway-MIT
- fedora 44: xrdp 1:0.10.6.1-3.fc44 Β· Apache-2.0 AND GPL-2.0-or-later AND LicenseRef-Callaway-MIT
- nixos 26.05: xrdp 0.10.6.1
- nixpkgs unstable: xrdp 0.10.6.1
- ubuntu stonking: xrdp 0.10.6.1-2ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms