You are not logged in.

#1 2025-07-26 04:44:15

ech
Member
Registered: 2024-05-05
Posts: 20

[SOLVED] Volume sometimes resets to 40% after installing SDDM

Hi, I'm using Hyprland + SDDM. The volume would randomly resets to 40% when I restart or log out.

Edit: My device is a Legion 5 Pro 2021. This didnt happen before installing sddm.

Edit 2: This doesn't happen when I use pulseaudio instead of pipewire

Last edited by ech (2025-07-31 05:53:48)

Offline

#2 2025-07-26 14:17:25

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,960

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

This is the "default" volume setting wireplumber will set the volume to unless you actively change it via a "proper" mixer that handles pipewire/pulse volumes (e.g. pactl/wpctl or pavucontrol for example), if you are using a volume mixer that internally adjusts the ALSA control then this information won't get passed along.

if you want to rather stick to 100% instead, you can do a

wpctl settings --save device.routes.default-sink-volume 1.0

and make sure you don't mix pulseaudio and pipewire and it's properly uninstalled and stopped after replacing it with pipewire-pulse

Offline

#3 2025-07-27 08:11:33

ech
Member
Registered: 2024-05-05
Posts: 20

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

I use wpctl for adjusting volume.

After some testings, the volume would be the same if I reboot directly from Hyprland. If I exit Hyprland and go back to SDDM, log in again, it would be reset to 40%.

Is this the expected behaviour?

Offline

#4 2025-07-27 09:56:43

ech
Member
Registered: 2024-05-05
Posts: 20

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

Hmm not sure if it's relevant but after logging out I have to remove the bluetooth headphones before connecting again.

Offline

#5 2025-07-27 13:16:53

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,610

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

I use wpctl for adjusting volume.I use wpctl for adjusting volume.

Did you also *save* the *default-sink-volume* as V1del suggested?

Online

#6 2025-07-27 14:35:23

ech
Member
Registered: 2024-05-05
Posts: 20

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

Sorry, I haven't tried that yet since it would mean the volume would be default to 100% right?

I wanted the volume to be saved whenever I log out/reboot etc... I did try disabling and masking wireplumber service for sddm and it worked.

Offline

#7 2025-07-27 14:38:23

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,610

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

Yes. Just save the default on logout, but don't hardcode the volume but query it from your current value from

wpctl get-volume @DEFAULT_AUDIO_SINK@

Online

#8 2025-07-27 14:49:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,960

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

Saving the volume once set should be the default. What kind of device are you storing volumes for? HDMI? That might sometimes get new identifiers depending on how your HDA implementation enumerates "new" displays.

FWIW some sanity checks

systemctl --user status pipewire{,-pulse} wireplumber pulseaudio
pactl list cards
pactl list sinks
aplay -lL

are you perhaps manually running a wireplumber instance somewhere? If you "weren't using SDDM" chances are you never had a proper user session before and are manually invoking things multiple times. Are you perhaps running some other tools that might store an override for this like qpwgraph or similar?

Last edited by V1del (2025-07-27 14:50:18)

Offline

#9 2025-07-27 14:51:31

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,610

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

Afaiu the OP just doesn't want to store a static volume but "how I left things on logout".

Online

#10 2025-07-27 15:15:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,960

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

yes, and this is the "normal" default assuming a vanilla and properly working wireplumber config and using tools like wpctl/pactl. Either the HW announces itself weirdly so wireplumber can't match the card identifiers it stores or the config was altered and this behaviour disabled, or there's some other tool implicitly overriding what wireplumber would do by default (or the cache/state dir removed). This works just fine here as the OP envisions. FWIW while we are at it

printenv
stat ~/.local/state/wireplumber ~/.local/state/wireplumber/restore-stream
cat ~/.local/state/wireplumber/restore-stream

Offline

#11 2025-07-28 06:13:02

ech
Member
Registered: 2024-05-05
Posts: 20

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

V1del wrote:

