[SOLVED] SlackARM 14.2 SF and Current - hp-systray and pulseaudio EQ - qpaeq crashing - both written in Python
Slackware - ARMThis forum is for the discussion of Slackware ARM.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
SlackARM 14.2 SF and Current - hp-systray and pulseaudio EQ - qpaeq crashing - both written in Python
Hello,
I've been trying to tune the sound of a Raspberry Pi 2 and give it a little more volume in the lower freq range for almost 2 years now. There is a python script Equalizer that comes with pulseaudio, needs X and is called:
/usr/bin/qpaeq
Every time I launch it (even with root privs) it builds up in memory, fills it up and crashes the system. I even uninstalled the official pulseaudio and compiled my own version, installed the necessary sinks and ended with the same result.
This python written EQ runs well under Slackware 14.2 X86.
<EDIT: hp-systray close and not disable>
Lately I found the hp-systray is also crashing if I close it and restart X (xfce). This hp-systray while useful for people who have printers attached to their arm devices (!?), is also written in python.
Here's how both of the described processes are progressively eating up the memory:
20 0 263M 216M 30456 R 100. 29.5 1:24.95 python /usr/bin/qpaeq
20 0 102M 49432 35348 R 100. 6.6 2:24.25 python /usr/bin/hp-systray -x
Should I recompile python / use another version? Is anybody else experiencing the same behavior?
Thanks!
Last edited by abga; 09-10-2017 at 04:15 PM.
Reason: missguidance: hp-systray close and not disable
I already did that but was more focusing on qpaeq. Strace shows tons of themes and icons that qpaeq looks after and doesn't find in /usr/share/ and finally I get this repeating while filling up the memory:
I also tried the python debugger and after ending up in main() - last step of the program execution, I wasn't receiving any info while the memory was still filling up:
python -m pdb /usr/bin/qpaeq
Looking at the qpaeq script I learned that it uses PyQt4 and checked the consistency of the packages between Slackware x86 and ARM. Everything looks in place and consistent. I'm thinking now to run it under KDE (an overkill for the Raspberry Pi2) considering that it might have something to do with the limited xfce environment. Under xfce the qpaeq window appears but it's empty, no buttons, no menus and it's unresponsive, I need to kill it with xkill if I leave it too much "loading".
hp-systray ran ok until I closed it and exited X (xfce). Then, the next time I started X, I saw it eating up memory, not that fast as qpaeq but still. I don't want to link them together yet, I don't usually use X on ARM, but only when I need something special like qpaeq. It's just that I got them together having fun with my RAM and I'll try to reproduce hp-systray separately.
I've got some time to play again with hp-systray and qpaeq, learning that hp-systray is actually OK.
hp-systray while launched by the X startup scripts eats quite a lot of RAM - 49MB RES and 102MB VIRT, and if closed and manually launched from the xfce menu then it's only taking up 10MB RES and 25MB VIRT:
/usr/bin/qpaeq is still crashing (gradually eating up the entire RAM) under xfce and unfortunately I was not able to launch kde under Slack ARM current on Raspberry Pi2B. I gave kde enough resources 256MB-VideoRAM, 700MB-SystemRAM and 8GB free space in /, /tmp and /var/tmp
kde loads and gets stuck while showing the last element of the "splash screen" - the K labeled gear symbol. Xorg.0.log doesn't show anything extraordinary and while investigating I found akonadi and its mysql sessions active apparently busy configuring some E-Mail account(s) - using 5% CPU once in a while
In /home/user-name/.local/share/akonadi I've found akonadi_control.error with the following content:
Executable "akonadi_nepomuk_feeder" for agent "akonadi_nepomuk_feeder" could not be found!
Executable "akonadi_folderarchive_agent" for agent "akonadi_folderarchive_agent" could not be found!
I repeatedly tried to start kde clean (suspecting some corruption) by deleting /home/user-name/.kde/ , /home/user-name/.local/share/akonadi and /var/tmp/username-kde-cache and failed in all my attempts.
I'm pretty much stuck right now and have no alternative to tune pulse audio EQ without its only frontend /usr/bin/qpaeq
qpaeq looks unsupported (dumped) ATM and there was a change in the file format of the pulse audio EQ sink configuration files in the pulseaudio version 6-7-8 ??, where a wise developer considered to change the clear text (human readable) file format into some database (cryptic) format. Perfect professional approach, over-complication and then dumping.
I got very happy when I saw the last bunch of updates (29-30-sep-2017)on Slack ARM current and considered that my qpaeq issue might get resolved after applying them. Well, it just got simplified now
Code:
/usr/bin/qpaeq
There was an error importing needed libraries
Make sure you have qt4 and dbus-python installed
The error that occured was:
No module named dbus.mainloop.qt
@drmozes - was this module deliberately excluded from the build?
Pulseaudio 11.1 looks also to not like stereo, but only mono, on a Raspberry Pi2B. The sound output however is stereo (tested it with both aplay and kodi):
Code:
# pactl list short sink-inputs
0 0 - module-equalizer-sink.c float32le 1ch 44100Hz
Code:
# pactl list short sinks
0 alsa_output.0.analog-mono module-alsa-card.c s16le 1ch 44100Hz SUSPENDED
1 alsa_output.0.analog-mono.equalizer module-equalizer-sink.c float32le 1ch 44100Hz SUSPENDED
I've uninstalled the pulseaudio 11 official package, compiled myself pulseaudio 11 from the official sources and experienced the same output:analog-mono - only. Then I took the official sources from pulseaudio 10, compiled them and everything is stereo now - as expected.
@drmozes
Sorry to bother you again, can you please provide some clues about the missing "No module named dbus.mainloop.qt" referenced in the last post?
The new packages:
dbus-python-1.2.4-arm-4
PyQt-4.12.1-arm-2
restored the functionality of qpaeq, actually the non-functionality as it still hangs eating the RAM.
Worth to mention, although off-topic, that the last bunch of updates (Nov 24) broke some things on my Pi2 ARM Slack 14.2 HF - current testbed, specifically:
- I lost libpcre2-8.so.0 - /usr/bin/xfce4-terminal was looking after it and I needed to install pcre2-10.30-arm-1 from the extra packs
- then I lost /bin/hostname (I almost took it personal ) - had to install hostname-3.18-arm-1
- and just noticed that /usr/bin/gpg-agent is looking after libnpth.so.0, but I won't fix this, I'm really happy I don't have a session of gpg-agent stuck running after every launch of xfce
Back to the original problem, qpaeq, I spent some time this evening and got it working on a Pi0 running Slack ARM 14.2 SF. I found out that in my previous attempts I forgot to enable the necessary equalizer modules in /etc/pulse/default.pa
Before doig this qpaeq had the same behavior, loading and eating the RAM. Now it's all fine, working and saving the settings. Screenshot: A-Slack-ARM-14-2-SF.jpg
Not the same success on Slack ARM 14.2 HF current, unfortunatelly. Screenshot: B-Slack-ARM-14-2-HF-current.jpg
I thought that pulseaudio might be the issue, so I've uninstalled my pulseaudio-10 (I'm still not using the "broken" (mono-only) official pulseaudio-11.1) and compiled & installed pulseaudio-9 just to be on the same version with Slack ARM 14.2 SF. This didn't solve anything and I'm still getting the same alsa-sink related messages as I've always got before with both the official pulseaudio-10 & 11. Might be an ALSA issue.
Code:
Nov 25 23:08:50 test-pi2 pulseaudio[7352]: [pulseaudio] module-equalizer-sink.c: module-equalizer-sink is currently unsupported, and can sometimes cause PulseAudio crashes, increased latency or audible artifacts.
Nov 25 23:08:50 test-pi2 pulseaudio[7352]: [pulseaudio] module-equalizer-sink.c: If you're facing audio problems, try unloading this module as a potential workaround.
Nov 25 23:08:50 test-pi2 pulseaudio[7352]: [pulseaudio] module-equalizer-sink.c: No resume state
Nov 25 23:08:50 test-pi2 pulseaudio[7352]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Nov 25 23:08:50 test-pi2 pulseaudio[7352]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Nov 25 23:08:50 test-pi2 pulseaudio[7352]: [alsa-sink-bcm2835 ALSA] alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write.
Nov 25 23:08:50 test-pi2 pulseaudio[7352]: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Most likely this is a bug in the ALSA driver '(null)'. Please report this issue to the ALSA developers.
Nov 25 23:08:50 test-pi2 pulseaudio[7352]: [alsa-sink-bcm2835 ALSA] alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.
While investigating the behavior of the hanging qpaeq I've noticed some Python-DBus related messages in the console where I started Xfce (sorry for the bad formatting - copy/paste on console-mcedit):
Code:
/usr/bin/startxfce4: X server already running on display :0
/usr/bin/gpg-agent: error while loading shared libraries: libnpth.so.0: cannot open shared object file: No such file or directory
(xfce4-session:6782): xfce4-session-WARNING **: gpg-agent returned no PID in the variables
(xfwm4:6789): xfwm4-WARNING **: Error opening /dev/dri/card0: No such file or directory
Error creating proxy: Error calling StartServiceByName for org.gtk.vfs.UDisks2VolumeMonitor: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gtk.vfs.UDisks
(nm-applet:6805): nm-applet-WARNING **: NetworkManager is not running
blueman-applet version 2.0.5 starting
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/dbus/bus.py", line 175, in activate_name_owner
return self.get_name_owner(bus_name)
File "/usr/lib/python3.6/site-packages/dbus/bus.py", line 361, in get_name_owner
's', (bus_name,), **keywords)
File "/usr/lib/python3.6/site-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.bluez': no such name
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/blueman-applet", line 121, in <module>
BluemanApplet()
File "/usr/bin/blueman-applet", line 63, in __init__
self.Plugins.Load()
File "/usr/lib/python3.6/site-packages/blueman/main/PluginManager.py", line 90, in Load
__import__(self.module_path.__name__ + ".%s" % plugin, None, None, [])
File "/usr/lib/python3.6/site-packages/blueman/plugins/applet/AuthAgent.py", line 9, in <module>
import blueman.main.applet.BluezAgent as BluezAgent
File "/usr/lib/python3.6/site-packages/blueman/main/applet/BluezAgent.py", line 23, in <module>
from blueman.bluez.Agent import Agent, AgentMethod
File "/usr/lib/python3.6/site-packages/blueman/bluez/Agent.py", line 48, in <module>
class Agent(dbus.service.Object):
File "/usr/lib/python3.6/site-packages/blueman/bluez/Agent.py", line 56, in Agent @AgentMethod
File "/usr/lib/python3.6/site-packages/blueman/bluez/Agent.py", line 38, in AgentMethod
if BlueZInterface.get_interface_version()[0] < 5:
File "/usr/lib/python3.6/site-packages/blueman/bluez/BlueZInterface.py", line 16, in get_interface_version
obj = dbus.SystemBus().get_object('org.bluez', '/')
File "/usr/lib/python3.6/site-packages/dbus/bus.py", line 241, in get_object
follow_name_owner_changes=follow_name_owner_changes)
File "/usr/lib/python3.6/site-packages/dbus/proxies.py", line 248, in __init__
self._named_service = conn.activate_name_owner(bus_name)
File "/usr/lib/python3.6/site-packages/dbus/bus.py", line 180, in activate_name_owner
self.start_service_by_name(bus_name)
File "/usr/lib/python3.6/site-packages/dbus/bus.py", line 278, in start_service_by_name
'su', (bus_name, flags)))
File "/usr/lib/python3.6/site-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
Now that I've excluded pulseaudio, I might need to focus on alsa (same configuration as on Slack ARM 14.2 SF, BTW), Python and eventually D-Bus, maybe bring (compile) them all back to the versions found in Slack ARM 14.2 SF.
I'm also considering to tune the equalizer on Slack ARM 14.2 SF and move the resulted conf files on current, but there are cookies, unique IDs & such, like pulseaudio will be used in a 500 sound cards with 1000 volume/equalizer profiles scenario, not to mention that XML was not sufficient, it had to be all cryptic now. Development driven by boredom - might send Monsieur Poettering a love mail
Worth to mention, although off-topic, that the last bunch of updates (Nov 24) broke some things on my Pi2 ARM Slack 14.2 HF - current testbed, specifically:
- I lost libpcre2-8.so.0 - /usr/bin/xfce4-terminal was looking after it and I needed to install pcre2-10.30-arm-1 from the extra packs
- then I lost /bin/hostname (I almost took it personal ) - had to install hostname-3.18-arm-1
- and just noticed that /usr/bin/gpg-agent is looking after libnpth.so.0, but I won't fix this, I'm really happy I don't have a session of gpg-agent stuck running after every launch of xfce
None of these problems exist on a fresh installation of -current.
Quote:
Code:
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.bluez': no such name
That happens on x86 too, so I'm not concerned.
I don't have a machine that has working sound support, so I can't test any of the audio stack.
hp-systray works fine, no matter how many times I quit xfce and restart.
You might want to reinstall your machine. If you were using a tool to update, I'd recommend doing it manually and reading the change log.
None of these problems exist on a fresh installation of -current.
I'm sure they don't.
On the Python-DBus messages (sorry for not reformatting the log), disregarding the common Bluez related errors, at the end of the log you'll get some other errors that are not related to Bluez and might be related to qpaeq instead, specifically:
Code:
File "/usr/lib/python3.6/site-packages/dbus/bus.py", line 241, in get_object
follow_name_owner_changes=follow_name_owner_changes)
File "/usr/lib/python3.6/site-packages/dbus/proxies.py", line 248, in __init__
self._named_service = conn.activate_name_owner(bus_name)
File "/usr/lib/python3.6/site-packages/dbus/bus.py", line 180, in activate_name_owner
self.start_service_by_name(bus_name)
File "/usr/lib/python3.6/site-packages/dbus/bus.py", line 278, in start_service_by_name
'su', (bus_name, flags)))
File "/usr/lib/python3.6/site-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
Quote:
hp-systray works fine, no matter how many times I quit xfce and restart.
I confirmed that in a post above and apologize again for my mistake in linking hp-systray with qpaeq. Worth rereading the post because there were some differences in RAM usage depending how hp-systray was launched: https://www.linuxquestions.org/quest...2/#post5762840
Quote:
You might want to reinstall your machine. If you were using a tool to update, I'd recommend doing it manually and reading the change log.
Reinstalling a Linux happens only with version updates, otherwise I'd use Redmond. Now, I don't have any pretensions on current - it's in a beta stage, but I haven't had any substantial breaks/glitches until now. I do take full SDCard binary snapshots (with accumulated official updates) every month or so and start fresh before every major new update (many packages) or if I messed the system too much with my "studies". On installation I'm not messing around with the system but only changing some conf files from /etc - mainly network/system optimization related. I don't use any other tool to update Slackware other than the official slackpkg.
While this thread shows some interest - almost 1k visits, due to the lack of inputs it looks like nobody really cares about improving their analogue sound on ARM devices and I start to feel "lonely" in this. It's only drmozes that tries to help and I fear that I'm keeping him busy with things nobody really cares about. Therefore I'll close this thread - put it on RESOLVED and maybe start a new thread with a guide to make the Equalizer work in case I'll succeed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.