Bug 253445 - Leaving sound device opened is causing lots of wakeups
Leaving sound device opened is causing lots of wakeups
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
: 251534 252352 (view as bug list)
Depends On:
Blocks: wakeup
  Show dependency treegraph
Reported: 2007-08-19 13:32 EDT by William Lovaton
Modified: 2009-01-08 23:51 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-08 23:51:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description William Lovaton 2007-08-19 13:32:07 EDT
Description of problem:
Current Rawhide is causing about 60 wake ups per second when previously it was
causing an excellent 20 wps on the Desktop.  The guilty according to powertop is
the interrupt CMI8738-MC6 (46 wps) even when idle and I am not playing any
sound.  Even if I start to play some video the CMI thing keeps waking up the CPU
and the same rate so it is doing something unnecessarily.

As show in comment #6 from the wakeup bug report:

Rawhide from August 13 didn't have this problem and the wake ups were very low.

According to lspci my audio card is:
00:05.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 10)

and the related kernel modules are:
[root@localhost ~]# lsmod | grep -i cm
snd_cmipci             32737  5 
gameport               15449  1 snd_cmipci
snd_pcm_oss            38625  0 
snd_mixer_oss          16969  1 snd_pcm_oss
rtc_cmos               10977  0 
snd_pcm                65389  4 snd_cmipci,snd_pcm_oss
snd_page_alloc         11209  1 snd_pcm
snd_opl3_lib           11865  1 snd_cmipci
snd_timer              20957  5 snd_seq,snd_pcm,snd_opl3_lib
snd_mpu401_uart        10585  1 snd_cmipci
snd                    45189  18snd_cmipci,snd_seq_oss,snd_seq,snd_pcm_oss,

My system is an AMD Athlon XP 2000+ using kernel 2.6.23-0.115.rc3.git1.fc8

If you need more info just yelp.
Comment 1 William Lovaton 2007-08-19 14:22:22 EDT
Mmmm... doing extra investigation I realized that this is caused by esd now
being enable by default and not by a kernel module regression.

When I disable it in gnome-sound-properties, wake ups go down to normal.
Comment 2 Bastien Nocera 2007-08-19 16:58:46 EDT
This is a problem with the sound system (ALSA). Whenever the device is opened,
the hardware will generate interrupts. It's a kernel problem that's unlikely to
be fixed. We'll get the fix for free when we switch to using PulseAudio by default.
Comment 3 Bastien Nocera 2007-08-19 18:03:45 EDT
*** Bug 252352 has been marked as a duplicate of this bug. ***
Comment 4 Arjan van de Ven 2007-08-19 18:29:37 EDT
note that there are two aspects to this bug:

1) the wakeups caused by "device open but no sound"


2) keeping/having the device open will prevent power saving from kicking in.

I'll agree that 1) is an alsa core issue that alsa should be fixing ideally; but
2) is an esd issue; powersaving (turning off power to the codec and sound chip)
kicks in on device closing, and that's the only thing that is right to do, since
only "nobody has the device open" can qualify as criterium for this.
Comment 5 Bastien Nocera 2007-08-19 19:30:21 EDT
A couple of things.

First, esound doesn't like not being started from the session. See the default
# autospawning is not recommended, since it can't really be done
# right.  If you want your login session to be using a sound daemon,
# you should start it from the session controller, not some random
# app inside.

Secondly, esound isn't the default in F8 anymore (it's been replaced by
PulseAudio in F8, along with esound-compat libraries).

Finally, Lennart mentioned that Takashi is working on using high-resolution
times for ALSA's ring buffer management, which means that we'd be able to not
use interrupts on the hardware.

So this bug needs to go to PA, or the kernel. As the fixes should happen in the
kernel, pushing there.
Comment 6 Bastien Nocera 2007-08-20 07:39:34 EDT
*** Bug 251534 has been marked as a duplicate of this bug. ***
Comment 7 Bastien Nocera 2007-08-20 07:40:40 EDT
Retitling to be more accurate.
Comment 8 Arjan van de Ven 2007-08-20 09:54:12 EDT
pushing this to the kernel does not and will not fix the 2nd issue (preventing 
sound hardware from going to sleep), but I suppose we need to create a second 
bug for that.
Comment 9 Bug Zapper 2008-04-04 09:38:13 EDT
Based on the date this bug was created, it appears to have been reported
during the development of Fedora 8. In order to refocus our efforts as
a project we are changing the version of this bug to '8'.

If this bug still exists in rawhide, please change the version back to
(If you're unable to change the bug's version, add a comment to the bug
and someone will change it for you.)

Thanks for your help and we apologize for the interruption.

The process we're following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 10 Bug Zapper 2008-11-26 02:41:41 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 11 Bug Zapper 2009-01-08 23:51:13 EST
Fedora 8 changed to end-of-life (EOL) status on 2009-01-07. Fedora 8 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.