Skip to content

Commit 5dc49ee

Browse files
authored
Merge pull request #12 from linuxserver/wayland-default
make wayland default
2 parents f3dfbb6 + 909f29f commit 5dc49ee

File tree

5 files changed

+131
-93
lines changed

5 files changed

+131
-93
lines changed

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
1010
LABEL maintainer="thelamer"
1111

1212
# title
13-
ENV TITLE="RustDesk"
13+
ENV TITLE="RustDesk" \
14+
NO_GAMEPAD=true \
15+
NO_FULL=true \
16+
PIXELFLUX_WAYLAND=true
1417

1518
RUN \
1619
echo "**** add icon ****" && \

Dockerfile.aarch64

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
1010
LABEL maintainer="thelamer"
1111

1212
# title
13-
ENV TITLE="RustDesk"
13+
ENV TITLE="RustDesk" \
14+
NO_GAMEPAD=true \
15+
NO_FULL=true \
16+
PIXELFLUX_WAYLAND=true
1417

1518
RUN \
1619
echo "**** add icon ****" && \

Jenkinsfile

Lines changed: 85 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ pipeline {
7878
'''
7979
script{
8080
env.EXIT_STATUS = ''
81+
env.CI_TEST_ATTEMPTED = ''
8182
env.LS_RELEASE = sh(
8283
script: '''docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:latest 2>/dev/null | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
8384
returnStdout: true).trim()
@@ -881,6 +882,7 @@ pipeline {
881882
script{
882883
env.CI_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/index.html'
883884
env.CI_JSON_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/report.json'
885+
env.CI_TEST_ATTEMPTED = 'true'
884886
}
885887
sh '''#! /bin/bash
886888
set -e
@@ -1083,98 +1085,13 @@ EOF
10831085
) '''
10841086
}
10851087
}
1086-
// If this is a Pull request send the CI link as a comment on it
1087-
stage('Pull Request Comment') {
1088-
when {
1089-
not {environment name: 'CHANGE_ID', value: ''}
1090-
environment name: 'EXIT_STATUS', value: ''
1091-
}
1092-
steps {
1093-
sh '''#! /bin/bash
1094-
# Function to retrieve JSON data from URL
1095-
get_json() {
1096-
local url="$1"
1097-
local response=$(curl -s "$url")
1098-
if [ $? -ne 0 ]; then
1099-
echo "Failed to retrieve JSON data from $url"
1100-
return 1
1101-
fi
1102-
local json=$(echo "$response" | jq .)
1103-
if [ $? -ne 0 ]; then
1104-
echo "Failed to parse JSON data from $url"
1105-
return 1
1106-
fi
1107-
echo "$json"
1108-
}
1109-
1110-
build_table() {
1111-
local data="$1"
1112-
1113-
# Get the keys in the JSON data
1114-
local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]')
1115-
1116-
# Check if keys are empty
1117-
if [ -z "$keys" ]; then
1118-
echo "JSON report data does not contain any keys or the report does not exist."
1119-
return 1
1120-
fi
1121-
1122-
# Build table header
1123-
local header="| Tag | Passed |\\n| --- | --- |\\n"
1124-
1125-
# Loop through the JSON data to build the table rows
1126-
local rows=""
1127-
for build in $keys; do
1128-
local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success")
1129-
if [ "$status" = "true" ]; then
1130-
status="✅"
1131-
else
1132-
status="❌"
1133-
fi
1134-
local row="| "$build" | "$status" |\\n"
1135-
rows="${rows}${row}"
1136-
done
1137-
1138-
local table="${header}${rows}"
1139-
local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g')
1140-
echo "$escaped_table"
1141-
}
1142-
1143-
if [[ "${CI}" = "true" ]]; then
1144-
# Retrieve JSON data from URL
1145-
data=$(get_json "$CI_JSON_URL")
1146-
# Create table from JSON data
1147-
table=$(build_table "$data")
1148-
echo -e "$table"
1149-
1150-
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
1151-
-H "Accept: application/vnd.github.v3+json" \
1152-
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
1153-
-d "{\\"body\\": \\"I am a bot, here are the test results for this PR: \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}"
1154-
else
1155-
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
1156-
-H "Accept: application/vnd.github.v3+json" \
1157-
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
1158-
-d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR: \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}"
1159-
fi
1160-
'''
1161-
1162-
}
1163-
}
11641088
}
11651089
/* ######################
1166-
Send status to Discord
1090+
Comment on PR and Send status to Discord
11671091
###################### */
11681092
post {
11691093
always {
1170-
sh '''#!/bin/bash
1171-
rm -rf /config/.ssh/id_sign
1172-
rm -rf /config/.ssh/id_sign.pub
1173-
git config --global --unset gpg.format
1174-
git config --global --unset user.signingkey
1175-
git config --global --unset commit.gpgsign
1176-
'''
1177-
script{
1094+
script {
11781095
env.JOB_DATE = sh(
11791096
script: '''date '+%Y-%m-%dT%H:%M:%S%:z' ''',
11801097
returnStdout: true).trim()
@@ -1217,6 +1134,87 @@ EOF
12171134
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
12181135
}
12191136
}
1137+
script {
1138+
if (env.GITHUBIMAGE =~ /lspipepr/){
1139+
if (env.CI_TEST_ATTEMPTED == "true"){
1140+
sh '''#! /bin/bash
1141+
# Function to retrieve JSON data from URL
1142+
get_json() {
1143+
local url="$1"
1144+
local response=$(curl -s "$url")
1145+
if [ $? -ne 0 ]; then
1146+
echo "Failed to retrieve JSON data from $url"
1147+
return 1
1148+
fi
1149+
local json=$(echo "$response" | jq .)
1150+
if [ $? -ne 0 ]; then
1151+
echo "Failed to parse JSON data from $url"
1152+
return 1
1153+
fi
1154+
echo "$json"
1155+
}
1156+
1157+
build_table() {
1158+
local data="$1"
1159+
1160+
# Get the keys in the JSON data
1161+
local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]')
1162+
1163+
# Check if keys are empty
1164+
if [ -z "$keys" ]; then
1165+
echo "JSON report data does not contain any keys or the report does not exist."
1166+
return 1
1167+
fi
1168+
1169+
# Build table header
1170+
local header="| Tag | Passed |\\n| --- | --- |\\n"
1171+
1172+
# Loop through the JSON data to build the table rows
1173+
local rows=""
1174+
for build in $keys; do
1175+
local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success")
1176+
if [ "$status" = "true" ]; then
1177+
status="✅"
1178+
else
1179+
status="❌"
1180+
fi
1181+
local row="| "$build" | "$status" |\\n"
1182+
rows="${rows}${row}"
1183+
done
1184+
1185+
local table="${header}${rows}"
1186+
local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g')
1187+
echo "$escaped_table"
1188+
}
1189+
1190+
if [[ "${CI}" = "true" ]]; then
1191+
# Retrieve JSON data from URL
1192+
data=$(get_json "$CI_JSON_URL")
1193+
# Create table from JSON data
1194+
table=$(build_table "$data")
1195+
echo -e "$table"
1196+
1197+
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
1198+
-H "Accept: application/vnd.github.v3+json" \
1199+
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
1200+
-d "{\\"body\\": \\"I am a bot, here are the test results for this PR: \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}"
1201+
else
1202+
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
1203+
-H "Accept: application/vnd.github.v3+json" \
1204+
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
1205+
-d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR: \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}"
1206+
fi
1207+
'''
1208+
}
1209+
}
1210+
}
1211+
sh '''#!/bin/bash
1212+
rm -rf /config/.ssh/id_sign
1213+
rm -rf /config/.ssh/id_sign.pub
1214+
git config --global --unset gpg.format
1215+
git config --global --unset user.signingkey
1216+
git config --global --unset commit.gpgsign
1217+
'''
12201218
}
12211219
cleanup {
12221220
sh '''#! /bin/bash

README.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ The application can be accessed at:
6060

6161
* https://yourhost:3001/
6262

63+
**Note: This is the Desktop application in a web accessible format! This container is for running the client in a sandbox so it does not have access to your system. It is not a server solution!**
64+
6365
### Strict reverse proxies
6466

6567
This image uses a self-signed certificate by default. This naturally means the scheme is `https`.
@@ -104,7 +106,9 @@ To use hardware acceleration in Wayland mode, we distinguish between the card us
104106
* `DRINODE`: The path to the GPU used for **Rendering** (EGL).
105107
* `DRI_NODE`: The path to the GPU used for **Encoding** (VAAPI/NVENC).
106108

107-
If both variables point to the same device, the container will automatically enable **Zero Copy** encoding, significantly reducing CPU usage and latency.
109+
If both variables point to the same device, the container will automatically enable **Zero Copy** encoding, significantly reducing CPU usage and latency. If they are set to different devices one will be used for **Rendering** and one for **Encoding** with a cpu readback.
110+
111+
You can also use the environment variable `AUTO_GPU=true`, with this set the first card detected in the container (IE `/dev/dri/renderD128`) will be used and configured for **Zero Copy**.
108112

109113
##### Intel & AMD (Open Source Drivers)
110114

@@ -122,13 +126,34 @@ For Intel and AMD GPUs.
122126
123127
##### Nvidia (Proprietary Drivers)
124128
129+
**Note: Nvidia support is currently considered experimental, driver changes can break it at any time.**
130+
125131
**Note: Nvidia support is not available for Alpine-based images.**
126132
133+
**Note: Nvidia frames have issues with hardware decoders in Chromium browsers you need to navigate to `chrome://flags/#disable-accelerated-video-decode` and toggle it to `Disabled` for smooth playback**
134+
127135
**Prerequisites:**
128136

129-
1. **Driver:** Proprietary drivers **580 or higher** are required.
130-
2. **Kernel Parameter:** Set `nvidia-drm.modeset=1` in your host bootloader (GRUB/systemd-boot).
131-
3. **Initialization:** On headless systems, run `nvidia-modprobe --modeset` on the host (once per boot) to initialize the card.
137+
1. **Driver:** Proprietary drivers **580 or higher** are required. **Crucially, you should install the driver using the `.run` file downloaded directly from the Nvidia website.**
138+
* **Unraid:** Use the production branch from the Nvidia Driver Plugin.
139+
140+
2. **Kernel Parameter:** You must set `nvidia-drm.modeset=1 nvidia_drm.fbdev=1` in your host bootloader.
141+
* **Standard Linux (GRUB):** Edit `/etc/default/grub` and add the parameter to your existing `GRUB_CMDLINE_LINUX_DEFAULT` line:
142+
143+
```text
144+
GRUB_CMDLINE_LINUX_DEFAULT="<other existing options> nvidia-drm.modeset=1 nvidia_drm.fbdev=1"
145+
```
146+
147+
Then apply the changes by running:
148+
149+
```bash
150+
sudo update-grub
151+
```
152+
153+
* **Unraid (Syslinux):** Edit the file `/boot/syslinux/syslinux.cfg` and add `nvidia-drm.modeset=1 nvidia_drm.fbdev=1` to the end of the `append` line for the Unraid OS boot entry.
154+
155+
3. **Hardware Initialization:** **On headless systems, the Nvidia video card requires a physical dummy plug inserted into the GPU so that DRM initializes properly.**
156+
132157
4. **Docker Runtime:** Configure the host docker daemon to use the Nvidia runtime:
133158

134159
```bash
@@ -157,6 +182,8 @@ services:
157182
capabilities: [compute,video,graphics,utility]
158183
```
159184

185+
* **Unraid:** Ensure you're properly setting the DRINODE/DRI_NODE and adding `--gpus all --runtime nvidia` to your extra parameters.
186+
160187
### SealSkin Compatibility
161188

162189
This container is compatible with [SealSkin](https://sealskin.app).
@@ -177,12 +204,14 @@ This container is based on [Docker Baseimage Selkies](https://github.com/linuxse
177204
| Variable | Description |
178205
| :----: | --- |
179206
| PIXELFLUX_WAYLAND | **Experimental** If set to true the container will initialize in Wayland mode running [Smithay](https://github.com/Smithay/smithay) and Labwc while enabling zero copy encoding with a GPU |
207+
| SELKIES_DESKTOP | If set to true and in Wayland mode, a simple panel will be initialized with labwc |
180208
| CUSTOM_PORT | Internal port the container listens on for http if it needs to be swapped from the default `3000` |
181209
| CUSTOM_HTTPS_PORT | Internal port the container listens on for https if it needs to be swapped from the default `3001` |
182210
| CUSTOM_WS_PORT | Internal port the container listens on for websockets if it needs to be swapped from the default 8082 |
183211
| CUSTOM_USER | HTTP Basic auth username, abc is default. |
184212
| DRI_NODE | **Encoding GPU**: Enable VAAPI/NVENC stream encoding and use the specified device IE `/dev/dri/renderD128` |
185213
| DRINODE | **Rendering GPU**: Specify which GPU to use for EGL/3D acceleration IE `/dev/dri/renderD129` |
214+
| AUTO_GPU | If set to true and in Wayland mode, we will automatically use the first GPU available for encoding and rendering IE `/dev/dri/renderD128` |
186215
| PASSWORD | HTTP Basic auth password, abc is default. If unset there will be no auth |
187216
| SUBFOLDER | Subfolder for the application if running a subfolder reverse proxy, need both slashes IE `/subfolder/` |
188217
| TITLE | The page title displayed on the web browser, default "Selkies" |
@@ -612,6 +641,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
612641

613642
## Versions
614643

644+
* **04.04.26:** - Make Wayland default disable with PIXELFLUX_WAYLAND=false.
615645
* **28.12.25:** - Add Wayland init logic.
616646
* **22.09.25:** - Rebase to Debian Trixie.
617647
* **12.07.25:** - Rebase to Selkies, HTTPS IS NOW REQUIRED.

readme-vars.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ app_setup_block: |
3535
The application can be accessed at:
3636
3737
* https://yourhost:3001/
38+
39+
**Note: This is the Desktop application in a web accessible format! This container is for running the client in a sandbox so it does not have access to your system. It is not a server solution!**
40+
3841
# init diagram
3942
init_diagram: |
4043
"rustdesk:latest": {
@@ -107,6 +110,7 @@ init_diagram: |
107110
"rustdesk:latest" <- Base Images
108111
# changelog
109112
changelogs:
113+
- {date: "04.04.26:", desc: "Make Wayland default disable with PIXELFLUX_WAYLAND=false."}
110114
- {date: "28.12.25:", desc: "Add Wayland init logic."}
111115
- {date: "22.09.25:", desc: "Rebase to Debian Trixie."}
112116
- {date: "12.07.25:", desc: "Rebase to Selkies, HTTPS IS NOW REQUIRED."}

0 commit comments

Comments
 (0)