:: [devuan-dev] bug#927: marked as don…
Inizio della pagina
Delete this message
Reply to this message
Autore: Devuan bug Tracking System
Data:  
To: dak
Oggetto: [devuan-dev] bug#927: marked as done (slim crashes when no monitor is attached on startup)
Your message dated Tue, 25 Nov 2025 14:26:45 +0000
with message-id <1764080805.678581.27766.nullmailer@???>
and subject line #927: fixed in src:slim version 1.4.1-1devuan5
has caused the Devuan bug report #927,
regarding slim crashes when no monitor is attached on startup
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@???
immediately.)


--
927: https://bugs.devuan.org/cgi/bugreport.cgi?bug=927
Devuan Bug Tracking System
Contact owner@??? with problems
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);

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);


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);



Version: 1.4.1-1devuan5

Source package slim (1.4.1-1devuan5) added to Devuan suite unstable.

This closes bug report 927.

Thanks

DAK managing the Devuan archive

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

Format: 1.8
Date: Tue, 25 Nov 2025 14:02:34 +0000
Source: slim
Architecture: source
Version: 1.4.1-1devuan5
Distribution: unstable
Urgency: medium
Maintainer: Devuan Dev Team <devuan-dev@???>
Changed-By: Mark Hindley <mark@???>
Closes: 927
Changes:
 slim (1.4.1-1devuan5) unstable; urgency=medium
 .
   * Update patch to set resolution if monitor is absent (Thanks:
     tempforever).  (Closes: #927)
Checksums-Sha1:
 e501c249b99be786bbedf13c7609657ee1610cb7 1835 slim_1.4.1-1devuan5.dsc
 ab43596d554c0323a6505fa514e2c7376289bc39 35196 slim_1.4.1-1devuan5.debian.tar.xz
 7b75caec2d120d1e495eab3595d2fc05017dc155 5585 slim_1.4.1-1devuan5_source.buildinfo
Checksums-Sha256:
 f3a7035f98e1ab14910735cf1f9521972c9ad8a6fec73b49dbe322691a18676d 1835 slim_1.4.1-1devuan5.dsc
 4d1a5dc2ab931ddf70ee3a0e6aa72f73beb04e58ba806c1b80f9b3ac98602b18 35196 slim_1.4.1-1devuan5.debian.tar.xz
 6f5166336b56bbcde7a9686f85b686b4067ebc745a553c2c577aa370cc348c8c 5585 slim_1.4.1-1devuan5_source.buildinfo
Files:
 fa5332bba38dabe604e5db6479437861 1835 x11 optional slim_1.4.1-1devuan5.dsc
 9df2c22aafd61d7c302dc1445de7c299 35196 x11 optional slim_1.4.1-1devuan5.debian.tar.xz
 f97e6e5cba1d6ff483723ea96bd8cefa 5585 x11 optional slim_1.4.1-1devuan5_source.buildinfo


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

iQEzBAEBCgAdFiEEcuPLdzMV36LkZHQ9lFMhJFQZIvsFAmklt6QACgkQlFMhJFQZ
IvvnZQf/evJgoSeEPgUGdPAWXob89CDRi9+blurs09ofD48XQiUYNo9ztJ1KjG+i
7gkByH4SB2MHwsxpJiK/1uyspbbsG+vksPTx3o9yYx/whGUOordkwdS0zf7+viFP
uMfEl0HEGK2rkBdud3J/Ff7wHmJS434h+pGJ6Bs5tT99Jlg5kBvx3y6bdAq+OVrT
rFPvwdEdBH8r+AoPOi1Pxd3egx8nJav+0npaSMxkqeh3j9z7VYBTEd6MsmhbCLhG
YOL9i6/nILPXtr3JPEE1jX+wOCJSERACvpr4UB+CLVzPsHMQixKeFp/IdRul7TH0
AQkpBbkqh4ELivT5zN+Cokk0e3A2SA==
=eEb3
-----END PGP SIGNATURE-----