Skip to content

Outputs ​

Outputs are rendering targets behind the logical monitor layout. Use them to read display modes and the GPU path for this session.

Read-only calls return detached snapshots. gnoblinctl output list prints the same snapshot from the command line, with --json for machine-readable output.

Read outputs ​

MethodArgumentsResult
gnoblin.outputs.list()NoneAll current Output records
gnoblin.outputs.primary()NonePrimary record or nil
gnoblin.outputs.by_id(id)String connector IDMatching record or nil
gnoblin.outputs.renderer()NoneRenderer record or nil
lua
local renderer = gnoblin.outputs.renderer()
if renderer and not renderer.accelerated then
    -- Avoid enabling expensive visual effects for this session.
end

for _, output in ipairs(gnoblin.outputs.list()) do
    print(output.id, output.mode.width, output.mode.height)
end

During login configuration the output snapshot may not exist yet: list() returns an empty list, and primary(), by_id(), and renderer() return nil until the first snapshot is published. Snapshots refresh on output changes, so event handlers read current state instead of caching records.

Output records ​

FieldTypeMeaning
idStringConnector name, such as "DP-1". Stable per output.
kindString enum"display" today. "virtual" and "xr" are reserved.
nameString or nilDisplay name, when the hardware provides one.
makeString or nilManufacturer string, when available.
modelString or nilModel string, when available.
serialString or nilSerial string, when available.
enabledBooleanWhether the output is active in the current layout.
primaryBooleanWhether this is the primary output.
monitor_idString or nilMatching logical monitor ID from gnoblin.monitors.
modeRecordwidth and height in physical pixels; refresh_rate in Hz.
scaleNumberCompositing scale of the logical monitor.
transformStringCurrent transformation, such as "normal" or "90".
x, yNumber or nilLogical position; present for display outputs.
rendererRecordRenderer record for the GPU path that renders this output.
revisionIntegerSnapshot revision of this record.

An output is not guaranteed to occupy a rectangle in the logical layout. Reserved virtual and xr kinds omit the logical position and rectangle shape.

Renderer records ​

FieldTypeMeaning
nameStringGL renderer string, such as "llvmpipe".
vendorString or nilGL vendor string, when available.
apiStringGL API in use, such as "gles2".
acceleratedBooleanfalse for software rasterizers.

Gnoblin reports accelerated = false for the software rasterizers llvmpipe, softpipe, swrast, and Software Rasterizer, and when Mutter reports software rendering. All outputs share one compositor renderer record today; the outputs design note covers multi-GPU limitations.

Display configuration such as modes and profiles stays with the session display-configuration interface. gnoblin.outputs gains write access only through that interface; see workspaces and monitors for the logical layout side.