3Dmouse (space mouse) unix socket failure to bind

My 3dconnexion space navigator use to work, for some reason it is not working anymore.
Some system changes, not necessarily related but could be:

  • I upgraded the gpu, replaced nvidia with amd
  • Multi boot with CachyOs & funtoo sharing the same /home dedicated drive

When running spacenavd -v -d as user I get the following error:

Spacenav daemon 1.2
reading config file: /etc/spnavrc
found usb device [46d:c626]: "3Dconnexion SpaceNavigator" (/dev/input/event27) 
adding device (id: 0).
failed to open device: Permission denied
removing device:  (id: 0 path: /dev/input/event27)
failed to bind unix socket: /var/run/spnav.sock: Permission denied
trying to open X11 display ":0"
   XAUTHORITY=/home/bmeagle/.Xauthority
Using XTEST to send key events

When running sudo spacenavd -v -d as user I get the following:

Spacenav daemon 1.2
reading config file: /etc/spnavrc
found usb device [46d:c626]: "3Dconnexion SpaceNavigator" (/dev/input/event27) 
adding device (id: 0).
device name: 3Dconnexion SpaceNavigator
  Number of axes: 6 (0a 6r)
  Number of buttons: 2 (evdev offset: 256)
using device: 3Dconnexion SpaceNavigator (/dev/input/event27)
  device flags: swap y-z invert y-z
trying to open X11 display ":0"
   XAUTHORITY=/home/bmeagle/.Xauthority
Using XTEST to send key events

Using sudo it works but not as normal user

inxi -v7azy:

System:
  Kernel: 6.1.9-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1-x86_64
    root=UUID=634dc3b9-84d5-49ba-aa26-dae3baba79b1 rw quiet
    resume=UUID=b3df84e3-14a9-4039-bb38-4562e46070de udev.log_priority=3
  Desktop: KDE Plasma v: 5.26.5 tk: Qt v: 5.15.8 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: Micro-Star model: MPG B550 GAMING EDGE WIFI (MS-7C91)
    v: 1.0 serial: <superuser required> BIOS: American Megatrends LLC. v: 1.90
    date: 03/17/2022
Battery:
  Message: No system battery data found. Is one present?
