You are not logged in.

#1 2011-12-11 21:48:13

Kaurin
Member
From: Ireland
Registered: 2011-12-11
Posts: 66

[Solved?]Sound crackling on poweroff/restart

Hello, I have been trying out some distributions to use with my laptop, and I feel most comfortable with arch, which will be staying here smile

Laptop: HP EliteBook 8440p

Sound crackling problem DID NOT happen on:
Linux mint 11 with gnome2
Ubuntu 11.04 / 11.10 with unity

Sound crackling problem DID happen on:
Debian lenny

modules:

Module                  Size  Used by
msr                     2608  0 
cpufreq_stats           3890  0 
fuse                   66858  2 
ipv6                  288122  46 
snd_hda_codec_hdmi     22821  4 
usb_storage            44391  0 
uvcvideo               64995  0 
uas                     8088  0 
videodev               85100  1 uvcvideo
media                  10565  2 uvcvideo,videodev
v4l2_compat_ioctl32     8644  1 videodev
pata_pcmcia            10093  1 
aesni_intel            47378  1 
cryptd                  8309  1 aesni_intel
aes_x86_64              7508  1 aesni_intel
aes_generic            26138  2 aesni_intel,aes_x86_64
ecb                     2073  1 
btusb                  11385  0 
arc4                    1410  2 
snd_hda_codec_idt      56715  1 
nvidia              12069499  33 
vboxnetflt             17159  0 
vboxdrv              1790690  1 vboxnetflt
bluetooth             150884  1 btusb
cpufreq_powersave        990  0 
cpufreq_userspace       2144  0 
cpufreq_ondemand        6100  4 
pcmcia                 36257  1 pata_pcmcia
snd_hda_intel          22410  6 
snd_hda_codec          81242  3 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_intel
snd_hwdep               6357  1 snd_hda_codec
snd_pcm                74368  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_timer              19544  1 snd_pcm
snd                    58362  19 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
tpm_infineon            7826  0 
e1000e                144580  0 
iwlagn                239157  0 
joydev                  9895  0 
soundcore               6210  1 snd
mei                    31195  0 
iTCO_wdt               11789  0 
snd_page_alloc          7153  2 snd_hda_intel,snd_pcm
iTCO_vendor_support     1961  1 iTCO_wdt
yenta_socket           21111  0 
mac80211              221963  1 iwlagn
intel_ips              11245  0 
intel_agp              10904  0 
intel_gtt              14455  1 intel_agp
serio_raw               4294  0 
pcspkr                  1819  0 
psmouse                55501  0 
cfg80211              165668  2 iwlagn,mac80211
ppdev                   5774  0 
sdhci_pci               8887  0 
tpm_tis                 9311  0 
sdhci                  22510  1 sdhci_pci
mmc_core               75853  1 sdhci
firewire_ohci          29650  0 
firewire_core          50872  1 firewire_ohci
parport_pc             30042  0 
acpi_cpufreq            5877  1 
tpm                    12698  2 tpm_infineon,tpm_tis
parport                31631  2 ppdev,parport_pc
hp_wmi                  7738  0 
freq_table              2515  3 cpufreq_stats,cpufreq_ondemand,acpi_cpufreq
crc_itu_t               1363  1 firewire_core
sparse_keymap           3120  1 hp_wmi
rfkill                 15498  3 bluetooth,cfg80211,hp_wmi
thermal                 7799  0 
wmi                     8475  1 hp_wmi
video                  11164  0 
processor              24224  1 acpi_cpufreq
hp_accel               13864  0 
pcmcia_rsrc             8889  1 yenta_socket
lis3lv02d              10604  1 hp_accel
i2c_core               20460  2 videodev,nvidia
pcmcia_core            12150  3 pcmcia,yenta_socket,pcmcia_rsrc
tpm_bios                5089  1 tpm
evdev                   9530  16 
ac                      2344  0 
button                  4470  0 
container               2429  0 
battery                 6453  0 
input_polldev           2914  1 lis3lv02d
mperf                   1275  1 acpi_cpufreq
ext4                  375413  4 
mbcache                 5881  1 ext4
jbd2                   70667  1 ext4
crc16                   1359  2 bluetooth,ext4
sr_mod                 14951  0 
sd_mod                 28275  6 
cdrom                  36553  1 sr_mod
usbhid                 35352  0 
hid                    82435  1 usbhid
ahci                   20005  5 
libahci                19559  1 ahci
libata                166724  3 pata_pcmcia,ahci,libahci
ehci_hcd               40794  0 
scsi_mod              132730  5 usb_storage,uas,sr_mod,sd_mod,libata
usbcore               144432  7 usb_storage,uvcvideo,uas,btusb,usbhid,ehci_hcd

