LinuxForum.Fans
Тема

звуковая карта ноутбука отключается без питания от сети

Автор: V-Oz 3 сообщений 2471 просмотров
#336468

У меня в ноутбуке через YAST видны две карты - одна (дискретная) динамики качает, другая (nVidia) - HDMI.
проблема в следующем: вскоре после отключения ноута от сети, если никакая программа не удерживает звук, то дискретная звуковая карта отключается - в рамках энергосбережения, видимо. Чтобы ее реанимировать приходится через YAST ее удалять и настраивать заново. тогда звук поднимается и работает даже без питания от сети. возможно заново происходит вставка модулей звуковой карты в ядро, которые заново ее инициализируют или еще что-то. Но все равно это утомляет. Особенно других пользователей.

Попробовал найти обход через PM - прописал правило "не отключать карту"

# more /etc/pm/config.d/intel-audio.config
# This file configures the ability to Allow the driver to put
# the audio hardware to sleep once the driver has been inactive for a second.
INTEL_AUDIO_POWERSAVE=false

но это вроде как помогло ровно на один раз и то не уверен, что из-за этого.

еще есть параметр карты при редактировании в YAST - Automatic power-saving timeout (in second, 0 - disabling)= power_save, который остается пустым. пробовал ставить 0, но драйвер ругается на параметры (и вообще, он ругается на любое значение параметра). То есть вроде как на уровне модуля ядра энергосбережение отключено или вовсе заблокировано.

вопросы:
1. кто на самом деле отключает устройства на шине?
2. как убедить его не отключать определенные устройства?
3. каким скриптом/командой перезапустить карту, чтобы не гоняться через YAST? (если пп.1,2 не сработают)

#336615

На мой взгляд, «проблема» в настройках laptop-mode-tools — гляньте, если этот пакет у вас установлен, файл /etc/laptop-mode/conf.d/intel-hda-powersave.conf.
P.S. ...или попробуйте от root выполнить команду

text
echo 0 > /sys/module/snd_ac97_codec/parameters/power_save
"cat /usr/src/linux/Documentation/sound/alsa/powersave.txt

Notes on Power-Saving Mode
==========================

AC97 and HD-audio drivers have the automatic power-saving mode.
This feature is enabled via Kconfig CONFIG_SND_AC97_POWER_SAVE
and CONFIG_SND_HDA_POWER_SAVE options, respectively.

With the automatic power-saving, the driver turns off the codec power
appropriately when no operation is required. When no applications use
the device and/or no analog loopback is set, the power disablement is
done fully or partially. It'll save a certain power consumption, thus
good for laptops (even for desktops).

The time-out for automatic power-off can be specified via power_save
module option of snd-ac97-codec and snd-hda-intel modules. Specify
the time-out value in seconds. 0 means to disable the automatic
power-saving. The default value of timeout is given via
CONFIG_SND_AC97_POWER_SAVE_DEFAULT and
CONFIG_SND_HDA_POWER_SAVE_DEFAULT Kconfig options. Setting this to 1
(the minimum value) isn't recommended because many applications try to
reopen the device frequently. 10 would be a good choice for normal
operations.

The power_save option is exported as writable. This means you can
adjust the value via sysfs on the fly. For example, to turn on the
automatic power-save mode with 10 seconds, write to
/sys/modules/snd_ac97_codec/parameters/power_save (usually as root):

# echo 10 > /sys/modules/snd_ac97_codec/parameters/power_save


Note that you might hear click noise/pop when changing the power
state. Also, it often takes certain time to wake up from the
power-down to the active state. These are often hardly to fix, so
don't report extra bug reports unless you have a fix patch ;-)

For HD-audio interface, there is another module option,
power_save_controller. This enables/disables the power-save mode of
the controller side. Setting this on may reduce a bit more power
consumption, but might result in longer wake-up time and click noise.
Try to turn it off when you experience such a thing too often.
#336733

Спасибо. Однако я забыл указать, что и это тоже я проходил. Поставил все на ноль, кроме таймаута.

cat /etc/laptop-mode/conf.d/intel-hda-powersave.conf
# Control INTEL HDA audio chipset power?
# Set to 0 to disable
CONTROL_INTEL_HDA_POWER=0

# Handle power savings for Intel HDA under specific circumstances
BATT_INTEL_HDA_POWERSAVE=0
LM_AC_INTEL_HDA_POWERSAVE=0
NOLM_AC_INTEL_HDA_POWERSAVE=0

# Number of seconds to wait before you want the device to time out
INTEL_HDA_DEVICE_TIMEOUT=2

# Disable controller on Device timeout
# This saves more power
# However you might want to disable this if you get annoyed by the
# "click" sound when the device wakes up again
#
# Set this to 1 to enable power savings for the controller also
INTEL_HDA_DEVICE_CONTROLLER=0

сейчас попробовал сделать

text
# cat /sys/module/snd_hda_intel/parameters/power_save
0
# cat /sys/module/snd_hda_intel/parameters/power_save_controller
Y
# echo N > /sys/module/snd_hda_intel/parameters/power_save_controller
# cat /sys/module/snd_hda_intel/parameters/power_save_controller
N

не помогло :(

придется по старинке подвесить на кнопку
modprobe snd_hda_intel :)

Войдите или зарегистрируйтесь, чтобы ответить.