Bug 314458

Summary: KDE panel disappears after suspend to ram in KDE when disks where still mounted.
Product: [Frameworks and Libraries] frameworks-solid Reporter: Wim De Meester <deepskywim>
Component: generalAssignee: Lukáš Tinkl <lukas>
Status: RESOLVED WORKSFORME    
Severity: normal CC: afiestas, christoph, kdelibs-bugs-null, lukas, mbriza, rauch
Priority: NOR    
Version First Reported In: 5.38.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Wim De Meester 2013-02-05 14:12:06 UTC
I have a fedora 17 laptop, with kde 4.9.5. At work, we can access disks which are mounted using nfs4.  (using automounter and freeipa/sssd). When I visit some of these disks (for example /home/user1, /home/user2 and /home/user3) and suspend to ram, the computer goes to sleep. When I remove the network cable and wake up the laptop again. the kde panel disappears. It can take a very long time before the panel reappears again. When I do the same, but suspend using pm-suspend, the problem does not appear... Any idea what solid/powerdevil does different than pm-suspend and how I can solve this problem?

Reproducible: Always

Steps to Reproduce:
1. ls /home/user1 /home/user2 /home/user3
2. Suspend to ram using the sleep button of the laptop (or the sleep button in the Application Launcher)
3. Wake the computer up.
Actual Results:  
The computer wakes up, but the KDE panel disappears.

Expected Results:  
The computer wakes up, and the KDE panel is visible and useable.
Comment 1 Lukáš Tinkl 2013-02-05 14:18:20 UTC
Does the panel eventually come back, or never?
Comment 2 Wim De Meester 2013-02-05 14:28:27 UTC
The panel does come back after I plug in the network cable again in about 30 seconds. If I don't plugin the network cable, I think that the panel only comes back after almost 30 minutes.... I'm testing this now.
Comment 3 Lukáš Tinkl 2013-02-05 14:31:19 UTC
Looks like kded and therefore plasma is blocked by waiting you to re-authorize to freeipa/sssd. The difference here between suspending via KDE and pm-suspend is that KDE tries to reestablish the network connection
Comment 4 Wim De Meester 2013-02-05 14:35:58 UTC
Is there a way to check for what kde is waiting? Shouldn't KDE  timeout in a few minutes when the network connection can not be reestablished?
Comment 5 Lukáš Tinkl 2013-02-05 14:37:17 UTC
For the password dialog (whatever provides it); 25 seconds is the DBUS timeout, the longer one is probably NFS
Comment 6 Wim De Meester 2013-02-05 14:42:34 UTC
I wrote a script in /usr/lib64/pm-utils/sleep.d/ which unmounts all nfs shares, so I don't see why the timeout should occur.... After resuming, the disks are indeed correctly unmounted...
Comment 7 Lukáš Tinkl 2013-02-05 14:43:37 UTC
You said you use automounter :)
Comment 8 Wim De Meester 2013-02-05 14:52:06 UTC
The disks are indeed unmounted, but the problem with the panel does still occur...
Comment 9 Lukáš Tinkl 2013-02-05 14:59:09 UTC
Yes but the automounter is trying to mount them back
Comment 10 Wim De Meester 2013-02-05 15:02:30 UTC
The automounter only mounts the disks back when I ask for it. As long as I don't do 

ls /home/user1

the disks are not mounted.
Comment 11 Wim De Meester 2013-02-06 10:53:31 UTC
At the moment the computer resumes, the panel is visible for a very short time, after that, the panel bacomes invisible.
Comment 12 Wim De Meester 2013-02-06 11:13:41 UTC
What is see in the list of processes is that a lot of kworker/u:xx processes are started after suspending and resuming...
Comment 13 Wim De Meester 2013-02-06 13:22:01 UTC
Apparently, both plasma-desktop and krunner show 'D' - Uninterruptible sleep when looking in the list of processes.
Comment 14 Martin Bříza 2013-02-11 11:45:58 UTC
Hello,
can you please provide some information regarding the bug?
Does this happen to one of the users who have their $HOME mounted via NFS or does the described behavior happen to user who has it stored locally?
By automounter, you mean you have enabled automatic mounting of the partition only in System Settings -> Removable Devices (If so, are you using "Automount on Login" or "Automount on Attach" or both?) or do you have it stored in /etc/fstab?
And finally, how are you logged into the Kerberos domain?
Thank you.
Comment 15 Martin Bříza 2013-02-11 11:51:39 UTC
Umm, I just crashed my plasma-desktop with just trying to open the shared partition without obtaining my Kerberos ticket... it seems there's something rotten.
Comment 16 Wim De Meester 2013-02-11 12:54:26 UTC
The $HOME directory is local on the machine and is not mounted using nfs. By automounter, I mean the automounter using ipa. Using ipa, a list of mountable directories is shared to the computer (using /etc/auto.master). There is nothing in /etc/fstab. The disks can be mounted, even if I'm not logged into the Kerberos domain. I log into the kerberos domain using kinit.
Comment 17 Robert Auch 2015-01-12 01:49:06 UTC
I get this even if I just access mounts via /net/<servername>/share, then suspend to RAM before the automount times out.  (auto.net is the only thing listed in my auto.master)

