Forum / NoMachine for Linux / Unable to get audio working through PulseAudio in AlmaLinux 9
Tagged: pulseaudio
- This topic has 5 replies, 4 voices, and was last updated 11 months, 1 week ago by Britgirl.
-
AuthorPosts
-
October 26, 2023 at 15:30 #45807BionicBunnyParticipant
Hello,
I installed NoMachine (latest version) under AlmaLinux 9 (essentially RHEL9) and audio was working well when it was connected to the “physical session”. I then followed your guide to disable the default X server so that NX can create its own X server so that resizing the screen works correctly.
At that point, audio stopped working and I found instructions that I needed to uninstall pipewire and install pulseaudio: https://kb.nomachine.com/AR07T01168
(I should note, running the nxnode –audiosetup command produced no output at all, not sure if it’s normal or not. I tried running as root and also from a logged in session)
I followed several KB articles and also several guides. Pulseaudio is properly installed, but it seems that it is not starting. I tried searching these forums and the Internet, but did not find a way to fix this.
I can’t even use “pactl”, I just get a “connection refused” error.
Trying to run and start pulseaudio manually from the connected session gives the following error:
W: [pulseaudio] core-util.c: Failed to open configuration file ‘/home/myuser/.nx/nxdevice/D-1001-80D3104D1FEB2FD8E3E626602D7D517A/audio/daemon.conf’: No such file or directory
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.I started NX in debug mode and please find the relevant section of the error log attached.
I noticed that it fails to start and it’s complaining about a ‘/usr/NX/share/audio/client.conf’ file, which doesn’t exist.
Please also find the node.conf configuration file attached to this thread.
(At one point, I also found a thread on this forum: https://forum.nomachine.com/topic/no-audio-with-pulseaudio-system-instance
I even tried changing the pulseaudio configuration file, but still no solution)
Hopefully someone can help or point towards the right direction.
Thanks!
Attachments:
November 6, 2023 at 13:33 #45925kubaszym1ParticipantHi,
I checked your logs and compared it to our code that handles creating of pulseaudio server for virtual sessions. Indeed, pulseaudio server needs client.conf file and such file doesn’t exist in /usr/NX/share/audio. The command that you used –
nxnode --audiosetup
– should copy this file from /etc/pulse/ to /usr/NX/share/audio. I’ll try to find out why it didn’t work. Meanwhile, you can copy client.conf file from /etc/pulse to /usr/NX/share/audio, restart the server and try to connect again. I hope it will fix the issue.Best regards,
Kuba
November 8, 2023 at 20:04 #45966BionicBunnyParticipantHello Kuba,
Thanks for taking the time to help me out on this.
I tried copying the file, but then realized in the logs that it was missing other files so I ended up copying everything from /etc/pulse:
cp -R /etc/pulse/* /usr/NX/share/audio/
When I re-ran
nxnode --audiosetup
I then got some output and then I restarted NoMachine.I’m happy to report that audio now works!
It would be nice if NoMachine could go grab the files directly from /etc/pulse as a fallback, especially if the files are identical, as it might avoid other users experiencing the same problem.
Thanks!
November 26, 2023 at 15:17 #46122huashanParticipantOn fresh install Ubuntu 22.04 with xcfe4 in remote VPS. Through Windows NoMachine app to remote access the VPS. No sound.
I also follow the instruction to modify the /usr/NX/share/audio/client.conf
#
# Specify which audio interface should be used to provide sound in
# sessions. Key values depend on the hosting operating system and can
# be ‘pulseaudio’, ‘alsa’ or ‘disabled’ on Linux, and ‘nxaudio’ or
# ‘disabled’ on Windows and Mac OS X.
#
AudioInterface pulseaudio
#
# Enable or disable audio streaming and microphone forwarding
# during session.
#
# 1: Enabled. Send sound to user’s computer and allow user’s
# microphone be forwarded to this machine.
#
# 0: Disabled. Sound won’t be streamed to user’s computer and
# user’s microphone won’t be forwarded to this machine
#
EnableAudio 1
#
# Specify path and name of the command to start PulseAudio server.
#
CommandStartPulseAudio “/usr/bin/pulseaudio –high-priority=no”
And also sudo cp -R /etc/pulse/* /usr/NX/share/audio/
Then nxnode –audiosetup will show that sudo: nxnode: command not found
Then I restart the system, the pulseaudio volumn control broken and show the error message:
Connection to PulseAudio failed.Automatic retry in 5sIn this case this is likely because PULSE SERVER in the Environment/X11 Root Window Propertiesor default-server in client.conf is misconfigured.
This situation can also arise when PulseAudio crashed and left stale details in the X11 Root Window.
If this is the case, then PulseAudio should autospawn again, or if this is not configured you should run start-pulseaudio-x11 manually.
Attachments:
November 27, 2023 at 17:51 #46138BionicBunnyParticipantHello huashan,
I’m not sure how much I can help you fix your problem, but one hint that I’ll give you is that the “nxnode” command needs to be executed from the NoMachine setup scripts folder. This is why you’re getting the “command not found” error.
So try to execute this before rebooting your server again and trying the sound:
/usr/NX/scripts/setup/nxnode --audiosetup
I hope that this helps! If not, someone else can hopefully chime in.
PS: Funny coincidence, last week I did almost the same thing as you did and I setup Xubuntu 22.04 for testing with NoMachine to alleviate some frustrations that I’ve been having with running AlmaLinux/RHEL as a desktop. Unfortunately, I wasn’t able to get the sound working but I didn’t go as far as you did with changing the PulseAudio startup command. I went back to AlmaLinux and fixed my main frustration (gnome-keyring wasn’t working under XFCE, I had to edit the xinitrc file to source another file).
December 22, 2023 at 15:33 #46463BritgirlKeymasterResponding Huashan, your question is now in https://forum.nomachine.com/topic/remote-vps-ubuntu-22-04-with-xcfe4-nomachine-no-sound. This topic will now be closed.
-
AuthorPosts
This topic was marked as solved, you can't post.