linuxmint / cinnamon-spices-desklets

Desklets for the Cinnamon desktop
http://cinnamon-spices.linuxmint.com
GNU General Public License v2.0
152 stars 163 forks source link

diskspace@schorschii - Wrong text alignment after resume from standby #827

Open dajusc opened 1 year ago

dajusc commented 1 year ago
 * Desklet version/Build date: **Version 1.13 (2022-06-03 13:18:42)**
 * Cinnamon version: **Cinnamon 5.6.7**
 * Distribution: **Linux Mint 21.1**
 * Graphics hardware *and* driver used: **NVIDIA GeForce GTX 980, Driver 4.6.0 NVIDIA 525.78.01**
 * Snippet or attachment of ~/.cinnamon/glass.log: **Does not exist**
 * Snippet or attachment of ~/.xsession-errors: **No related entries**

Notify author of desklet @schorschii

Issue After the system resumes from standby all diskspace desklets have the text aligned to the left, also the text should be centered.

Steps to reproduce

  1. Send system to standby
  2. Resume System from standby
  3. Login
  4. Text alignment of diskspace desklets is left (wrong)

Expected behaviour

Text alignment should be centered all time

Other information

  1. The alignment becomes correctly centered when cinnamon is restarted (Ctrl + Alt + Esc) or when the system is rebooted
  2. The issue seems to happen to others as well, see comment from @krasotaa here: https://cinnamon-spices.linuxmint.com/desklets/view/39
  3. The problem did not appear before I upgraded from Linux Mint 20.3 to 21.1
  4. My desklet configuration is as follows:

{ "head0": { "type": "header", "description": "Settings for diskspace@schorschii" }, "head1": { "type": "header", "description": "General" }, "type": { "type": "combobox", "default": "filesystem", "description": "Monitor a file system or RAM usage", "tooltip": "Choose, if this desklet should show file system or RAM usage.", "options": { "Filesystem": "filesystem", "RAM": "ram", "Swap": "swap" }, "value": "filesystem" }, "filesystem": { "type": "filechooser", "default": "/", "description": "Filesystem to monitor", "tooltip": "Select the file system, which you want to monitor.", "allow-none": true, "select-dir": true, "value": "/" }, "onclick-action": { "type": "combobox", "default": "filemanager", "description": "Action on mouse click", "tooltip": "Choose what to do when the desklet was clicked.", "options": { "Open File Manager": "filemanager", "Open Partition Manager": "partitionmanager", "Open System Monitor": "sysmonitor", "Nothing": "nothing" }, "value": "filemanager" }, "head2": { "type": "header", "description": "Visual" }, "design": { "type": "combobox", "default": "thin", "description": "Design", "options": { "Thin": "thin", "Compact": "compact", "Classic (Thick)": "classic" }, "value": "classic" }, "text-view": { "type": "combobox", "default": "used-size", "description": "Text", "options": { "Name and total space": "name-size", "Used and total space": "used-size", "Total and used space": "size-used", "Free and total space": "free-size", "Total and free space": "size-free", "No text": "none" }, "value": "used-size" }, "size-prefix": { "type": "combobox", "default": "binary", "description": "Size Prefix", "options": { "Decimal": "decimal", "Binary": "binary" }, "value": "binary" }, "hide-decorations": { "type": "checkbox", "description": "Hide decorations", "default": false, "value": false }, "draw-free-space": { "type": "checkbox", "description": "Draw free/unused space (gray)", "default": true, "value": true }, "use-own-circle-color": { "type": "checkbox", "default": false, "description": "Use a custom circle color", "value": true }, "circle-color": { "type": "colorchooser", "default": "rgba(83,199,160,1.0)", "description": "Circle color", "dependency": "use-own-circle-color", "value": "rgb(144,209,82)" }, "text-color": { "type": "colorchooser", "default": "rgba(255,255,255,1.0)", "description": "Text color", "value": "rgb(255,255,255)" }, "scale-size": { "type": "spinbutton", "default": 1, "min": 0.4, "max": 10, "step": 0.2, "units": "scale factor", "description": "Desklet size", "tooltip": "Increase or decrease the size of this desklet using this scale factor.", "value": 0.6000000000000001 }, "head3": { "type": "header", "description": "Custom desklet label (only visible if decorations are enabled)" }, "use-custom-label": { "type": "checkbox", "default": false, "description": "Use a custom desklet label", "tooltip": "Checking this box allows you to set a custom label in the field below.", "value": true }, "custom-label": { "type": "entry", "default": "Filesystem /", "description": "Custom desklet label", "indent": true, "dependency": "use-custom-label", "tooltip": "Set your custom label here. This field is unavailable unless the checkbox above is enabled.", "value": "SSD" }, "random-circle-color-generated": { "type": "generic", "default": false, "value": true }, "random-circle-color-r": { "type": "generic", "default": 1, "value": 0.4509409984240097 }, "random-circle-color-g": { "type": "generic", "default": 1, "value": 0.7031443908046597 }, "random-circle-color-b": { "type": "generic", "default": 1, "value": 1 }, "__md5__": "f5a43280f94b41a7dd26dee7dd823a1e" }

