Devuan bug report logs - #927
slim crashes when no monitor is attached on startup

version graph

Package: slim; Maintainer for slim is Devuan Dev Team <devuan-dev@lists.dyne.org>; Source for slim is src:slim.

Reported by: tempforever <dev1@tempforever.com>

Date: Tue, 25 Nov 2025 13:50:02 UTC

Severity: normal

Tags: patch

Found in version slim/1.4.1-1devuan1

Fixed in versions 1.4.1-1devuan5, 1.4.1-1devuan1+excalibur2

Done: dak@devuan.org

Full log


🔗 View this message in rfc822 format

MIME-Version: 1.0
X-Mailer: MIME-tools 5.515 (Entity 5.515)
X-Loop: owner@bugs.devuan.org
From: "Devuan bug Tracking System" <owner@bugs.devuan.org>
To: tempforever <dev1@tempforever.com>
Subject: bug#927 closed by dak@devuan.org (#927: fixed in src:slim version
 1.4.1-1devuan1+excalibur2)
Message-ID: <handler.927.D927.17657943412060.notifdone@bugs.devuan.org>
References: <1765794317.826004.7757.nullmailer@dak.localnet.devuan.org>
 <176407844729.13025.7555000061962801936.reportbug@srv604779.hstgr.cloud>
X-Devuan-PR-Message: they-closed 927
X-Devuan-PR-Package: slim
X-Devuan-PR-Keywords: patch
X-Devuan-PR-Source: slim
Reply-To: 927@bugs.devuan.org
Date: Mon, 15 Dec 2025 10:26:02 +0000
Content-Type: multipart/mixed; boundary="----------=_1765794362-2071-1"
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the slim package:

#927: slim crashes when no monitor is attached on startup

It has been closed by dak@devuan.org.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact dak@devuan.org by
replying to this email.


-- 
927: https://bugs.devuan.org/cgi/bugreport.cgi?bug=927
Devuan Bug Tracking System
Contact owner@bugs.devuan.org with problems
[Message part 2 (message/rfc822, inline)]
From: dak@devuan.org
To: 927-done@bugs.devuan.org
Subject: #927: fixed in src:slim version 1.4.1-1devuan1+excalibur2
Date: Mon, 15 Dec 2025 10:25:17 +0000
Version: 1.4.1-1devuan1+excalibur2

Source package slim (1.4.1-1devuan1+excalibur2) added to Devuan suite excalibur-proposed-updates.

This closes bug report 927.

Thanks

