Update on sound and power saving

In an earlier post I wrote about the problems I had with sound in Ubuntu on my laptop. Well, "Henning" commented on it and suggested installing latest development snapshot of Alsa drivers, which I did. I then modified the option line I had added earlier to /etc/modprobe.d/alsa-base to "options snd-hda-intel model=acer". Now jack sensing and recording via the microphone jack work fine! No luck with the internal microphone, though. I'm not sure if I haven't just found the right settings or if it's not supported yet.

Henning also suggested this nice website lesswatts.org and the program powertop, which I promptly installed from Synaptic. I'll have a closer look at it when I get the time.

PS. I would like to thank those who have commented on my earlier post. If you have anything to add I hope I hear from you. Especially if you have any suggestions on how to get suspend to work.

Update 2008-04-26: ChrisSavery wrote a couple of interesting comments to this post about the built-in mic. I was unable to get it working, but perhaps someone else can give further advice?


Cyrille said...

Does the backlight butons + and - work for you ?
I do instal specific acer_acpi function and buton management (volume, home, end ... works).
Using xbacklight -set 50 it doesn't works also ?
Any tip ? (on OpenSuse)

spicifer said...

Yeah, the buttons work out of the box on Ubuntu.

I didn't have xbacklight installed but I just installed to try it out. It doesn't seem to work and it returns nan (not-a-number) as the current brightness.

I have no idea how to fix that, unfortunately. I've been using Gnome power saving settings, which works quite nicely.


purba said...

Hi, i am purba from Indonesia.
i just bought acer 2920, i have the same problem with you, the jack sensing is not working.

i have downloaded the latest alsa driver, i have followed the installation instruction, but still it gives me error.

Do you mind to give the simplest way to compile and install the driver? because i am a total newbie in linux.

Thank you

spicifer said...

Hi, I'm sorry to hear that you're having problems. If I were you I would probably just wait for 8 days, because then Ubuntu 8.04 will be released. I suppose it will have the latest Alsa driver with it and upgrading to it may (or may not) fix the problems with jack sensing.

Hope this helps.

ChrisSavery said...

I have a Acer 4920 - similar but 14" and sounds like different wifi but otherwise your notes are quite close to my trial and error process. I'll be following along as you find new things and I'm about to upgrade to 8.04 soon to see if that gets better audio functionality.
One thing I wanted to comment though. I'm fairly sure that the built-in mic is part of the suyin webcam device. I have seen no indications of a separate audio device for it either in usb device info or pci info. If thats the case I suspect the only way to get that working is for the V4L2 driver to "open up" that data stream. I have no more idea how that can be done as so far I have not heard of V4L2 having sound support. I may be wrong but I think that is the place to look now. I'd really like to get that part going - along with some semblance of suspend/hibernation. I have been using the webcam with skype ok but sound only with an external mic. Hoping 8.04 will give me headphone usage too. I ahve been using Compiz ok with VLC for watching video but the trick there was to set VLC to use X11 for video output and not the default. Usually canot use V4L2 (webcam) with Compiz and have to disable compiz when wanting to use skype. Well, that hardly matters as it's pretty splashy candy-gloss anyway.

Thanks for your notes and will be checking back for any updates.

ChrsSavery said...

Just following up on my comment yesterday. I was wrong about the sound being in the webcam driver. After much further searching I found info about how to get webcam internal mic working. Took a bit of fiddling though. There is a post on ubuntu forums (which I have lost the link to now) about installing backports to get internal sound and headphones working and for me that worked. Command was "sudo apt-get install linux-backports-modules-generic", and then use volume control app and preferences to enable various options. I found that for my model the Front-Mic input was connected to the internal mics next to the webcam and it took some fiddling with "mic-boost" settings etc. Also now the headphones being plugged in will shutoff internal speakers. I expect this backport-generic is bringing new drivers from 8.04 into 7.10 so quite possibly upgrading Ubuntu would also suffice.
Hope this all helps someone stuck like I was.

ChrisSavery said...

Oops. Should have mentioned that after you install the backport as in my comment above you still need to add the model=acer option as spicifer described in original post and reboot too so it loads with the option activated. Sorry for multiple posts and now I see I even spelled my name wrong. Eeek, what a day. Hey, but my webcam mic is working so can't complain.

