Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headphones are gone with kernel 4.8.1 #164

Open
victrcodes opened this issue Oct 16, 2016 · 13 comments
Open

Headphones are gone with kernel 4.8.1 #164

victrcodes opened this issue Oct 16, 2016 · 13 comments

Comments

@victrcodes
Copy link

I've upgraded straight from kernel 4.4 to 4.8, followed the section "Users upgrading from pre-4.7 Samus kernel". Everything is working, but headphones are gone from the sound settings. If I reboot back to kernel 4.8 without doing any changes - headphones are back, but now the mic is gone, probably due to the "Users upgrading from pre-4.7 Samus kernel" changes. Am I missing something here? I'm on Ubuntu 16.04.

@nelsonni
Copy link
Contributor

Ditto. I'm having the same problem with no headphones listed after removing the following lines from /etc/pulse/default.pa:

#load-module module-alsa-sink device=hw:0,0
#load-module module-alsa-source device=hw:0,1
#load-module module-alsa-source device=hw:0,2

I know that the bdw-rt5677 driver is included in the latest kernel, but the headphone jack does not seem to be dynamically located and loaded without modifying /etc/pulse/default.pa.

@rroll1
Copy link

rroll1 commented Nov 7, 2016

Was this ever fixed? I'm on the latest samus kernel and I don't have headphones, which is kind of problematic (since I use headphones on my laptop far more than my speakers).

@raphael
Copy link
Owner

raphael commented Nov 7, 2016

The scripts in the README work fine for me, I can use them to switch between headphones and speakers.

@nsparks86
Copy link

Has anyone made a script to toggle this with a single action?

@victrcodes
Copy link
Author

@nsparks86 there's nothing to toggle if headphones are not even loaded with latest kernel. I tend to agree with what @nelsonni said.

@rroll1
Copy link

rroll1 commented Nov 15, 2016

The script to toggle is in the readme, or at least, the commands. Here are the scripts I use to switch between headphones and speakers, based on @raphael's comment a week ago:

 $ cat /usr/sbin/samus-alsaenable-speakers 
 #!/bin/sh
 #

 ## enable audio
 amixer -c 0 cset name='DAC1 MIXL DAC1 Switch' on
 amixer -c 0 cset name='DAC1 MIXR DAC1 Switch' on

 ## enable speakers
 amixer -c 0 cset name='Headphone Switch' off
 amixer -c 0 cset name='Stereo DAC MIXL DAC1 L Switch' off
 amixer -c 0 cset name='Stereo DAC MIXR DAC1 R Switch' off
 amixer -c 0 cset name='Stereo DAC MIXL DAC1 R Switch' on
 amixer -c 0 cset name='Stereo DAC MIXR DAC1 L Switch' on
 amixer -c 0 cset name='Speaker Switch' on
 $ cat /usr/sbin/samus-alsaenable-headphones 
 #!/bin/sh
 # 
 ## enable audio
 amixer -c 0 cset name='DAC1 MIXL DAC1 Switch' on
 amixer -c 0 cset name='DAC1 MIXR DAC1 Switch' on

 ## enable speakers
 amixer -c 0 cset name='Speaker Switch' off
 amixer -c 0 cset name='Stereo DAC MIXL DAC1 R Switch' off
 amixer -c 0 cset name='Stereo DAC MIXR DAC1 L Switch' off
 amixer -c 0 cset name='Stereo DAC MIXL DAC1 L Switch' on
 amixer -c 0 cset name='Stereo DAC MIXR DAC1 R Switch' on
 amixer -c 0 cset name='OUT1 Playback Switch' on
 amixer -c 0 cset name='OUT2 Playback Switch' on
 amixer -c 0 cset name='Headphone Switch' on

This works for me on

$ uname -a
Linux echo.pixel 4.8.6-6-ph #1 SMP Wed Nov 2 14:32:11 CDT 2016 x86_64 GNU/Linux

Haven't updated to 4.8.7 yet.

There are 2 issues currently, though neither of them are the headphones not working:

  1. Headphones don't show up in the Gnome Sound control panel, it only registers the speakers in that list. I believe that in earlier Samus kernels it showed up as an output device in the Sound control panel; now you have to use the amixer commands to switch.
  2. ACPI doesn't detect headphone plugs or unplugs, so it's impossible at the current moment to bind the scripts to ACPI events. Hopefully this will be fixed sometime in the future (maybe .7? Haven't installed it yet)

@nsparks86
Copy link

nsparks86 commented Nov 18, 2016

I'm not very familiar with Bash scripting, but I figured I'd try and start somewhere. Could use a "Headphone/Speaker toggle" script, so I came up with these lines to determine the current state.

awk -F"[][]" '/Playback/ { print $2 }' <(amixer sget Speaker)
awk -F"[][]" '/Playback/ { print $2 }' <(amixer sget Headphone)

@stefanwiegmann
Copy link

maybe stupid question: I am on KDE on Arch, still on my first install from April '15.
Is everybody here using plain ALSA? Who has pulseaudio? I feel like my audio setup became a mess, especially looking into my mixer. Was also thinking of a fresh install, as I still wanted to update my ssd firmware eventually.

Anybody with KDE/Pulseaudio + the script and everything just works? And how many mixer items do you have? :-)

