Solved Mixer mutes volume device randomly

Hi. Lately, i am having issues and that happens while playing videos through chromium/firefox with pulseaudio/sndio with OSS backend. That mostly happens while I am working on terminal and mostly using arrow keys on my 60% keyboard with Fn key. After that, when I run mixer I see that volume device is muted and it resolves after i run mixer vol.mute=off. I don't run desktop environments but dwm window manager. I am on 14.2-RELEASE with graphics/drm-515-kmod. I am using wired headphones which has colorful jacks that i plug into rear analog of my PC. I am using latest package repository. I don't remember if it was the same before upgrade, on 14.1-RELEASE. I am not sure about the source of this problem. Thanks in advance.

Code:
% cat /dev/sndstat
Installed devices:
pcm0: <ATI R6xx (HDMI)> (play)
pcm1: <Realtek ALC887 (Rear Analog)> (play/rec) default
pcm2: <Realtek ALC887 (Front Analog)> (play/rec)
pcm3: <Realtek ALC887 (Internal Digital)> (play)
No devices installed from userspace.

% uname -a
FreeBSD hale.home.arpa 14.2-RELEASE FreeBSD 14.2-RELEASE releng/14.2-n269506-c8918d6c7412 GENERIC amd64

% mixer
pcm1:mixer: <Realtek ALC887 (Rear Analog)> on hdaa1 (play/rec) (default)
    vol       = 0.84:0.84     pbk
    pcm       = 1.00:1.00     pbk
    speaker   = 0.74:0.74     rec
    line      = 0.01:0.01     rec
    mic       = 0.67:0.67     rec src
    mix       = 0.74:0.74     rec
    rec       = 0.35:0.35     pbk
    igain     = 0.00:0.00     pbk
    ogain     = 1.00:1.00     pbk
 
I have similar symptoms now and then this year, so maybe it already started with 14.1. Since about a week using 14.2 and similar things happened. PCM dropped from 100 to something lower, VOL dropped too. If I recall mostly when switching to a browser or switching between applications/desktops (I use BSPWM).
 
hi mate

does this help
sysctl dont reset volume to default

Code:
sudo vi /etc/sysctl.conf

Code:
# dont autoreset vol to default
hw.snd.vpc_autoreset=0


I applied your suggestion. But it still/just happened again switching to the browser (coming from cantata/mpd).
 
just wondering if its a pulseaudio issue

you can use firefox without pulseaudio

To force a specific backend open

Code:
about:config

and create

Code:
media.cubeb.backend

set the option to string and

Code:
oss
 
just wondering if its a pulseaudio issue

you can use firefox without pulseaudio

To force a specific backend open

Code:
about:config

and create

Code:
media.cubeb.backend

set the option to string and

Code:
oss
I had already media.cubeb.backend and it was set to oss. Pulseaudio is running in the background.


amw@z440 ~> ps -aux | grep pulse
amw 52218 0.0 0.1 382164 11688 - S 16:57 0:11.52 /usr/local/bin/pulseaudio --start --log-target=syslog
amw@z440 ~>


For now, it is not bothering me.
 
I had multimedia keys for adjusting volume levels with mixer in my dwm configuration. Few days ago, i removed these keybindings in my dwm configuration to see if i do trigger these keys with some other key (even though # xev doesn't assume these keys as volume keys). I don't have a test result yet because these days I can't use my computer much.

Diff:
% cat /usr/ports/x11-wm/dwm/files/patch-01-mixer
--- config.def.h.orig   2023-12-11 13:41:28.765635000 +0300
+++ config.def.h        2023-12-11 13:46:14.977398000 +0300
@@ -58,7 +58,14 @@
 /* commands */
 static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
 static const char *termcmd[]  = { "st", NULL };
+static const char *incrvol[] = { "mixer", "vol.volume=+0.10", NULL };
+static const char *decrvol[] = { "mixer", "vol.volume=-0.10", NULL };
+static const char *mutevol[] = { "mixer", "vol.mute=^", NULL };

+#define XK_XF86AudioLowerVolume 0x1008ff11
+#define XK_XF86AudioMute       0x1008ff12
+#define XK_XF86AudioRaiseVolume 0x1008ff13
+
 static const Key keys[] = {
        /* modifier                     key        function        argument */
        { MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
@@ -94,6 +101,9 @@
        TAGKEYS(                        XK_8,                      7)
        TAGKEYS(                        XK_9,                      8)
        { MODKEY|ShiftMask,             XK_q,      quit,           {0} },
+       { 0x0,                          XK_XF86AudioRaiseVolume,        spawn,  {.v = incrvol } },
+       { 0x0,                          XK_XF86AudioLowerVolume,        spawn,  {.v = decrvol } },
+       { 0x0,                          XK_XF86AudioMute,               spawn,  {.v = mutevol } },
 };

 /* button definitions */
 
I never had random sound mutes after changing the key bindings. I still don't know why it did happen, maybe it is an issue with my %60-sized keyboard.
 
i have a ducky mini 60% keyboard with cherry mx blue switches
noisy as feck, but a dream to type on

best keyboard i have every owned

much better than the zx spectrum i had when i was a kid with the squishy keys
 
Back
Top