Desktop icons missing after resume from suspend: DING relaunch loop (zorin-desktop-icons 50.3.0, Wayland), with proposed fix

Note first: I am not a developer or a programmer and I can't write code. I noticed the
problem myself, but all the analysis and the proposed fix below were done by an AI assistant
(Claude, by Anthropic). Please review the changes carefully before using them.

System

  • Zorin OS 18.1 Core, GNOME Shell 46.0, Wayland session, laptop with a single built-in display
  • mutter 46.2-1ubuntu0.24.04.18+zorin1
  • gnome-shell-extension-zorin-desktop-icons 50.3.0

Symptom

Sometimes, after closing the laptop lid (suspend) and opening it again, the desktop shows
the wallpaper but no icons at all. Disabling and re-enabling the extension does not
help. Only a reboot or a logout/login brings the icons back. It does not happen every time.

What the logs show

After unlocking, the extension starts the DING process again and again, every 3 seconds,
forever. On 24 Oct 2026, after a 38-minute suspend:

ott 24 09:00:14 gnome-shell[2251]: Launching DING process
ott 24 09:00:16 gnome-shell[2251]: DING: GNOME nautilus 46.4
ott 24 09:00:17 gnome-shell[2251]: Launching DING process
ott 24 09:00:20 gnome-shell[2251]: Launching DING process
ott 24 09:00:23 gnome-shell[2251]: Launching DING process
...

This went on for 540 launches in 27 minutes, and Received notification for window was
never logged. Before the suspend, the same startup took about 1 second.

Analysis

  1. Window timeout too short. On Wayland, LaunchSubprocess.spawnv() in extension.js
    gives DING only 3000 ms to show its window, then calls force_exit() and starts it
    again. Right after resume, the system is slow (network, Nautilus and tracker are all
    restarting), so DING can need more than 3 s. Each attempt is killed before it finishes,
    which gives an endless loop. Upstream Desktop Icons NG (Rastersoft / Desktop Icons NG · GitLab,
    master) already uses 6000 ms here, while the Zorin version still uses 3000 ms.
  2. Orphan DING process. killCurrentProcess() (called on disable(), for example when
    the screen locks) only sends SIGTERM and then forgets the process. If DING does not exit,
    it stays alive as an orphan and keeps the D-Bus name com.rastersoft.ding. Every new
    DING then starts as a "remote" instance, never creates a window, and is killed after 3 s.
    I observed exactly this after a manual disable/enable during the loop: an orphan DING
    started at 09:32:46 still owned com.rastersoft.ding minutes later. The existing cleanup
    doKillAllOldDesktopProcesses() only runs in the constructor, that is when GNOME Shell
    starts, and it only sends SIGTERM.

Proposed fix (applied locally, working)

@@ killCurrentProcess()
             this.data.currentProcess.subprocess.send_signal(15);
+            // if DING ignores SIGTERM it stays alive as an orphan holding the
+            // com.rastersoft.ding name, and no new instance can ever start: force it after 2 s.
+            const oldSubprocess = this.data.currentProcess.subprocess;
+            GLib.timeout_add(GLib.PRIORITY_DEFAULT, 2000, () => {
+                if (!oldSubprocess.get_identifier()) {
+                    return false;
+                }
+                console.log('DING-FIX: DING ignored SIGTERM, forcing exit');
+                oldSubprocess.force_exit();
+                return false;
+            });
         }
