Where does XFCE store Volume Control settings?

Technical issues/questions of an intermediate or advanced nature.
User avatar
Rava
Contributor
Contributor
Posts: 5415
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Where does XFCE store Volume Control settings?

Post#1 by Rava » 08 Sep 2022, 13:15

System Port 5.0 x86-64

I did make some changes in XFCE 4.12 (003-xfce-4.12-20220725) Volume Control settings, and it remembers it:
Image

I looked into the most recent changed files in $HOME :

Code: Select all

guest@porteus:~$ find . -mtime 0 2>/dev/null | xargs ls -oad --color=auto --time-style=long-iso 2>&1 |grep -vE "cache| .$| ..$"|grep "2022-09-08 15:"
drwxr-xr-x 44 guest    520 2022-09-08 15:03 ./.config
-rw-r--r--  1 guest     41 2022-09-08 15:06 ./.config/l3afpad/l3afpadrc
-rw-r--r--  1 guest    108 2022-09-08 15:03 ./.config/pavucontrol.ini
drwx------  2 guest     60 2022-09-08 15:05 ./.local/share/mc
-rw-------  1 guest   2381 2022-09-08 15:05 ./.local/share/mc/history
but it not looks like the Volume Control settings are included in any of the listed files.

~/.config/pavucontrol.ini is not it:

Code: Select all

[window]
width=500
height=400
sinkInputType=1
sourceOutputType=1
sinkType=0
sourceType=1
showVolumeMeters=1
Does XFCE store these settings elsewhere, e.g. in /etc/ ?

EDIT
About the system forgetting the settings after suspend: I seems to have found an unorthodox method for the system to remember different main volume left/right settings, see here:
viewtopic.php?p=90021#p90021
Cheers!
Yours Rava

donald
Full of knowledge
Full of knowledge
Posts: 2071
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Where does XFCE store Volume Control settings?

Post#2 by donald » 09 Sep 2022, 02:58

The files that change if I increase or decrease the output volume are:
~/.config/pulse/<longnumber>-device-volumes. tdb
~/.config/pulse/<longnumber>-stream-volumes. tdb

...before and after the volume change: [renamed to 1 + 2.tdb]

Code: Select all

guest@porteus:~/Test$ diff 1.tdb 2.tdb
Binary files 1.tdb and 2.tdb differ
guest@porteus:~/Test$ tdbdump 1.tdb > 1.txt
guest@porteus:~/Test$ tdbdump 2.tdb > 2.txt
guest@porteus:~/Test$ diff 1.txt 2.txt
3c3
< data(26) = "B\011m\02\01\02v\02\00\00\00\00\00\00\00\0010B\01fB\01PN"
---
> data(26) = "B\011m\02\01\02v\02\00\01\00\00\00\01\00\0010B\01fB\01PN"
guest@porteus:~/Test$ 

User avatar
Rava
Contributor
Contributor
Posts: 5415
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Where does XFCE store Volume Control settings?

Post#3 by Rava » 09 Sep 2022, 03:07

in l .config/pulse/ I have these

Code: Select all

guest@porteus:~$ l .config/pulse/
total 60
drwx------  2 guest   160 2022-09-08 08:47 .
drwxr-xr-x 44 guest   520 2022-09-09 03:42 ..
-rw-------  1 guest 24576 2022-09-08 08:47 22cc023c917669e0ea405d986319abb9-card-database.tdb
-rw-------  1 guest    43 2022-09-08 08:47 22cc023c917669e0ea405d986319abb9-default-sink
-rw-------  1 guest    42 2022-09-08 08:47 22cc023c917669e0ea405d986319abb9-default-source
-rw-------  1 guest 12288 2022-09-08 08:47 22cc023c917669e0ea405d986319abb9-device-volumes.tdb
-rw-------  1 guest 12288 2022-09-08 12:15 22cc023c917669e0ea405d986319abb9-stream-volumes.tdb
-rw-------  1 guest   256 2022-09-08 08:47 cookie
Since it's the main output device, would it be
22cc023c917669e0ea405d986319abb9-device-volumes.tdb - or is it 22cc023c917669e0ea405d986319abb9-stream-volumes.tdb

