Skip to content

Flatpak build cannot use a 3D mouse: the sandbox has no /dev/hidraw #2713

Open

Description

@karpiCz

Flatpak build cannot use a 3D mouse: the sandbox has no /dev/hidraw

Summary

The Flatpak build of CADCraft cannot use a 3Dconnexion 3D mouse at all. Tools ▸ 3D Mouse stays on
No supported 3D mouse found (Status::Searching) because the sandbox contains no /dev/hidraw*
nodes, so the raw-HID reader (hidapi, feature linux-native-basic-udev, usage_page == 1 && usage == 8) has nothing to open. Enabling --device=usb does not help; --device=all does.

Environment

  • CADCraft 0.17.0, installed through the ArtCraft Launcher as flatpak app id
    ai.storyteller.cadcraft (user installation, started via
    flatpak-spawn --host flatpak run --env=CRAFT_VERSIONS_FILE=… ai.storyteller.cadcraft)
  • Fedora 44, Wayland session (labwc/wlroots), Flatpak 1.18.4
  • Device: 3Dconnexion Universal Receiver 256f:c652 (SpaceMouse Pro Wireless through the receiver)

The host side is healthy: lsusb sees 256f:c652, /dev/input/by-id/usb-3Dconnexion_…-if01-event-joystick
exists, capabilities/abs is 3f (six axes), and hidraw6…hidraw10 belong to the receiver.

Steps to reproduce

  1. Install CADCraft from the Flatpak bundle / the launcher.
  2. Plug in a 3Dconnexion device.
  3. Tools ▸ 3D Mouse → status stays No supported 3D mouse found.

Evidence

$ flatpak info --show-permissions ai.storyteller.cadcraft
[Context]
devices=dri;

which matches finish-args in packaging/linux/flatpak/ai.storyteller.cadcraft.yml (--device=dri
only; the file even notes "Deliberately not granted: home/host filesystem access").

Inside the sandbox:

$ flatpak run --command=sh ai.storyteller.cadcraft -c 'ls -l /dev/hidraw*'
ls: cannot access '/dev/hidraw*': No such file or directory

but enumeration data is available, so switching to --device=all is enough to make the feature work:

$ flatpak run --command=sh ai.storyteller.cadcraft -c 'cat /sys/class/hidraw/hidraw7/device/uevent'
DRIVER=hid-generic
HID_ID=0003:0000256F:0000C652
HID_NAME=3Dconnexion 3Dconnexion Universal Receiver

--device=usb was also tried and exposes /dev/bus/usb only — no hidraw nodes (flatpak 1.18.4).
--device=all exposes them (as bind mounts of the host nodes, ACLs included).

Workaround that works here

flatpak override --user --device=all ai.storyteller.cadcraft

plus a host-side udev rule, because the host nodes are root:root 0600 and Fedora's uaccess rule for
3D mice (SUBSYSTEM=="hidraw", ENV{ID_INPUT_3D_MOUSE}=="1", TAG+="uaccess", in
/usr/lib/udev/rules.d/70-uaccess.rules) does not fire for this device: its hidraw nodes carry no
ID_INPUT* property at all.

echo 'SUBSYSTEM=="hidraw", ATTRS{idVendor}=="256f", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/60-3dconnexion-spacemouse.rules
sudo udevadm control --reload-rules && sudo udevadm trigger --subsystem-match=hidraw

After both steps the dialog reports 3D mouse connected. Note that the udev part is a requirement for
a native install too — a normal user cannot read /dev/hidraw* without it, on Fedora 44 at least.

Suggestions

  1. Give the Flatpak build access to hidraw in finish-args of both
    packaging/linux/flatpak/ai.storyteller.cadcraft.yml and the .bundle.yml
    (--device=all, or a narrower grant if one exists — I could not find a way to expose just
    /dev/hidraw*, --device=usb does not do it).
  2. Document the Linux permission requirement (udev rule / uaccess) somewhere user-visible, e.g. in the
    3D Mouse dialog when the status is Searching — today an out-of-the-box native install cannot work
    for a non-root user either.
  3. Minor, possibly redundant with SpaceMouse: calibrate devices that are silent at rest, fix the pan Y direction, zoom on push/pull only #983/3DConnexion Space Mouse settings #989: the hint in the dialog reads "Move sideways to pan;
    push/pull or twist to zoom."
    , while apps/cadcraft/src/spacemouse/motion.rs maps
    pan = [tx, ty], zoom = tz + rz and ignores rx/ry — so push/pull currently pans, and tilting
    the cap does nothing. Also, because the dialog itself is a dialog, navigation is disabled while it
    is open (app.ui.dialog.is_none() in spacemouse.rs), which makes the feature look dead exactly
    when a user opens the window to check the status. A one-line note in the window would save that
    confusion.

Related: #983, #989, #819.

Activity

  1. ticket-craft commented on Nov 3, 2026

    @ticket-craft

    Thanks! This ticket describes several separate problems:

    • Flatpak sandbox lacks hidraw access, so 3D mouse is not detected
    • Linux requires a udev uaccess rule for 3D mice, which is not documented
    • 3D mouse dialog hint mismatches the mapping and navigation is disabled while the dialog is open

    It helps a lot if each one has its own ticket, so they can be tracked and fixed separately.

    Possibly related: #989, #623 and #1657.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions