NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.91k stars 13.95k forks source link

Spacenav module does not work in Blender #230295

Open TheSirC opened 1 year ago

TheSirC commented 1 year ago

Describe the bug

With the spacenavd module active, the 3D mouse is not working.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Set hardware.spacenavd.enable = true
  2. Open Blender
  3. The 3D Mouse is not working

Expected behavior

With the module is active, the mouse should be detected and working in Blender

Additional context

If you start the binary spacenavd with sudo seems to be enough for Blender to be enough for it to work.

When the blender binary detects the mouse the first line is sh: line 1: lsusb : command not found weirdly

Notify maintainers

@Sohalt

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
 - host os: `Linux 6.1.15, NixOS, 23.05 (Stoat), 23.05pre-git`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.14.1`
 - channels(root): `"nix-ld, nixos"`
 - channels(sirc): `""`
 - nixpkgs: `/nix/store/vnymyf1cja5h41zlg9bxg6a9sq5chgs5-nixos-unstable-2023-03-06`
flosse commented 1 year ago

I also tried hardware.spacenavd.enable = true and it does not work, no matter in which application. Running sudo spacenavd solves the problem, but I actually expect the mouse to work the moment i plug it in.

@Sohalt could you help?

the-furry-hubofeverything commented 1 year ago

It looks like spacenavd is supposed to run on a system level, instead of a user unit like @Sohalt outlined?

https://github.com/NixOS/nixpkgs/blob/ee176b5fbb680864dcf80f9ca3f6f134d81331d8/nixos/modules/services/hardware/spacenavd.nix#L16

see https://github.com/FreeSpacenav/spacenavd#running-spacenavd

Spacenavd is designed to run during startup as a system daemon.

and https://github.com/FreeSpacenav/spacenavd/issues/88#issuecomment-1687021487

spacenavd is a daemon, which is supposed to run as root. spacenavd being a daemon, is started by init before X has even started.

Sohalt commented 1 year ago

Ah, sorry. It used to work as a user service, until @gebner removed the patch in https://github.com/NixOS/nixpkgs/commit/3a4f71d5a08c0f350a77d134a1c7d8b7a2960d94

the-furry-hubofeverything commented 1 year ago

Ah, sorry. It used to work as a user service, until @gebner removed the patch in https://github.com/NixOS/nixpkgs/commit/3a4f71d5a08c0f350a77d134a1c7d8b7a2960d94

I thought you fixed the patch in #118617?

Maybe it needs an update

Sohalt commented 1 year ago

Ah sorry. I didn't look closely enough. 🙈 I'll update all the spacenavd related packages.

Sohalt commented 12 months ago

Sorry, I didn't get around to finishing this yet. Here's my work in progress: https://github.com/NixOS/nixpkgs/pull/263120

deftdawg commented 11 months ago

Trying to get SpaceMouse going for my Podman Wine SketchUp container build, need to get the mouse working on my NixOS host first to pass /var/run/spnav.sock in as a volume.

Was about to file an issue about spacenavd needing an update from 0.8 to 1.2, but looks like @Sohalt is working on it, so I'll just hang out here... :beers:

Sohalt commented 10 months ago

https://github.com/NixOS/nixpkgs/pull/263120 works with Blender 3.5.1. You can either pull in the changes from there or wait until it's merged.