Memory:
  RAM: total: 15.55 GiB used: 5.42 GiB (34.9%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: AMD Ryzen 5 3500X bits: 64 type: MCP arch: Zen 2 gen: 3
    level: v3 note: check built: 2020-22 process: TSMC n7 (7nm) family: 0x17 (23)
    model-id: 0x71 (113) stepping: 0 microcode: 0x8701021
  Topology: cpus: 1x cores: 6 smt: <unsupported> cache: L1: 384 KiB
    desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB L3: 32 MiB
    desc: 2x16 MiB
  Speed (MHz): avg: 2403 high: 3599 min/max: 2200/4120 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 3599 2: 2200
    3: 2024 4: 2200 5: 2200 6: 2200 bogomips: 43219
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1
    bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy
    constant_tsc cpb cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total
    cqm_occup_llc cr8_legacy cx16 cx8 de decodeassists extapic extd_apicid
    f16c flushbyasid fma fpu fsgsbase fxsr fxsr_opt ht hw_pstate ibpb ibs
    irperf lahf_lm lbrv lm mba mca mce misalignsse mmx mmxext monitor movbe
    msr mtrr mwaitx nonstop_tsc nopl npt nrip_save nx osvw overflow_recov pae
    pat pausefilter pclmulqdq pdpe1gb perfctr_core perfctr_llc perfctr_nb
    pfthreshold pge pni popcnt pse pse36 rapl rdpid rdpru rdrand rdseed rdt_a
    rdtscp rep_good sep sev sev_es sha_ni skinit smap smca smep ssbd sse sse2
    sse4_1 sse4_2 sse4a ssse3 stibp succor svm svm_lock syscall tce topoext
    tsc tsc_scale umip v_spec_ctrl v_vmsave_vmload vgif vmcb_clean vme vmmcall
    wbnoinvd wdt x2apic xgetbv1 xsave xsavec xsaveerptr xsaveopt xsaves
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT disabled
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, STIBP:
    disabled, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M] vendor: XFX
    driver: amdgpu v: kernel arch: RDNA-2 code: Navi-2x process: TSMC n7 (7nm)
    built: 2020-22 pcie: gen: 4 speed: 16 GT/s lanes: 16 ports:
    active: HDMI-A-1 empty: DP-1,DP-2,DP-3 bus-ID: 2d:00.0 chip-ID: 1002:73df
    class-ID: 0300
  Display: x11 server: X.Org v: 21.1.6 with: Xwayland v: 22.1.7
    compositor: kwin_x11 driver: X: loaded: amdgpu dri: radeonsi gpu: amdgpu
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1200 s-dpi: 96 s-size: 508x317mm (20.00x12.48")
    s-diag: 599mm (23.57")
  Monitor-1: HDMI-A-1 mapped: HDMI-A-0 model: Samsung SyncMaster
    serial: <filter> built: 2009 res: 1920x1200 hz: 60 dpi: 305 gamma: 1.6
    size: 160x90mm (6.3x3.54") diag: 184mm (7.2") ratio: 16:9 modes:
    max: 1920x1200 min: 640x480
  API: OpenGL v: 4.6 Mesa 22.3.4 renderer: AMD Radeon Graphics (navi22 LLVM
    15.0.7 DRM 3.49 6.1.9-1-MANJARO) direct-render: Yes
Audio:
  Device-1: AMD Navi 21/23 HDMI/DP Audio driver: snd_hda_intel v: kernel
    bus-ID: 1-4:3 pcie: gen: 4 chip-ID: 1b1c:0a64 class-ID: 0300 speed: 16 GT/s
    serial: <filter> lanes: 16 bus-ID: 2d:00.1 chip-ID: 1002:ab28
    class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 2f:00.4 chip-ID: 1022:1487 class-ID: 0403
  Device-3: Corsair VIRTUOSO XT Wireless Gaming Receiver type: USB
    driver: hid-generic,snd-usb-audio,usbhid
  Sound API: ALSA v: k6.1.9-1-MANJARO running: yes
  Sound Interface: sndio v: N/A running: no
  Sound Server-1: JACK v: 1.9.21 running: no
  Sound Server-2: PulseAudio v: 16.1 running: yes
  Sound Server-3: PipeWire v: 0.3.65 running: yes
Network:
  Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel pcie: gen: 2
    speed: 5 GT/s lanes: 1 bus-ID: 29:00.0 chip-ID: 8086:2723 class-ID: 0280
  IF: wlo1 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  Device-2: Realtek RTL8125 2.5GbE vendor: Micro-Star MSI driver: r8169
    v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1 port: f000 bus-ID: 2a:00.0
    chip-ID: 10ec:8125 class-ID: 0200
  IF: enp42s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-9:7
    chip-ID: 8087:0029 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 2.27 TiB used: 1.1 TiB (48.3%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
    model: SSD 970 EVO Plus 2TB size: 1.82 TiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 2B2QEXM7 temp: 41.9 C scheme: MBR
  ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 500GB
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 4B6Q scheme: MBR
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 126.67 GiB size: 123.62 GiB (97.59%)
    used: 40.35 GiB (32.6%) fs: ext4 dev: /dev/sda1 maj-min: 8:1 label: N/A
    uuid: 634dc3b9-84d5-49ba-aa26-dae3baba79b1
  ID-2: /home raw-size: 1.82 TiB size: 1.79 TiB (98.37%)
    used: 1.06 TiB (59.2%) fs: ext4 dev: /dev/nvme0n1p1 maj-min: 259:1
    label: home uuid: 46801a27-bafa-439a-8286-a181742901cf
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 17.1 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/sda2 maj-min: 8:2 label: N/A
    uuid: b3df84e3-14a9-4039-bb38-4562e46070de
Unmounted:
  ID-1: /dev/sda3 maj-min: 8:3 size: 224.33 GiB fs: xfs label: N/A
    uuid: 4fb44150-4775-4a91-ab60-d7ef3ab9f2dd
  ID-2: /dev/sda4 maj-min: 8:4 size: 97.66 GiB fs: ext4 label: N/A
    uuid: 70f39786-13db-49ec-88a5-a87f2e84e9f6
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 10 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 1-2:2 info: Genesys Logic Hub ports: 4 rev: 2.0 speed: 480 Mb/s
    power: 100mA chip-ID: 05e3:0608 class-ID: 0900
  Device-1: 1-4:3 info: Corsair VIRTUOSO XT Wireless Gaming Receiver
    type: Audio,HID driver: hid-generic,snd-usb-audio,usbhid interfaces: 5
    rev: 2.0 speed: 12 Mb/s power: 500mA chip-ID: 1b1c:0a64 class-ID: 0300
    serial: <filter>
  Device-2: 1-5:4 info: IBM NetVista Full Width Keyboard type: Keyboard
    driver: hid-generic,usbhid interfaces: 1 rev: 1.1 speed: 1.5 Mb/s power: 70mA
    chip-ID: 04b3:3025 class-ID: 0301
  Device-3: 1-6:8 info: Logitech 3Dconnexion Space Navigator 3D Mouse
    type: HID driver: logitech,usbhid interfaces: 1 rev: 2.0 speed: 1.5 Mb/s
    power: 100mA chip-ID: 046d:c626 class-ID: 0300
  Device-4: 1-8:6 info: Micro Star MYSTIC LIGHT type: HID
    driver: hid-generic,usbhid interfaces: 1 rev: 1.1 speed: 12 Mb/s power: 500mA
    chip-ID: 1462:7c91 class-ID: 0300 serial: <filter>
  Device-5: 1-9:7 info: Intel AX200 Bluetooth type: Bluetooth driver: btusb
    interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 8087:0029
    class-ID: e001
  Hub-3: 2-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-4: 3-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 3-4:2 info: Elecom TrackBall Mouse M-DPT1MR Wired type: Mouse,HID
    driver: hid-generic,usbhid interfaces: 3 rev: 2.0 speed: 12 Mb/s power: 100mA
    chip-ID: 056e:0131 class-ID: 0300
  Hub-5: 4-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: amdgpu temp: 36.0 C mem: 30.0 C
  Fan Speeds (RPM): N/A gpu: amdgpu fan: 0
Info:
  Processes: 319 Uptime: 39m wakeups: 0 Init: systemd v: 252 default: graphical
  tool: systemctl Compilers: gcc: 12.2.1 clang: 15.0.7 Packages: pm: pacman
  pkgs: 1862 libs: 461 tools: pacaur,pamac pm: flatpak pkgs: 0 Shell: Bash
  v: 5.1.16 running-in: konsole inxi: 3.3.25

Is my ~/.Xauthority the problem or something else?

dmesg:

dmesg
[ 1235.893056] usb 1-6: USB disconnect, device number 5
[ 1238.012550] usb 1-6: new low-speed USB device number 8 using xhci_hcd
[ 1238.331868] usb 1-6: New USB device found, idVendor=046d, idProduct=c626, bcdDevice= 4.14
[ 1238.331873] usb 1-6: New USB device strings: Mfr=3, Product=1, SerialNumber=0
[ 1238.331875] usb 1-6: Product: SpaceNavigator
[ 1238.331877] usb 1-6: Manufacturer: 3Dconnexion
[ 1238.464166] input: 3Dconnexion SpaceNavigator as /devices/pci0000:00/0000:00:01.2/0000:05:00.0/usb1/1-6/1-6:1.0/0003:046D:C626.0009/input/input30
[ 1238.519360] logitech 0003:046D:C626.0009: input,hidraw7: USB HID v1.10 Multi-Axis Controller [3Dconnexion SpaceNavigator] on usb-0000:05:00.0-6/input0
echo $DISPLAY
:0

See here spacenav-users Mailing List for Free Spacenav (Page 2)
You will see that you have to entire reinstall/rebuild the package spacenavd because is from AUR, and some of those AUR need a rebuild after each major system update.