lspci:

00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 12)
00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 12)
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)
00:16.3 Serial controller: Intel Corporation 5 Series/3400 Series Chipset KT Controller (rev 06)
00:19.0 Ethernet controller: Intel Corporation 82577LM Gigabit Network Connection (rev 06)
00:1a.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 06)
00:1c.3 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 4 (rev 06)
00:1d.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 06)
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 6 port SATA AHCI Controller (rev 06)
00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 06)
01:00.0 VGA compatible controller: nVidia Corporation GT218 [NVS 3100M] (rev a2)
01:00.1 Audio device: nVidia Corporation High Definition Audio Controller (rev a1)
44:00.0 Network controller: Intel Corporation Centrino Advanced-N 6200 (rev 35)
45:06.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 06)
45:06.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 25)
45:06.2 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev bb)
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)
ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)
ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)

lsusb:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 03f0:231d Hewlett-Packard 
Bus 001 Device 004: ID 138a:0007 Validity Sensors, Inc. VFS451 Fingerprint Reader
Bus 001 Device 005: ID 04f2:b15e Chicony Electronics Co., Ltd 
Bus 002 Device 003: ID 1c4f:0003 SiGma Micro HID controller

I know that this info might be relevant too:

sudo aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: STAC92xx Digital [STAC92xx Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

sudo cat /proc/asound/card0/codec#* | grep Codec

Codec: IDT 92HD75B3X5
Codec: LSI ID 1040

I have been playing with various options for snd-hda-intel. Some of them gave me back my pc speaker (which I don't need), but none of those which I tried removed the crackling on power off sad

Does anyone have any idea what option to use. Or if this problem is not module related, what to do?

Last edited by Kaurin (2012-01-29 02:15:19)

Offline

#2 2011-12-11 22:00:22

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved?]Sound crackling on poweroff/restart

You mention playing with various options for snd-hda-intel, did you try 'modprobe snd-hda-intel power_save=0'?
https://wiki.archlinux.org/index.php/AL … g_Playback

Offline

#3 2011-12-11 22:24:56

Kaurin
Member
From: Ireland
Registered: 2011-12-11
Posts: 66

Re: [Solved?]Sound crackling on poweroff/restart

thank you for your quick reply!


options snd-hda-intel power_save=0 model=auto

still happens (reboot 2x after each change to modprobe.conf)

Offline

#4 2011-12-12 02:39:43

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

Re: [Solved?]Sound crackling on poweroff/restart

I use in an initscript's stop():

amixer -q set Master 0% mute

This stops the crackling.

Offline

#5 2011-12-12 09:10:08

Kaurin
Member
From: Ireland
Registered: 2011-12-11
Posts: 66

Re: [Solved?]Sound crackling on poweroff/restart

did you edid /etc/rc.shutdown or some other script?

What would be the "proper" way to do this? smile

i tried putting  "amixer -q set Master 0% mute" in /etc/rc.local.shutdown , but i get some pulseaudio error (something about not being able to connect), and i still get crackles on shutdown hmm

Last edited by Kaurin (2011-12-12 17:44:35)

Offline

#6 2011-12-12 17:51:34

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

Re: [Solved?]Sound crackling on poweroff/restart

If you're using pulseaudio (I'm not), then try adding -c 0 to that amixer command (to bypass pulseaudio).

Offline

#7 2011-12-15 05:24:22

Ralgo
Member
From: Chile
Registered: 2011-09-30
Posts: 13

