11

After I log in to my Ubuntu 14.04 desktop, I see my desktop background for approximately 20 seconds before the actual Unity desktop loads. I installed bootchart and that suggests that the problem is that pactl is being called and taking a long time to do something, and that the main desktop startup is blocked on that:

enter image description here

How can I identify where this pactl call is, and why it might be taking a long time?

Logs from pulseaudio startup are at: http://kryogenix.org/random/pulseverbose/.

  • try to comment out the string "Exec=start-pulseaudio-x11" in /etc/xgd/autostart/pulseaudio.desktop and do the same for /etc/xgd/autostart/pulseaudio-kde.desktop and see how it goes! – ostendali Dec 17 '15 at 14:11
  • if the above doesn't work try removing both pulseaudio-kde.desktop and pulseaudio.desktop (back them up somewhere) your audio will still work not to worry about that. – ostendali Dec 17 '15 at 14:14
  • erm... won't that disable pulseaudio? – sil Dec 17 '15 at 20:18
  • 1
    you need to identify first the cause before worrying about your pulseaudio and no it wont disable as I said above, it will just disable the autostart that is all.... – ostendali Dec 18 '15 at 9:59
  • Agree with @ostendali and @Dee; try disabling the offending startup process. If that makes startup fast, then try reenabling it with logging as Dee suggests, and see what shows up. – Wildcard Dec 21 '15 at 22:11
8
+125

For Diagnosis (not the solution) you should enable logging on pactl module:

  • edit (with sudo) following file

    /etc/pulse/client.conf
    
  • and add following line to the file

    extra-arguments = -vvvv --log-target=newfile:/tmp/pulseverbose.log --log-time=1
    
  • After reboot log in /tmp/pulseverbose.log will hopefully contain potential problem of pulse audio control. There could be more than one file.

  • Come back and paste it here and we can give you additional hints.

  • Remove! the line from /etc/pulse/client.conf after you finish.

For Solution I would first try to reinstall pulseaudio, but after we will see logs, possibly this will change. Therefore give us your logs first. Eventually steps to reinstall pulseaudio and alsa could be:

sudo apt-get remove --purge alsa-base pulseaudio
sudo apt-get install alsa-base pulseaudio
sudo alsa force-reload

but this can be helpless for example if your drivers are wrong/crippled by wrong settings etc.

Update: Diagnosis from log files: Core of your problem lies here

D (   0.005|   0.000)  [pulseaudio] module-udev-detect.c: Loading module-alsa-card with arguments 'device_id="0" name="pci-0000_00_03.0" card_name="alsa_card.pci-0000_00_03.0" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1"'
D (   3.010|   3.004)  [pulseaudio] reserve-wrap.c: Unable to contact D-Bus session bus: org.freedesktop.DBus.Error.NoServer: Failed to connect to socket /tmp/dbus-zgX6izEp13: Connection refused

followed by many errors like this:

I (   3.011|   0.000)  [pulseaudio] alsa-util.c: Error opening PCM device hw:0: No such file or directory

which takes your time on startup.

Proposed solutions:

  1. xxx Looks like there is a temporary socket left open and pulseaudio does not make it over. Please check if there is a /tmp/dbus-zgX6izEp13 file and if yes, remove it by sudo rm /tmp/dbus-zgX6izEp13 and try to reboot if there is a change.

    -- Update: there is not such a file, means that it is created just before the pulseaudio wants to use it or something wants to write it simultaneously. Some configuration could be michmached/doubled.

  2. You can try to purge and reinstall pulseaudio. See the text above.

Please give a short reply if something helps.

| improve this answer | |
  • OK, thank you for that. What's the best way to provide the logs? I added to client.conf, rebooted, logged in, and removed from client.conf, and I now have three files: pulseverbose.log, .log.1, and .log.2, of sizes 279K, 2.5K, 313K. I can't paste all of that :-) Are there specific things to look for? – sil Dec 22 '15 at 8:51
  • You can share a link to a file for example on google drive (docs.google.com/document/d/…), or any other fileshare service. – Dee Dec 22 '15 at 9:56
  • or try to use paste.ubuntu.com – Dee Dec 22 '15 at 10:06
  • OK, log files at kryogenix.org/random/pulseverbose – sil Dec 22 '15 at 11:09
  • @sil could you please add the link to your question? It makes it easier for to find all the relevant information. – Tobias Dec 23 '15 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.