@@ doKillAllOldDesktopProcesses()
-            let path = `gjs ${GLib.build_filenamev([this.path, 'app', 'ding.js'])}`;
-            if (contents.startsWith(path)) {
-                let proc = new Gio.Subprocess({argv: ['/bin/kill', filename]});
+            if (contents.startsWith('gjs ') && contents.includes('/zorin-desktop-icons@zorinos.com/app/ding.js ')) {
+                console.log(`DING-FIX: killing old DING process ${filename}`);
+                let proc = new Gio.Subprocess({argv: ['/bin/kill', '-9', filename]});
@@ launchDesktop()
     launchDesktop() {
+        // an orphan DING would keep the D-Bus name and block this new instance
+        this.doKillAllOldDesktopProcesses();
         console.log('Launching DING process');
@@ LaunchSubprocess.spawnv()
-                this._launch_timer = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 3000, () => {
+                this._launch_timer = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 10000, () => {
                     this._launch_timer = 0;
+                    console.log('DING-FIX: DING window not detected in 10 s, relaunching');
                     this.subprocess.force_exit();

Result after the fix

On 24 Oct 2026 the lid was closed from 12:44 to 14:55 (over 2 hours of suspend). After
unlocking:

ott 24 14:56:45 gnome-shell[2132]: Launching DING process
ott 24 14:56:49 gnome-shell[2132]: Received notification for window. 0 notifications remaining.

DING needed 4 seconds to show its window. With the original 3 s timeout it would have
been killed and restarted. With the longer timeout it worked on the first attempt and the
icons were there. A short suspend (32 s) also worked normally.

The longer timeout is clearly needed. The orphan cleanup is a safety net: it has not
been needed since the fix was applied, so it has not been tested in a real case yet.

Workaround for other users

If the icons disappear after resume: log out and log in again, or reboot.

Thank you for Zorin OS!

Which gnome extensions for desktop icons do you have enabled? Zorin desktop icons are not the same as DING from rastersoft. They are different gnome extensions.
DING isn't preinstalled on Zorin by default.

3 Likes

Thanks for the reply! You're right, I don't have rastersoft's DING extension installed. The only desktop icons extension enabled is the preinstalled Zorin Desktop Icons (zorin-desktop-icons@zorinos.com, version 50.3.0). Full list of enabled extensions:

drive-menu, user-theme, x11gestures, zorin-appindicator, zorin-connect, zorin-desktop-icons, zorin-magic-lamp-effect, zorin-menu, zorin-printers, zorin-taskbar, zorin-tiling-shell, zorin-window-move-effect

There is nothing in ~/.local/share/gnome-shell/extensions/.

When I wrote "DING" I meant the helper process that Zorin Desktop Icons itself launches. Its metadata.json describes it as a "Fork of the original Desktop Icons extension", and the code still carries the DING name: extension.js starts with "DING: Desktop Icons New Generation for GNOME Shell – Copyright (C) 2019 Sergio Costas", it launches app/ding.js, and the journal shows "Launching DING process". That's where the 540+ relaunches in my logs come from.

Sorry for the confusion in the naming. The bug and the proposed fix are about Zorin Desktop Icons 50.3.0 (file /usr/share/gnome-shell/extensions/zorin-desktop-icons@zorinos.com/extension.js).

1 Like

I need to apologize. It was my mistake. I didn't realize that the code for the Zorin desktop icons contained so much from DING.

No problem at all, thanks for taking the time to look into it! The naming is confusing, since Zorin Desktop Icons still carries the DING name in its code.

If it helps the developers, I'm happy to provide any further information or run any tests on my machine (logs, extension version, reproduction steps after suspend/resume, or testing a patch). :smiley:

Since your 2 s force-exit is the one branch that hasn't run in a real case yet, the useful check is to exercise it deliberately instead of waiting for the resume race to happen again.

You already saw the orphan once during a manual disable/enable, so that is the reproducible sequence: with icons working, disable and re-enable Zorin Desktop Icons a few times from the Extensions app, and compare what the session reports each time:

pgrep -af 'zorin-desktop-icons@zorinos.com/app/ding.js'
busctl --user status com.rastersoft.ding

While the extension is off, the first should print nothing and the second should report no owner for com.rastersoft.ding. If a PID survives and the name is still owned, you have reproduced the orphan on demand, with no suspend involved. That is also the fast regression test for that half of the patch: afterwards the name should be free within about two seconds of each disable, and journalctl -b -o short-precise -g 'Launching DING process|DING-FIX' should show one launch per enable, with the DING-FIX line appearing only when SIGTERM was actually ignored.

On your upstream reference: current master of desktop-icons-ng still passes 6000 ms to the launch timer in LaunchSubprocess, so that part holds. It also throttles a relaunch that dies within one second, which is what keeps the journal from filling at a fixed interval, so a bounded launch count is what to watch when judging the patch.

Thanks, that was a useful suggestion. I ran it this morning: three disable/enable cycles of Zorin Desktop Icons with gnome-extensions, checking 3 s after each disable and 10 s after each enable.

  • While disabled: pgrep found no ding.js process and busctl reported no owner for com.rastersoft.ding, every time.
  • After each enable: exactly one ding.js process (new PID each time) owning the name.
  • journalctl showed one "Launching DING process" per enable (from 1 to 4 for the boot) and no DING-FIX lines, so DING exited on SIGTERM each time and the 2 s force-exit never fired.

So the orphan did not reproduce with a plain disable/enable. Looking back at my logs, I think I mixed things up: on the 24th, toggling the extension did not fix the loop, but the orphan had most likely been left over from the screen lock, not created by the toggle.

Since DING normally honours SIGTERM (the bug I hit is the rare case where it does not), a plain toggle can't reach the force-exit branch. So I forced it: I froze DING with kill -STOP (a stopped process can't act on SIGTERM) and then disabled the extension:

 08:51:21.160  extension disabled, DING still alive (stopped) 1 s later
 08:51:23.160  DING-FIX: DING ignored SIGTERM, forcing exit
               (checked at 08:51:24) process gone, com.rastersoft.ding has no owner
 08:51:24.417  extension re-enabled: Launching DING process, exactly one new ding.js owning the name

So the 2 s force-exit fires exactly as intended, and both halves of the patch have now been exercised.

One more detail: the patch also kills any leftover ding.js with SIGKILL right before each launch (doKillAllOldDesktopProcesses is called at the start of launchDesktop), so even if an orphan survived a disable, the next enable would clear it before starting the new process.

Thanks also for checking upstream: the original Zorin 50.3.0 file uses 3000 ms for that timer (my patch raises it to 10000 ms), and the one-second relaunch throttle is there too.

Update: root cause found. It was my local NAS setup, not Zorin Desktop Icons

A follow-up to close this thread, and apologies for the noise.

Root cause. I have three CIFS shares from an office NAS mounted under /mnt/nas (noauto entries in /etc/fstab, mounted by a NetworkManager dispatcher script I added myself), plus three symlinks on the desktop pointing into them. The dispatcher script was supposed to unmount the shares when the network goes down, but:

  • it was only in dispatcher.d, not linked in dispatcher.d/pre-down.d, so it only received down, after the Wi-Fi was already gone;
  • it checked each share with mountpoint -q, which hangs on a dead CIFS share, so it never reached the umount.

So every time I closed the lid at the office and resumed on another network (phone hotspot, home), the shares were still mounted but unreachable. Desktop Icons then got stuck while starting (the journal stops after "GNOME nautilus 46.4" and never reaches "DBus interface ... is now available"), and the extension relaunched it over and over. Going back through my logs from 10 October to 5 November, every relaunch loop, including the 540+ relaunches from my first post, coincides with the NAS not responding, and there was never a loop while the NAS was reachable.

How I confirmed it. While on the office network I blocked the NAS with a temporary iptables rule and restarted the extension: icons gone, ls on the share hanging, Desktop Icons stuck at the same point. As soon as the NAS was reachable again, it started on the first attempt.

The fix (on my side). I rewrote the dispatcher script:

  • it reads /proc/mounts instead of querying the share;
  • every unmount has a timeout (umount -f, then umount -l, both with -c);
  • it is also linked in pre-down.d, so it unmounts while the network is still up;
  • it unmounts any leftover share when the PC joins a network where the NAS doesn't answer.

Tested today with the real scenario (lid closed at the office, resumed on the phone hotspot): the shares were unmounted 3 seconds before suspend and the icons came up immediately on resume.

About my patch. My "orphan DING" theory was wrong, or at least not the main cause, so I've dropped my patch and I'm back on the stock 50.3.1. One thing worth knowing if anyone reuses it: calling doKillAllOldDesktopProcesses() before every launch, as my patch did, can throw "Error opening file /proc//cmdline: No such file or directory" when a process exits between query_exists() and load_bytes(), and the exception aborts the relaunch. The stock code has the same read but only calls it from init(), so it is much less likely to hit.

A possible improvement. Even though the cause was on my side, one unreachable network mount was enough to leave the whole desktop without icons. I couldn't pin down the exact call that blocks: in one test, unmounting the shares was not enough while other requests to the dead server were still pending. If Desktop Icons could start without waiting on remote filesystems, or give up on them after a timeout, it would be more robust against setups like mine.

Thanks to Forpli and AidanJast for the replies and the suggestions. As with my earlier posts: I'm not a developer, and the analysis, tests and fix were done with the help of an AI assistant (Claude).