DAK managing the Devuan archive

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 15 Dec 2025 09:58:48 +0000
Source: slim
Architecture: source
Version: 1.4.1-1devuan1+excalibur2
Distribution: excalibur-proposed-updates
Urgency: medium
Maintainer: Devuan Dev Team <devuan-dev@lists.dyne.org>
Changed-By: Mark Hindley <mark@hindley.org.uk>
Closes: 927
Changes:
 slim (1.4.1-1devuan1+excalibur2) excalibur-proposed-updates; urgency=medium
 .
   * Update patch to fix 1.4.1 auto_login regression (See: #857).
   * Add patch to fix setting resolution when monitor is absent (Thanks:
     tempforever).  (Closes: #927)
Checksums-Sha1:
 442ae585dc7816d5bf40aa133ecc7d26b913f025 1879 slim_1.4.1-1devuan1+excalibur2.dsc
 17c7a2135d77173d2fb7f6e0db6a36f088155c9f 35036 slim_1.4.1-1devuan1+excalibur2.debian.tar.xz
 36bb43b375c8842986cf1e7d9eeda3850b18bd72 5629 slim_1.4.1-1devuan1+excalibur2_source.buildinfo
Checksums-Sha256:
 b071aa5fd7a5fe4bab133c75705621ae9545d40fbf95ddd5f5e6452ceb9d40cb 1879 slim_1.4.1-1devuan1+excalibur2.dsc
 a25151f672cdcfa90e7d27273552a217b3c43ddf9661526aba3c19672a91c451 35036 slim_1.4.1-1devuan1+excalibur2.debian.tar.xz
 94ff1e23b046fcb0a7fbaf354fc2dc5c247b9d1fb0adbbb5ee68218beb29c09b 5629 slim_1.4.1-1devuan1+excalibur2_source.buildinfo
Files:
 078fd5b0cd7ab18a5a73c07612be5d82 1879 x11 optional slim_1.4.1-1devuan1+excalibur2.dsc
 092a15d41eef6f165b10fb872add130d 35036 x11 optional slim_1.4.1-1devuan1+excalibur2.debian.tar.xz
 000f8dcb8eed027fcf61881d962222d5 5629 x11 optional slim_1.4.1-1devuan1+excalibur2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEcuPLdzMV36LkZHQ9lFMhJFQZIvsFAmk/3LgACgkQlFMhJFQZ
IvtQRQf/VcbBC/lhkgbo5o8pLLYEhWmsSDFADGQLbYurl/1tYUyq21nX+nqh2xcU
0ynPF1TuLhjYg475O3MhW/jk5gesPuCF73zP5oyfeWRUfsbNJHie5aHtZg7GO2n3
uSBdfwq8VEQ3Peq86pp57labhdNErhmSFI2PJ6bn45shsym3waIGlEwN5+F40EPL
RitNdhREqlJCuLjvYSd8cHcswnYXvZwnk8HmkzpN6Nw5jnnZRKsxtTLwkEirOo6f
60G/pS7Wh1EFS66BHG+Q5/CmtjtI2THA/UCJLWuE6C6tnCLYzxYtAiAwAFmDDBGf
PqJ/aYoCvjRWMEyr1lmYJLHy5p1Fqg==
=zeeV
-----END PGP SIGNATURE-----
[Message part 3 (message/rfc822, inline)]
From: tempforever <dev1@tempforever.com>
To: Devuan Bug Tracking System <submit@bugs.devuan.org>
Subject: slim crashes when no monitor is attached on startup
Date: Tue, 25 Nov 2025 13:47:27 +0000
[Message part 4 (text/plain, inline)]
Package: slim
Version: 1.4.1-1devuan1
Severity: normal
Tags: patch

Dear Maintainer,

This was reported on devuan's forum by Eeqmcsq at
https://dev1galaxy.org/viewtopic.php?id=7501

When no monitor is attached to the system on startup,
slim will crash in a call to XGetWindowAttributes(),
due to slim's root window having a height and width of 0.

The patch sets non-zero default fallback values for the
display's width and height.

Patch is below.  I'll also attempt to attach, if reportbug allows.

-- System Information:
Distributor ID:	Devuan
Description:	Devuan GNU/Linux 6 (excalibur)
Release:	6
Codename:	excalibur
Architecture: x86_64

Kernel: Linux 6.12.48+deb13-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages slim depends on:
ii  dbus                     1.16.2-2devuan2
ii  debconf [debconf-2.0]    1.5.91
ii  libc6                    2.41-12
ii  libck-connector0         1.2.6-4+b1
ii  libdbus-1-3              1.16.2-2devuan2
ii  libgcc-s1                14.2.0-19
ii  libjpeg62-turbo          1:2.1.5-4
ii  libpam-elogind [logind]  255.17-2
ii  libpam0g                 1.7.0-5
ii  libpng16-16t64           1.6.48-1
ii  libstdc++6               14.2.0-19
ii  libx11-6                 2:1.8.12-1
ii  libxext6                 2:1.3.4-1+b3
ii  libxft2                  2.3.6-1+b4
ii  libxmu6                  2:1.1.3-3+b4
ii  libxrandr2               2:1.5.4-1+b3
ii  x11-xserver-utils        7.7+11

Versions of packages slim recommends:
ii  xterm  398-1

Versions of packages slim suggests:
pn  scrot  <none>
ii  xauth  1:1.1.2-1.1


set-default-fallback-resolution.patch
diff --git a/panel.cpp b/panel.cpp
index 7268706..5429dc8 100644
--- a/panel.cpp
+++ b/panel.cpp
@@ -901,6 +901,19 @@ Rectangle Panel::GetPrimaryViewport()
 	fallback.y = 0;
 	fallback.width = DisplayWidth(Dpy, Scr);
 	fallback.height = DisplayHeight(Dpy, Scr);
+	// set fallback values of 1024x768, if DisplayWidth,DisplayHeight not right
+	if (fallback.width <= 0) {
+		logStream << APPNAME
+				 << ": could not determine display width; fallback to 1024"
+				 << endl;
+		fallback.width = 1024;
+	}
+	if (fallback.height <= 0) {
+		logStream << APPNAME
+				 << ": could not determine display height; fallback to 768"
+				 << endl;
+		fallback.height = 768;
+	}

 	resources = XRRGetScreenResources(Dpy, Root);
 	if (!resources)
@@ -947,8 +960,11 @@ Rectangle Panel::GetPrimaryViewport()

 	result.x = crtc_info->x;
 	result.y = crtc_info->y;
-	result.width = crtc_info->width;
-	result.height = crtc_info->height;
+	// use fallback values if monitorless
+	// see https://dev1galaxy.org/viewtopic.php?id=7501
+	// also see https://dev1galaxy.org/viewtopic.php?id=7459
+	result.width = (crtc_info->width > 0 ? crtc_info->width : fallback.width);
+	result.height = (crtc_info->height > 0 ? crtc_info->height : fallback.height);

 	XRRFreeCrtcInfo(crtc_info);
 	XRRFreeOutputInfo(primary_info);
[set-default-fallback-resolution.patch (text/plain, attachment)]
[set-default-fallback-resolution.patch (text/plain, attachment)]

Send a report that this bug log contains spam.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Mon Jan 12 16:37:19 2026;