And would saving 22cc023c917669e0ea405d986319abb9-???? even work?
Would at next start the "22cc023c917669e0ea405d986319abb9" still be used by pulse?

Added in 5 minutes 32 seconds:
I changed the volume settings (similar to my screenshot above) but still, the files are the same

Code: Select all

guest@porteus:~$ l .config/pulse/
total 60
drwx------  2 guest   160 2022-09-08 08:47 .
drwxr-xr-x 44 guest   520 2022-09-09 05:11 ..
-rw-------  1 guest 24576 2022-09-08 08:47 22cc023c917669e0ea405d986319abb9-card-database.tdb
-rw-------  1 guest    43 2022-09-08 08:47 22cc023c917669e0ea405d986319abb9-default-sink
-rw-------  1 guest    42 2022-09-08 08:47 22cc023c917669e0ea405d986319abb9-default-source
-rw-------  1 guest 12288 2022-09-08 08:47 22cc023c917669e0ea405d986319abb9-device-volumes.tdb
-rw-------  1 guest 12288 2022-09-08 12:15 22cc023c917669e0ea405d986319abb9-stream-volumes.tdb
-rw-------  1 guest   256 2022-09-08 08:47 cookie
Still, pulse / Volume Control remembers the changed settings.
Then why did the time stamp not change for any of the files in ~/.config/pulse/

Added in 1 minute 1 second:
Or does the content change but pulse refuses to update the time stamp for some reason?
Cheers!
Yours Rava

donald
Full of knowledge
Full of knowledge
Posts: 2071
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Where does XFCE store Volume Control settings?

Post#4 by donald » 09 Sep 2022, 03:17

