Forum / NoMachine for Linux / No audio with 8.11.3: Linux server, Linux client
- This topic has 7 replies, 3 voices, and was last updated 7 months, 2 weeks ago by Britgirl.
-
AuthorPosts
-
April 16, 2024 at 11:07 #47785chstParticipant
Sorry for opening another topic about ‘no audio’.
But I think it’s not exactly the same problem as described e.g. in ‘No audio with 8.11.3: Linux server, macOS client’Server:
– Debian Bookworm
– kde-full
– pulseaudio
– nomachine-workstation 8.11.3-4Client:
– debian Bookworm
– xorg
– kde-full
– pulsaudo
– nomachine 8.11.3-4After install of nomachine-workstation on the server I edited
‘/usr/NX/etc/node.cfg’ (not ‘/usr/NX/share/audio/client.conf’ as mentioned in https://forum.nomachine.com/topic/unable-to-get-audio-working-through-pulseaudio-in-almalinux-9#post-46122):AudioInterface pulseaudio
EnableAudio 1
CommandStartPulseAudio “/usr/bin/pulseaudio –high-priority=no”Then I executed
/usr/NX/scripts/setup/nxnode –audiosetup
cp /etc/pulse/* /usr/NX/share/audioand restarted ‘nxserver’.
BTW: ‘…/nxnode –audiosetup’ did nothing but the following log messages in ‘/usr/NX/var/log/nxupdate.log’:
NX> 704 Running: /bin/chmod 775 ‘/usr/NX/var/log’.
NX> 704 Result: OK.Now I started nxplayer on the client within a full KDE desktop session and connected to the server and started with ‘Creating a new custom session’.
Within this new session I started ‘konsole’ and saw that PULSE_SERVER pointed to ‘/home/test/.nx/nxdevice/D-1001-72AD68BE3EE123C5F5E56100240CAE6E/audio/native.socket’.
But pulseaudio was listening on ‘/run/user/1000/pulse/native’!
So ‘pactl’ couldn’t connect.
For testing I made a softlink from /run/user/1000… to /home/test… and got the following output from ‘pactl info’:
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 4
Tile Size: 65472
User Name: test
Host Name: server1
Server Name: pulseaudio
Server Version: 16.1
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: auto_null
Default Source: auto_null.monitor
Cookie: 7c1c:b15eAnd ‘pactl list sources’:
Source #0
State: SUSPENDED
Name: auto_null.monitor
Description: Monitor of Dummy Output
Driver: module-null-sink.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 10
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor of Sink: auto_null
Latency: 0 usec, configured 0 usec
Flags: DECIBEL_VOLUME LATENCY
Properties:
device.description = “Monitor of Dummy Output”
device.class = “monitor”
device.icon_name = “audio-input-microphone”
Formats:
pcmBut when I play a sound file with ‘paplay’ I only here about 2 tenths of a second every 2-3 seconds all the time!
Playing the same soundfile within a local session on the client is working perfectly.When I set PULSE_SERVER within ‘/etc/X11/90×11-pulseaudio’ on the server it will be overwitten (by nxserver?)!
So my question at the moment is, how could PULSE_SERVER be set to ‘/run/user/1000/pulse/native’ or how could I start pulseaudio on the server listening at ‘/home/test/.nx/nxdevice/<device id>/audio/native.socket’ instead?
April 17, 2024 at 11:57 #47806kubaszym1ParticipantHi,
Do you experience the same issues in virtual session? In a virtual session audio settings should be the same as in a custom session. PULSE_SERVER should be set to .nx/nxdevice/…/native.socket, you should see devices NoMachine Output and NoMachine Microphone.
PULSE_SERVER remains set to /run/user/1000/pulse/native only in a physical session.
Please check one more thing. You wrote that PULSE_SERVER was set to ‘/home/test/.nx/nxdevice/D-1001-72AD68BE3EE123C5F5E56100240CAE6E/audio/native.socket’. But ‘D-1001-…’ directory is usually used for handling devices in physical session, not virtual or custom sessions. For virtual and custom session directories like ‘D-1002-…’, ‘D-1003-…’ should be created (1002, 1003 are display ids). Maybe all sockets were created properly but PULSE_SERVER was set to a wrong path. Check if you have a native.socket in a directory ‘.nx/nxdevice/D-1002-…/audio’ when you create a new virtual/custom session. Then you can switch to a proper pulse server by changing environmental variable :
export PULSE_SERVER=~/.nx/nxdevice/D-1002-…/audio/native.socket.
After this step it’s possible that restarting pulseaudio service will be required.
Thank for your detailed description of the issue and I hope that my answer will help you somehow.
Regards,
Kuba
April 23, 2024 at 17:38 #47926chstParticipantHello,
I don’t know why but I’m not able to start a virtual desktop.
After about 2 seconds I always get (message/image missing)But meanwhile I’ve solved the problem with audio:
After disabling pulseaudio in systemd with ‘sudo systemctl –global disable pulseaudio‘ for all users audio was working without problems!The reason it didn’t worked before seems to be that systemd is starting pulseaudio for users to early.
So restarting pulseaudio within a session works, too.
But I think it should be started by session management of NX.Looking at ‘systemctl status pulseaudio‘ before and after restart offers the difference:
Before it was listening at ‘/var/run/users/…/pulse/native’ and after restart at ‘.nx/nxdevice/…/audio/native.socket’.I think this is perhaps only a systemd/Debian related problem.
Best regards,
Chris
April 23, 2024 at 17:52 #47935BritgirlKeymasterI don’t know why but I’m not able to start a virtual desktop.
After about 2 seconds I always get (message/image missing)Can you show us or paste the error? This is a different issue.
April 23, 2024 at 22:13 #47936chstParticipantSomehow the screenshot has disappeared in my last post.
The following error message appears:
Ooop’s The session negotiation failed
Error: Unexpected program termination.‘session’ on client:
…
59799 59799 2024-04-23 23:03:07 935.011 ClientSession: Failing reason is ‘The session negotiation failed.Error: Unexpected program termination.’.
59799 59799 2024-04-23 23:03:07 941.408 ClientSession: Stopping session at 0x1e98c80.
59799 59799 2024-04-23 23:03:07 948.475 ClientSession: Destroying display client.April 24, 2024 at 17:09 #47948BritgirlKeymasterTake a look at the article which contains a number of things to check why this could be happening:
How to solve ‘session negotiation failed, application terminated prematurely’
https://kb.nomachine.com/AR08N00898Please enable the logs:
sudo /etc/NX/nxserver --debug --enable
reproduce
sudo /etc/NX/nxserver --debug --collect
Also attach the node.cfg, system logs and .xsession-errors file.
Send everything to forum[at]nomachine[dot]com making sure to reference the topic. Thanks!
May 3, 2024 at 15:14 #48005chstParticipantThanks for the link https://kb.nomachine.com/AR08N00898!
The hint about the ‘DefaultDesktopCommand’ was the solution:I changed it from the default
env -u WAYLAND_DISPLAY /usr/bin/dbus-launch --sh-syntax --exit-with-session /usr/bin/startplasma-x11
to
/usr/bin/startplasma-x11
Now starting a session with ‘Create a new virtual desktop’ instead of ‘Create a new custom session’ works, too.
Interesting detail I’ve learned:
When starting with ‘Create a new custom session’ the option ‘Run the default x client script on the server’ didn’t use the command of ‘DefaultDesktopCommand’ from node.cfg!May 14, 2024 at 14:00 #48118BritgirlKeymasterFor custom sessions, the following key is used instead
DefaultXSession
, also in node.cfg. -
AuthorPosts
This topic was marked as solved, you can't post.