Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
virtual_display.h
Go to the documentation of this file.
1
5#pragma once
6
7// standard includes
8#include <atomic>
9#include <chrono>
10#include <condition_variable>
11#include <cstdint>
12#include <filesystem>
13#include <functional>
14#include <map>
15#include <memory>
16#include <mutex>
17#include <optional>
18#include <string>
19#include <string_view>
20#include <vector>
21
22#include <sys/types.h>
23
24// local includes
25#include "src/uuid.h"
26#include "hermes_kms_color.h"
27#include "monitor_restore.h"
28
29namespace VDISPLAY {
30
42
49 enum class EVDI_DIAGNOSTIC {
50 READY,
51 INITIAL_DEVICE_CONFIGURATION_REQUIRED,
52 LIBRARY_MISSING,
53 MODULE_NOT_INSTALLED,
54 MODULE_NOT_LOADED,
55 DKMS_BUILD_FAILED,
56 };
57
59 std::string name;
60 std::string client_name;
61 int device_index;
63 int drm_card_index;
64 uint32_t width;
65 uint32_t height;
66 uint32_t fps;
67 uint64_t frame_updates;
68 };
69
79 READY,
80 MODULE_NOT_LOADED,
81 MODULE_NOT_INSTALLED,
82 DKMS_BUILD_FAILED,
83 UAPI_TOO_OLD,
84 MISSING_CAPABILITIES,
85 DEVICE_NODE_MISSING,
87 };
88
90 HERMES_KMS_DIAGNOSTIC diagnostic;
91 bool module_loaded;
92 bool module_installed;
95 uint32_t uapi_version;
97 bool experimental_multi_output_enabled;
98 bool multi_output_capable;
99 bool experimental_isolated_sessions_enabled;
100 bool multi_device_capable;
101 uint32_t device_count;
102 uint32_t output_count;
103 uint32_t private_seat_broker_count;
104 std::vector<uint32_t> missing_private_seat_brokers;
105 std::string driver_version;
106 std::string running_kernel;
107 std::vector<std::string> dkms_kernels;
108 std::vector<EvdiVirtualDisplayStatus> active_displays;
109 std::string inaccessible_node;
112 std::string installed_version;
115 bool reload_needed {false};
119 };
120
121 struct EvdiStatus {
122 EVDI_DIAGNOSTIC diagnostic;
123 bool library_installed;
124 bool library_loaded;
125 bool module_loaded;
126 bool module_installed;
127 int device_count;
128 std::string session_type;
129 bool exclusive_layout_supported;
130 std::string output_layout_backend;
131 std::string library_version;
132 std::string running_kernel;
133 std::vector<std::string> dkms_kernels;
134 std::vector<EvdiVirtualDisplayStatus> active_displays;
135 };
136
146 bool available = false;
147 int output_index = -1;
148 std::string output_name;
149 uint64_t frame_sequence = 0;
150 uint64_t frame_update_count = 0;
151 uint64_t acquire_count = 0;
153 uint64_t dmabuf_export_count = 0;
155 uint64_t wait_count = 0;
156 uint64_t wait_ready_count = 0;
157 uint64_t wait_timeout_count = 0;
158 uint64_t output_enable_count = 0;
159 uint64_t output_disable_count = 0;
160 uint64_t hotplug_event_count = 0;
161 uint64_t last_update_ns = 0;
166 bool session_lifecycle = false;
170 uint64_t bound_fd_count = 0;
171 uint64_t bind_count = 0;
172 uint64_t bind_reject_count = 0;
173 uint64_t unbind_count = 0;
174 uint64_t binding_revoke_count = 0;
179 };
180
189
195
203
206
209
212
215
219 void closeVDisplayDevice();
220
226 bool startPingThread(std::function<void()> failCb);
227
233 bool setRenderAdapterByName(const std::string &adapterName);
234
251
273 std::string createVirtualDisplay(
274 const char *s_client_uid,
275 const char *s_client_name,
276 uint32_t width,
277 uint32_t height,
278 uint32_t fps,
279 const uuid_util::uuid_t &guid,
280 std::optional<uid_t> session_owner_uid = std::nullopt,
281 virtual_display_layout_e layout = virtual_display_layout_e::extend,
282 bool isolated_session = false
283 );
284
290 bool removeVirtualDisplay(const uuid_util::uuid_t &guid);
291
306 int changeDisplaySettings(const char *deviceName, int width, int height, int refresh_rate, int deadline_ms = 4000);
307
317 int changeDisplaySettings2(const char *deviceName, int width, int height, int refresh_rate, bool bApplyIsolated = false);
318
320 std::string getEvdiConnectorName(const std::string &displayName);
321
323 std::string getHermesKmsConnectorName(const std::string &displayName);
324
342 enum class compositor_e {
343 unknown,
345 mutter,
349 };
350
352 std::string compositorName(compositor_e compositor);
353
372
381 enum class readiness_e {
382 ready,
384 unavailable,
385 unknown,
386 };
387
389 feature_e feature;
390 readiness_e readiness;
391 std::string detail;
392 std::string remediation;
393 };
394
406 // Deliberately two flags rather than one: "not Wayland" and "X11" are
407 // different claims, and a session that is neither - a headless service, a
408 // daemon started before any window system - must not inherit X11's answers.
409 // Reporting such a session as a working X11 one is the failure mode a
410 // diagnostic can least afford.
411 bool wayland {false};
412 bool x11 {false};
413 bool output_management {false};
414 bool screencopy {false};
415 bool image_copy_capture {false};
416 bool linux_dmabuf {false};
417 bool kscreen {false};
418 bool mutter {false};
419 bool hermes_kms_present {false};
422 bool drm_seat_isolation {false};
428 bool hyprland_control {false};
429 };
430
432 std::string featureName(feature_e feature);
433 std::string readinessName(readiness_e readiness);
434
441 std::vector<FeatureReport> assessSession(const SessionFacts &facts);
442
444 SessionFacts probeSessionFacts();
445
452 void logSessionAssessment();
453
465 bool hermesKmsSeatIsolationActive();
466
484 std::optional<bool> displayConnectorLit(
485 const std::filesystem::path &drm_class = "/sys/class/drm",
486 const std::string &ignored_connector = {}
487 );
488
497
511 std::optional<std::string> boundedCommandOutput(
512 const std::string &command,
513 std::chrono::milliseconds timeout,
514 bool *timed_out = nullptr
515 );
516
528 bool displayServerReachable(const std::string &wayland_display, const std::string &x_display, const std::string &runtime_dir);
529
535 std::optional<bool> graphicalSessionPresent();
536
541 bool inLoginSession();
542
551 std::optional<std::vector<std::string>> userManagerEnvironment();
552
561 const std::string &connector,
562 std::chrono::milliseconds timeout,
563 const std::filesystem::path &drm_class = "/sys/class/drm"
564 );
565
579 bool removalStrandsGreeter(bool greeter_on_seat, bool output_lit, std::optional<bool> another_connector_lit);
580
585 std::string parkedConnector();
586
598 compositor_e compositorFromDesktopNames(const std::string &desktop_names);
599
610
629 const std::string &current_state,
630 const std::string &virtual_connector,
631 std::string &serial,
632 std::string &argument
633 );
634
656 const std::string &current_state,
657 const std::string &connector,
658 uint32_t width,
659 uint32_t height,
660 uint32_t refresh_mhz,
661 std::string &serial,
662 std::string &argument
663 );
664
678 const std::string &current_state,
679 const std::string &connector,
680 std::string &serial,
681 std::string &argument
682 );
683
696 const std::string &current_state,
697 const std::string &connector,
698 std::string &serial,
699 std::string &argument
700 );
701
709 const std::string &current_state,
710 std::string &serial,
711 std::string &argument
712 );
713
728 uint64_t displayLayoutGeneration();
729
740 constexpr uint16_t VIRTUAL_INPUT_SETTINGS_VENDOR_ID = 0xBEEF;
741 constexpr uint16_t VIRTUAL_INPUT_SETTINGS_PRODUCT_ID = 0xDEAD;
742
756 const std::string &current_state,
757 const std::string &connector
758 );
759
767 void mutterInputDeviceSettingsTargets(std::string &touch, std::string &pen);
768
776 std::string systemdUserBusAddress(uint32_t uid);
777
790
799 constexpr const char *VIRTUAL_TOUCH_DEVICE_NAME = "Touch passthrough";
800 constexpr const char *VIRTUAL_PEN_DEVICE_NAME = "Pen passthrough";
801
808 bool isHermesKWinInputDevice(const std::string &name, uint32_t vendor, uint32_t product);
809
817 std::string buildKWinInputBindingReadCommand(const std::string &device_name);
818
830 std::string buildKWinInputBindingRestoreCommand(const std::string &device_name, const std::string &previous_uuid);
831
854 const std::string &current_state,
855 const std::string &connector,
856 int &offset_x,
857 int &offset_y,
858 int &environment_width,
859 int &environment_height
860 );
861
864 int x {0};
865 int y {0};
866 };
867
868
892 kscreen_point_t kscreenVirtualOutputPosition(
893 const std::string &virtual_output,
894 const std::vector<kscreen_output_t> &before,
895 const std::vector<kscreen_output_t> &current,
896 virtual_display_layout_e layout
897 );
898
915 bool kscreenDisplayGeometry(
916 const std::vector<kscreen_output_t> &outputs,
917 const std::string &output_name,
918 int &offset_x,
919 int &offset_y,
920 int &environment_width,
921 int &environment_height
922 );
923
952 std::string buildKScreenLayoutCommand(
953 const std::string &virtual_output,
954 const std::map<std::string, int> &enabled_before,
955 int target_x,
956 int target_y,
957 int mode_width,
958 int mode_height,
959 int mode_refresh_hz,
960 const std::map<std::string, kscreen_point_t> &positions_before = {},
962 );
963
971
986 kscreen_mode_state_e kscreenModeState(
987 const std::string &json_text,
988 const std::string &output,
989 int width,
990 int height,
991 int refresh_hz
992 );
993
996 bool hdr_supported;
997 bool hdr;
998 bool wcg_supported;
999 bool wcg;
1000 };
1001 std::optional<kscreen_hdr_state_t> kscreenHdrState(const std::string &json_text, const std::string &output);
1002
1017 std::optional<std::string> kscreenLayoutFailure(std::string_view output);
1018
1021 bool hdr;
1023 const char *sdr_reason;
1024 };
1025
1032 hdr_launch_mode_t virtualDisplayHdrMode(bool requested, const kscreen_hdr_state_t &state, bool driver_reports_frame_color);
1033
1035 bool configureVirtualDisplayHdr(const std::string &displayName, bool hdr);
1036
1038 bool activateVirtualDisplayOutput(const std::string &displayName);
1039
1046 std::string primaryPhysicalOutputName();
1047
1055 void endPhysicalOutputSession();
1056 void notePhysicalCaptureOutput(const std::string &connector_name);
1057
1069 bool wakeSleepingMonitor();
1070
1078 void placeWindowsOnVirtualDisplay(const std::string &displayName, const std::vector<std::string> &windowClasses, const std::vector<std::uint32_t> &gamescopePids = {});
1080 bool enableExclusiveVirtualDisplay(const std::string &displayName);
1081 void restoreExclusiveVirtualDisplay();
1082
1087 std::string getPrimaryDisplay();
1088
1094 bool setPrimaryDisplay(const char *primaryDeviceName);
1095
1101 bool getDisplayHDRByName(const char *displayName);
1102
1109 bool setDisplayHDRByName(const char *displayName, bool enableAdvancedColor);
1110
1116 std::vector<std::string> matchDisplay(const std::string &sMatch);
1117
1123 bool isEvdiDisplay(const std::string &displayName);
1124
1126 bool isHermesKmsDisplay(const std::string &displayName);
1127
1135 std::string getHyprlandOutputName(const std::string &displayName);
1136
1142 int getEvdiCardIndex(const std::string &displayName);
1143
1145 int getHermesKmsCardIndex(const std::string &displayName);
1146
1148 bool isHermesKmsDriverPresent();
1149
1151 std::vector<std::string> listHermesKmsDisplayNames();
1152
1154 std::string getHermesKmsDevicePath(const std::string &displayName);
1155
1157 std::string getHermesKmsSeatName(const std::string &displayName);
1158
1164 class EvdiBuffer {
1165 public:
1166 EvdiBuffer(uint32_t width, uint32_t height);
1167 EvdiBuffer(const EvdiBuffer &) = delete;
1168 EvdiBuffer &operator=(const EvdiBuffer &) = delete;
1169
1170 uint32_t width() const { return width_; }
1171 uint32_t height() const { return height_; }
1172 uint32_t stride() const { return width_ * 4; }
1173 uint64_t frame_number() const { return frame_number_.load(std::memory_order_acquire); }
1174 void *raw_buffer() { return data_.data(); }
1175 uint64_t copy_to(uint8_t *dst, uint32_t dst_stride) const;
1176 uint64_t wait_for_update(uint64_t last_frame, std::chrono::milliseconds timeout);
1177 void begin_write();
1178 void end_write();
1179 void mark_updated();
1180
1181 private:
1182 mutable std::mutex mutex_;
1183 std::condition_variable condition_;
1184 std::vector<uint8_t> data_;
1185 uint32_t width_;
1186 uint32_t height_;
1187 std::atomic<uint64_t> frame_number_ {0};
1188 };
1189
1191 std::shared_ptr<EvdiBuffer> getEvdiBuffer(const std::string &display_name);
1192
1202 hermes_kms::color_t color;
1203 int width {0};
1204 int height {0};
1205 uint32_t fourcc {0};
1206 uint64_t modifier {0};
1207 uint32_t plane_count {0};
1208 int dma_buf_fd[4] {-1, -1, -1, -1};
1209 uint32_t pitch[4] {0, 0, 0, 0};
1210 uint32_t offset[4] {0, 0, 0, 0};
1211 int sync_file_fd {-1};
1212 uint64_t sequence {0};
1213 long long acquire_ns {0};
1214
1215 void close();
1216 };
1217
1220 bool frame_ready {false};
1221 bool cursor_ready {false};
1222 uint64_t frame_sequence {0};
1223 uint64_t cursor_sequence {0};
1224 };
1225
1228 bool visible {false};
1229 bool position_valid {false};
1230 bool geometry_valid {false};
1231 bool buffer_valid {false};
1232 int32_t position_x {0};
1233 int32_t position_y {0};
1234 int32_t crtc_x {0};
1235 int32_t crtc_y {0};
1236 uint32_t crtc_w {0};
1237 uint32_t crtc_h {0};
1238 uint32_t src_x {0};
1239 uint32_t src_y {0};
1240 uint32_t src_w {0};
1241 uint32_t src_h {0};
1242 int32_t hotspot_x {0};
1243 int32_t hotspot_y {0};
1244 uint32_t width {0};
1245 uint32_t height {0};
1246 uint32_t fourcc {0};
1247 uint64_t modifier {0};
1248 uint32_t plane_count {0};
1249 int dma_buf_fd[4] {-1, -1, -1, -1};
1250 uint32_t pitch[4] {0, 0, 0, 0};
1251 uint32_t offset[4] {0, 0, 0, 0};
1252 int sync_file_fd {-1};
1253 uint64_t sequence {0};
1254 uint64_t image_sequence {0};
1255
1256 void close();
1257 };
1258
1263 int hermesKmsOpenCapture(const std::string &display_name);
1264
1269 bool getHermesKmsDisplayGeometry(const std::string &display_name,
1270 int &offset_x, int &offset_y,
1271 int &environment_width, int &environment_height);
1272
1280 bool hermesKmsCaptureSize(int render_fd, int &width, int &height, uint32_t timeout_ms = 0);
1281
1288 // Query one coherent initial frame/colour snapshot without exporting fds.
1289 // A legacy driver returns unknown colour state; never infer HDR from fourcc.
1290 bool hermesKmsCaptureColor(int render_fd, hermes_kms::color_t &color, uint32_t &fourcc);
1291
1293 bool hermesKmsReportsFrameColor(int render_fd);
1294
1295 bool hermesKmsAcquireFrame(int render_fd, uint64_t after_sequence,
1296 uint32_t timeout_ms, HermesKmsFrame &out, bool capture_color = false);
1297
1299 bool hermesKmsWaitUpdate(int render_fd, uint64_t after_frame_sequence,
1300 uint64_t after_cursor_sequence, uint32_t timeout_ms,
1301 HermesKmsUpdate &out);
1302
1304 bool hermesKmsAcquireCursor(int render_fd, bool request_buffer,
1305 HermesKmsCursor &out);
1306
1307} // namespace VDISPLAY
1308
Frame-associated colour state from Hermes-KMS UAPI v14.
Verified physical-output restoration, independent of the compositor transport.
Hyprland's control socket.
int output_index
0-based Hermes-KMS output, or -1 for EVDI.
std::string detail
Why this verdict, in terms of what was observed.
std::string remediation
What the user can do; empty when nothing can be.
uint32_t src_x
DRM 16.16 fixed point.
uint32_t src_h
DRM 16.16 fixed point.
void close()
Close all owned fds (dma_buf_fd[] and sync_file_fd).
uint32_t src_w
DRM 16.16 fixed point.
uint32_t src_y
DRM 16.16 fixed point.
long long acquire_ns
Time spent in the ACQUIRE_FRAME ioctl only.
Output-lifetime counters read from the Hermes-KMS GET_METRICS ioctl.
uint64_t hotplug_event_count
Hotplug uevents emitted.
uint64_t bind_reject_count
Binds refused: bad token, wrong session, revoked.
uint64_t wait_timeout_count
Waits that timed out.
uint64_t wait_ready_count
Waits that returned a ready frame.
uint64_t frame_sequence
Latest frame sequence number.
uint64_t dmabuf_export_fail_count
Failed DMA-BUF exports.
uint64_t last_update_ns
Timestamp of the last framebuffer update.
uint64_t unbind_count
Bindings given up by their holder.
int output_index
0-based output selected for this snapshot.
uint64_t acquire_count
ACQUIRE_FRAME ioctls served.
uint64_t acquire_no_frame_count
Acquires that found no new frame.
uint64_t output_enable_count
Times the virtual output was enabled.
uint64_t wait_count
WAIT_FRAME ioctls served.
uint64_t output_disable_count
Times the virtual output was disabled.
uint64_t dmabuf_export_count
DMA-BUFs exported to the consumer.
uint64_t bind_count
Bindings granted over the output's lifetime.
uint64_t frame_update_count
Total framebuffer updates seen.
uint32_t required_uapi_version
Minimum UAPI version Hermes needs.
bool device_present
A hermes-kms DRM card node was found and opened.
uint32_t uapi_version
UAPI version reported by the device, or 0.
int card_index
DRM card index of the Hermes-KMS device, or -1.
std::string driver_version
"major.minor.patch" from the device, if present.
What was observed about the session, before any verdict is drawn.
bool output_management
zwlr_output_manager_v1 is advertised.
bool hermes_kms_present
A Hermes-KMS device was opened.
bool hermes_kms_multi_output
The device advertises more than one output.
bool image_copy_capture
ext_image_copy_capture_manager_v1 is advertised.
bool drm_seat_isolation
Session DRM cards carry a private ID_SEAT.
bool mutter
org.gnome.Mutter.DisplayConfig answers.
bool screencopy
zwlr_screencopy_manager_v1 is advertised.
bool x11
An X11 session, which has its own xrandr layout path.
bool kscreen
kscreen-doctor is usable.
bool wayland
A Wayland session Hermes will capture from.
bool linux_dmabuf
zwp_linux_dmabuf_v1 is advertised.
bool hermes_kms_multi_device
The driver exposes a session-device pool.
const char * sdr_reason
Why an HDR request streams SDR instead; null when nothing fell back.
A point in KScreen's logical coordinate space.
Declarations for UUID generation.
EvdiStatus getEvdiStatus()
bool needsInitialDeviceConfiguration()
Whether EVDI needs a device pre-created at module load time.
compositor_e compositorFromDesktopNames(const std::string &desktop_names)
Classify a compositor from an XDG_CURRENT_DESKTOP-style value.
bool hermesKmsAcquireCursor(int render_fd, bool request_buffer, HermesKmsCursor &out)
bool mutterDisplayGeometry(const std::string &current_state, const std::string &connector, int &offset_x, int &offset_y, int &environment_width, int &environment_height)
Where a connector sits on a GNOME desktop, for absolute input.
bool unlockHostSessionIfLocked()
Unlock the active graphical login session for the Hermes user when locked.
bool inLoginSession()
Whether Hermes itself runs inside a login session - started from a terminal or over SSH - rather than...
HERMES_KMS_DIAGNOSTIC getHermesKmsDiagnostic()
bool windowSystemAttached()
Whether Hermes runs inside a graphical session (Wayland or X11).
HermesKmsMetrics getHermesKmsMetrics()
Read the Hermes-KMS device metrics, if a metrics-capable device is present. It opens a short-lived re...
uint64_t displayLayoutGeneration()
A counter bumped whenever the desktop layout changes underneath a running session.
bool startPingThread(std::function< void()> failCb)
Start a ping thread to keep the virtual display alive.
bool buildMutterLayoutWithMode(const std::string &current_state, const std::string &connector, uint32_t width, uint32_t height, uint32_t refresh_mhz, std::string &serial, std::string &argument)
Build the Mutter ApplyMonitorsConfig payload that drives a connector at a requested geometry.
bool buildMutterMirrorLayout(const std::string &current_state, const std::string &connector, std::string &serial, std::string &argument)
Build the payload that clones the primary output onto connector.
int hermesKmsOpenCapture(const std::string &display_name)
bool hermesKmsWaitUpdate(int render_fd, uint64_t after_frame_sequence, uint64_t after_cursor_sequence, uint32_t timeout_ms, HermesKmsUpdate &out)
compositor_e sessionCompositor()
Classify the compositor of the running session.
std::string mutterInputDeviceOutputValue(const std::string &current_state, const std::string &connector)
The GNOME output value that binds an input device to connector.
DRIVER_STATUS openVDisplayDevice()
Initialize the virtual display driver.
bool isHermesKWinInputDevice(const std::string &name, uint32_t vendor, uint32_t product)
Whether a device KWin reports is one of Hermes' touch or pen devices.
void placeWindowsOnVirtualDisplay(const std::string &displayName, const std::vector< std::string > &windowClasses, const std::vector< std::uint32_t > &gamescopePids)
EVDI_DIAGNOSTIC getEvdiDiagnostic()
bool configureVirtualDisplayHdr(const std::string &displayName, bool hdr)
hdr_launch_mode_t virtualDisplayHdrMode(bool requested, const kscreen_hdr_state_t &state, bool driver_reports_frame_color)
bool getHermesKmsDisplayGeometry(const std::string &display_name, int &offset_x, int &offset_y, int &environment_width, int &environment_height)
bool hermesKmsReportsFrameColor(int render_fd)
bool waitForConnectorEnabled(const std::string &connector, std::chrono::milliseconds timeout, const std::filesystem::path &drm_class)
Wait until some compositor has bound connector to a CRTC.
void mutterInputDeviceSettingsTargets(std::string &touch, std::string &pen)
The relocatable-schema targets whose output key binds Hermes' own touch and pen devices,...
std::string buildKWinInputBindingRestoreCommand(const std::string &device_name, const std::string &previous_uuid)
The kwriteconfig6 command that puts a KWin input device's binding back to previous_uuid,...
bool setRenderAdapterByName(const std::string &adapterName)
Set the render adapter by name.
bool hermesKmsCaptureColor(int render_fd, hermes_kms::color_t &color, uint32_t &fourcc)
std::optional< std::string > kscreenLayoutFailure(std::string_view output)
What went wrong with a kscreen-doctor layout command, read from its output.
bool hermesKmsCaptureSize(int render_fd, int &width, int &height, uint32_t timeout_ms)
bool buildMutterLayoutWithoutConnector(const std::string &current_state, const std::string &virtual_connector, std::string &serial, std::string &argument)
Build the Mutter ApplyMonitorsConfig payload that drops a connector.
HermesKmsStatus getHermesKmsStatus()
bool displayServerReachable(const std::string &wayland_display, const std::string &x_display, const std::string &runtime_dir)
Whether a display server is listening where these variables point.
void beginPhysicalOutputSession()
std::shared_ptr< EvdiBuffer > getEvdiBuffer(const std::string &display_name)
bool removalStrandsGreeter(bool greeter_on_seat, bool output_lit, std::optional< bool > another_connector_lit)
Whether removing a virtual display would leave the login greeter with nothing to draw on.
std::string systemdUserBusAddress(uint32_t uid)
The standard systemd user-bus address for uid.
void closeVDisplayDevice()
Close the virtual display driver.
std::optional< std::string > boundedCommandOutput(const std::string &command, std::chrono::milliseconds timeout, bool *timed_out)
Run a shell command and collect its standard output, waiting no longer than timeout for it.
std::string buildKWinInputBindingReadCommand(const std::string &device_name)
The kreadconfig6 command that prints the output UUID a KWin input device is bound to....
std::optional< std::vector< std::string > > userManagerEnvironment()
The environment the systemd user manager hands to the units it starts, as "NAME=value" strings.
bool activateVirtualDisplayOutput(const std::string &displayName)
std::string parkedConnector()
The connector of the output being kept for the login greeter, or empty. It is lit,...
bool buildMutterRestoreLayout(const std::string &current_state, std::string &serial, std::string &argument)
Build the payload that reproduces the layout in current_state.
bool buildMutterExclusiveLayout(const std::string &current_state, const std::string &connector, std::string &serial, std::string &argument)
Build the ApplyMonitorsConfig payload that hands the desktop to connector alone, which is how a monit...
bool wakeSleepingMonitor()
Wake a monitor the compositor has put to sleep.
std::string primaryPhysicalOutputName()
The desktop's primary physical output ("DP-2"), or empty.
std::optional< bool > graphicalSessionPresent()
Whether this user has a session of their own, as logind sees it - graphical or not,...
constexpr const char * VIRTUAL_TOUCH_DEVICE_NAME
The names Hermes gives its per-client touch and pen devices.
feature_e
A thing Hermes does that a session either supports or does not.
@ exclusive_mode
Blank the physical monitors for the duration of a session.
@ virtual_display
Create a virtual display and have it composited onto.
@ multiple_displays
More than one virtual display in the same session.
@ zero_copy_capture
Capture over DMA-BUF rather than through a CPU copy.
@ client_requested_mode
Drive it at the geometry the client asked for.
@ isolated_sessions
One seat and one compositor per client.
virtual_display_layout_e
Where the host compositor places a newly created virtual output.
@ primary
Side-by-side like extend, with the virtual output as the primary one.
@ detached
Side-by-side while preserving physical-output state where possible.
@ extend
Side-by-side, reasserting the pre-session physical layout.
constexpr uint16_t VIRTUAL_INPUT_SETTINGS_VENDOR_ID
The ids GNOME's per-device settings path is built from.
readiness_e
How well a session supports one feature.
@ degraded
Usable, but not as asked for - the detail says how.
kscreen_mode_state_e
What kscreen-doctor -j says about a mode on one output.
@ advertised
The mode exists and is not the one being driven.
@ current
KWin already drives the output at that mode.
@ not_advertised
The output exists but offers no such mode.
@ unknown_output
KWin does not report that output at all.
compositor_e
The Wayland compositor driving this session.
@ cosmic
COSMIC: wlr-output-management, but no wlr-screencopy for capture.
@ wlroots
sway, wayfire, river, labwc: the plain wlr-output-management path.
@ unknown
X11, no session, or a compositor Hermes cannot name.
DRIVER_STATUS
Status of the virtual display driver.
@ VERSION_INCOMPATIBLE
Driver version incompatible.
@ NOT_SUPPORTED
Virtual display not supported on this system.
@ UNKNOWN
Driver status unknown.
@ WATCHDOG_FAILED
Driver watchdog failed.
@ FAILED
Driver failed to initialize.
EVDI_DIAGNOSTIC
Actionable EVDI state exposed to the Web UI.
HERMES_KMS_DIAGNOSTIC
Actionable Hermes-KMS state exposed to the Web UI.
@ NO_ACCESS
The driver's desktop render node exists but this user may not open it.