linuxmint / linuxmint/cinnamon

System tray applet disappears from the panel on monitor wakeup (dual monitors)

Open
#11,347 17 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

New
Dominant language
JavaScript
Stars
5.6k
Forks
915
Avg merge
5d 22h
Merged PRs (30d)
3

Description

 * Cinnamon version 5.4.12
 * Distribution - Mint 21
 * Graphics hardware:
   * NVIDIA GeForce GTX 1660 Ti
   * Driver Version: 525.60.11
   * 2 x Samsung U28E510 (DP-0, DP-2)
 * 64 bit
 * .xsession-errors snippet
======================
(cinnamon:7537): St-CRITICAL **: 10:20:14.563: cr_parser_new_from_buf: assertion 'a_buf && a_len' failed

(cinnamon:7537): St-CRITICAL **: 10:20:14.563: cr_declaration_parse_list_from_buf: assertion 'parser' failed

** (csd-color:7344): WARNING **: 10:20:14.814: no xrandr-Samsung Electric Company-U28E510-HTPH503516 device found: Failed to find output xrandr-Samsung Electric Company-U28E510-HTPH50
3516

(cinnamon:7537): Gjs-WARNING **: 10:20:15.224: JS ERROR: Exception in callback for signal: monitors-changed: TypeError: this.findMonitorForActor(...) is undefined
_updateVisibility@/usr/share/cinnamon/js/ui/layout.js:593:27
_relayout@/usr/share/cinnamon/js/ui/layout.js:616:14
_emit@resource:///org/gnome/gjs/modules/core/_signals.js:114:47
_monitorsChanged@/usr/share/cinnamon/js/ui/layout.js:157:14

