You are not logged in.
OK, so that memory leak seemed to be caused specifically be the `start-pulseaudio-x11` command.
By its use of xprop, which I don't see in the code you quoted in fact. Here's what I have in my BL system:
john@bunsen1:~$ cat /usr/bin/start-pulseaudio-x11
#!/bin/sh
#(header)
set -e
# check if pulseaudio has already been started by someone else
if /usr/bin/pulseaudio --check; then
EXIT_WITH_X_SESSION=no
else
EXIT_WITH_X_SESSION=yes
/usr/bin/pulseaudio --start "$@"
fi
if [ x"$DISPLAY" != x ] ; then
/usr/bin/pactl load-module module-x11-publish "display=$DISPLAY" > /dev/null
/usr/bin/pactl load-module module-x11-cork-request "display=$DISPLAY" > /dev/null
if [ x"$SESSION_MANAGER" != x ] ; then
/usr/bin/pactl load-module module-x11-xsmp "display=$DISPLAY session_manager=$SESSION_MANAGER" > /dev/null
fi
fi
# fork and wait for X-session to end, then quit pulseaudio
if [ "$EXIT_WITH_X_SESSION" = yes ]; then
/usr/bin/xprop -root -spy > /dev/null 2>&1 || true
/usr/bin/pulseaudio --kill
fi &
There's nothing stopping us from using a custom version, with for example a modified xprop command '/usr/bin/xprop -root -spy WM_____ > /dev/null 2>&1 || true' as posted here: https://bugs.debian.org/cgi-bin/bugrepo … =765828#30
About the pulse modules that get loaded, I have no idea how important they are:
https://www.freedesktop.org/wiki/Softwa … #index31h3
Can anyone comment on that?
Would using `pulseaudio --start` cause any problems?
It seems clear that it might cause problems for some people in some situations; let's hold that option as a last resort.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Debian Stable has the virtue that, while packages might be old, for the duration of the release you can count on their behavior not changing much. You can ship scripts and config files that won't need constant updating.
So, if it has no major issues (I'm presuming the Debian devs saw to that) I'd vote for staying with pulseaudio 5 by default. We could offer users the option of upgrading if it was found to fix certain problems.
Agreed. We've been successful staying with stable OOTB so far and we keep discovering (inventing!) workarounds, let's keep that up.
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
By its use of xprop, which I don't see in the code you quoted in fact.
Yes, that /usr/bin/start-pulseauduio-x11 was from my Arch system.
Looks like that fork stanza has been removed in the upstream package.
Offline
Yes, that /usr/bin/start-pulseauduio-x11 was from my Arch system.
Looks like that fork stanza has been removed in the upstream package.
Not only the fork at the end to kill PA after X exits, but also the command to launch PA is missing! The code you posted from Arch is identical to what comes in PA7 (jessie backports) and PA9 (Sid), except that the line to load module-x11-cork-request is commented out in Arch.
I can't see how that version of start-pulseauduio-x11 actually starts PA to be honest. I guess I'll have to upgrade PA on a Jessie VM and see what it does. The .desktop files in 7 & 9 still call start-pulseauduio-x11 as before. Maybe calling /usr/bin/pactl load-module starts up PA if it isn't running? So pulseaudio --start isn't needed?
Quick check PA5/Jessie:
john@bunsen1:~$ pgrep -a pulse
1373 /usr/bin/pulseaudio --start
1383 /bin/sh /usr/bin/start-pulseaudio-x11
john@bunsen1:~$ pulseaudio --kill
john@bunsen1:~$ pgrep -a pulse
1383 /bin/sh /usr/bin/start-pulseaudio-x11
john@bunsen1:~$ /usr/bin/pactl load-module module-x11-publish "display=$DISPLAY"
20
john@bunsen1:~$ pgrep -a pulse
1383 /bin/sh /usr/bin/start-pulseaudio-x11
14208 /usr/bin/pulseaudio --start --log-target=syslog
So PA gets started with that extra --log-target argument.
Anyway... using a backported version of a central app like PA might bring in some quite different annoyances. I'd really prefer to stay with stable if possible.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
^ Overriding /etc/xdg/pulseaudio.desktop and using start-pulseaudio-x11 and then starting volumeicon WFM perfectly. My understanding was that it's the module, pulseaudio-module-x11, that was reported to cause the memory leak, which is why I left it out of BunsenLabs. start-pulseaudio-x11 is the same command the desktop file uses. Tint2 can be killed and sound happily playes along and keyboard volume keys still work as long as volumeicon's been started, volumeicon pops up if another systray loads.
I built some test ISOs and was still having problems getting tint2 to load consistentantly when running BL live. I found this (first response)...
https://gitlab.com/o9000/tint2/issues/494
Starting compton/tint2 like so loads the desktop correctly for me every single time...
## SETTINGS START
## Turn on/off system beep.
xset b off
## 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
## Add keyboard mapping.
#xmodmap -e "keysym Insert = Multi_key"
## NEW
## Disable CapsLK
setxkbmap -option ctrl:nocaps
## Configure touchpad. See 'man synaptics' for more info.
synclient VertEdgeScroll=1 HorizEdgeScroll=1 TapButton1=1 2>/dev/null
## NEW
## Disable touchpad while typing
syndaemon -i .5 -K -t -R -d &
## SETTINGS END
## GNOME PolicyKit authentication
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 &
## Set a wallpaper
nitrogen --restore
## Compton
bl-compositor --start
## Start the tint2 session (the default tint2 will run if no sessions have been set)
sleep 2 ##1 is less sleep, 3 is more
bl-tint2-session
## Start the Conky session (the default conkyrc will run if no sessions have been set)
bl-conky-session --autostart &
## Battery meter for systray
fdpowermon &
## Start Clipboard manager
clipit &
## PulseAudio
start-pulseaudio-x11
## Volume control for systray
(sleep 2; volumeicon) &
## bl-welcome - post-installation script, will not run in a live session and
## only runs once. Safe to remove.
(sleep 10; bl-welcome --firstrun) &
The tint2 autostart edit is due to an issue I'm about to raise in this forum...
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
^ Overriding /etc/xdg/pulseaudio.desktop and using start-pulseaudio-x11 and then starting volumeicon WFM perfectly.
Excellent! *rubs hands together maniacally*
Independent confirmation also from @sexynsmartjenny here:
https://forums.bunsenlabs.org/viewtopic … 753#p32753
My understanding was that it's the module, pulseaudio-module-x11, that was reported to cause the memory leak
No, it was the `xprop` command -- I tried this briefly and it does appear to be slightly leaky but I haven't bothered with Valgrind or anything.
As johnraff has pointed out, this bug is already present and "active" in BunsenLabs with no complaints so far...
Offline
was still having problems getting tint2 to load consistentantly when running BL live. I found this (first response)...
https://gitlab.com/o9000/tint2/issues/494
It would be a pity to have to go back to the subshell-with-sleep for tint2, but maybe there's no other way to ensure that compton is fully up and running when tint2 is started. Perhaps just drop a sleep in the main script? It would hold everything else up by the same time of course.
bl-compositor --start
sleep 2 # are 2 seconds needed? 1 enough?
bl-tint2-session # no ampersand
So, it also looks as if tint2 may not enjoy having compositing restarted while it's running.
At the time bl-tint2-restart was written, a restart of compositing seemed to be needed after restarting tint2. @damo any ideas?
Maybe we should reverse it: put a tint2 restart (only if tint2 is running) in bl-compositor's --restart code, and take the compositor restart out of bl-tint2-restart? I've just done this at home and we'll see how it goes...
btw about compton, I noticed today that it has a -b option to daemonize it into the background, which is what we want. Using that in bl-compositor would let us drop the fork-off ampersand after its compton launch command. It doesn't help the loss of transparency I got in the dropbox icon after restarting composition, but it feels cleaner. It would be nice if 'compton -b' didn't return till the compositor was running. I suppose we could put a pgrep test in autostart for compton to hold the script till it was up.
EDIT Actually it looks as if 'compton -b' might be OK. Little test:
john@bunsen1:~$ killall compton
john@bunsen1:~$ compton -b --vsync opengl;pgrep compton && echo UP
6534
UP
@hhh could you try either editing your bl-compositor to add -b on line 32: EXECXCOMP='compton -b' and remove the ampersand after $EXECXCOMP on line 62, or else just try substituting the compton line in autostart like this:
compton -b --vsync opengl #drop the vsync if you don't use it
bl-tint2-session
and see if tint2 starts up OK. If it works then we can tweak bl-compositor accordingly.
Last edited by johnraff (2016-07-19 10:11:47)
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
I've gone over this again on my desktop (nvidia graphics):
Restarting the compositor causes artifacts and/or loss of transparency with the Dropbox icon in the systray
'bl-tint2restart': works fine, with 'bl-compositor --restart' commented out
'bl-tint2-session': works fine, with 'bl-compositor --restart' commented out
The only difference I see between the way the tint2 scripts work is that 'bl-tint2restart' uses 'kill -KILL "$pid"', while 'bl-tint2-session' uses 'kill "$pid"'. Curiously, when I used '-KILL' in 'bl-tint2-session' I lost all the systray icons except dropbox, and need to log out/in to restore them all. (Merely restarting tint2 didn't work).
To summarize: don't restart the compositor after restarting tint2 (on my system at least), if running Dropbox!
I haven't tried the compositor tweaks yet ^
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
OK, I've used the 'compton -b' setting, but I still get the dropbox icon issues when 'bl-compositor --restart' is used in 'bl-tint2-session' or 'bl-tint2restart'.
On my system, I'm not going to restart compton after restarting tint2.
EDIT: Guess what, no problems using the backports tint2 (0.12.11~bl1+ee9207e8-1.1), on both laptop+intel and desktop+nvidia
Last edited by damo (2016-07-19 09:59:54)
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
The compton -b was suggested for making sure tint2 starts OK in autostart. Restarting compositing still messes up tint2 (the Jessie version).
I suggest removing the compositing restart from bl-tint2-restart and adding a tint2 restart to bl-compositor --restart. That seems to work here.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Is all this due to a specific issue with Dropbox? I notice that the backports tint2 outputs information in the terminal, including
Systray composited rendering on
...
tint2 : systray started
add_icon: 46138064 (clipit), pid 2817, visual 0xe8d610, colormap 46138063, depth 32, width 18, height 18
add_icon: 27263834 (volumeicon), pid 2814, visual 0xe8d610, colormap 27263833, depth 32, width 18, height 18
add_icon: 48234569 (), pid 3002, visual 0xe8d610, colormap 48234570, depth 32, width 20, height 20
add_icon: 25166100 (NetworkManager Applet), pid 2856, visual 0xe8d610, colormap 25165831, depth 32, width 16, height 16
The dropbox icon is not identified by name like the others, but the backports tint2 copes with rendering it in a way a compositor restart can handle, but the jessie version doesn't, it would seem. Or am I wandering off in the wrong direction? 8o
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
I opened the tint2 thread for tint2 discussion, doodz! Anyway, simply commenting out...
#sleep 1
#bl-compositor --restart # restart compositor
... in bl-tint2-restart and the same without sleep in bl-tint2-session WFM and get's rid of the flashing/flickering I was seeing.
@damo, not just dropbox, all icons with transparency (volti, volumeicon, nm-applet wireless, etc...) Also related to icon "artifacts" we get reports of? Confirmed the transparency works with out tint2 backport, but not restarting compton WFM with jessie's tint2.
@johnraff,
bl-compositor --start
sleep 2 # are 2 seconds needed? 1 enough?
bl-tint2-session # no ampersand
Perfect. 1 second works for me on reboot, but I won't know till later about live-boot.
These edits in autostart and removing the compositor restart from our tint2 scripts solves everything for me. So much better!
Updated my last autostart post... https://forums.bunsenlabs.org/viewtopic … 850#p32850
Last edited by hhh (2016-07-19 20:33:01)
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
Sorry, not too much time to read the whole thread, kinda busy but wanted to leave a parachute comment -
Is there a way to script a test to see whether the compositor is fully started, and make the tint2 startup dependent on that? Using arbitrary sleep values in our startup script feels like something we could programmatically replace with simple (yet robust) testing.
Offline
Sorry, not too much time to read the whole thread, kinda busy but wanted to leave a parachute comment -
Is there a way to script a test to see whether the compositor is fully started, and make the tint2 startup dependent on that? Using arbitrary sleep values in our startup script feels like something we could programmatically replace with simple (yet robust) testing.
Open another thread please. A second or two delay is nothing. Look at GNOME and Plasma start times.
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
@hhh could you try either editing your bl-compositor to add -b on line 32: EXECXCOMP='compton -b' and remove the ampersand after $EXECXCOMP on line 62, or else just try substituting the compton line in autostart like this:
compton -b --vsync opengl #drop the vsync if you don't use it bl-tint2-session
and see if tint2 starts up OK. If it works then we can tweak bl-compositor accordingly.
@hhh could you check this out? I have a suspicion that 'compton -b' might not return till compton is up and ready for business. If that's the case then we won't need any sleep at all. (It's working OK here atm.)
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
## Eyecandy
#bl-compositor --start
compton -b
## Start the tint2 session (the default tint2 will run if no sessions have been set)
#sleep 1
bl-tint2-session
Smooth as silk. I'm still giving volumeicon a 2 second sleep time. I'll test with less now...
No problems with zero sleep on volumeicon now. I don't see any change in compton with the vsync switch on my Thinkpad/Intel video.
My current autostart...
## Turn on/off system beep.
xset b off
## 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
## Add keyboard mapping.
#xmodmap -e "keysym Insert = Multi_key"
## Disable CapsLK
setxkbmap -option ctrl:nocaps
## Configure touchpad. See 'man synaptics' for more info.
synclient VertEdgeScroll=1 HorizEdgeScroll=1 TapButton1=1 2>/dev/null
## Disable touchpad while typing
syndaemon -i .5 -K -t -R -d &
## GNOME PolicyKit authentication
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 &
## Set a wallpaper
nitrogen --restore
## Eyecandy (See 'man compton' for available options)
#bl-compositor --start
compton -b
## Start the tint2 session (the default tint2 will run if no sessions have been set)
#sleep 1
bl-tint2-session
## Start the Conky session (the default conkyrc will run if no sessions have been set)
bl-conky-session --autostart &
## Battery meter for systray
#fdpowermon &
## Start Clipboard manager
#clipit &
## PulseAudio
start-pulseaudio-x11
## Volume control for systray
volumeicon &
## bl-welcome - post-installation script, will not run in a live session and
## only runs once. Safe to remove.
(sleep 10; bl-welcome --firstrun) &
I'll let you know what happen in Live build when I have an ISO built, which should be in the next few days at the latest.
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
synclient and syndaemon are meaningless for desktop users without touchpads. While synclient is just a quick config, syndaemon is another daemon. Should we comment those out by default, or add comments saying that desktop users can comment them out?
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Either/or is fine by me. Power manager is somewhat useless for home/tower users, too. Whatever you say, really. I'm sure we're talking about a tiny bit of RAM. Everyone? Anyone?
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline
xfce4-power-manager shouldn't be in openbox/autostart anyway - it gets XDG-started. It has some functions for desktop users, but nothing drastically important.
synclient and syndaemon - I'm OK either way, too.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Leave them in, then, until somewhat reports a problem with either, don't you think?
Loving the new autostart. I think that's going to push things over the edge, I want BL for my main desktop. Close to idle 100MB RAM on 32 bit, and very impressive features, too. Broadcom, ffs.
Trying a live build. Don't expect any early feedback, my Internet has been leaking like a sieve. 3 out of 5 builds on-average failed for me in the last few days.
No, he can't sleep on the floor. What do you think I'm yelling for?!!!
Offline