If I then travel to another network, even if NetworkManager *does* get online to another network, because the original resources are unavailable, the plamsa-desktop, kded, and krunner processes never return from "D" state - I just waited nearly 60 minutes after resume, which I did 6 hours after the last sleep, and ended up rebooting to get access to my desktop tools again.

19:45 rob@kubuntu4:~$ cat bin/clearcomments.sh 
#!/bin/bash
file="$@"

SED=/bin/sed
if [ -x /usr/xpg4/bin/sed ]; then
    SED=/usr/xpg4/bin/sed
fi

$SED -e '/^[[:space:]]*[#;\/]/d' -e '/^[[:space:]]*$/d' $file

19:44 rob@kubuntu4:~$ grep auto /etc/nsswitch.conf
19:44 rob@kubuntu4:~$ cat /etc/auto.master 
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#
#/misc  /etc/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
#       "nosuid" and "nodev" options unless the "suid" and "dev"
#       options are explicitly given.
#
/net    -hosts
#
# Include /etc/auto.master.d/*.autofs
#
+dir:/etc/auto.master.d
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
19:45 rob@kubuntu4:~$ clearcomments.sh /etc/default/nfs-common 
NEED_STATD=
STATDOPTS=
NEED_GSSD=yes
19:45 rob@kubuntu4:~$ clearcomments.sh /etc/default/autofs 
MASTER_MAP_NAME="/etc/auto.master"
TIMEOUT=60
NEGATIVE_TIMEOUT=10
MOUNT_WAIT=180
UMOUNT_WAIT=12
BROWSE_MODE="yes"
19:46 rob@kubuntu4:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/kubuntu-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=7e47d334-a53a-4550-9714-2c648218c334 /boot           ext2    defaults        0       2
/dev/mapper/kubuntu-swap_1 none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0
Comment 18 Jonathan Riddell 2015-03-11 19:18:31 UTC
This bug is reported on libsolid which is the kdelibs4 version of the solid library.  It is now in maintenance mode.  If you think it should still be fixed in the KDE Frameworks 5 version of solid please move it to or report a bug on frameworks-solid or Powerdevil.
Comment 19 Andrew Crouthamel 2018-09-04 15:44:57 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I am closing this bug. Please try again with the latest version and submit a new bug to frameworks-solid if your issue persists. Thank you!
Comment 20 Robert Auch 2018-09-04 15:53:15 UTC
The "KDE Plasma and other interfaces fail or crash" bug still exists with automounted disks in KDE5 - Kubuntu 18.04.  Moving to frameworks-solid per comment 18
Comment 21 Robert Auch 2018-09-04 15:53:23 UTC
Package: libkf5solid5
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 960
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: solid
Version: 5.38.0-0ubuntu1
Depends: libkf5solid5-data (= 5.38.0-0ubuntu1), libc6 (>= 2.14), libqt5core5a (>= 5.9.0~beta), libqt5dbus5 (>= 5.6.1~), libqt5widgets5 (>= 5.6.1~), libqt5xml5 (>= 5.6.1~), libstdc++6 (>= 4.1.1), libudev1 (>= 183)
Recommends: media-player-info
Description: Qt library to query and control hardware
 Solid is a device integration framework. It provides a way of querying and
 interacting with hardware independently of the underlying operating system.
 .
 Solid is part of KDE Frameworks 5.
Original-Maintainer: Debian/Kubuntu Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Homepage: https://projects.kde.org/projects/frameworks/solid
Comment 22 Christoph Cullmann 2025-03-08 21:01:20 UTC
Can you re-try this with Plasma 6? Thanks!

If it still crashes, a backtrace would be very helpful.
Comment 23 Bug Janitor Service 2025-03-23 03:46:30 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 24 Bug Janitor Service 2025-04-07 03:46:45 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.