Gjs-Message: 10:20:15.260: JS LOG: [LookingGlass/info] Adding systray: shutter (32x32px)
Gjs-Message: 10:20:15.263: JS LOG: [LookingGlass/info] Adding systray: shutter (32x32px)
Gjs-Message: 10:20:15.265: JS LOG: [LookingGlass/info] Adding systray: shutter (32x32px)
Gjs-Message: 10:20:15.272: JS LOG: [LookingGlass/info] Adding systray: shutter (32x32px)
Gjs-Message: 10:20:15.274: JS LOG: [LookingGlass/info] [weather@mockturtl#17]: Removing applet instance...

(cinnamon:7537): Gjs-WARNING **: 10:20:15.298: JS ERROR: Exception in callback for signal: monitors-changed: TypeError: this.findMonitorForActor(...) is undefined
_updateVisibility@/usr/share/cinnamon/js/ui/layout.js:593:27
_relayout@/usr/share/cinnamon/js/ui/layout.js:616:14
_emit@resource:///org/gnome/gjs/modules/core/_signals.js:114:47
_monitorsChanged@/usr/share/cinnamon/js/ui/layout.js:157:14


(cinnamon:7537): Gjs-WARNING **: 10:20:15.300: JS ERROR: Exception in callback for signal: monitors-changed: TypeError: this.findMonitorForActor(...) is undefined
_updateVisibility@/usr/share/cinnamon/js/ui/layout.js:593:27
_relayout@/usr/share/cinnamon/js/ui/layout.js:616:14
_emit@resource:///org/gnome/gjs/modules/core/_signals.js:114:47
_monitorsChanged@/usr/share/cinnamon/js/ui/layout.js:157:14


(cinnamon:7537): Gjs-CRITICAL **: 10:20:15.308: JS ERROR: TypeError: monitor is undefined
show@/usr/share/cinnamon/js/ui/tooltips.js:359:17
_onShowTimerComplete@/usr/share/cinnamon/js/ui/tooltips.js:134:18


** (csd-color:7344): WARNING **: 10:20:15.663: failed to reset xrandr-Samsung Electric Company-U28E510-HTPH503422 gamma tables: gamma size is zero

** (csd-color:7344): WARNING **: 10:20:15.664: failed to reset xrandr-Samsung Electric Company-U28E510-HTPH503516 gamma tables: gamma size is zero

** (csd-color:7344): WARNING **: 10:20:15.664: failed to reset xrandr-Samsung Electric Company-U28E510-HTPH503422 gamma tables: gamma size is zero

** (csd-color:7344): WARNING **: 10:20:15.664: failed to reset xrandr-Samsung Electric Company-U28E510-HTPH503516 gamma tables: gamma size is zero

** (csd-color:7344): WARNING **: 10:20:15.664: failed to reset xrandr-Samsung Electric Company-U28E510-HTPH503422 gamma tables: gamma size is zero

** (csd-color:7344): WARNING **: 10:20:15.664: failed to reset xrandr-Samsung Electric Company-U28E510-HTPH503516 gamma tables: gamma size is zero
Gjs-Message: 10:20:16.329: JS LOG: [LookingGlass/warning] Failed to add launcher from path: firefox.desktop
Gjs-Message: 10:20:16.588: JS LOG: [LookingGlass/info] [weather@mockturtl#17]: Internet access now available, resuming operations.

** (cinnamon:7537): CRITICAL **: 10:20:16.646: na_tray_manager_manage_screen: assertion 'manager->screen == NULL' failed

(cinnamon:7537): St-CRITICAL **: 10:20:16.693: cr_parser_new_from_buf: assertion 'a_buf && a_len' failed

(cinnamon:7537): St-CRITICAL **: 10:20:16.694: cr_declaration_parse_list_from_buf: assertion 'parser' failed

(cinnamon:7537): St-CRITICAL **: 10:20:16.694: cr_parser_new_from_buf: assertion 'a_buf && a_len' failed

(cinnamon:7537): St-CRITICAL **: 10:20:16.694: cr_declaration_parse_list_from_buf: assertion 'parser' failed
Gjs-Message: 10:20:16.918: JS LOG: calendar@cinnamon.org: Calendar events supported.

** (csd-power:7360): CRITICAL **: 10:20:16.934: abs_to_percentage: assertion 'max > min' failed
Gjs-Message: 10:20:16.962: JS LOG: Unknown network device type, is 14
Gjs-Message: 10:20:16.974: JS LOG: [LookingGlass/info] Adding XAppStatusIcon: mintUpdate.py (:1.925/org/x/StatusIcon/Icon)
Gjs-Message: 10:20:16.983: JS LOG: [LookingGlass/info] Adding XAppStatusIcon: birdtray (:1.1001/org/x/StatusIcon/Icon_2)
Gjs-Message: 10:20:16.990: JS LOG: [LookingGlass/info] Adding XAppStatusIcon: skype1 (:1.1001/org/x/StatusIcon/Icon)
Gjs-Message: 10:20:16.996: JS LOG: [LookingGlass/info] Adding XAppStatusIcon: slack1 (:1.1001/org/x/StatusIcon/Icon_1)
Gjs-Message: 10:20:17.003: JS LOG: [LookingGlass/info] Adding XAppStatusIcon: mintreport (:1.105/org/x/StatusIcon/Icon)
Gjs-Message: 10:20:17.049: JS LOG: [LookingGlass/info] Adding XAppStatusIcon: process-monitor (:1.105/org/x/StatusIcon/Icon_1)
Gjs-Message: 10:20:17.078: JS LOG: [LookingGlass/info] Hiding XAppStatusIcon (we have an applet): nm-applet
Gjs-Message: 10:20:17.798: JS LOG: [LookingGlass/info] [weather@mockturtl#17]: Weather Information refreshed

(cinnamon:7537): St-CRITICAL **: 10:20:17.881: cr_parser_new_from_buf: assertion 'a_buf && a_len' failed

(cinnamon:7537): St-CRITICAL **: 10:20:17.881: cr_declaration_parse_list_from_buf: assertion 'parser' failed
Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x760003a
cinnamon-session[7203]: WARNING: t+340516.94077s: Detected that screensaver has left the bus
Window manager warning: META_CURRENT_TIME used to choose focus window; focus window may not be correct.
========
Issue

System tray applet (systray@cinnamon.org) containing a single app icon (shutter) disappears or collapses when the monitors wake up from powersave. Restarting Cinnamon brings it back.

Steps to reproduce
  1. xset dpms force off
  2. Wake up the monitors.
  3. Observe the absence of the icon.
Other information

The monitor configuration is as follows: DP0=primary, DP2=secondary. The system tray applet is located in the top panel of the secondary monitor.

The exception stack from .xsession-errors points to a place in the code that looks suspicious to me:

Exception in callback for signal: monitors-changed: TypeError: this.findMonitorForActor(...) is undefined
_updateVisibility@/usr/share/cinnamon/js/ui/layout.js:593:27
_relayout@/usr/share/cinnamon/js/ui/layout.js:616:14
_emit@resource:///org/gnome/gjs/modules/core/_signals.js:114:47
_monitorsChanged@/usr/share/cinnamon/js/ui/layout.js:157:14
            else if (!actorData.visibleInFullscreen &&
                     this.findMonitorForActor(actorData.actor).inFullscreen)
                visible = false;

From investigating other visual issues I am quite positive the two monitors do not wake up simultaneously and there have to be [at least] two monitors-changed events. During the first of them, one of the monitors (likely secondary) is absent from xrandr list and it would not be surprising for findMonitorForActor() to return undefined. Perhaps a small defensive programming measure is all that's required. Will try and see.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in /usr/share/cinnamon/js/ui/layout.js around _updateVisibility, _relayout, and _monitorsChanged, then reproduce with xset dpms force off and wake both monitors. Investigate the reported findMonitorForActor(...) result during monitors-changed events. Done means the systray@cinnamon.org applet and its shutter icon remain visible after monitor wakeup without the reported exceptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.