Announcement

Collapse
No announcement yet.

Question about debugging: KDE hangs up every night

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Question about debugging: KDE hangs up every night

    Hi fellow KDE lovers!

    I have a question about getting detailed debug and log info from KDE...BEFORE I bother the developers with ill-defined bug reports.

    Since an update a few days ago, KDE partially hangs sometime in the middle of the night - every night. The symptoms are that the system has gone to screen saver at some unknown time, and the on-screen clock continues to show the correct time. At that point, moving the mouse or hitting a keyboard key (Note both are Bluetooth) has no effect, and the system appears to be be hung....but it's not.

    Being a long term Linux and KDE addict (first used KDE in 2001 on SuSE), I experimented.
    A USB mouse and Keyboard still work - cursor moves, and I can enter a password to unlock and see all my (many, many!) windows in 4 workspaces. However...window management has stopped working...I can't raise a new window to the foreground, can't change focus, there is no screen background menu popup on right-click, so I usually ended up holding the power button to force a system restart. I suspect that the Bluetooth subsystem in KDE has hung as well, as USB still seems to work, and I think that's handled by the OS rather than KDE.

    Further experimentation...I can hit ctrl-allt-F2 to get to a non-GUI shell, and can login as root and do the usual things (including a clean reboot), so I tried to restart KWin and Plasmashell from there, but that failed, and then the USB subsystem hung as well....back to the power switch! To eliminate hardware errors, I booted into Windows (something I almost never do) and the machine didn't have any problems overnight....I guess it could be a driver issue, but not sure where to begin with that.

    The whole thing is repeatable - happens every night - and I don't see anything obvious in the usual logs in /var/log/syslog. However, the previous session log, in syslog1.gz is filled with large amounts of red text near the end, and before the hang. A huge number are from the likcups printer system, but I can't believe they are causing the hang. The problem with syslog is that the system hasn't completely hung, just some core parts of KDE, so it's hard to know where/when to look because syslog keeps getting messages from still running code. There are no notifications of crashes from KDE.

    A large number are from plasmashell, but the dates are wrong for a crash last night......

    Dec 23 23:48:41 vetinari plasmashell[4382]: Could not find the Plasmoid for Plasma::FrameSvgItem(0x55be09dbc820) QQmlContext(0x55be06001de0) QUrl("file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml")
    Dec 23 23:48:42 vetinari plasmashell[4382]: Could not find the Plasmoid for Plasma::FrameSvgItem(0x55be09dbc820) QQmlContext(0x55be06001de0) QUrl("file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml")
    Dec 23 23:48:42 vetinari plasmashell[4382]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationItem.qml:222:21: QML SelectableLabel: Binding loop detected for property "implicitWidth"
    Dec 23 23:48:42 vetinari plasmashell[4382]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationItem.qml:222:21: QML SelectableLabel: Binding loop detected for property "implicitWidth"
    Dec 23 23:48:42 vetinari plasmashell[4382]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationItem.qml:222:21: QML SelectableLabel: Binding loop detected for property "implicitHeight"
    Dec 23 23:52:31 vetinari plasmashell[4382]: Could not find the Plasmoid for Plasma::FrameSvgItem(0x55be09dbc820) QQmlContext(0x55be06001de0) QUrl("file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml")
    Dec 23 23:52:31 vetinari plasmashell[4382]: Could not find the Plasmoid for Plasma::FrameSvgItem(0x55be09dbc820) QQmlContext(0x55be06001de0) QUrl("file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml")
    Dec 23 23:52:31 vetinari plasmashell[4382]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationItem.qml:222:21: QML SelectableLabel: Binding loop detected for property "implicitWidth"
    Dec 23 23:52:31 vetinari plasmashell[4382]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationItem.qml:222:21: QML SelectableLabel: Binding loop detected for property "implicitWidth"
    Dec 23 23:52:31 vetinari plasmashell[4382]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationItem.qml:222:21: QML SelectableLabel: Binding loop detected for property "implicitHeight"
    Dec 23 23:52:31 vetinari plasmashell[4382]: file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/components.3/ScrollView.qml:45:27: QML ScrollBar: Binding loop detected for property "visible"
    Dec 23 23:52:31 vetinari plasmashell[4382]: file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/components.3/ScrollView.qml:45:27: QML ScrollBar: Binding loop detected for property "visible"



    There is so much noise in the syslog files, that I can't see anything obvious, and I don't know what to look for.

    System Info...

    Operating System: Kubuntu 22.10
    KDE Plasma Version: 5.26.4
    KDE Frameworks Version: 5.100.0
    Qt Version: 5.15.6
    Kernel Version: 5.19.0-26-generic (64-bit)
    Graphics Platform: X11
    Processors: 24 × AMD Ryzen 9 3900X 12-Core Processor
    Memory: 47.0 GiB of RAM
    Graphics Processor: AMD Radeon RX 6600
    Manufacturer: ASUS

    So...my question for you all is....can you suggest additional logging/debugging steps I can take before going to the developers? Can I do anything with KCrash?

    Thanks for even looking at this, and have a great 2022 - 2023 transition season!!

    Paul

    #2
    You might need to look at jornalctl and see if anything useful is found there.

    Plasma doesn't use a screensaver, the closest thing would be the lock screen, so you might see if disabling that has any effect on things as an experiment.

    As to Bluetooth, the device probably defaults to turning off or suspending when idle, even though the Bluetooth system default setting is NOT to do so. it probably is usb-driver related, like it is for me. I also use a Bluetooth mouse and keyboard most of the time, and have to disable autosuspend on it, as well as on both my Keychron KBs so I am not annoyed all the time

    To check:
    Code:
    $ cat /sys/module/btusb/parameters/enable_autosuspend
    Y

    To disable it, create the file /etc/modprobe.d/btusb_autosuspend-disable.conf with the contents:
    Code:
    ​options btusb enable_autosuspend=0
    Reboot, or reload btusb, and check again:
    Code:
    $ cat /sys/module/btusb/parameters/enable_autosuspend
    N
    I doubt this will cure any freezes, but might help make things less frustrating

    When you have this happen next, instead of going to a vt, try hitting alt-space or alt-f2, to bring up krunner. You can try restarting plasmashell (plasmashell --replace) or kwin_x11 from there.

    As for troubleshooting, I don't know. I'd say report a bug on kde's bugzilla, but ask for assistance on getting the desired info. They will offer suggestions or links for that.

    Comment


      #3
      Thanks, claydoh I'll start looking at journalctl - something new to learn is always good!

      You're right - it's the lock screen I use...I'll try disabling that tonight as well.

      I'm used to the Bluetooth suspend pain - it usually takes a few seconds of mouse movement before the cursor starts to react after inactivity. I'll do the autosuspend disable thing anyway - seems useful, so thanks. When the hang happens, the bluetooth devices never come back, no matter how much activity or time I use. The USB devices always work perfectly and instantly, even when BTooth is dead. That could still be a driver issue, as IIRC, the drivers are combined??

      I'll try the krunner/kwin_x11 advice tomorrow, if/when it has crashed overnight.

      My hesitancy in going straight to the developers is that I know they're ultra-busy and mostly volunteers, so I want to be able to give them real info in any bug report.

      Comment


        #4
        Hi again, claydoh. You were right - turning off the BlueTooth autosuspend didn't make any difference.

        Sadly neither did turning off the lock screen. The system still hangs, just slightly differently. Trying to bring up KRunner fails. Restarting Plasmashell or running kwin_x11 both fail as well.

        I've been digging into journalctl , and in the process of getting started, I found a QT based GUI for journalctl, which is excellent! It's called QJournalctl and is on github at https://github.com/pentix/qjournalctl/ I had to satisfy a dependency on libssh dev files, but it compiled easily once downloaded.

        There's so much stuff in the journalctl logs that it's still going to take a lot of time to look through, but the GUI makes it a huge amount easier, as it has filtering by severity and good search features.

        Thanks again for pitching in, and happy 2023!

        Paul

        Comment


          #5
          I should have mentioned KSystemLog, which can show quite a few different log files.....but you don't get the fun of compiling.
          But QJournalctl is arguably better looking..

          Comment


            #6
            I had something similar happening to me. I figured out that, even with the desktop frozen, I was able to hit Ctrl+Alt+T to bring up a terminal. Then I was able to do "killall plasmashell" and "killall kwin_x11". At that point KRunner would start working again though my whole desktop would look like a mess. From KRunner, I then ran "plasmashell" and then "kwin_x11" and my desktop was back up and running. I had to do this quite a bit since my desktop would go crazy while I was actively using it, usually in response to a notification popping up.

            Comment


              #7
              Originally posted by arraybolt3 View Post
              ... I was able to do "killall plasmashell" and "killall kwin_x11"... then ran "plasmashell" and then "kwin_x11"
              In theory, plasmashell --replace and kwin --replace does the same as killing then starting anew.
              Regards, John Little

              Comment

              Working...
              X