Re: [Solved?]Sound crackling on poweroff/restart

cat /etc/conf.d/alsa

# Arguments for alsactl
# example: ALSA_ARGS="--file /var/lib/alsa/asound.state"
ALSA_ARGS="--file /var/lib/alsa/asound.state"

# Enables powersaving mode for AC97 and hda_intel audio chips.
# Set to 1 to enable powersaving.
# Set to 0 to disable powersaving (default).
POWERSAVE=1

# Whether to save volume levels when stopped ("yes" or "no").
SAVE_VOLUME="yes"

# Whether to mute the master volume when stopped ("yes" or "no").
# Useful for bad audio cards which make a noise on system poweroff.
MUTE_VOLUME="no"

Is this useful?

Last edited by Ralgo (2011-12-15 05:25:10)

Offline

#8 2011-12-15 09:38:05

Kaurin
Member
From: Ireland
Registered: 2011-12-11
Posts: 66

Re: [Solved?]Sound crackling on poweroff/restart

brebs' solution reduces the crackle volume
Ralgo, your solution (not using brebs') gets it to a few little pops instead annoying crackles, but you can still hear it
combining both solution does not improve it more then Ralgo's solution on its own

What can I do to eliminate this completely :'(

Offline

#9 2011-12-15 16:19:35

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

Re: [Solved?]Sound crackling on poweroff/restart

Next thing that I would try is to also unload all ALSA modules.

E.g.:

modprobe -r snd_seq_oss
modprobe -r snd_pcm_oss
modprobe -r snd-hda-intel
modprobe -r snd_seq
modprobe -r snd_hda_codec_realtek
modprobe -r snd_hda_codec

You should end up with no snd* modules loaded. You'll have to tweak the above script to suit your own setup.

Offline

#10 2011-12-15 16:25:31

Kaurin
Member
From: Ireland
Registered: 2011-12-11
Posts: 66

Re: [Solved?]Sound crackling on poweroff/restart

I have added those lines to /etc/rc.local.shutdown

This is what i get on reboot/shutdown:

FATAL: Module snd_hda_intel is in use.
FATAL: Module snd_hda_codec is in use.

edit: *crackles* smile

my lsmod

Module                  Size  Used by
fuse                   66858  2 
ipv6                  288122  46 
snd_hda_codec_hdmi     22821  4 
uvcvideo               64995  0 
videodev               85100  1 uvcvideo
media                  10565  2 uvcvideo,videodev
v4l2_compat_ioctl32     8644  1 videodev
aesni_intel            47378  2 
nvidia              12069499  33 
cryptd                  8309  1 aesni_intel
aes_x86_64              7508  1 aesni_intel
aes_generic            26138  2 aesni_intel,aes_x86_64
ecb                     2073  1 
btusb                  11385  0 
pata_pcmcia            10093  1 
snd_hda_codec_idt      56605  1 
ppdev                   5774  0 
parport_pc             30042  0 
joydev                  9895  0 
arc4                    1410  2 
iwlagn                239328  0 
firewire_ohci          29650  0 
snd_hda_intel          22410  6 
firewire_core          50872  1 firewire_ohci
snd_hda_codec          81242  3 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_intel
tpm_infineon            7826  0 
crc_itu_t               1363  1 firewire_core
mac80211              222059  1 iwlagn
e1000e                144580  0 
pcmcia                 36257  1 pata_pcmcia
snd_hwdep               6357  1 snd_hda_codec
snd_pcm                74368  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
iTCO_wdt               11789  0 
iTCO_vendor_support     1961  1 iTCO_wdt
intel_agp              10904  0 
intel_gtt              14455  1 intel_agp
parport                31631  2 ppdev,parport_pc
intel_ips              11245  0 
snd_timer              19544  1 snd_pcm
mei                    31195  0 
cfg80211              165796  2 iwlagn,mac80211
snd                    58362  19 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
soundcore               6210  1 snd
snd_page_alloc          7153  2 snd_hda_intel,snd_pcm
serio_raw               4294  0 
psmouse                55501  0 
pcspkr                  1819  0 
hp_wmi                  7738  0 
hp_accel               13864  0 
yenta_socket           21111  0 
lis3lv02d              10604  1 hp_accel
tpm_tis                 9311  0 
pcmcia_rsrc             8889  1 yenta_socket
tpm                    12698  2 tpm_infineon,tpm_tis
sdhci_pci               8887  0 
sdhci                  22510  1 sdhci_pci
i2c_core               20460  2 videodev,nvidia
sparse_keymap           3120  1 hp_wmi
mmc_core               75853  1 sdhci
pcmcia_core            12150  3 pcmcia,yenta_socket,pcmcia_rsrc
evdev                   9530  16 
container               2429  0 
input_polldev           2914  1 lis3lv02d
video                  11164  0 
tpm_bios                5089  1 tpm
battery                 6453  0 
thermal                 7799  0 
wmi                     8475  1 hp_wmi
ac                      2344  0 
button                  4470  0 
vboxnetflt             17159  0 
vboxdrv              1790690  1 vboxnetflt
bluetooth             150884  1 btusb
rfkill                 15498  3 cfg80211,hp_wmi,bluetooth
cpufreq_powersave        990  0 
cpufreq_userspace       2144  0 
cpufreq_ondemand        6100  4 
acpi_cpufreq            5877  1 
freq_table              2515  2 cpufreq_ondemand,acpi_cpufreq
processor              24224  1 acpi_cpufreq
mperf                   1275  1 acpi_cpufreq
ext4                  375413  4 
mbcache                 5881  1 ext4
jbd2                   70667  1 ext4
crc16                   1359  2 bluetooth,ext4
sr_mod                 14951  0 
cdrom                  36553  1 sr_mod
sd_mod                 28275  6 
usbhid                 35352  0 
hid                    82435  1 usbhid
ahci                   20005  5 
libahci                19559  1 ahci
libata                166724  3 pata_pcmcia,ahci,libahci
ehci_hcd               40762  0 
scsi_mod              132826  3 sr_mod,sd_mod,libata
usbcore               144432  5 uvcvideo,btusb,usbhid,ehci_hcd

Last edited by Kaurin (2011-12-15 16:26:19)

Offline

#11 2011-12-30 20:11:15

Fallback
Member
From: Austria
Registered: 2009-12-26
Posts: 25

Re: [Solved?]Sound crackling on poweroff/restart

try blacklisting pcspkr

GRUB_CMDLINE_LINUX
modprobe.blacklist=pcspkr

Offline

#12 2011-12-30 23:55:51

Kaurin
Member
From: Ireland
Registered: 2011-12-11
Posts: 66

Re: [Solved?]Sound crackling on poweroff/restart

i have added your line to grub, ran grub-mkconfig, rebooted 2x, same thing

hmm

Offline

#13 2012-01-20 23:46:43

Kaurin
Member
From: Ireland
Registered: 2011-12-11
Posts: 66

Re: [Solved?]Sound crackling on poweroff/restart

bump. I have just upgraded to 3.2.1-1 . the problem persists.

Current lsmod:

Module                  Size  Used by
fuse                   66922  2 
bnep                    9181  2 
ipv6                  288511  50 
uvcvideo               64311  0 
videodev               82069  1 uvcvideo
media                  10597  2 uvcvideo,videodev
v4l2_compat_ioctl32     8316  1 videodev
snd_hda_codec_hdmi     24121  4 
pata_pcmcia            10093  1 
arc4                    1410  2 
joydev                  9895  0 
tpm_infineon            7826  0 
snd_hda_codec_idt      56637  1 
nvidia              12066843  43 
ppdev                   5774  0 
iwlwifi               247876  0 
mac80211              229016  1 iwlwifi
firewire_ohci          31669  0 
parport_pc             30170  0 
tpm_tis                 9311  0 
tpm                    12698  2 tpm_infineon,tpm_tis
cfg80211              172260  2 iwlwifi,mac80211
pcmcia                 36257  1 pata_pcmcia
iTCO_wdt               11885  0 
hp_wmi                  7738  0 
sparse_keymap           3120  1 hp_wmi
snd_hda_intel          23311  2 
snd_hda_codec          89032  3 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_intel
sdhci_pci              10884  0 
sdhci                  23274  1 sdhci_pci
mmc_core               80878  2 sdhci_pci,sdhci
serio_raw               4429  0 
hp_accel               16360  0 
wmi                     8475  1 hp_wmi
psmouse                61311  0 
e1000e                144248  0 
snd_hwdep               6389  1 snd_hda_codec
intel_ips              11213  0 
evdev                   9530  16 
snd_pcm                74780  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_timer              19544  1 snd_pcm
snd                    59214  11 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
soundcore               6210  1 snd
yenta_socket           21143  0 
parport                31983  2 ppdev,parport_pc
firewire_core          50872  1 firewire_ohci
tpm_bios                5089  1 tpm
lis3lv02d              10875  1 hp_accel
intel_agp              10904  0 
iTCO_vendor_support     1961  1 iTCO_wdt
pcmcia_rsrc             8889  1 yenta_socket
pcmcia_core            12150  3 pcmcia,yenta_socket,pcmcia_rsrc
crc_itu_t               1363  1 firewire_core
mei                    32414  0 
snd_page_alloc          7153  2 snd_hda_intel,snd_pcm
thermal                 7799  0 
video                  11164  0 
container               2429  0 
i2c_core               20492  2 videodev,nvidia
intel_gtt              14519  1 intel_agp
vboxnetflt             17159  0 
input_polldev           2914  1 lis3lv02d
vboxdrv              1790690  1 vboxnetflt
ac                      2344  0 
battery                 6453  0 
button                  4470  0 
bluetooth             151999  7 bnep
rfkill                 15498  5 cfg80211,hp_wmi,bluetooth
cpufreq_powersave        990  0 
cpufreq_userspace       2144  0 
cpufreq_ondemand        6164  4 
acpi_cpufreq            5877  1 
freq_table              2515  2 cpufreq_ondemand,acpi_cpufreq
processor              25582  1 acpi_cpufreq
mperf                   1275  1 acpi_cpufreq
ext4                  417052  4 
mbcache                 5881  1 ext4
jbd2                   71243  1 ext4
crc16                   1359  2 bluetooth,ext4
sr_mod                 14951  0 
sd_mod                 28307  6 
cdrom                  36649  1 sr_mod
usbhid                 35352  0 
hid                    83267  1 usbhid
ahci                   20037  5 
libahci                19559  1 ahci
libata                166654  3 pata_pcmcia,ahci,libahci
scsi_mod              133443  3 sr_mod,sd_mod,libata
ehci_hcd               40698  0 
usbcore               146241  4 uvcvideo,usbhid,ehci_hcd
usb_common               954  1 usbcore

I have also updated my rc,local.shutdown to look like this:

#!/bin/bash
#
# /etc/rc.local.shutdown: Local shutdown script.
#

modprobe -r snd_hda_intel 
modprobe -r snd_hda_codec_idt 
modprobe -r snd_hda_codec_hdmi
modprobe -r snd_hda_codec 
modprobe -r snd_hwdep 
modprobe -r snd_pcm 
modprobe -r snd_timer
modprobe -r snd soundcore 
modprobe -r snd_page_alloc
modprobe -r snd

Note: this shutdown script does not work (snd_hda_intel in use). I have put the modules in this particular order, because I managed to unload them from init 1 in that order. After rebooting from init 1 after unloading those modules, the problem still persisted.

Any ideas? sad

Offline

#14 2012-01-21 01:03:09

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

Re: [Solved?]Sound crackling on poweroff/restart

Kaurin wrote:

snd_hda_intel in use

So, kill whatever's using it. Check with:

fuser -fv /dev/snd/* /dev/dsp*

Offline

#15 2012-01-21 07:54:02

Kaurin
Member
From: Ireland
Registered: 2011-12-11
Posts: 66

Re: [Solved?]Sound crackling on poweroff/restart

As I said: I have manually removed all those modules from init 1 and then rebooted without success. It's not just the sound modules

Offline

#16 2012-01-21 08:05:02

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [Solved?]Sound crackling on poweroff/restart

Installing pulseaudio could help - at some point my PCs started crackling when resuming, they don't do it when I'm running pulseaudio, and Ubuntu/Mint use pulseaudio, Debian probably doesn't.

-edit-

You mention some pulseaudio error, so perhaps you are running it. If that's the case, you can use "su your_username -c "amixer -q set Master 0% mute"" to mute the card on shutdown.

Last edited by lucke (2012-01-21 08:13:30)

Offline

#17 2012-01-21 08:14:01

Kaurin
Member
From: Ireland
Registered: 2011-12-11
Posts: 66

Re: [Solved?]Sound crackling on poweroff/restart

I'm using it

[milos@KaurinovCNN ~]$ ps axu | grep pulse
milos     1926  0.0  0.1 434660  7616 ?        Sl   00:41   0:09 /usr/bin/pulseaudio --start --log-target=syslog
milos     1930  0.0  0.0  68896  2604 ?        S    00:41   0:00 /usr/lib/pulse/gconf-helper
milos     6577  0.0  0.0   8652  1052 pts/0    S+   09:14   0:00 grep --color=auto pulse

Offline

#18 2012-01-21 08:37:07

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

Re: [Solved?]Sound crackling on poweroff/restart

You're not being very helpful.

You have to make sure that pulseaudio is stopped, before the ALSA kernel modules can be unloaded. Isn't this obvious?

Offline

#19 2012-01-21 08:46:18

Kaurin
Member
From: Ireland
Registered: 2011-12-11
Posts: 66

Re: [Solved?]Sound crackling on poweroff/restart

brebs. I guess you don't know what init 1 is. When you go to init 1, you are in single usermode with only 1 instance of shell and no other services/processes active.

here is an output of ps axu from init 1

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   4196   732 ?        Ss   00:40   0:00 init [s]  
root         2  0.0  0.0      0     0 ?        S    00:40   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    00:40   0:00 [ksoftirqd/0]
root         6  0.0  0.0      0     0 ?        S    00:40   0:00 [migration/0]
root        21  0.0  0.0      0     0 ?        S<   00:40   0:00 [cpuset]
root        22  0.0  0.0      0     0 ?        S<   00:40   0:00 [khelper]
root        23  0.0  0.0      0     0 ?        S    00:40   0:00 [kdevtmpfs]
root        24  0.0  0.0      0     0 ?        S<   00:40   0:00 [netns]
root        25  0.0  0.0      0     0 ?        S    00:40   0:00 [sync_supers]
root        26  0.0  0.0      0     0 ?        S    00:40   0:00 [bdi-default]
root        27  0.0  0.0      0     0 ?        S<   00:40   0:00 [kblockd]
root        29  0.0  0.0      0     0 ?        S    00:41   0:00 [khungtaskd]
root        30  0.0  0.0      0     0 ?        S    00:41   0:00 [kswapd0]
root        31  0.0  0.0      0     0 ?        SN   00:41   0:00 [ksmd]
root        32  0.0  0.0      0     0 ?        SN   00:41   0:00 [khugepaged]
root        33  0.0  0.0      0     0 ?        S    00:41   0:00 [fsnotify_mark]
root        34  0.0  0.0      0     0 ?        S<   00:41   0:00 [crypto]
root        36  0.0  0.0      0     0 ?        S<   00:41   0:00 [kthrotld]
root       161  0.0  0.0      0     0 ?        S    00:41   0:00 [khubd]
root       166  0.0  0.0      0     0 ?        S<   00:41   0:00 [ata_sff]
root       167  0.0  0.0      0     0 ?        S    00:41   0:00 [scsi_eh_0]
root       168  0.0  0.0      0     0 ?        S    00:41   0:00 [scsi_eh_1]
root       169  0.0  0.0      0     0 ?        S    00:41   0:00 [scsi_eh_2]
root       170  0.0  0.0      0     0 ?        S    00:41   0:00 [scsi_eh_3]
root       171  0.0  0.0      0     0 ?        S    00:41   0:00 [scsi_eh_4]
root       172  0.0  0.0      0     0 ?        S    00:41   0:00 [scsi_eh_5]
root       208  0.0  0.0      0     0 ?        S    00:41   0:00 [jbd2/sda7-8]
root       209  0.0  0.0      0     0 ?        S<   00:41   0:00 [ext4-dio-unwrit]
root       332  0.0  0.0      0     0 ?        S<   00:41   0:00 [iprt]
root       408  0.0  0.0      0     0 ?        S<   00:41   0:00 [firewire]
root       409  0.0  0.0      0     0 ?        S    00:41   0:00 [ips-adjust]
root       410  0.0  0.0      0     0 ?        S    00:41   0:00 [ips-monitor]
root       412  0.0  0.0      0     0 ?        S<   00:41   0:00 [kpsmoused]
root       413  0.0  0.0      0     0 ?        S    00:41   0:00 [pccardd]
root       441  0.0  0.0      0     0 ?        S<   00:41   0:00 [cfg80211]
root       456  0.0  0.0      0     0 ?        S<   00:41   0:00 [iwlwifi]
root       460  0.0  0.0      0     0 ?        S<   00:41   0:00 [hd-audio0]
root       474  0.0  0.0      0     0 ?        S<   00:41   0:00 [hd-audio1]
root       524  0.0  0.0      0     0 ?        S    00:41   0:00 [scsi_eh_6]
root       633  0.0  0.0      0     0 ?        S    00:41   0:00 [jbd2/sda5-8]
root       634  0.0  0.0      0     0 ?        S<   00:41   0:00 [ext4-dio-unwrit]
root       635  0.0  0.0      0     0 ?        S    00:41   0:00 [jbd2/sda9-8]
root       636  0.0  0.0      0     0 ?        S<   00:41   0:00 [ext4-dio-unwrit]
root       637  0.0  0.0      0     0 ?        S    00:41   0:00 [jbd2/sda8-8]
root       638  0.0  0.0      0     0 ?        S<   00:41   0:00 [ext4-dio-unwrit]
root      1198  0.0  0.0      0     0 ?        S    00:41   0:00 [flush-8:0]
root      2878  0.0  0.0      0     0 ?        S    08:51   0:00 [migration/1]
root      2880  0.0  0.0      0     0 ?        S    08:51   0:00 [ksoftirqd/1]
root      2882  0.0  0.0      0     0 ?        S    08:51   0:00 [migration/2]
root      2884  0.0  0.0      0     0 ?        S    08:51   0:00 [ksoftirqd/2]
root      2886  0.0  0.0      0     0 ?        S    08:51   0:00 [migration/3]
root      2888  0.0  0.0      0     0 ?        S    08:51   0:00 [ksoftirqd/3]
root      2890  0.0  0.0      0     0 ?        S    08:51   0:00 [irq/45-mei]
root      2912  0.0  0.0      0     0 ?        S    08:51   0:00 [kworker/u:39]
root      2914  0.0  0.0      0     0 ?        S    08:51   0:00 [kworker/2:0]
root      2915  0.0  0.0      0     0 ?        S    08:51   0:00 [kworker/1:0]
root      2916  0.0  0.0      0     0 ?        S    08:51   0:01 [kworker/1:1]
root      2918  0.0  0.0      0     0 ?        S    08:51   0:00 [kworker/3:1]
root      5550  0.0  0.0      0     0 ?        S    09:11   0:00 [kworker/u:0]
root      6119  0.0  0.0      0     0 ?        S    09:13   0:00 [kworker/3:2]
root      6264  0.0  0.0      0     0 ?        S    09:13   0:00 [watchdog/0]
root      6265  0.0  0.0      0     0 ?        S    09:13   0:00 [watchdog/1]
root      6266  0.0  0.0      0     0 ?        S    09:13   0:00 [watchdog/2]
root      6267  0.0  0.0      0     0 ?        S    09:13   0:00 [watchdog/3]
root     15877  0.0  0.0      0     0 ?        S    09:26   0:00 [kworker/0:1]
root     15950  0.0  0.0      0     0 ?        S    09:31   0:00 [kworker/2:1]
root     15983  0.0  0.0      0     0 ?        S    09:32   0:00 [kworker/0:3]
root     16167  0.0  0.0      0     0 ?        S    09:37   0:00 [scsi_eh_8]
root     16168  0.0  0.0      0     0 ?        S    09:37   0:00 [usb-storage]
root     16190  0.0  0.0      0     0 ?        S    09:37   0:00 [kworker/0:0]
root     16199  0.0  0.0      0     0 ?        S    09:38   0:00 [kworker/u:1]
root     16313  0.0  0.0      0     0 ?        S<   09:38   0:00 [krfcommd]
root     16995  0.0  0.0      0     0 ?        S    09:38   0:00 [kworker/3:0]
root     17006  0.0  0.0      0     0 ?        S    09:38   0:00 [kworker/0:2]
root     17016  0.2  0.0  11320  1720 ?        Ss   09:38   0:00 /lib/udev/udevd --daemon
root     17086  0.0  0.0  11268  1248 ?        S    09:38   0:00 /lib/udev/udevd --daemon
root     17087  0.0  0.0  11236  1296 ?        S    09:38   0:00 /lib/udev/udevd --daemon
root     17349  0.0  0.0   4196   104 tty1     Ss   09:38   0:00 init [s]  
root     17350  0.6  0.1  18672  5156 tty1     S    09:38   0:00 -bash
root     17404  0.0  0.0  10736  1228 tty1     R+   09:39   0:00 ps axu

and pstree

init-+-init---bash---pstree
     `-udevd---2*[udevd]

As you can see - only kernel processes udevd and bash are active.

Offline

#20 2012-01-21 11:07:06

dawidope
Member
Registered: 2012-01-13
Posts: 5

Re: [Solved?]Sound crackling on poweroff/restart

Is it this same sound like sound after this commend: aplay -d 1 /dev/zero ?
I had similar problem after wakeup from suspend. I removed this line from /etc/pm/sleep.d/90alsa. I know you have crackling after poweroff but maybe you have also this line in some poweroff script.

Offline

#21 2012-01-21 11:33:10

Kaurin
Member
From: Ireland
Registered: 2011-12-11
Posts: 66

Re: [Solved?]Sound crackling on poweroff/restart

The sound is very similar, only it lasts around 2.5 seconds and is more intense (like multiple instances of it). I have went to /etc and ran

$ sudo grep -r aplay .
./speech-dispatcher/modules/espeak-mbrola-generic.conf:# utility (play, aplay, paplay for OSS, ALSA or Pulse)
./speech-dispatcher/modules/espeak-mbrola-generic.conf:# with play, paplay or similar.
./speech-dispatcher/modules/espeak-generic.conf:# IMPORTANT: The audio output method relies on ALSA Player (aplay)
./speech-dispatcher/modules/espeak-generic.conf:# or replace the aplay command in the GenericExecuteString below
./speech-dispatcher/modules/swift-generic.conf:# utility (play, aplay, paplay for OSS, ALSA or Pulse)
./speech-dispatcher/modules/swift-generic.conf:# with play, paplay or similar.
grep: ./httpd/run: No such file or directory
./pm/sleep.d/90alsa:aplay -d 1 /dev/zero
Binary file ./ld.so.cache matches

So, i don't see it anywhere except in /etc//pm/90alsa. I have commented it out, but, ofcourse, it still happens on reboot/shutdown

Last edited by Kaurin (2012-01-21 11:35:05)

Offline

#22 2012-01-29 02:18:05

Kaurin
Member
From: Ireland
Registered: 2011-12-11
Posts: 66

Re: [Solved?]Sound crackling on poweroff/restart

Ok. I have found a way to stop the crackling noise. There is probably a better way to solve this (maybe options for the snd_hda module or something similar). Anyway, you will find my solution below:

add the following lines to the end of /etc/rc.local.shutdown

amixer set Master mute

reboot to try it out smile

edit: you will have to unmute upon boot, or put "amixer set Master unmute" in one of the startup scripts because sound will be muted on boot

Last edited by Kaurin (2012-01-29 02:19:30)

Offline

Board footer

Powered by FluxBB