feat: Ubuntu 26.04 support — install script + Wayland/napari rendering + desktop launcher fixes#568
Open
hongquanli wants to merge 5 commits into
Open
feat: Ubuntu 26.04 support — install script + Wayland/napari rendering + desktop launcher fixes#568hongquanli wants to merge 5 commits into
hongquanli wants to merge 5 commits into
Conversation
Add setup_26.04.sh, adapted from setup_22.04.sh for Ubuntu 26.04 LTS, which ships Python 3.14 as the system interpreter. That breaks the 22.04 script in two ways, addressed here: - pip3 install --break-system-packages: system Python is externally managed (PEP 668), so plain pip3 install is rejected. Non-sudo install keeps packages in the user site, leaving apt-managed packages intact. - numpy<2 -> numpy (2.x): NumPy 1.x has no Python 3.14 wheels. - napari==0.5.4 -> napari: the old pin predates 3.14. - Drop aicsimageio and basicpy: only imported by the orphaned control/stitcher.py (nothing loads it; the active stitcher is the ImageJ-based tools/stitcher.py). These were the main 3.14 blocker. Qt stays installed via apt (not subject to PEP 668). All version-agnostic steps (camera drivers, udev rules, dialout, kernel hold, desktop shortcut) are unchanged from the 22.04 script. Not yet runtime-tested on 26.04. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…t black (#568) On a Linux Wayland session, napari 0.7.1's napari/_wayland_fix.py forces QT_QPA_PLATFORM=xcb and PYOPENGL_PLATFORM=glx on Nvidia hardware, assuming XWayland+GLX is more stable. On recent hardware/drivers (e.g. RTX 5070 Ti Blackwell + Mutter, Ubuntu 26.04 / Python 3.14) this is backwards: XWayland renders napari's vispy GL surface black, and GLX context tracking fails with "Attempt to retrieve context when no valid context", so acquisition image layers never draw. Live View is unaffected because it uses pyqtgraph (raster). napari applies its defaults with os.environ.setdefault, so presetting both QT_QPA_PLATFORM=wayland and PYOPENGL_PLATFORM=egl before napari is imported neutralizes the workaround and keeps the proven-good native Wayland + EGL combination. Guarded to Linux Wayland sessions and respects explicit overrides, so it is a no-op on X11/macOS/Windows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…minal Ubuntu 26.04 ships ptyxis as the default terminal; gnome-terminal is not installed and its `-e` command syntax was removed, so the generated launcher did nothing when double-clicked. Use `ptyxis --new-window --working-directory ... -- <cmd>` and set Terminal=false since we invoke the terminal explicitly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…thout a drag On a native Wayland session the whole UI stalls until the window is moved, but only on the first acquisition: the top-level surface stops receiving frame callbacks while the first napari (vispy/OpenGL) canvas is realized. When the napari display is first activated, generate a one-time window configure event (maximized: brief state toggle with geometry pinned; otherwise a 1px resize nudge) to restart frame callbacks. Guarded to Wayland; no-op elsewhere. Known limitation: on a maximized window a brief resize flicker is still visible; the un-stall itself works. Fully hiding the flicker is unresolved. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
_do_wayland_surface_kick pinned the normal geometry to the maximized size via setGeometry() to hide the restore flash, but that overwrites the window's stored restore geometry. After the first-acquisition kick the maximize/restore toggle no longer changed anything and the window was stuck at full size. Toggle the window state without touching geometry (Qt preserves the real restore geometry across showNormal/ showMaximized), and handle fullscreen separately so a fullscreen window isn't downgraded to maximized. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes Squid run on Ubuntu 26.04 LTS (system Python 3.14, GNOME/Mutter Wayland). Three parts:
software/setup_26.04.sh— install script adapted fromsetup_22.04.sh.main_hcs.py,control/gui_hcs.py) — stops the GUI going black on acquisition.setup_26.04.sh) — the shortcut now usesptyxisinstead of the removedgnome-terminal.1. Install script (
setup_26.04.sh)Ubuntu 26.04 ships Python 3.14, which breaks the 22.04 script two ways: PEP 668 (externally-managed system pip) and pinned deps with no 3.14 wheels.
pip3 install --break-system-packages— system Python 3.14 is externally-managed (PEP 668). Non-sudo install keeps packages in the user site, leaving apt-managed packages intact.numpy<2→numpy— NumPy 1.x has no Python 3.14 wheels (1.26 caps at 3.12).napari==0.5.4→napari— the old pin predates 3.14 (this now resolves to napari 0.7.1; see the rendering fix below).aicsimageio+basicpy— only imported bycontrol/stitcher.py, which nothing loads (active stitcher is the ImageJ-basedtools/stitcher.py). These were the main 3.14 blocker.python3-pyqt5*,python3-pyqtgraph) — apt packages aren't subject to PEP 668.Version-agnostic steps (Daheng/Toupcam drivers, udev rules,
dialoutgroup, kernel-hold, desktop shortcut) are unchanged.2. Wayland/napari black-screen fix
On a Wayland session, napari 0.7.1's
napari/_wayland_fix.pyruns on import and forcesQT_QPA_PLATFORM=xcb+PYOPENGL_PLATFORM=glxon Nvidia hardware, assuming XWayland+GLX is more stable. On recent hardware/drivers (tested: RTX 5070 Ti Blackwell + driver 595 + Mutter) it's backwards:Attempt to retrieve context when no valid context), so image layers never draw.Live View is unaffected because it uses pyqtgraph (raster), which is why only acquisition went black.
Fix: napari applies those defaults with
os.environ.setdefault, so presetting bothQT_QPA_PLATFORM=waylandandPYOPENGL_PLATFORM=eglbefore napari is imported neutralizes the workaround and keeps the proven-good native Wayland + EGL path. Guarded to Linux Wayland sessions and respects explicit overrides → no-op on X11/macOS/Windows. Because it lives inmain_hcs.py/gui_hcs.py, it applies on pull without re-running setup.3. Desktop launcher fix
Ubuntu 26.04 dropped
gnome-terminal(default terminal is now ptyxis) and removed the-e "cmd"syntax, so the generated.desktopdid nothing when double-clicked. Now usesptyxis --new-window --working-directory=… -- …withTerminal=false.Testing
✅ Runtime-tested on Ubuntu 26.04 (Python 3.14, Mutter Wayland, RTX 5070 Ti Blackwell + Intel, driver 595):
setup_26.04.shon a fresh 26.04 box still recommended to confirm apt package availability and full pip resolution.🤖 Generated with Claude Code