Forum / NoMachine for Linux / Audio not muted on Ubuntu server (NoMachine 8.16.1)
- This topic has 10 replies, 3 voices, and was last updated 2 weeks, 6 days ago by
jimavera.
-
AuthorPosts
-
March 4, 2025 at 07:26 #52047
jimavera
ParticipantI see that a similar problem was reported previously but shown as fixed in version 7.something.
I’m running NoMachine 8.16.1 on Ubuntu 24.04 LTS server and Windows 10 client. While playing youtube videos (running on the server, viewed on the client), the sound is heard from both server and client machines.
Physical display (Xorg session)“Mute audio on the server” is checked in Audio settings, reached via the peel menu after connecting.
I’ll attach server logs and the output from various alsa commands requested in one of those older bug reports (although I don’t think Ubuntu 24.04 uses alsa).
OOPS it won’t allow me to attach a 1.5 megabyte file. I will email them to info[ab]nomachine
Thanks for any help!
March 6, 2025 at 15:49 #52128kubaszym1
ParticipantHi,
We will try to reproduce your issue on our computers. I looked at the logs you send but I need to investigate it more deeply. For now I can give some hints and also ask some questions that will help investigate your issue.
1) NoMachine uses alsa functionalities to mute/unmute sound during session, so your ubuntu should have alsa installed in order work correctly with NoMachine. I found a case that may be similar to yours: https://askubuntu.com/questions/1511648/audio-not-working-ubuntu-24-04
2) I saw that you tried to list all you audio devices. It failed because you used pacmd (a command specific to pulseaudio). Instead you can use “pactl list sinks short” or “pw-cli ls Node” for more detailed info. Although NoMachine does not mute audio devices – it mutes the whole sound card, that’s why we need to use alsa functionalities. We need it like that, so we can stream data with having the server muted at the same time.
3) The issue may be caused for two main reasons: NoMachine’s muting script didn’t work or it wasn’t run at all because of some problems in the higher layer. Can you check if unchecking and then checking the ‘Mute audio on the server’ option again actually mutes sound on the server?
Regards,
Kuba
March 8, 2025 at 05:22 #52169jimavera
ParticipantHi Kuba,
I have Ubuntu 24.04 LTS. also is installed.
* I tried un-checking and re-checking the “Mute audio on the server” but the problem persists (still hear sound on both).
* Attached is the output from the pactl and pw-cli commands you mentioned.
Thanks,
-Jim
Attachments:
March 8, 2025 at 05:26 #52171jimavera
Participant…I noticed in the
pactl list sinks short
output that “nx_voice_out” is “SUSPENDED” (see output file sent previously). Is that normal?March 12, 2025 at 16:04 #52214kubaszym1
ParticipantHi,
I investigated the logs you send and everything seems fine there – NoMachine process shows that it successfully muted your sound card. I only see one sound card there in the logs, but to ensure you can run this:
ls /dev/snd | grep controlC
in order to list your sound cards.
Here’s the list of controls in your sound card: [numid=33%%60-numid=9%%87,87-numid=68%%255,255-numid=14%%0,0-numid=1%%87,87-numid=3%%87,87-numid=5%%87-numid=6%%87-numid=16%%0,0-numid=12%%0,0]. You can use it to manually mute your sound card. I’d like to ask you to do it, in order to check if the issue is related to our script or directly to the amixer command. So the command is:
amixer -c 0 cset numid=<numid> 0%
If you call the command above for all numids, the sound should be muted. If it works, then I’ll try to investigate why it doesn’t work for you when called from our script.
Regards,
Kuba
March 13, 2025 at 08:54 #52232jimavera
ParticipantHi Kuba,
Your post came through garbled, but I extracted the bits matching /numid=\d+/ and tried this:for n in 1 12 14 16 3 33 5 6 68 9 ; do
(set -x; amixer -c 0 cset numid=$n 0%)
doneThat had no effect. However by experimenting on all numid values shown by
amixer -c 0 controls
I found one that worked:$ amixer -c 0 cset numid=51 0%
numid=51,iface=MIXER,name=’IEC958 Playback Switch’
; type=BOOLEAN,access=rw——,values=1
: values=offI googled IEC985 and found out that it is an S/PDIF data standard which is also used by some HDMI devices. I think. Anyway, muting that seems to be necessary to mute the speakers in my monitor (connected via Display Port, I believe).
Hope this helps!-Jim
Attachments:
March 13, 2025 at 13:08 #52239kubaszym1
ParticipantHi,
It seems that NoMachine doesn’t mute HDMI speakers properly. Do you only have HDMI speakers? There can be two reasons:
1) It used to work better in the past and muting controls with “Playback Volume” in their name was enough.
2) Muting HDMI causes issues with streaming audio data to the client machine. The relation between different speakers, ALSA, and pipewire/pulseaudio is a bit complicated. For certain speakers, i.e. bluetooth headphones, you can’t mute the device and stream audible audio data to the client at once becasuse of linux audio architecture. Maybe it’s similar for HDMI.
If you mute the HDMI speakers manually, does it interrupt streaming audio to the client or you can still hear the audio from the server on the client?
Regards,
Kuba
March 13, 2025 at 21:25 #52250jimavera
ParticipantOn my system there is no problem: Setting ‘IEC958 Playback Switch’ to off stops sound from the HDMI-attached host speakers, but does NOT prevent sound being heard on the client, i.e. it does what we want. My bluetooth headset (Bose QC35) remained working (both sound and microphone input — which I tested using zoom) regardless of which devices I set to 0% or off — in fact I could not determine how to shut off the bluetooth headset using amixer. Attached is the Perl script I used to test. It discovers the devices (using
amixer -c 0 controls
) , filters out the names which cause errors (determined experimentally), and reads and saves current settings withcget
. Then it transmografies the settings to mean “off” (changes true to false, on to off, numbers to zeroes). Finally, it waits for the user to type ENTER and then restores the original settings. In other words, if nomachine used a script like this it would work fine on my system. Thanks for sticking with me on this one. I hope this provides you the info you need. -JimMarch 13, 2025 at 21:28 #52251jimavera
ParticipantGrr…. How can I attache a text file containing the Perl script? The forum says that file type is “not allowed”. I tried putting a .txt suffix on the end, and making the lines contain CRLF line endings (ala MSWin) but still it would not accept it! Do I *have* to put everything in a .zip file !?!
Attachments:
March 14, 2025 at 09:30 #52256Britgirl
KeymasterHi, about the attachment rules, generally it’s possible to attach a txt file. There could be a character which is causing it to be intercepted, so yes, in that case it’s advisable to zip it. Thanks for your understanding.
March 14, 2025 at 18:47 #52282jimavera
ParticipantThe script I sent previously ‘use’d a private library (sorry).
Here is a revised version which used only standard libraries.Attachments:
-
AuthorPosts
You must be logged in to reply to this topic. Please login here.