aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-12-12 15:36:23 +0100
committerSimon Zeni <simon@bl4ckb0ne.ca>2023-12-12 10:04:14 -0500
commita6ef12d968111d4d8c480124575d9d86ae61e470 (patch)
treec68aa911d4bf26cac391dcf70664151c36747273
parentff07eab85b5c6b728ad3cc99d02e9f2ae8b9854f (diff)
Detect proprietary DisplayLink drivers
evdi is open-source, but is just some condom for their proprietary user-space driver.
-rw-r--r--sway/server.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/sway/server.c b/sway/server.c
index 267e46c0..d173581f 100644
--- a/sway/server.c
+++ b/sway/server.c
@@ -128,18 +128,27 @@ static void detect_proprietary(struct wlr_backend *backend, void *data) {
return;
}
+ bool is_unsupported = false;
if (strcmp(version->name, "nvidia-drm") == 0) {
- if (allow_unsupported_gpu) {
- sway_log(SWAY_ERROR, "!!! Proprietary Nvidia drivers are in use !!!");
- } else {
- sway_log(SWAY_ERROR,
- "Proprietary Nvidia drivers are NOT supported. "
- "Use Nouveau. To launch sway anyway, launch with "
- "--unsupported-gpu and DO NOT report issues.");
- exit(EXIT_FAILURE);
+ is_unsupported = true;
+ sway_log(SWAY_ERROR, "!!! Proprietary Nvidia drivers are in use !!!");
+ if (!allow_unsupported_gpu) {
+ sway_log(SWAY_ERROR, "Use Nouveau instead");
}
}
+ if (strcmp(version->name, "evdi") == 0) {
+ is_unsupported = true;
+ sway_log(SWAY_ERROR, "!!! Proprietary DisplayLink drivers are in use !!!");
+ }
+
+ if (!allow_unsupported_gpu && is_unsupported) {
+ sway_log(SWAY_ERROR,
+ "Proprietary drivers are NOT supported. To launch sway anyway, "
+ "launch with --unsupported-gpu and DO NOT report issues.");
+ exit(EXIT_FAILURE);
+ }
+
drmFreeVersion(version);
}