dajusc commented 1 year ago

This is how it looks with the wrong alignment:

diskspace-schorschii_wrong_text-alignment_after_resume

schorschii commented 1 year ago

I'm also experiencing this since I upgraded to Mint 21. The issue seems to be that the CSS rules of stylesheet.css are not applied anymore after standby. I don't think this is anything I can fix within the desklet, it is more likely a Cinnamon issue.

Other desklets, applets and extensions also show strange effects after standby, e.g. the popular "Transparent panels" extension is not working until Cinnamon is restarted and sometimes my entire task bar doesn't show any text after standby.

dajusc commented 1 year ago

Thank you for your reply and analysis @schorschii. So how to proceed? Do you perhaps know the right person from the Cinnamon team to ask for help in this?

dajusc commented 1 year ago

Thanks @schorschii for taking the initiative in this! :)

dajusc commented 1 year ago

Short update: I recently changed to an AMD graphics card and the issue has not appeared any more.

schorschii commented 1 year ago

Yes, this problem seems to be related to the proprietary NVIDIA driver. Thanks for confirming.

H34dl3ss commented 10 months ago

Restarting cinnamon fixes the issue (Ctrl-Alt+ESC). Is there a way to let this happen automatically when starting from standby?

rcalixte commented 10 months ago

Is there a way to let this happen automatically when starting from standby?

It's not automatic but there are Actions that will be available to download in Mint 21.3 (or you can install them manually but then you would not get updates so it might be best to wait):

If you install either of these, they will be available in the context menu on the desktop, usable whenever you want.

I haven't looked into this specific issue but has anyone been able to test in the Wayland session? I suspect it might be a bug in the compositor but it would be nice to confirm.

schorschii commented 10 months ago

@rcalixte Good to hear that Mint 21.3 makes the first steps towards Wayland! I installed it on a test machine. Starting a Wayland session with the proprietary NVIDIA driver was only possible after adding the kernel parameter nvidia_drm.modeset=1. Otherwise, there is just a black screen after login. The good news: the diskspace desklet does not show the mentioned graphic issue after standby (while still having it when using a X11 session on the same test machine). But the icons in the taskbar still show some glitches after standby in Wayland which look like these mentioned here.

So it seems that things will get better with Wayland. Until we can use Wayland productive, I keep restarting Cinnamon with a right click on the taskbar -> Troubleshooting -> Restart.

Apart from that, I like the idea of the new installable actions. Finally, there is an "official" way of getting the "Send by Email" action again. May I get a bit off-topic here? A built-in "Send by Email" action was removed from Linux Mint not long ago (I think it was 20.x), which I didn't understood (do you know why?). Because of this, I created my Nemo-Extensions repo, which I can now transfer to your new cinnamon-spices-actions repo.

rcalixte commented 10 months ago

The good news: the diskspace desklet does not show the mentioned graphic issue after standby (while still having it when using a X11 session on the same test machine). But the icons in the taskbar still show some glitches after standby in Wayland which look like these mentioned here.

The current implementation of the Wayland session is far from complete but it's good to know that this might indeed be a bug in the X11 session. I don't have a fix for the X11 issue quite yet, just workarounds. The Action that reloads desklets works for both X11 and Wayland while Cinnamon restarts aren't support in Wayland quite yet.

Apart from that, I like the idea of the new installable actions. Finally, there is an "official" way of getting the "Send by Email" action again. May I get a bit off-topic here? A built-in "Send by Email" action was removed from Linux Mint not long ago (I think it was 20.x), which I didn't understood (do you know why?).

I don't have context on this unfortunately.

Because of this, I created my Nemo-Extensions repo, which I can now transfer to your new cinnamon-spices-actions repo.

This would be awesome! I wish I had known about this sooner since I would've reached out. Definitely feel free to take a look at the new repository's structure since there are some slight differences from Applets and Desklets, all explained in the README. You can look through some of the existing Actions too of course.