Skip to content

Commit 0f21b0a

Browse files
committed
make wayland default
1 parent 675a174 commit 0f21b0a

5 files changed

Lines changed: 124 additions & 93 deletions

File tree

Dockerfile

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

1212
# title
13-
ENV TITLE=QDirStat
13+
ENV TITLE=QDirStat \
14+
NO_GAMEPAD=true \
15+
PIXELFLUX_WAYLAND=true
1416

1517
RUN \
1618
echo "**** add icon ****" && \

Dockerfile.aarch64

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

1212
# title
13-
ENV TITLE=QDirStat
13+
ENV TITLE=QDirStat \
14+
NO_GAMEPAD=true \
15+
PIXELFLUX_WAYLAND=true
1416

1517
RUN \
1618
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: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ To use hardware acceleration in Wayland mode, we distinguish between the card us
104104
* `DRINODE`: The path to the GPU used for **Rendering** (EGL).
105105
* `DRI_NODE`: The path to the GPU used for **Encoding** (VAAPI/NVENC).
106106

107-
If both variables point to the same device, the container will automatically enable **Zero Copy** encoding, significantly reducing CPU usage and latency.
107+
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.
108+
109+
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**.
108110

109111
##### Intel & AMD (Open Source Drivers)
110112

@@ -122,13 +124,34 @@ For Intel and AMD GPUs.
122124
123125
##### Nvidia (Proprietary Drivers)
124126
127+
**Note: Nvidia support is currently considered experimental, driver changes can break it at any time.**
128+
125129
**Note: Nvidia support is not available for Alpine-based images.**
126130
131+
**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**
132+
127133
**Prerequisites:**
128134

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.
135+
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.**
136+
* **Unraid:** Use the production branch from the Nvidia Driver Plugin.
137+
138+
2. **Kernel Parameter:** You must set `nvidia-drm.modeset=1 nvidia_drm.fbdev=1` in your host bootloader.
139+
* **Standard Linux (GRUB):** Edit `/etc/default/grub` and add the parameter to your existing `GRUB_CMDLINE_LINUX_DEFAULT` line:
140+
141+
```text
142+
GRUB_CMDLINE_LINUX_DEFAULT="<other existing options> nvidia-drm.modeset=1 nvidia_drm.fbdev=1"
143+
```
144+
145+
Then apply the changes by running:
146+
147+
```bash
148+
sudo update-grub
149+
```
150+
151+
* **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.
152+
153+
3. **Hardware Initialization:** **On headless systems, the Nvidia video card requires a physical dummy plug inserted into the GPU so that DRM initializes properly.**
154+
132155
4. **Docker Runtime:** Configure the host docker daemon to use the Nvidia runtime:
133156

134157
```bash
@@ -157,6 +180,8 @@ services:
157180
capabilities: [compute,video,graphics,utility]
158181
```
159182

183+
* **Unraid:** Ensure you're properly setting the DRINODE/DRI_NODE and adding `--gpus all --runtime nvidia` to your extra parameters.
184+
160185
### SealSkin Compatibility
161186

162187
This container is compatible with [SealSkin](https://sealskin.app).
@@ -177,12 +202,14 @@ This container is based on [Docker Baseimage Selkies](https://github.com/linuxse
177202
| Variable | Description |
178203
| :----: | --- |
179204
| 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 |
205+
| SELKIES_DESKTOP | If set to true and in Wayland mode, a simple panel will be initialized with labwc |
180206
| CUSTOM_PORT | Internal port the container listens on for http if it needs to be swapped from the default `3000` |
181207
| CUSTOM_HTTPS_PORT | Internal port the container listens on for https if it needs to be swapped from the default `3001` |
182208
| CUSTOM_WS_PORT | Internal port the container listens on for websockets if it needs to be swapped from the default 8082 |
183209
| CUSTOM_USER | HTTP Basic auth username, abc is default. |
184210
| DRI_NODE | **Encoding GPU**: Enable VAAPI/NVENC stream encoding and use the specified device IE `/dev/dri/renderD128` |
185211
| DRINODE | **Rendering GPU**: Specify which GPU to use for EGL/3D acceleration IE `/dev/dri/renderD129` |
212+
| 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` |
186213
| PASSWORD | HTTP Basic auth password, abc is default. If unset there will be no auth |
187214
| SUBFOLDER | Subfolder for the application if running a subfolder reverse proxy, need both slashes IE `/subfolder/` |
188215
| TITLE | The page title displayed on the web browser, default "Selkies" |
@@ -615,6 +642,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
615642

616643
## Versions
617644

645+
* **04.04.26:** - Make Wayland default disable with PIXELFLUX_WAYLAND=false.
618646
* **18.01.26:** - Update build logic for Qt6 and version 2.0.
619647
* **28.12.25:** - Add Wayland init logic.
620648
* **12.07.25:** - Rebase to Selkies, HTTPS IS NOW REQUIRED.

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ init_diagram: |
106106
"qdirstat:latest" <- Base Images
107107
# changelog
108108
changelogs:
109+
- {date: "04.04.26:", desc: "Make Wayland default disable with PIXELFLUX_WAYLAND=false."}
109110
- {date: "18.01.26:", desc: "Update build logic for Qt6 and version 2.0."}
110111
- {date: "28.12.25:", desc: "Add Wayland init logic."}
111112
- {date: "12.07.25:", desc: "Rebase to Selkies, HTTPS IS NOW REQUIRED."}

0 commit comments

Comments
 (0)