Skip to content

Issues running on Linux Wayland #2

Description

@laundmo

Trying this on Linux with a Wayland compositor (KDE Plamsa) i've run into a few issues.

For context: I installed with uv tool install pyimagecuda-studio instead of pip to install this in its own venv, and because global pip installation is blocked on linux due to that using the system-managed python installation.

  1. numpy dependency was missing, so i had to run uv tool install pyimagecuda-studio --with numpy to install it.
  2. QEGL Error 3009:
    $ pics
    [GUI] Allocated U8 buffer: 2048x2048 for preview
    QEGLPlatformContext: Failed to create context: 3009
    QRhiGles2: Failed to create temporary context
    QEGLPlatformContext: Failed to create context: 3009
    QRhiGles2: Failed to create context
    Failed to create QRhi for QBackingStoreRhiSupport
    QEGLPlatformContext: Failed to create context: 3009
    QOpenGLWidget: Failed to create context
    QEGLPlatformContext: Failed to create context: 3009
    QOpenGLWidget: Failed to create context
    QEGLPlatformContext: Failed to create context: 3009
    QOpenGLWidget: Failed to create context
    
    fixed by running: QT_QPA_PLATFORM="xcb" pics instead
  3. Lack of PNG support (?)
    [LOAD_IMAGE] Image loading image from /home/a/test.png
    Traceback (most recent call last):
      File "/home/a/.local/share/uv/tools/pyimagecuda-studio/lib/python3.12/site-packages/pyimagecuda_studio/gui/properties/properties_factory.py", line 263, in browse_file
        notify_change(file_path)
      File "/home/a/.local/share/uv/tools/pyimagecuda-studio/lib/python3.12/site-packages/pyimagecuda_studio/gui/properties/properties_factory.py", line 23, in notify_change
        on_change_callback(param.name, value)
      File "/home/a/.local/share/uv/tools/pyimagecuda-studio/lib/python3.12/site-packages/pyimagecuda_studio/gui/properties/node_properties.py", line 181, in on_param_changed
        self.current_node.update_param(param_name, value)
      File "/home/a/.local/share/uv/tools/pyimagecuda-studio/lib/python3.12/site-packages/pyimagecuda_studio/nodes/core.py", line 29, in update_param
        self.update_param_child(param_name, value)
      File "/home/a/.local/share/uv/tools/pyimagecuda-studio/lib/python3.12/site-packages/pyimagecuda_studio/nodes/node_generator.py", line 59, in update_param_child
        self.generate_image()
      File "/home/a/.local/share/uv/tools/pyimagecuda-studio/lib/python3.12/site-packages/pyimagecuda_studio/nodes/generators/generators.py", line 45, in generate_image
        self.original_image = load(self.path)
                              ^^^^^^^^^^^^^^^
      File "/home/a/.local/share/uv/tools/pyimagecuda-studio/lib/python3.12/site-packages/pyimagecuda/io.py", line 82, in load
        vips_img = pyvips.Image.new_from_file(filepath, access='sequential', autorotate=autorotate)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/a/.local/share/uv/tools/pyimagecuda-studio/lib/python3.12/site-packages/pyvips/vimage.py", line 329, in new_from_file
        return pyvips.Operation.call(name, filename,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/a/.local/share/uv/tools/pyimagecuda-studio/lib/python3.12/site-packages/pyvips/voperation.py", line 285, in call
        raise Error(f'{operation_name} does not support optional '
    pyvips.error.Error: VipsForeignLoadPngFile does not support optional argument autorotate
    
    solution: Convert to jpeg with magick test.png test.jpeg
  4. Preview does not render. From what little i could tell, it seems like an issue with the far more strict OpenGL validation on Linux. A bit of testing led me to the OpenGL Preview widget, and i found that errors raised in initializeGL are silently swallowed. wrapping everything in a try-except and printing the error message, it seems that a context isn't enabled when something is called that needs a context. For testing this, i've worked around it by exporting the image - which works.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions