dangvd / crystal-dock

A cool dock (desktop panel) for Linux desktop
GNU General Public License v3.0
100 stars 11 forks source link

Dock disappears after screen turn-off #98

Open dangvd opened 2 weeks ago

dangvd commented 2 weeks ago

From EliteAMDGamer:

It happens in my case when either I manually shut off the monitor when I walk away from the system. Or when the display automatically shuts off after four hours of inactivity.

I don't use sleep or anything currently because they don't really function to well. But the dock will appear with autostart on boot or sddm login.

I have not tested it with plasma's lock screen, but I don't think it would open then either.

~Update-

So when using hibernate or suspend it works normally as expected i think cause the system comes on to the lock screen. If there was a way to have the dock spit out a log i would be happy to add that in.

Here's what i get from opening it in terminal. Shutting off the screen manually an truing it back on. So maybe its on QT.

crystal-dock QSocketNotifier: Can only be used with threads started with QThread Could not find application with id: org.kde.xwaylandvideobridge. The window icon will have limited functionalities. qt.qpa.wayland: Creating a fake screen in order for Qt not to crash


From TheCrustyCurmudgeon:

I've installed crystal-dock-2.7-1.qt6.7.x86_64.rpm in Fedora 41 w/ Wayland (KDE Plasma Version: 6.2.2, KDE Frameworks Version: 6.7.0, Qt Version: 6.7.2, Kernel Version: 6.11.5-300).

It seems that Crystal Dock does not reappear after restoring from lock. I do not have sleep/hibernate enabled, so my system just locks when idle. My session setting is set to "Start with an empty Session". Crystal Dock is enabled in autostart and it does start on a reboot. Just not on restore from lock.

BigCrustyOne commented 2 weeks ago

Just clarifying my comment above (from "TheCrustyCurmudgeon"). This happens any time the lock screen is enabled, however,. if I engage lock for only a few seconds /usr/bin/crystal-dock is still running and the dock appears normally. If I leave lock for more than few minutes, it is not running after return to the desktop.

The only recent log entries I can see are as follow:

systemd app-crystal\x2ddock@autostart.service: Consumed 7min 35.240s CPU time, 3.4G memory peak.
systemd Started app-crystal\x2ddock@abe7efba8a554c6e8ca5c544bd566693.service - Crystal Dock - Desktop Panel.
crystal-dock    QSocketNotifier: Can only be used with threads started with QThread
crystal-dock    Could not find application with id: org.kde.xwaylandvideobridge. The window icon will have limited functionalities.
crystal-dock    [Parent 22947, Main Thread] WARNING: Theme parsing error: gtk.css:68:35: The style property GtkButton:child-displacement-x is deprecated and shouldn't be used anymore. It will be removed in a future version: 'glib warning', file /builddir/build/BUILD/thunderbird-128.3.3-build/thunderbird-128.3.3/toolkit/xre/nsSigHandlers.cpp:187
dangvd commented 2 weeks ago

I believe the relevant error message was: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash

Also I believe this happens when the screen turned off. It relates to screen lock because the default setting for turning off screen is like 1 hour normally and 1 minute if screen lock is on. I've verified this on my Fedora 41: when I disabled turning off screen, it stopped happening.

BigCrustyOne commented 2 weeks ago

I believe the relevant error message was: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash

Also I believe this happens when the screen turned off. It relates to screen lock because the default setting for turning off screen is like 1 hour normally and 1 minute if screen lock is on. I've verified this on my Fedora 41: when I disabled turning off screen, it stopped happening.

Understood. Unfortunate... screen turn-off is important to me and I would assume, anyone who wants to reduce electricity use. Not willing to abandon that practice, so I'll have to live with restarting crystal dock for now.

BigCrustyOne commented 2 weeks ago

I believe the relevant error message was: qt.qpa.wayland: Creating a fake screen in order for Qt not to crash

Also I believe this happens when the screen turned off. It relates to screen lock because the default setting for turning off screen is like 1 hour normally and 1 minute if screen lock is on. I've verified this on my Fedora 41: when I disabled turning off screen, it stopped happening.

Just tested this on Fedora 41 after some updates this morning. Locking the system w/ CTRL+L, then allowing the screen to turn off. woke up screen and logged in to find Crystal Dock stiil running (happy dance!). Will double-check that with a longer test, but seems to have been resolved by some update in the last 18 hours.

UPDATE: Nope, still broke. Can't say when, but after leaving it for ~40 minutes, no dock appears when logging back in. Still appears when I lock it and then allow it to screen off after 60-90 seconds, so seems to kill the dock at some point after that.

dangvd commented 1 week ago

Thanks for the update, I'll look more into it.

coffeinflash commented 1 week ago

Can confirm this issue using openSUSE Tumbleweed.

I am using the package build by my own on OBS: https://build.opensuse.org/package/show/home:Herbster0815/crystal-dock

Not sure if it is related but I had a similar issue with conky (conky disappered after signal loss on monitor due to standby) and this is fixed since Plasma 6.2.2, at least for me.

Actually a simple workaround would be monitoring the PID - if it is gone after wakeup, restart crystal-dock.

rjwest000 commented 1 week ago

The dock is great, BUT I also have this issue on my desktop (AMD Ryzen 9, AMD graphics and HDMI monitor) but strangely not on my older HP Intel Core i5 laptop.

Both machines have a newly installed OS (Fedora Linux KDE 41), with default settings, plus the crystal-dock-2.7-1.x86_64.rpm package.

ssteinerx commented 4 days ago

I am also experiencing this whenever the screen shuts off on:

  Operating System: Kubuntu 24.10
  KDE Plasma Version: 6.1.5
  KDE Frameworks Version: 6.6.0
  Qt Version: 6.6.2
  Kernel Version: 6.11.0-9-generic (64-bit)
  Graphics Platform: Wayland

This is in syslog, maybe it'll be helpful. the "parent is not mapped" message shows up thousands of times. 5,240 to be exact.

2024-11-10T19:25:07.356390-05:00 B450M-DS3H crystal-dock[730404]: [Parent 730404, Main Thread] WARNING: Couldn't map window 0x7e54ef94e2c0 as subsurface because its parent is not mapped.: 'glib warning', file /builds/worker/checkouts/gecko/toolkit/xre/nsSigHandlers.cpp:187
2024-11-10T19:37:12.634148-05:00 B450M-DS3H systemd[3368]: Started app-crystal\x2ddock@cff9cd20eee1480b91b7af4af4b69e08.service - Crystal Dock - Desktop Panel.
2024-11-10T19:37:12.659956-05:00 B450M-DS3H crystal-dock[916659]: QSocketNotifier: Can only be used with threads started with QThread
2024-11-10T19:37:13.116610-05:00 B450M-DS3H crystal-dock[916659]: Could not find application with id: org.kde.xwaylandvideobridge. The window icon will have limited functionalities.
2024-11-10T19:37:13.121435-05:00 B450M-DS3H crystal-dock[916659]: Could not find icon with name:  in the current icon theme and its fallbacks. The window icon will have limited functionalities.
ssteinerx commented 4 days ago

Again, I'm not sure how helpful this might be, but here is a collection of the unique-ish messages from syslog. Since this is on Plasma 6.x and Qt 6.6.x, (first time I've been running either of those on an actual machine), I thought this might be kind of generally useful.

It's not perfectly "deduped" but I have a regex headache so it's going to have to do...

syslog-unique-11.txt

dangvd commented 3 days ago

Thanks for all the additional info, I will update the bug as soon as I've found a fix.