I'm new to Linux and recently bought a ZenBook Pro Duo UX582LR. I'm running Zorin OS 16 Pro and having audio issues. The audio appears to be working. In settings you can see feedback from output meter and the input meter on the microphone but can't hear anything on the speakers. I found this thread
https://www.linux.org/threads/solved-asus-zenbook-15-ux534f-realtek-hd-audio-problem.27384/ and the below commands work to get audio playing from the speaker but it causes the microphone to stop working. Any help would be appreciated.
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x1b
sudo hda-verb /dev/snd/hwC0D0 0x20 0x477 0x4a4b
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0xf
sudo hda-verb /dev/snd/hwC0D0 0x20 0x477 0x74
The reason you have no output through your speakers is because there is no program linking the microphone input to any outputs.
You'll be able to monitor the levels in the sound options, to see what sort of levels your microphone is picking up, but you won't hear anything.
If you open up a program like audacity - you can set the microphone as the input and then record from the microphone and then play back the recording to listen back.
Likewise, if you start a call with a SIP client, or something like Jitsi, Zoom, or Skype - those applications will stream audio from your microphone to whoever you're talking with. But again, you won’t hear your voice through the headphones/speakers.
Off the top of my head - if you just want your voice to come straight out of the speakers, you could perhaps open a terminal and try this (using alsa):
That
will work. That will record audio from the default input device and will pipe it directly to aplay, which will play it back immediately through the systems default output device.
To stop the process - simply press
ctrl + c
to kill it.
Just be careful with how loud your speakers are and with how much gain you have on your mic, because you could end up with a lot of screechy feedback!
The only way to prevent the feedback would be to keep the microphone away from the speakers, or perhaps plug in some headphones (especially if your mic is internal) - that way the mic won't pick up any of the audio from the speakers and cause a feedback loop.
It's also worth noting that this method will have a bit of latency to it - so there will be some delay between your mic picking up a sound and it coming out of your speakers.
Another way I can think of, to connect the mic directly to the speakers would be to install
pavucontrol
(mixer for the pulseaudio system) and then run:
Bash:
pactl load-module module-loopback latency_msec=10
That will load pulseaudio's loopback module and will allow you to set up which device to route through the local loopback interface. I've just arbitratily set the latency to 10 milliseconds, which should reduce the delay between speech and playback.
However, if that value is too low for your system - you could end up with underruns, or drop-outs. In which case, you should increase it a little bit.
Once you have the loopback module running in pulse, you should be able to run
pavucontrol
and open the "Recording" tab to set up which microphone should loop-back into your default output device. As soon as that is set up - that should directly route voice input to your speakers.
And again - be careful with your speaker levels and the mic gain levels, or you could end up with a lot of feedback.
If you have an internal mic that cannot be kept away from the speaker output - the only way to avoid feedback is to use headphones!
To stop it, use the command:
Bash:
pactl unload-module module-loopback
That will unload the loopback module and stop your microphone audio from going directly to the speaker.
NOTE: When you run
pactl load-module module-loopback
- you will see a number output to the terminal.
If you want to shut the module down with less typing, you could use
pactl unload-module {number}
- where {number} is the number that was displayed when you loaded the module. So for example, if loading the module outputs 22, then to unload the module, you would use:
Another even more advanced method of routing your audio would be to install and use
JACK
(Jacks Audio Connection Kit) and
qjackctl
- But I'm not going to go into that here. I don't have time to discuss all of the ins and outs of using JACK. But if you're a musician and want to record audio - then JACK is pretty much a necessity!
So it IS possible to route microphone input directly to the speaker, as I have demonstrated. And there are several ways of doing so.
There are times when monitoring voice input is desirable. However - generally speaking - you don't want to do it all of the time because it's going to feed back, unless you are extremely careful with your setup!
I hope this helps!