Comment 5 for bug 528798

OMS (oms-ubun) wrote :

The problem is not specific to Ubuntu. Symptoms (on a non-Ubuntu installation) here: constant delay of ca. 8 seconds between clicking on popup / pulldown menu entries and appearance of popup menus. Same delay when closing or browsing horizontally from one pulldown menu to another one. Only popup menus seem affected; most popup windows / dialogs or simple button actions are not. It's noteworthy that in these ca. 8 seconds of delay Firefox pauses completely. That is, it doesn't compute anything at 100% CPU but rather waits constantly at 0% CPU usage!

The problem exists even in (today's) latest Firefox 36 and when being started in safe mode, that is, all plugins disabled! I even tried a brand new manual installation of Firefox and deleted all data in its home directry: problem persists! There are reports that Thunderbird may suffer from the same problem. So it may not be a problem specific to Firefox but to the XUL implementation in general.

After some investigation I found the cause, at least here: it's neither a missing localhost entry in /etc/hosts nor a disabled loopback ( device nor DNS lookup problems or something like that. Instead, it's the PulseAudio daemon! Some sort of interaction between Firefox and PulseAudio seems to go astray when triggering popup menus.

Solution: disable PulseAudio before starting Firefox. In my case, renaming /usr/bin/pulseaudio to /usr/bin/pulseaudio~ (or similar) is sufficient. After that the delays are completely gone. CAUTION: this has to be done while Firefox is not running! Otherwise, at least here, Firefox immediately locks up totally and has to be SIGKILLed and restarted. Whether it's Firefox or PulseAudio daemon who is to be blamed of behaving erroneously is beyond my findings.

However, since this problem seems not to occur everywhere I suppose some special configuration settings, likely of the PulseAudio daemon, being involved in the problem. I haven't figured out that in detail yet. However, I use nonstandard SHM size of just 1 MB and daemon exit-idle-time of -1 (stay alive) and have connected my PulseAudio to a JackAudio server.