You are not logged in.

#1 2011-11-24 23:19:19

Convergence
Member
Registered: 2005-07-02
Posts: 377

deny user's ability to change volume?

Everytime I log into KDE, Some program changes all of the volume settings in alsa.  I've saved the settings using alsactl, that did nothing.  I've told kmix to stop changing the volume on login, that didn't work.  I've tried disabling kde's sound system, that didn't work.  So, I would love it if only root could change alsa mixer's settings.

I'm not interested in pulse or some other sound server, as this would cause software mixing, and I have a hardware mixer.


It's a very deadly weapon to know what you're doing
---  William Murderface

Offline

#2 2011-11-24 23:44:43

roygbiv
Member
Registered: 2011-05-18
Posts: 204

Re: deny user's ability to change volume?

Just a shot in the dark: remove user from audio group?

Offline

#3 2011-11-24 23:49:05

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: deny user's ability to change volume?

That's a weird request. I think you'd have to hack the kernel module, so that it checks the current user and ignores the volume-change request as appropriate.

A far more sane thing to do would be to put more effort into finding out which app is altering the sound.

I run a script at XFCE startup to set the volume.

Offline

#4 2011-12-03 20:31:04

Convergence
Member
Registered: 2005-07-02
Posts: 377

Re: deny user's ability to change volume?

roygbiv:  From what I understand, that actually prevents the user from using the soundcard.

brebs:  Yeah, it's pretty weird.  However, for me it would be very practical.  I only need to use the physical volume control on my speaker system, and in spite of hours of trial and error, I can't figure out which program(s) for which user(s) is causing the problem.  It would be great if I could use root, set the mixer settings one last time, and lock them into place.  Several times already, I thought that I had found the culprit, and solved the problem.  Shortly afterward, things started to sound wonky again.  It actually sets one of my stereo speakers louder than the other, and the master volume way above where clipping kicks in.  I don't want to use a soundserver like pulse, but may have to.  I like having my soundcard do all of the mixing, but it would be more important to have the sound volumes stay where they should be.


It's a very deadly weapon to know what you're doing
---  William Murderface

Offline

#5 2011-12-03 21:04:17

Convergence
Member
Registered: 2005-07-02
Posts: 377

Re: deny user's ability to change volume?

I took every step I could think of to disable kmix, and still it tenaciously  returned time after time at login.  Finally I renamed the file to kmix_DieDamnitDie and that prevented it from starting of course.  However, the problem persists. At least I eliminated kmix as the cause of the problem.

I've also configured mpd to not use any volume controlling at all.  It doesn't make any sense that mpd would cause the problem because it starts at boot rather than login, but I thought I'd try it anyway.

Last edited by Convergence (2011-12-03 21:07:09)


It's a very deadly weapon to know what you're doing
---  William Murderface

Offline

#6 2011-12-03 21:47:51

Convergence
Member
Registered: 2005-07-02
Posts: 377

Re: deny user's ability to change volume?

Brebs:  I took  a look at the link in your sig about alsa.  I think it helped me solve the problem.  I used this:  fuser -fv /dev/snd/* /dev/dsp*  to show that pulse was still accessing alsa (in spite of taking steps to disable it).  I was instantly sure that this was the culprit.  I read this:  https://wiki.archlinux.org/index.php/Pu … A_settings.  This seems to say that there is little that one can do to keep pulse from overwriting alsa settings.  It even gives a very hacky work-around.   I decided that pulse had to go!

Pacman -Rsc pulseadio

Now the problem seems to be solved.  My volume doesn't jump around anymore.  Time will tell what I have broken. 

I really hope that the pulse devs will one day decide to make pulse less invasive.  Honestly it reminds me of my windows days, when every stinking program embedded itself into the registry, becoming impossible to root-out.  There are those of us that don't need it, and it's a pain in the butt for us to get rid of it.  I wish that hardware mixing was more prevalent.

Thanks.


It's a very deadly weapon to know what you're doing
---  William Murderface

Offline

#7 2011-12-04 01:00:29

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: deny user's ability to change volume?

Here pulse remembers the volume settings just fine, but then again I have only one user on this machine: me.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB