plasma-manager icon indicating copy to clipboard operation
plasma-manager copied to clipboard

[BUG] Desktop widget "systemMonitor" does not load

Open BPier opened this issue 7 months ago • 4 comments

Description

When creating a system monitor widget, the widget load just a back box. Vene after restarting the system it stays as black box.

Image

However, killing and restarting plasmashell with the command kquitapp6 plasmashell; kstart plasmashell fix the issue and makes the widgets works.

Image

Here is the plasma files before and after restaring plasmashell, the files are slightly different so I don't know if the difference between the files can help to identify the issue.

plasma-org.kde.plasma.desktop-appletsrc.After.txt plasma-org.kde.plasma.desktop-appletsrc.Before.txt plasmashellrc.After.txt plasmashellrc.Before.txt

Here is my module with my plasma config:

KDEPlasma.nix.txt

Steps to reproduce

Steps

On a NixOs install with Home-manager and flakes, add plasma-manager following the instructions on github and add a desktop widget with systemMonitor.

Example:

programs.plasma = {
    enable = true;
    overrideConfig = true;
  
  desktop.widgets = [
    {
        # Memory Chart
        systemMonitor = {
          title = "Memory Usage";
          position = {
            horizontal = calcDesktopLength 54;
            vertical = calcDesktopLength 2;
          };
          size = {
            width = calcDesktopLength 50;
            height = calcDesktopLength 26;
          };
          displayStyle = "org.kde.ksysguard.linechart";
          sensors = [
            {
              name = "memory/physical/used";
              color = colors.primary;
              label = "Used Physical Memory";
            }
          ];
        };
      }  
  ]
};

Rebuild the nixos configuration and restart the computer for the configuration to be applied.

Expected result

I expected the widget to be loaded and functional.

Actual Results

The widget are here on the desktop but not functional

Environment

home-assistant + flakes

