You are not logged in.

#1 2018-12-29 11:02:08

damien200
Member
Registered: 2018-12-29
Posts: 16

[Solved] Realtek ALC299 : sound problem after fresh install

Hello,

I just installed Archlinux on my new laptop but when I log in Gnome, the sound is not working.
-> pavucontrol say : "Speaker (unavaible)" and "earphones (plugged in)"

Nothing change if I select manually Speaker... And no sound when earphone is selected...
No problem at all under Windows.

So if someone can help me, I have never dealt with Pulseaudio before.

Here are some info about my sound configuration : http://www.alsa-project.org/db/?f=4cb1c … 3c1f516414

Thanks

Last edited by damien200 (2019-01-09 17:27:38)

Offline

#2 2018-12-29 11:48:40

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,563

Re: [Solved] Realtek ALC299 : sound problem after fresh install

Can you check if speaker-test -c 2 gives you an error?
Also can you give the output of:

sudo fuser -v /dev/snd/*
amixer -c1
pacmd list-cards
pacmd list-sinks
pacmd list-sink-inputs

while trying to play some media.

Offline

#3 2018-12-29 12:30:33

damien200
Member
Registered: 2018-12-29
Posts: 16

Re: [Solved] Realtek ALC299 : sound problem after fresh install

Thanks for your reply, here are the outputs :

No error for speaker-test -c 2

sudo fuser -v /dev/snd/* 
                     UTIL.       PID ACCÈS  COMMANDE
/dev/snd/controlC0:  gdm         836 F.... pulseaudio
                     damien     1081 F.... pulseaudio
/dev/snd/pcmC0D0p:   damien     1081 F...m pulseaudio

amixer -c1 gives : "Invalid card number" so I tried with -c0 :

amixer -c0
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 78 [90%] [-6.75dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 0 [0%] [-65.25dB] [off]
  Front Right: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 39 [62%] [12.00dB] [on]
  Front Right: Capture 39 [62%] [12.00dB] [on]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'
Simple mixer control 'Internal Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
pacmd list-cards
1 card(s) available.
    index: 0
	name: <alsa_card.pci-0000_00_1f.3>
	driver: <module-alsa-card.c>
	owner module: 6
	properties:
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0x404a100000 irq 141"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a348"
		device.product.name = "Cannon Lake PCH cAVS"
		device.form_factor = "internal"
		device.string = "0"
		device.description = "Audio interne"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	profiles:
		input:analog-stereo: Entrée Stéréo analogique (priority 65, available: unknown)
		output:analog-stereo: Sortie Stéréo analogique (priority 6500, available: unknown)
		output:analog-stereo+input:analog-stereo: Duplex stéréo analogique (priority 6565, available: unknown)
		off: Éteint (priority 0, available: unknown)
	active profile: <output:analog-stereo+input:analog-stereo>
	sinks:
		alsa_output.pci-0000_00_1f.3.analog-stereo/#0: Audio interne Stéréo analogique
	sources:
		alsa_output.pci-0000_00_1f.3.analog-stereo.monitor/#0: Monitor of Audio interne Stéréo analogique
		alsa_input.pci-0000_00_1f.3.analog-stereo/#1: Audio interne Stéréo analogique
	ports:
		analog-input-internal-mic: Microphone interne (priority 8900, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-output-speaker: Haut-parleurs (priority 10000, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-speakers"
		analog-output-headphones: Casque audio (priority 9000, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "audio-headphones"
pacmd list-sinks
1 sink(s) available.
  * index: 0
	name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: RUNNING
	suspend cause: (none)
	priority: 9039
	volume: front-left: 50580 /  77% / -6,75 dB,   front-right: 50580 /  77% / -6,75 dB
	        balance 0,00
	base volume: 65536 / 100% / 0,00 dB
	volume steps: 65537
	muted: no
	current latency: 40,65 ms
	max request: 6 KiB
	max rewind: 6 KiB
	monitor source: 0
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stéréo
	used by: 1
	linked by: 1
	configured latency: 40,00 ms; range is 0,50 .. 2000,00 ms
	card: 0 <alsa_card.pci-0000_00_1f.3>
	module: 6
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC299 Analog"
		alsa.id = "ALC299 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0x404a100000 irq 141"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a348"
		device.product.name = "Cannon Lake PCH cAVS"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "352800"
		device.buffering.fragment_size = "176400"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Stéréo analogique"
		device.description = "Audio interne Stéréo analogique"
		alsa.mixer_name = "Realtek ALC299"
		alsa.components = "HDA:10ec0299,10251243,00100002"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-output-speaker: Haut-parleurs (priority 10000, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-speakers"
		analog-output-headphones: Casque audio (priority 9000, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output-headphones>
pacmd list-sink-inputs
1 sink input(s) available.
    index: 9
	driver: <protocol-native.c>
	flags: START_CORKED FIX_RATE 
	state: RUNNING
	sink: 0 <alsa_output.pci-0000_00_1f.3.analog-stereo>
	volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
	        balance 0,00
	muted: no
	current latency: 1127,39 ms
	requested latency: 40,00 ms
	sample spec: float32le 2ch 44100Hz
	channel map: front-left,front-right
	             Stéréo
	resample method: copy
	module: 12
	client: 7 <VLC media player (LibVLC 3.0.4)>
	properties:
		media.role = "video"
		media.name = "audio stream"
		application.name = "VLC media player (LibVLC 3.0.4)"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "32"
		application.id = "org.VideoLAN.VLC"
		application.version = "3.0.4"
		application.icon_name = "vlc"
		application.language = "fr_FR.UTF-8"
		application.process.id = "1573"
		application.process.user = "damien"
		application.process.host = "damien-laptop"
		application.process.binary = "vlc"
		window.x11.display = ":1"
		application.process.machine_id = "3f139095db3049feaaaa85d3e9f0ef66"
		application.process.session_id = "2"
		module-stream-restore.id = "sink-input-by-media-role:video"

Offline

#4 2018-12-29 18:02:54

damien200
Member
Registered: 2018-12-29
Posts: 16

Re: [Solved] Realtek ALC299 : sound problem after fresh install

I'm a bit confused, I spent my entire afternoon on this problem and it seems to be solved by itself...
I just changed the .config/pulse/default.pa file with some lines that I found on internet and at a moment, everything worked.
Just to try to understand wich line is responsible of the solution, I removed the .config/pulse folder and I planned to add each new line I added one by one. But suprise, now, there is no need to add something.

So, if you have the same problem as me, I'm sorry I can't help you.

Offline

#5 2018-12-30 08:38:56

damien200
Member
Registered: 2018-12-29
Posts: 16

Re: [Solved] Realtek ALC299 : sound problem after fresh install

Youhouuuu !
I found the problem !
I just noticed that when my laptop is on battery, sound is working perfectly but when it start plugged, sound doesn't work. So I have investigated and this is tlp's fault (power saving software).
After several minutes tweaking the config file about the audio option, I discovered that the line to change in /etc/default/tlp is... USB_AUTOSUSPEND !!!!!
If you want to solve the pb, put it to 0.

Hard thing to solve, I will put a line in the wiki and report a bug.

Offline

#6 2018-12-31 07:21:53

damien200
Member
Registered: 2018-12-29
Posts: 16

Re: [Solved] Realtek ALC299 : sound problem after fresh install

A little update, finally it doesn't come from tlp...
I don't understand, why sometimes it works perfectly and sometimes not...

Offline

#7 2019-01-06 20:00:36

Toolfox
Member
Registered: 2019-01-06
Posts: 1

Re: [Solved] Realtek ALC299 : sound problem after fresh install

Thanks for the hint about battery vs AC.

I'm struggling with the same ALC299 problem on an Acer Predator Helios 500 system for the last 3 weeks or so...and I believe I've sleuthed it down!

Yes, the root cause is mis-configuration in TLP.

Before we continue, I checked when I could plug AC back in and still have sound: It's at least by the time the GUI login starts up. That indicates that it's a part of kernel/services startup. AC power at Grub will kill audio (no kernel yet) and the system boots to GUI too fast to determine if there's any particular point where audio fails with AC power.

Oddly, sound still works if you simple reboot with AC power; only if you shutdown then restart while plugged into the wall.

Anyway, there are 4 settings that need to be checked in the config file (/etc/default/tlp):

(1) SOUND_POWER_SAVE_ON_AC = 1 [this might be zero by default]
(2) SOUND_POWER_SAVE_ON_BAT = 1
(3) SOUND_POWER_SAVE_CONTROLLER = Y
(4) RUNTIME_PM_ON_AC = auto [this one is disabled by default]

That last one is the biggie. My default setting for it was not to do any power management on PCI/PCI-Express devices. According to the documentation in the config file, this setting as writtten here turns power management on.

Those 4 settings (at least on the Helios 500 I'm trying to deploy to my wife) let sound and headphones work as advertised.

While we're on the subject of power management and an Acer Predator Helios 500, I also noted that wifi did not auto reconnect from sleep. Sure enough, there's a setting in tlp for that as well:

WIFI_PWR_ON_AC = on

will wake up the wifi hardware and auto reconnect.

I think that about covers it. I know I had some funky problems with the sound system's subwoofer being muted, but this machine is not as good soundwise as the earlier generation Predators from two years ago.

Hopefully this information will help you get on your way. Your troubleshooting efforts certainly helped me find the root cause on my system.

Offline

#8 2019-01-06 20:30:09

damien200
Member
Registered: 2018-12-29
Posts: 16

Re: [Solved] Realtek ALC299 : sound problem after fresh install

Hi Toolfox, thanks for your in depth investigation wink
I will try it and I will let you know if it solved the problem for me too.
Thanks

Offline

#9 2019-01-09 17:27:56

damien200
Member
Registered: 2018-12-29
Posts: 16

Re: [Solved] Realtek ALC299 : sound problem after fresh install

It works perfectly for me, good job smile

Last edited by damien200 (2019-01-09 17:28:04)

Offline

#10 2020-02-10 17:51:57

damien200
Member
Registered: 2018-12-29
Posts: 16

Re: [Solved] Realtek ALC299 : sound problem after fresh install

This post is just to mention that after the new version (1.3.0) of tlp, the configuration file is now located in /etc/tlp.conf

My sound disappeared after an upgrade so I had to redo the changes

Offline

Board footer

Powered by FluxBB