spicifer said...

Hi Chris

Thanks for the information. I just upgraded to 8.04 and now there's a new "Front mic" slider and input in the mixer. However, I'm unable to capture anything but loud static from this input.

Could you please inform me of your mixer settings? (E.g. what levels are you using for the mic boosts. You can for example paste output from command amixer here.) I'd really like to know if I'm just failing to figure out how to use the mixer :)

ChrisSavery said...

Hi Spicifer,
I didn't know about amixer. Kinda cool to be able to get a list of settings and also be able to control from a script. So I ran "amixer contents" and got the list I have posted below. When I first installed the backport and rebooted I also did not immediately get more than static. It did take some fiddling with settings in alsamixer and then after I figured it out I also used the volume control panel available from the panel applet. I think the breakthrough was related to setting "internal mic boost" up, and making sure the options-input source was set for front mic. What I found was that when I changed the input source to just "mic" it used the mic input jack instead. Also just checking now in the System->Sound Prefs I have set the "Audio Conferencing Sound Capture" to ALSA, most of the others to "auto" but the mixer to HDA Intel (Alsa). I'm not sure what else. I used the sound recorder app to test record my voice while trying various things until I finally had a recording. At first it was crappy and garbled but with adjusting the record levels some more I managed to get a clear recording. Even still I find the internal mic does tend to pick up a lot of ambient sounds and you get much better clarity with the mic jack - presumably because the mic on my headset picks up only close sounds. Anyway, hope this helps out - see settings below. Sorry for very long post . I didn't see an email here or I would have sent this all as an email.

numid=2,iface=MIXER,name='Master Playback Switch'
; type=BOOLEAN,access=rw------,values=2
: values=on,on
numid=1,iface=MIXER,name='Master Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=64,step=0
: values=52,52
| dBscale-min=-64.00dB,step=1.00dB,mute=0
numid=11,iface=MIXER,name='PCM Playback Volume'
; type=INTEGER,access=rw---RW-,values=2,min=0,max=255,step=0
: values=209,209
| dBscale-min=-51.00dB,step=0.20dB,mute=0
numid=5,iface=MIXER,name='Line In Boost'
; type=INTEGER,access=rw---R--,values=2,min=0,max=2,step=0
: values=1,1
| dBscale-min=0.00dB,step=20.00dB,mute=0
numid=3,iface=MIXER,name='Mic Boost'
; type=INTEGER,access=rw---R--,values=2,min=0,max=2,step=0
: values=1,1
| dBscale-min=0.00dB,step=20.00dB,mute=0
numid=7,iface=MIXER,name='Capture Switch'
; type=BOOLEAN,access=rw------,values=2
: values=on,on
numid=6,iface=MIXER,name='Capture Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0
: values=15,15
| dBscale-min=-16.50dB,step=1.50dB,mute=0
numid=10,iface=MIXER,name='Caller ID Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=12,iface=MIXER,name='Digital Capture Volume'
; type=INTEGER,access=rw---RW-,values=2,min=0,max=120,step=0
: values=98,98
| dBscale-min=-30.00dB,step=0.50dB,mute=0
numid=8,iface=MIXER,name='Input Source'
; type=ENUMERATED,access=rw------,values=1,items=4
; Item #0 'Mic'
; Item #1 'Front Mic'
; Item #2 'Line'
; Item #3 'CD'
: values=1
numid=4,iface=MIXER,name='Internal Mic Boost'
; type=INTEGER,access=rw---R--,values=2,min=0,max=2,step=0
: values=2,2
| dBscale-min=0.00dB,step=20.00dB,mute=0
numid=9,iface=MIXER,name='Off-hook Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off

spicifer said...

Hi Chris,

Thanks a lot for your extremely informative reply. I tried the exact same settings for mixer channels as you on my Hardy installation, but when I tried recording all I got was an annoying "crackling" noise. I also tried a lot of other combinations. This leads me to suppose it may be due to some differences between 2920 and 4920. The external mic connection now works though without any hassles.

Once again thanks for the detailed information. I think it's a good thing you posted it here in full, as someone may benefit from it. I will resume my own attempts when I get the time.

purba said...

yes, the jack sensing is working in ubuntu 8.04 :D