Open MaxMotovilov opened 1 year ago
Will try and see.
Did not solve the issue. With /usr/share/cinnamon/js/ui/layout.js
modified as follows:
$ diff /usr/share/cinnamon/js/ui/layout.js /usr/share/cinnamon/js/ui/layout.js.backup
576c576,577
< let monitor = this.findMonitorForActor(actorData.actor);
---
> else if (global.stage_input_mode == Cinnamon.StageInputMode.FULLSCREEN) {
> let monitor = this.findMonitorForActor(actorData.actor);
578d578
< if (global.stage_input_mode == Cinnamon.StageInputMode.FULLSCREEN) {
592c592,593
< else if (!actorData.visibleInFullscreen && monitor && monitor.inFullScreen)
---
> else if (!actorData.visibleInFullscreen &&
> this.findMonitorForActor(actorData.actor).inFullscreen)
the issue persists, although the exception trace is no longer present in .xsession-errors
. Attaching the full set of messages added to the latter during monitor wakeup sequence.
xsession-errors.incremental.txt
Have similar problem after upgrading to Mint 21.1 but ONLY with dual 4K monitors, DP0=primary, DP2=secondary, system trap displayed ONLY on main monitor. Bug does not appear on single monitors. System tray IS visible on monitor wakeup. (unlike MaxMotovilov) Error occurs If you toggle ON Panel Edit Mode. This causes the right side System Tray icons to drop BELOW the bar (Invisible) If you TOGGLE the Panel-Edit, the tray REAPPEARS for ONE SECOND before disappearing again. Toggling the Panel-Edit OFF, does NOT return the right side system tray. Left side is well-behaved. Moving the panel bar to the top position has no effect on the error - It still disappears. It worked perfectly in the previous version. Restarting Cinnamon returns the tray to its proper (visible) position.
@LarsCarlin Is this the systray@cinnamon.org applet or xapp-status@cinnamon.org?
Do you have multiple tray applets enabled?
The systray one only supports a single instance, while the xapp you can have as many as you want.
Both were active. Removed xapp-status@cinnamon.org leaving systray@cinnamon.org.
Toggling Panel Edit mode produces the same effect with the addition that the icons seem at least 4x larger as they disappear just below the bar. Restarting cinnamon resets them.
Yes, have other applets; like BT, printers, etc. Same as I had before 21.1.
I'm glad to run any tests or help ferret out the issue.
The systray one only supports a single instance, while the xapp you can have as many as you want.
@mtwebster empirically, only the systray seems to be able to show Shutter's status icon. I wouldn't even use systray if it wasn't for that. Any particular reason you could think of (like, different APIs/versions in play)? I do know Shutter is written in Perl (ouch)...
I just fixed an issue that I think was the problem with edit mode.
I can't reproduce anything involving dpms - no errors, warnings, anything, though I am on Cinnamon 5.6 now.
Can you try reproducing the sleep/dpms issue on a new user account?
For the exception there's already PR #11348 pending
Can you try reproducing the sleep/dpms issue on a new user account?
Reproduces. Steps as follows:
xset dpms force off
It is not inconceivable it would repro with simpler steps but I tried to roughly recreate my normal desktop...
I can't reproduce anything involving dpms - no errors, warnings, anything, though I am on Cinnamon 5.6 now.
Does Vera (21.1) have 5.6? I'll try upgrading... was reluctant 'cause I had just spent a ton of time moving from 19.3 on mdraid to 21 on ZFS and felt like I've done enough sysadmin work to last me a quarter :grinning:
Does Vera (21.1) have 5.6?
Yes, currently 5.6.5
[FIXED] I made these changes by @mtwebster https://github.com/linuxmint/cinnamon/commit/fa4960a6e8070ac44643f56934b674091d2ab4c4 and it fixed the error where systray icons disappeared after toggling Panel Edit Mode. Tested new code with 4K single monitor AND 4K dual monitor
Bug fix for Icons not resizing after toggled panel edit mode
Seemed to occur ONLY with dual monitor 4k. Single 4k monitor worked fine.
Changes to applet.js
/usr/share/cinnamon/applets/systray@cinnamon.org/applet.js
sections commented out are orig code new code immediately below 5 lines changed; from lines 102..121 Fri 23 Dec 2022 02:54:06 PM CST
//resizeIcons(size) { // this.icon_size = size global.ui_scale; resizeIcons() { this.icon_size = this.getPanelIconSize() global.ui_scale; Main.statusIconDispatcher.redisplay(); }
on_panel_icon_size_changed(size) {
//this.resizeIcons(size);
this.resizeIcons();
}
on_panel_edit_mode_changed() {
//this.resizeIcons(this.icon_size);
this.resizeIcons();
}
uiScaleChanged() {
if (this._scaleUpdateId > 0) {
Mainloop.source_remove(this._scaleUpdateId);
}
this._scaleUpdateId = Mainloop.timeout_add(1500, () => {
//this.resizeIcons(this.getPanelIconSize());
this.resizeIcons();
this._scaleUpdateId = 0;
return GLib.SOURCE_REMOVE;
});
}
I can't reproduce anything involving dpms - no errors, warnings, anything, though I am on Cinnamon 5.6 now.
Does Vera (21.1) have 5.6? I'll try upgrading... was reluctant 'cause I had just spent a ton of time moving from 19.3 on mdraid to 21 on ZFS and felt like I've done enough sysadmin work to last me a quarter grinning
Upgraded to Vera - no improvement.
After recent upgrade to 5.6.6 the issue (disappearance of systray after monitor wakeup) still there and I see a new error in the log:
JS ERROR: Exception in callback for signal: status-icon-removed: TypeError: parent is null
_onTrayIconRemoved@/usr/share/cinnamon/applets/systray@cinnamon.org/applet.js:218:9
_emit@resource:///org/gnome/gjs/modules/core/_signals.js:114:47
_onTrayIconRemoved@/usr/share/cinnamon/js/ui/statusIconDispatcher.js:64:14
@mtwebster
Same problem here - the problem started only after adding a second 4K display. I have to restart cinnamon every time monitors turn off, and after every wake-up from suspend.
Cinnamon 5.6.8.
I still have the same issue with 6.0.2, two 4k displays. Sys: Manjarop testing $ cinnamon --version Cinnamon 6.0.2
Did you make the documented changes to applet.js? /usr/share/cinnamon/applets/systray@cinnamon.org/applet.js
I have the same issue on Cinnamon 6.0.4 with one non-4k monitor. Every time the monitor wakes up, systray disappears and the following errors appear in the log:
** (cinnamon:482956): CRITICAL **: 17:08:26.037: na_tray_manager_manage_screen: assertion 'manager->screen == NULL' failed
** (csd-power:3634): CRITICAL **: 17:08:26.071: abs_to_percentage: assertion 'max > min' failed
/usr/share/cinnamon/applets/systray@cinnamon.org/applet.js already has the changes proposed earlier.
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
xset dpms force off
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: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 forfindMonitorForActor()
to returnundefined
. Perhaps a small defensive programming measure is all that's required. Will try and see.