Afaik pulseaudio restores the last settings.Read the files in /etc/pulse/
Maybe move/delete the files in ~/.config/pulse/ and restart the system or pulseaudio
( if it doesn't connect again, kill pulse in Taskmanager and/or try pulseaudio -k )

EDIT
--> Or does the content change but pulse refuses to update the time stamp for some reason? <--
I don't know but if I dump the binary files they differ after a volume change -- as shown above.
Last edited by donald on 09 Sep 2022, 03:22, edited 2 times in total.

User avatar
Rava
Contributor
Contributor
Posts: 5415
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Where does XFCE store Volume Control settings?

Post#5 by Rava » 09 Sep 2022, 03:20

donald wrote:
09 Sep 2022, 03:17
Afaik pulseaudio restores the last settings.
But it recalls changes I made… without updating the files in ~/.config/pulse/
donald wrote:
09 Sep 2022, 03:17
Read the files in /etc/pulse/
will do…
Cheers!
Yours Rava

donald
Full of knowledge
Full of knowledge
Posts: 2071
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Where does XFCE store Volume Control settings?

Post#6 by donald » 09 Sep 2022, 03:24

some of them do change -- as shown above.

User avatar
Rava
Contributor
Contributor
Posts: 5415
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Where does XFCE store Volume Control settings?

Post#7 by Rava » 09 Sep 2022, 03:25

Code: Select all

guest@porteus:/etc/pulse$ grep -i volume *
daemon.conf:; flat-volumes = no
daemon.conf:; enable-deferred-volume = yes
daemon.conf:; deferred-volume-safety-margin-usec = 8000
daemon.conf:; deferred-volume-extra-delay-usec = 0
default.pa:### Automatically restore the volume of streams and devices
system.pa:### Automatically restore the volume of streams and devices
Nothing there refers to unlocking the main volume and having different values for the main channel volumes.
donald wrote:
09 Sep 2022, 03:24
some of them do change -- as shown above.
Did in your case the time stamp also kept its old value?
Cheers!
Yours Rava

donald
Full of knowledge
Full of knowledge
Posts: 2071
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Where does XFCE store Volume Control settings?

Post#8 by donald » 09 Sep 2022, 03:27

I haven't checked the time stamps -- maybe next time.

User avatar
Rava
Contributor
Contributor
Posts: 5415
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Where does XFCE store Volume Control settings?

Post#9 by Rava » 09 Sep 2022, 11:13

I had to restart due to other reasons and as I presumed, the random-id part is different now:

Code: Select all

guest@porteus:~$ l .config/pulse/
total 60
drwx------  2 guest   160 2022-09-09 10:20 .
drwxr-xr-x 43 guest   480 2022-09-09 12:15 ..
-rw-------  1 guest 24576 2022-09-09 10:20 20b4bfe5ea04650a3387d4f9631b132e-card-database.tdb
-rw-------  1 guest    43 2022-09-09 10:20 20b4bfe5ea04650a3387d4f9631b132e-default-sink
-rw-------  1 guest    42 2022-09-09 10:20 20b4bfe5ea04650a3387d4f9631b132e-default-source
-rw-------  1 guest 12288 2022-09-09 10:20 20b4bfe5ea04650a3387d4f9631b132e-device-volumes.tdb
-rw-------  1 guest 12288 2022-09-09 12:15 20b4bfe5ea04650a3387d4f9631b132e-stream-volumes.tdb
-rw-------  1 guest   256 2022-09-09 10:20 cookie
I try looking into some Linux wikis that explain how you save and restore pulse audio settings, since saving any of these files most probably would not help when at next boot a different random-id is used.

In the meantime I manually have to adjust the sound balance settings manually until I find a solution how you store these settings outside these files, or how you can tell pulse to always use the same (previous stored) random-id.

Added in 5 minutes 23 seconds:
I checked via md5sums the files prior adjusting the sound balance, and after I adjusted it and 2 of the above files have been changed:

Code: Select all

20b4bfe5ea04650a3387d4f9631b132e-device-volumes.tdb
20b4bfe5ea04650a3387d4f9631b132e-stream-volumes.tdb
Could be one is due to me having started a ffplay loop-soundfile to have a test sound for adjusting the balance - while the other is the changing the main sound balance in itself…
Cheers!
Yours Rava

User avatar
Rava
Contributor
Contributor
Posts: 5415
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Where does XFCE store Volume Control settings?

Post#10 by Rava » 17 Sep 2022, 18:22

For some reasons, after every resume from suspend the volume settings are back to default (aka both channels are the same) and I have to do my adjustments anew. Seems how pulseaudio stores its settings is not even able to survive a suspend.

This is what Volume Control Output was prior suspend
Image

and this is what it was after suspend:
Image

As you can see, the minimum volume of any of the channels (46%) is now the setting for both channels, and the one set louder (front left 63%) just got reset to the same as front right. Whhhhyyyyyy? :wall:

And I tested it again and again, first I hear that the setting is changed, and when I do make the changes similar to the first of the screenshots and exit the settings, open the settings anew, go to Output Devices and click the "Lock Channels Together" (the lock icon) I see that Volume Control remembers my settings… at least until the next suspend.
Cheers!
Yours Rava

User avatar
Rava
Contributor
Contributor
Posts: 5415
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Where does XFCE store Volume Control settings?

Post#11 by Rava » 20 Sep 2022, 06:10

Experimenting with moc - see here [Solved: outdated module] moc-2.5.2-x86_64 only finds ogg - I realized that when you use the volume control via the command keys in mocp it resets the volume (meaning the different volume for main left/right is reset - this time to the loudest of the two volumes)
To keep a different left/right in Volume Control you have to not use mocp's way of adjusting the volume but look in the tab [Playback] for the Entry "ALSA plugin [mocp]" (reflecting that it's starting info of "Trying ALSA..." is successful) and adjust the volume via volume control and not via moc.

But, now the fun part, by trying out mocp and realizing the above, I by sheer accident left open the Volume Control at "Output devices" and with the clicked Lock Icon - meaning it showed the different left/right volume of the main output.
Like in this screenshot, this is the window I left open in one of my XFCE desktops:
Image

And guess what: after suspend the volume settings was unchanged for once, meaning the different left/right volume was preserved.
Image Image Image
Cheers!
Yours Rava

Post Reply