Yeah, I tried that variable as well - I always read the messages and try to follow the suggestions
If I find the time, I’ll try to build tint2 over the weekend the normal way - using a PKGBUILD.
The situation with tint2 isn’t great… there are lots of patches floating around online - both for the original version and for the forks - some of them works, some are not working “AI hallucinations” and sorting all of that out will definitely be time‑consuming.
From: zackattackz
Subject: [PATCH] systray: fix iterator UAF in on_change_systray
Patch adapted for original tint2 (o9000/tint2) by danieln@maboxlinux.org
on_change_systray() iterates systray.list_icons and calls reparent_icon()
for each icon not yet reparented. If the XEMBED handshake fails,
reparent_icon() calls remove_icon(), which g_slist_remove()s and g_free()s
the current node. The loop then advances via l = l->next on the freed node,
and the next iteration dereferences l->data on garbage memory (SIGSEGV).
Trigger: any tray client that requests dock then destroys its window before
the embed completes — e.g. Steam's transient 200x200 loader icon, Electron
apps (Vesktop/Discord) that tear down their GdkWindow mid-embed.
Fix: capture l->next at the top of the loop body, before any call that
might free the current node. remove_icon() only frees the current node, so
the pre-captured next pointer stays valid.
This is the same iterator-invalidation pattern fixed in uevent_handler() by
the glib2.76 patch (issue #4). That fix addressed one occurrence; this is
the missed sibling in systraybar.c.
Tested with a reproducer that queues N_SYSTEM_TRAY_REQUEST_DOCK events then
destroys the windows before on_change_systray can reparent them:
unpatched → SIGSEGV within a few rounds; patched → all rounds survive.
---
src/systray/systraybar.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/systray/systraybar.c b/src/systray/systraybar.c
index 2a9fafe..5eb5c6f 100644
--- a/src/systray/systraybar.c
+++ b/src/systray/systraybar.c
@@ -292,9 +292,10 @@ void on_change_systray(void *obj)
}
TrayWindow *traywin;
- GSList *l;
+ GSList *l, *next;
int i;
- for (i = 1, l = systray.list_icons; l; i++, l = l->next) {
+ for (i = 1, l = systray.list_icons; l; i++, l = next) {
+ next = l->next;
traywin = (TrayWindow *)l->data;
traywin->y = posy;
My tint2 systray is not working (as you know). I updated the package to 17.0.2-9 (mabox upgrade script ).
So far so good. But today, when I started my system:
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 takes all CPU
nm-applet, xfce4-notifyd, clipit, blueman, xfce4-power-manager also takes 90% CPU. (before all this begins, they were in systray). even pcmanfm -d do that.
Obviously, the system is slow. S-t (terminator) does not start.
In the same session, open TTY. check the issue with top. even exo-open (the terminal window from GUI) at >90% CPU.
pkill those culprits.
commented polkit and pcmanfm daemon in openbox’s autostart
disable those programmes in XDG editor.
Restart. tint2 is working (no systray). No hot CPU (reached >90º before). It looks/behave normal.
Enable programmes In XDG editor and restart: the issue reappears as described. Reboot and repeat those steps.
start nm-applet from terminal: icon appears in systray, normal cpu usage, working normally.
also clipit, blueman-applet, xfce4-power-manager appear in systray, normal CPU.
pcmanfm daemon still disabled.
Don’t know how to start xfce4-notifyd…
This is my situation right now. Fell free to show me what to do. Thanks!
Another way to narrow down = to disable all systray apps and only start nm-applet.
One app could trigger the issue.
The strange thing is the polkit.
Polkit has nothing to do with the systray, so if it’s also spiking, the root cause may be elsewhere than tint2 itself.
:$ journalctl -b -1 --no-pager | grep -E 'tint2|nm-applet|blueman|clipit|polkit|xfce4|pcmanfm' > ~/boot-bad.log
cat ~/boot-bad.log
may 09 22:59:23 rhuks-k53sv polkitd[536]: Started polkitd version 127
may 09 22:59:23 rhuks-k53sv polkitd[536]: Error compiling script /etc/polkit-1/rules.d/51-blueman.rules: SyntaxError: invalid regexp flags (line 1)
may 09 22:59:25 rhuks-k53sv dbus-broker-launch[597]: Service file '/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service' is not named after the D-Bus name 'org.freedesktop.Notifications'.
may 09 22:59:25 rhuks-k53sv dbus-broker-launch[597]: Service file '/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifyd.service' is not named after the D-Bus name 'org.xfce.Notifyd'.
may 09 23:07:27 rhuks-k53sv dbus-broker-launch[769]: Service file '/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service' is not named after the D-Bus name 'org.freedesktop.Notifications'.
may 09 23:07:27 rhuks-k53sv dbus-broker-launch[769]: Service file '/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifyd.service' is not named after the D-Bus name 'org.xfce.Notifyd'.
may 09 23:07:32 rhuks-k53sv xfce4-notifyd[1107]: Your sqlite library does not support OFFSET/LIMIT with DELETE; falling back to less-efficient deletion method
may 09 23:41:45 rhuks-k53sv NetworkManager[414]: <info> [1778380905.9994] agent-manager: agent[e7e31905bcbcd63e,:1.1079/org.freedesktop.nm-applet/1000]: agent registered
may 10 01:04:33 rhuks-k53sv systemd[514]: xfce4-notifyd.service: Main process exited, code=exited, status=1/FAILURE
may 10 01:04:33 rhuks-k53sv systemd[514]: xfce4-notifyd.service: Failed with result 'exit-code'.
may 10 01:04:33 rhuks-k53sv systemd[1]: polkit.service: Deactivated successfully.
may 10 01:04:33 rhuks-k53sv systemd[1]: polkit.service: Consumed 2.377s CPU time over 2h 5min 10.281s wall clock time, 7M memory peak.
may 10 01:04:34 rhuks-k53sv systemd[1]: polkit-agent-helper.socket: Deactivated successfully.
Not tidy, but it works:
:$ cat ~/.config/openbox/autostart
## Mabox Autostart File
##
##
##
## Note that global autostart .desktop files will also be in
## /etc/xdg/openbox/autostart. These will include applications
## such as the Network Manager and Parcellite
##
## Turn on/off system beep.
xset b off
## Resolution
## Set up LVDS1 (laptop) as PRIMARY with its own X screen
#xrandr --setmonitor "LVDS1-only" 1366/340x768/190+0+0 LVDS1
## Set up HDMI1 (external monitor) as a separate X screen
#xrandr --setmonitor "HDMI1-only" 1920/530x1080/300+1366+0 none
# Fallback config #
#xrandr --output VGA-1 --primary --mode 1600x900 --pos 0x0 --rotate normal
#xrandr --output VGA-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal
#xrandr --output LVDS1 --mode 1366x768 --rate 59.97
# Ajustando la resolución para dos monitores (Working!)
# (Laptop Rd/ HDMI1 Lu)
#xrandr --output LVDS1 --primary --mode 1366x768 --pos 1920x312 --rotate normal
#xrandr --output HDMI1 --mode 1920x1080 --pos 0x0 --rotate normal
# # # Laptop Left/down HDMI1 Right/Up
xrandr --output LVDS1 --primary --mode 1366x768 --pos 0x0 --rotate normal
xrandr --output HDMI1 --mode 1920x1080 --pos 1366x0 --rotate normal
#
# xrandr --output LVDS1 --mode 1366x768 --pos 0x0 --output HDMI1 --mode 1920x1080 --pos 1366x-312
## Disable unused outputs (optional)
xrandr --output DP1 --off --output VGA1 --off --output VIRTUAL1 --off
##### EOConfig###
#
## Copy Language files for Mabox - only for first run
#/usr/bin/mabox-langfiles &
## Set keyboard settings - 250 ms delay and 25 cps (characters per second) repeat rate.
## Adjust the values according to your preferances.
#xset r rate 250 25
# Alias Super key to Super+Space for single-key menu.
# See 'man xcape' for other possibilities.
#xcape -e 'Super_L=Super_L|space'
#/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
## Panel
(sleep 1s && mb-tint2-session) &
## Background
(sleep 2s && nitrogen --restore) &
## Optionally enable file manager in daemon mode for automounting
#(sleep 1s && pcmanfm -d) &
## Optionally disable touchpad
#/usr/bin/synclient TouchpadOff=1 &
## Funtional touchpad command
#(sleep 3s && /home/rhuks/bin/touchpad_switch.sh) &
(sleep 3s && /home/rhuks/bin/DS-touchpad-toggle.sh) &
## Mabox scripts - DO NOT DISABLE
(sleep 1s && mabox-obstart startopenbox) &
## XSETTINGS
(sleep 2 && xsettingsd) &
#export XDG_CONFIG_DIRS="/etc/xdg"
## Stalonetray
#(sleep 5 && stalonetray --dockapp-mode simple --grow-gravity E -bg "#333333") &
This is a StatusNotifierItem watcher from the Cinnamon/Budgie ecosystem — it doesn’t belong in an Openbox/tint2 setup and directly competes with tint2’s systray. Disable xapp-sn-watcher.desktop in your XDG autostart.
A few more things to clean up:
Disable pamac-tray-budgie.desktop — it’s a duplicate, pamac-tray is already running
Disable lxrandr-autostart.desktop — conflicts with the xrandr commands in your openbox autostart
Your XDG autostart fires ~20 apps all at once before tint2 is ready — adding small delays to the heavier systray apps would help
Small autostart fix:
The last line in your openbox autostart should not have &:
(sleep 2 && xsettingsd)
Start with the blueman fix — that alone might solve most of it.
Hi @muzqs
Thanks for your time to solve this (my) issue.
I’ve followed your instructions.
Before reboot, uncommented the polkit line in openbox’ autostart (just to test that).
After login, I hear the fan throttling, slow system. Check top in TTY, again the polkit process at 96% CPU.
pkill it.
Run again the log checker you provided in your previous response.
the compiling error for the blueman rule ¿is still there?
:$ journalctl -b -1 --no-pager | grep -E 'tint2|nm-applet|blueman|clipit|polkit|xfce4|pcmanfm' > ~/boot-bad.log
cat ~/boot-bad.log
may 11 11:31:01 rhuks-k53sv polkitd[545]: Started polkitd version 127
may 11 11:31:01 rhuks-k53sv polkitd[545]: Error compiling script /etc/polkit-1/rules.d/51-blueman.rules: SyntaxError: invalid regexp flags (line 1)
may 11 11:31:02 rhuks-k53sv dbus-broker-launch[607]: Service file '/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service' is not named after the D-Bus name 'org.freedesktop.Notifications'.
may 11 11:31:02 rhuks-k53sv dbus-broker-launch[607]: Service file '/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifyd.service' is not named after the D-Bus name 'org.xfce.Notifyd'.
may 11 13:00:12 rhuks-k53sv dbus-broker-launch[861]: Service file '/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service' is not named after the D-Bus name 'org.freedesktop.Notifications'.
may 11 13:00:12 rhuks-k53sv dbus-broker-launch[861]: Service file '/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifyd.service' is not named after the D-Bus name 'org.xfce.Notifyd'.
may 11 13:00:17 rhuks-k53sv xfce4-notifyd[1211]: Your sqlite library does not support OFFSET/LIMIT with DELETE; falling back to less-efficient deletion method
may 11 13:09:26 rhuks-k53sv sudo[9710]: rhuks : TTY=pts/0 ; PWD=/home/rhuks ; USER=root ; COMMAND=/usr/bin/rm /etc/polkit-1/rules.d/51-blueman.rules
may 11 13:09:36 rhuks-k53sv sudo[9847]: rhuks : TTY=pts/0 ; PWD=/home/rhuks ; USER=root ; COMMAND=/usr/bin/pacman -S blueman
may 11 13:09:40 rhuks-k53sv dbus-broker-launch[861]: Service file '/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service' is not named after the D-Bus name 'org.freedesktop.Notifications'.
may 11 13:09:40 rhuks-k53sv dbus-broker-launch[861]: Service file '/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifyd.service' is not named after the D-Bus name 'org.xfce.Notifyd'.
may 11 13:09:40 rhuks-k53sv dbus-broker-launch[861]: Service file '/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service' is not named after the D-Bus name 'org.freedesktop.Notifications'.
may 11 13:09:40 rhuks-k53sv dbus-broker-launch[861]: Service file '/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifyd.service' is not named after the D-Bus name 'org.xfce.Notifyd'.
may 11 13:11:27 rhuks-k53sv systemd[524]: xfce4-notifyd.service: Main process exited, code=exited, status=1/FAILURE
may 11 13:11:27 rhuks-k53sv systemd[524]: xfce4-notifyd.service: Failed with result 'exit-code'.
may 11 13:11:27 rhuks-k53sv systemd[1]: polkit.service: Deactivated successfully.
may 11 13:11:28 rhuks-k53sv systemd[1]: polkit-agent-helper.socket: Deactivated successfully.
List the directory /etc/polkit-1/rules.d : permission denied.
sudo ls: empty directory.
I’m still curious; run blueman-applet from terminal: icon working in tint2 systray.
In other time, I would do a fresh install and forget all this, but now, I prefer to guide my patience looking for a solution, if possible.
normal login; lower RAM usage! (this was not an issue/concern, but cool)
tint2 systray with icons working.
system working as always…
but programmes depending of polkit (remember, I disable it from openbox autostart), i.e: pamac, can not work properly for authentication. (not a big deal, pacman do the job)
picom is still enabled from XDG, but doesn’t start at login. S-p keybind and it start/stop at will (could added it to openbox autostart; I missed that) But I think that’s a symptom of something.
So if I understand tint2 is fine now. But issue with polkit.
The authentication (polkit) sounds like a new topic (issue).
Background fyi:
For me, maybe some years ago I found that .desktop autostart did’t work always for me. So I moved most of the applications to the autostart file.
But in theory the .desktop autostarts should work fine.
When editing the autostart file I looked at when which application starts.
If you have polkit issues and need to look at, a new topic helps others with the same issue in the future. Easier to find.
Yes please use as inspiration.
I am still moving stuff around when i see the boot is not yet right. Or think this could be better. I use this setup for a month or 2 now.
I prefer managing autostart via the Openbox autostart file rather than the autostart GUI. For apps like Surfshark and Vorta that have their own built-in launch at startup or start in systray option, I disable that — and handle it from the autostart file instead. Also worth a double check for duplicate .desktop entries, since conflicts can cause logout/login issues.
That said, this is personal preference — using the autostart GUI with .desktop entries works just as well, as long as there are no duplicates between the two.
Hello, @muzqs
This is not to bring to life a solved post, but I think this post could “explain?” what happened to my system regarding tint2 and the polkit issue:
Yes, the tint2 issue was solved, but I think there were a lot of things happenning at the same time, and I felt my system was not working as I intended , why to comment polkit in OB autostart? There were other programmes affected for that, and, in my mind, it broke the robustness of Mabox in my machine.
So I decided to apply a fresh OS re-install. It works out the box (Thanks for this project, @napcok).
After the mandatory upgrades, I try to replicate my old desktop (not heavily custom, but I used it from almost for 2 years, so a lot of habits). The system was working well until I set my old tint2 config (copied the config file into the tint2 directory, set it with mabox tools).
Reboot… CPU 99% each: polkit, nm-applet, clipit, blueman-applet, xfce4-notify and xfce-power-manager.
Second re-install (because I didn’t want to tinkering). And here we are: all is working as good as always, with my customizations but not with that old tint2 config file. I don’t want to test it again, but I think something is wrong with my old tint2 file, not with polkit or anything else.