Bug 75984

Summary: balance shifted right after restore
Product: PulseAudio Reporter: Tom Yan <tom.ty89>
Component: modulesAssignee: pulseaudio-bugs
Status: RESOLVED MOVED QA Contact: pulseaudio-bugs
Severity: minor    
Priority: medium CC: lennart
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: before changing output device for once
before changing output device for once
after changing output device for once
after changing output device for once
before reboot (volume adjusted)
after reboot (volume is zero/muted)
log of a seperate process

Description Tom Yan 2014-03-10 15:50:59 UTC
If I remember correctly it's quite an old problem, but it still happens in PulseAudio 5.

My card is ASUS Xonar Essence STX. I am using Arch so most/all other packages are also of latest stable version.

Also it doesn't store/restore volume until I switched the output device once in GNOME's sound setting.

Yet if use alongside with alsa-utils restoring service, the problem(s) doesn't show.
Comment 1 Tanu Kaskinen 2014-03-11 15:20:08 UTC
(In reply to comment #0)
> Also it doesn't store/restore volume until I switched the output device once
> in GNOME's sound setting.

This sounds like bug 55262.

Did you have some other problem? The bug title says "balance shifted right after restore", but you didn't explain that any further.
Comment 2 Tom Yan 2014-03-11 15:39:02 UTC
Created attachment 95606 [details]
before changing output device for once

before reboot
Comment 3 Tom Yan 2014-03-11 15:39:43 UTC
Created attachment 95607 [details]
before changing output device for once

after reboot
Comment 4 Tom Yan 2014-03-11 15:41:33 UTC
Created attachment 95608 [details]
after changing output device for once

before reboot
Comment 5 Tom Yan 2014-03-11 15:42:02 UTC
Created attachment 95609 [details]
after changing output device for once

after reboot
Comment 6 Tom Yan 2014-03-11 15:44:18 UTC
I thought the title was clear enough. Anyway, let the pictures speak.
Comment 7 Tanu Kaskinen 2014-03-11 16:14:18 UTC
Ok, so the word "balance" in the bug title referred to the overall volume, not left/right balance. I'll close this bug as a duplicate of bug 55262.

*** This bug has been marked as a duplicate of bug 55262 ***
Comment 8 Tom Yan 2014-03-11 16:55:43 UTC
Did you check all the attachments? I did mean left/right balance. The overall volume issue is just another thing that I thought might be related.

I doubt if it's a duplicate. Of course they are of similar nature (well volume restore), but the actual sympton seems to be quite different to me, both the overall AND the balance one.

In my case, to put it in text, the volume is stored but the balance shifted right (or I guess I can say, it (re)store only volume of the left channel), and it only (re)store something after I have changed the output device ONCE.
Comment 9 Tom Yan 2014-03-11 17:01:15 UTC
and by ONCE I mean after I deleted .config/pulse and rebooted
Comment 10 Raymond 2014-03-12 00:59:22 UTC
pulseaudio store the volunexpected in the *.tdb in .pulse directory

does pulseaudio store the volume, balance , fade and bass in these database ?

do pulseaudio have any tools to dump the database content instead of using tdbdump ?
Comment 11 Tanu Kaskinen 2014-03-12 07:44:18 UTC
(In reply to comment #8)
> Did you check all the attachments? I did mean left/right balance. The
> overall volume issue is just another thing that I thought might be related.

Oops, I did look at them all, but apparently I didn't pay enough attention to the balance slider (I guess I somehow made the conclusion after the first three pictures that the balance slider isn't changing).

> I doubt if it's a duplicate. Of course they are of similar nature (well
> volume restore), but the actual sympton seems to be quite different to me,
> both the overall AND the balance one.

Yes, this appears to be a separate bug, so reopening.

Can you reproduce this with these steps:

1) Disable autospawning:
        echo autospawn = no >> ~/.config/pulse/client.conf

2) Stop pulseaudio:
        killall pulseaudio

3) Remove the device volume database:
        rm ~/.config/pulse/*device-volumes*

4) Start pulseaudio in a terminal:
        pulseaudio -vvv

5) Do what you did when making those screeshots (switch the output once, set the volume).

6) Stop pulseaudio with Ctrl-C and save the log output.

7) Start pulseaudio again:
        pulseaudio -vvv

8) Check if the balance is wrong. If it is wrong, attach the logs from the two pulseaudio runs to this bug. If it's not wrong, then this is more mysterious.
Comment 12 Tanu Kaskinen 2014-03-12 07:47:47 UTC
(In reply to comment #10)
> pulseaudio store the volunexpected in the *.tdb in .pulse directory
> 
> does pulseaudio store the volume, balance , fade and bass in these database ?

Pulseaudio doesn't know anything about bass, but the device volume, balance and fade (these are all represented by a single per-channel volume structure) are stored in *-device-volumes.tdb.

> do pulseaudio have any tools to dump the database content instead of using
> tdbdump ?

No. Would be nice to have (or I'd actually like to store the data in plain text format).
Comment 13 Tom Yan 2014-03-12 17:21:57 UTC
(In reply to comment #11)
> (In reply to comment #8)
> > Did you check all the attachments? I did mean left/right balance. The
> > overall volume issue is just another thing that I thought might be related.
> 
> Oops, I did look at them all, but apparently I didn't pay enough attention
> to the balance slider (I guess I somehow made the conclusion after the first
> three pictures that the balance slider isn't changing).
> 
> > I doubt if it's a duplicate. Of course they are of similar nature (well
> > volume restore), but the actual sympton seems to be quite different to me,
> > both the overall AND the balance one.
> 
> Yes, this appears to be a separate bug, so reopening.
> 
> Can you reproduce this with these steps:
> 
> 1) Disable autospawning:
>         echo autospawn = no >> ~/.config/pulse/client.conf
> 
> 2) Stop pulseaudio:
>         killall pulseaudio
> 
> 3) Remove the device volume database:
>         rm ~/.config/pulse/*device-volumes*
> 
> 4) Start pulseaudio in a terminal:
>         pulseaudio -vvv
> 
> 5) Do what you did when making those screeshots (switch the output once, set
> the volume).
> 
> 6) Stop pulseaudio with Ctrl-C and save the log output.
> 
> 7) Start pulseaudio again:
>         pulseaudio -vvv
> 
> 8) Check if the balance is wrong. If it is wrong, attach the logs from the
> two pulseaudio runs to this bug. If it's not wrong, then this is more
> mysterious.

Well funny enough, it's not wrong.
Comment 14 Tom Yan 2014-03-12 18:11:32 UTC
Hmm suddenly the balance problem is gone. Though the volume still become zero after reboot unless I changed the output device.

I don't recall I did anything special, only that I deleted .config/pulse in console with root before I login in gdm, instead of deleting it in gnome.
Comment 15 Tom Yan 2014-03-12 18:37:49 UTC
Created attachment 95673 [details]
before reboot (volume adjusted)
Comment 16 Tom Yan 2014-03-12 18:38:27 UTC
Created attachment 95674 [details]
after reboot (volume is zero/muted)
Comment 17 Tom Yan 2014-03-12 18:41:05 UTC
Created attachment 95675 [details]
log of a seperate process

the process is started only if .config/pulse is deleted before that boot, may not be relevant
Comment 18 GitLab Migration User 2018-07-30 09:55:58 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/124.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.