-------------------- 
OS: NixOS 25.11.20250518.292fa7d ( 
Host: LENOVO LNVNB161216 
Kernel: 6.12.28 
Uptime: 24 mins 
Packages: 1252 (nix-system), 937 ( 
Shell: bash 5.2.37 
Resolution: 1920x1080, 2560x1440 
DE: Plasma 6.3.5 (Wayland) 
WM: kwin 
Icons: Papirus-Dark [GTK2/3] 
Terminal: .konsole-wrappe 
CPU: AMD Ryzen 7 5800H with Radeon 
GPU: NVIDIA GeForce RTX 3050 Ti Mo 
GPU: AMD ATI Radeon Vega Series /  
Memory: 6465MiB / 13827MiB 

BPier avatar May 20 '25 12:05 BPier

I’m encountering a similar issue.

With overrideConfig set to true, running systemctl --user restart plasma-plasmashell.service consistently fixes the problem even after relog. (Edit: it works after relog, but not reboot)

This is unexpected since overrideConfig should reset the configuration files, so the fix shouldn’t persist. So I think there's something else besides the changes in the config file done by plasma.

ericukk avatar Jul 09 '25 17:07 ericukk

systemctl --user restart plasma-plasmashell.service does work but does not persist after reboot unfortunately.

edit: However with overrideConfig set to false the fix does persist after reboot

BPier avatar Jul 22 '25 14:07 BPier

Ive got a very similar problem, except for me systemctl --user restart plasma-plasmashell.service only works partially (for one out of 5 widgets). Heres my config:

      desktop.widgets = [
        # --- Applet 1014: IO ---
        {
          name = "org.kde.plasma.systemmonitor.diskactivity";
          position = { horizontal = 1696; vertical = 656; };
          size = { width = 352; height = 224; };
          config = {
            Appearance = {
              chartFace = "org.kde.ksysguard.linechart";
              title = "SSD";
            };
            SensorColors."disk/nvme0n1/read" = "186,61,233";
            SensorColors."disk/nvme0n1/write" = "179,233,61";
            SensorColors."lmsensors/nvme-pci-0100/temp1" = "134,233,61";
            SensorLabels."disk/nvme0n1/read" = "Read Rate";
            SensorLabels."disk/nvme0n1/write" = "Write Rate";
            SensorLabels."lmsensors/nvme-pci-0100/temp1" = "Temperature";
            # Convert the JSON-like string to a proper Nix list
            Sensors.highPrioritySensorIds = [ "disk/nvme0n1/read" "disk/nvme0n1/write" ];
            Sensors.lowPrioritySensorIds = [ "lmsensors/nvme-pci-0100/temp1" ];
          };
        }

        # --- Applet 1016: Memory ---
        {
          name = "org.kde.plasma.systemmonitor.memory";
          position = { horizontal = 1696; vertical = 224; };
          size = { width = 352; height = 224; };
          config = {
            Appearance = {
              chartFace = "org.kde.ksysguard.piechart";
              title = "Memory";
            };
            SensorColors = {
              "memory/physical/applicationPercent" = "61,163,233";
              "memory/physical/bufferPercent" = "233,181,61";
              "memory/physical/cachePercent" = "233,82,61";
              "memory/swap/usedPercent" = "71,61,233";
            };
            SensorLabels."memory/swap/usedPercent" = "Swap";
            Sensors.highPrioritySensorIds = [ "memory/physical/applicationPercent" "memory/physical/bufferPercent" "memory/physical/cachePercent" "memory/swap/usedPercent" ];
          };
        }
        # --- Applet 1017: GPU ---
        {
          name = "org.kde.plasma.systemmonitor.gpu";
          position = { horizontal = 1696; vertical = 448; };
          size = { width = 352; height = 208; };
          config = {
            Appearance = {
              chartFace = "org.kde.ksysguard.linechart";
              title = "GPU";
            };
            SensorColors = {
              "gpu/gpu1/temp3" = "233,107,61";
              "gpu/gpu1/usage" = "66,233,61";
              "gpu/gpu1/usedVram" = "61,233,224";
            };
            SensorLabels = {
              "gpu/gpu1/usage" = "GPU %";
              "gpu/gpu1/usedVram" = "Memory";
              "gpu/gpu1/temp3" = "Temperature";
            };
            Sensors = {
              highPrioritySensorIds = [ "gpu/gpu1/usage" "gpu/gpu1/usedVram" ];
              lowPrioritySensorIds = [ "gpu/gpu1/temp3" ];
            };
          };
        }
        # --- Applet 1018: Network ---
        {
          name = "org.kde.plasma.systemmonitor.network";
          position = { horizontal = 1696; vertical = 880; };
          size = { width = 352; height = 224; };
          config = {
            Appearance = {
              chartFace = "org.kde.ksysguard.linechart";
              title = "Network";
            };
            SensorColors = {
              "network/all/download" = "89,233,61";
              "network/all/upload" = "233,61,140";
            };
            Sensors = {
              highPrioritySensorIds = [ "network/all/download" "network/all/upload" ];
            };
          };
        }
        # --- Applet 1020: CPU ---
        {
          name = "org.kde.plasma.systemmonitor.cpu";
          position = { horizontal = 1696; vertical = 0; };
          size = { width = 352; height = 224; };
          config = {
            Appearance = {
              chartFace = "org.kde.ksysguard.linechart";
              title = "CPU";
            };
            SensorColors = {
              "cpu/all/averageFrequency" = "175,61,233";
              "cpu/all/averageTemperature" = "74,61,233";
              "cpu/all/usage" = "61,174,233";
            };
            SensorLabels = {
              "cpu/all/averageFrequency" = "Frequency";
              "cpu/all/averageTemperature" = "Temperature";
              "cpu/loadaverages/loadaverage1" = "Load avg 1m";
              "cpu/loadaverages/loadaverage15" = "Load avg 15m";
              "cpu/loadaverages/loadaverage5" = "Load avg 5m";
              "pressure/cpu/full10Sec" = "Pressure 10s";
            };
            Sensors.highPrioritySensorIds = [ "cpu/all/averageFrequency" "cpu/all/averageTemperature" ];
            Sensors.lowPrioritySensorIds = [ "cpu/loadaverages/loadaverage1" "cpu/loadaverages/loadaverage5" "cpu/loadaverages/loadaverage15" "pressure/cpu/full10Sec" ];
          };
        }

weirdly, after generating appletsrc the contents look all right, but then after restarting plasma, the contents of appletsrc file seem to be somewhat messed up.

Dinth avatar Aug 06 '25 11:08 Dinth

The issue seems to be fixed for me now, when restarting the system the widgets are loading as they should without needing to restart Plasma.

plasmashell 6.4.4

I don't know for others but something might have changed in KDE that fixed the issue, I don't know

BPier avatar Sep 11 '25 12:09 BPier