[Linux] Stuck forever at "Analyzing network" root cause: unhandled exception in NCT SDK when setting thread priority fails (EPERM)
Client: GeForce NOW native Linux app (Flatpak com.nvidia.geforcenow), version 2.0.86.133
OS: CachyOS (Arch-based, rolling), kernel 7.1.3-2-cachyos, COSMIC desktop
Hardware: Ryzen 7 5800X, RTX 5070 Ti, wired Ethernet
Network: No proxy, no VPN, DNS resolves all NVIDIA endpoints correctly, all HTTPS API calls succeed (login, PNS, etc.)
Launching any game hangs indefinitely at "Analyzing network". The spinner never completes and never errors out in the UI.
The network test plugin fails ~100 ms after starting, but the failure never reaches the UI, which waits forever.
CxNative_GeForceNOW.log:
[I] libNetwo TASK NetworkTestPlugin.cpp:52 Starting network test
[I] libNetwo TASK NetworkTestModule.cpp:232 Calling HandleNctClient
[E] libNetwo TASK PluginModuleBase.cpp:452 0x8000ffff[0]: System exception
[E] libNetwo TASK PluginModuleBase.cpp:498 Skipping telemetry report of error 0x8000ffff[0]: System exception from method Start
Hooking __cxa_throw and dumping the Poco exception messages shows the real error inside libNetworkTestSDK.so:
THROW Poco::FileNotFoundException msg="/app/cef/NCTClientConfig.xml" <- thrown during nctCreateClient (caught internally?)
THROW Poco::SystemException msg="cannot set thread priority (Operation not permitted)"
libNetworkTestSDK.so(...)
libNetworkTestSDK.so(nctRegisterClientCallbackStruct+0x15)
libNetworkTest.so(...)
The SystemException escapes the SDK, NetworkTest::Start returns 0x8000ffff, the JS layer logs policy: "NetworkTestFailed" with all metrics zero, and the UI spins forever.
The NCT SDK promotes its measurement thread to a realtime scheduling class. On Windows SetThreadPriority effectively never fails, but on Linux pthread_setschedparam(SCHED_RR/FIFO) returns EPERM on any system where unprivileged realtime scheduling is not permitted. The resulting Poco::SystemException is unhandled and kills the entire network test.
Note this is not distro-specific: denying unprivileged RT scheduling is the default posture on most desktop Linux, including Ubuntu 24.04 LTS (RLIMIT_RTPRIO = 0 for regular users), so this failure mode should be reproducible on the officially supported configuration. It was observed here on CachyOS (Arch-based), but nothing in the failing code path involves anything distro-specific.
The test does not need RT priority to function: masking the failed call (LD_PRELOAD shim that turns a failed pthread_setschedparam into a no-op) makes the network test complete successfully and streaming works normally.
Treat thread-priority elevation as best-effort on Linux: catch the exception (or check the return code) around the pthread_setschedparam call in the NCT SDK and continue with default priority, optionally logging a warning.
Also worth fixing (found while debugging, currently masked by fallbacks):
- SDK probes
<app-data>/config\nvstreamer\settings.txt— Windows path separators on Linux. - SDK probes hardcoded
/opt/nvidia/config/NVIDIA_Corporation.conf, which cannot exist inside the Flatpak sandbox. libSharelooks forconfig.jsonat/app/cef/plugins/GeForceNOW/../../mall/...but the file ships at/app/mall/...(AutoHighlightsHandler construction fails with 0x8000ffff at every startup)./app/cef/NCTClientConfig.xmlis not shipped in the Flatpak.
An LD_PRELOAD shim (prioshim.c, included in this gist) that intercepts pthread_setschedparam / pthread_setschedprio / sched_setscheduler / setpriority and returns success when the real call fails. The network test does not need realtime priority to work with the failure masked, it completes normally and streaming works.
gcc -shared -fPIC -O2 -o prioshim.so prioshim.c -ldl
mkdir -p ~/.var/app/com.nvidia.geforcenow/fix
cp prioshim.so ~/.var/app/com.nvidia.geforcenow/fix/(~/.var/app/com.nvidia.geforcenow/ is the app's own data dir, so it is visible inside the Flatpak sandbox and survives app updates.)
NVIDIA's launcher script inside the Flatpak explicitly clears LD_PRELOAD, so the client binary must be started directly:
flatpak run --command=sh \
--env=LD_PRELOAD=$HOME/.var/app/com.nvidia.geforcenow/fix/prioshim.so \
com.nvidia.geforcenow -c 'cd /app/cef && exec ./GeForceNOW'To make it permanent, put that command in a small script (see launch.sh in this gist) and point the Exec= line of your GeForce NOW .desktop entry at it.
Notes:
- Bypassing the stock launcher skips the in-app self-update flow; update with
flatpak update com.nvidia.geforcenowinstead. - The shim is forward-compatible: it only masks failed priority calls, so once NVIDIA fixes the bug it becomes a no-op.
- Optional debugging: set
GFN_PRIO_LOG=/path/to/logto log which priority calls were masked.