Saving the volume once set should be the default. What kind of device are you storing volumes for? HDMI? That might sometimes get new identifiers depending on how your HDA implementation enumerates "new" displays.

FWIW some sanity checks

systemctl --user status pipewire{,-pulse} wireplumber pulseaudio
pactl list cards
pactl list sinks
aplay -lL

are you perhaps manually running a wireplumber instance somewhere? If you "weren't using SDDM" chances are you never had a proper user session before and are manually invoking things multiple times. Are you perhaps running some other tools that might store an override for this like qpwgraph or similar?

Here's the output
https://0x0.st/85dj.txt
I'm storing volumes for my internal speakers and bluetooth headphones.

V1del wrote:

yes, and this is the "normal" default assuming a vanilla and properly working wireplumber config and using tools like wpctl/pactl. Either the HW announces itself weirdly so wireplumber can't match the card identifiers it stores or the config was altered and this behaviour disabled, or there's some other tool implicitly overriding what wireplumber would do by default (or the cache/state dir removed). This works just fine here as the OP envisions. FWIW while we are at it

printenv
stat ~/.local/state/wireplumber ~/.local/state/wireplumber/restore-stream
cat ~/.local/state/wireplumber/restore-stream

https://0x0.st/85d_.txt

Last edited by ech (2025-07-28 06:19:37)

Offline

#12 2025-07-28 15:24:20

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,960

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

That file not existing is a problem, do you have nonstandard wireplumber config?

wpctl settings  node.stream.restore-props

might shed some global light on this but this might be down to config

grep -RA3 'restore' {/etc,/usr/lib,~/.config}/wireplumber/wireplumber.conf*

Offline

#13 2025-07-29 10:56:26

ech
Member
Registered: 2024-05-05
Posts: 20

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

wpctl settings  node.stream.restore-props
Value: true

grep -RA3 'restore' {/etc,/usr/lib,~/.config}/wireplumber/wireplumber.conf*
grep: /etc/wireplumber/wireplumber.conf*: No such file or directory
grep: /usr/lib/wireplumber/wireplumber.conf*: No such file or directory
grep: /home/echonarch/.config/wireplumber/wireplumber.conf*: No such file or directory

TBH I'm curious too. Just check my Ubuntu device and there's a restore-stream file. I don't think that I've made any modification to wireplumber config.

Last edited by ech (2025-07-29 11:13:32)

Offline

#14 2025-07-30 15:16:03

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,960

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

On double checking my file wasn't accessed in a while so that might be getting stored somewhere else in recent versions, FWIW it should be /usr/share and not /usr/lib of course, my bad.

Offline

#15 2025-07-31 05:43:18

ech
Member
Registered: 2024-05-05
Posts: 20

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

Okay I think I will go with the masking solution and mark this as solved. Thank you so much for your help!

Offline

#16 2025-07-31 06:19:44

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,610

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

Sanity check

ls -laR ~sddm

Online

#17 2025-08-03 06:18:45

ech
Member
Registered: 2024-05-05
Posts: 20

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

seth wrote:

Sanity check

ls -laR ~sddm
Permission denied: /var/lib/sddm - code: 13

Skipped 1 directories due to permission denied:
  /var/lib/sddm

Offline

#18 2025-08-03 06:40:01

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,610

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

sudo ls -laR ~sddm

Online

#19 2025-08-07 05:04:25

ech
Member
Registered: 2024-05-05
Posts: 20

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

Offline

#20 2025-08-07 06:53:11

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,610

Re: [SOLVED] Volume sometimes resets to 40% after installing SDDM

Permissions look all fine…

* why does SDDM have a /var/lib/sddm/.local/share/flatpak ?
The directory is effectively empty, but SDDM isn't a flatschpak installation?

pacman -Qikk sddm

Before starting SDDM,
* remove /var/lib/sddm/.config/pulse (maybe SDDM goes exclusively through libpulse and pipewire-pulse?
* remove /var/lib/sddm/.local/state/wireplumber (just for good measure)

Online

Board footer

Powered by FluxBB