@stefanwiegmann
Copy link

I guess I was kind of hijacking this thread, but I did my fresh install. Only thing I had to do was running the sound scripts @raphael provided and everything worked as you would expect. My mess was due to still tinkering in my first install from over a year ago and with so many changes happening.....

As for the headphone/speaker switch: I would love acpi to work as well, but in the meantime I just put a toggle script on CTRL+[Volume Mute]. The script checks the current setup and switches with @raphael 's sound scripts accordingly.

@raphael
Copy link
Owner

raphael commented Dec 15, 2016

Do you know if ACPI works with the vanilla 4.9 kernel?

@stefanwiegmann
Copy link

stefanwiegmann commented Dec 16, 2016

short answer: no.

for
ls -l /usr/lib/modules/$(uname -r)/kernel/drivers/acpi

I get on your kernel 4.8.13-12-ph:
total 184
-rw-r--r-- 1 root root 10408 Dec 9 16:15 ac.ko
-rw-r--r-- 1 root root 12648 Dec 9 16:15 acpi_extlog.ko
-rw-r--r-- 1 root root 14008 Dec 9 16:15 acpi_ipmi.ko
-rw-r--r-- 1 root root 19072 Dec 9 16:15 acpi_pad.ko
drwxr-xr-x 2 root root 4096 Dec 9 16:15 apei
-rw-r--r-- 1 root root 21600 Dec 9 16:15 battery.ko
-rw-r--r-- 1 root root 6384 Dec 9 16:15 custom_method.ko
-rw-r--r-- 1 root root 7856 Dec 9 16:15 ec_sys.ko
-rw-r--r-- 1 root root 13088 Dec 9 16:15 fan.ko
drwxr-xr-x 2 root root 4096 Dec 9 16:15 nfit
-rw-r--r-- 1 root root 11936 Dec 9 16:15 sbshc.ko
-rw-r--r-- 1 root root 16704 Dec 9 16:15 sbs.ko
-rw-r--r-- 1 root root 24224 Dec 9 16:15 thermal.ko

on stock 4.8.13-1:

total 108
-rw-r--r-- 1 root root 2946 Dec 9 01:25 ac.ko.gz
-rw-r--r-- 1 root root 2787 Dec 9 01:25 acpi_configfs.ko.gz
-rw-r--r-- 1 root root 4133 Dec 9 01:25 acpi_extlog.ko.gz
-rw-r--r-- 1 root root 4334 Dec 9 01:25 acpi_ipmi.ko.gz
-rw-r--r-- 1 root root 5513 Dec 9 01:25 acpi_pad.ko.gz
drwxr-xr-x 2 root root 4096 Dec 9 01:25 apei
-rw-r--r-- 1 root root 6748 Dec 9 01:25 battery.ko.gz
-rw-r--r-- 1 root root 4930 Dec 9 01:25 button.ko.gz
-rw-r--r-- 1 root root 1777 Dec 9 01:25 custom_method.ko.gz
drwxr-xr-x 2 root root 4096 Dec 9 01:25 dptf
-rw-r--r-- 1 root root 2297 Dec 9 01:25 ec_sys.ko.gz
-rw-r--r-- 1 root root 3923 Dec 9 01:25 fan.ko.gz
drwxr-xr-x 2 root root 4096 Dec 9 01:25 nfit
-rw-r--r-- 1 root root 3537 Dec 9 01:25 sbshc.ko.gz
-rw-r--r-- 1 root root 5529 Dec 9 01:25 sbs.ko.gz
-rw-r--r-- 1 root root 7375 Dec 9 01:25 thermal.ko.gz
-rw-r--r-- 1 root root 14251 Dec 9 01:25 video.ko.gz

I am not an acpi guy. would have to read up on it. I thought I read somewhere here acpi doesn't work in general for us. Is there a module we are missing or what did @rroll1 mean?

I'll check 4.9 as soon as I get it

@stefanwiegmann
Copy link

by the way, your current aur script doesn't build ;-)

@raphael
Copy link
Owner

raphael commented Dec 16, 2016

Fixed it, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants