Jump to content
  • KDE's native virtual machine manager, Karton, inches closer to potential stable release


    Karlston

    • 499 views
    • 3 minutes
     Share


    • 499 views
    • 3 minutes

    Nearly two months ago, we told you about Karton, a project by Google Summer of Code student Derek Lin, which is hoped to replace tools like virt-manager and GNOME Boxes as a native option for KDE Plasma users.

     

    A few weeks into the official coding period, Lin, the major contributor to the project, has published an update, showing how the project's coming along, as we near a possible stable release.

     

    The first thing you should know is that the virtual machine installer we mentioned last time has been merged into the main branch. This change gets rid of the dependency on virt-install entirely. Instead, Karton now uses libosinfo to identify the operating system from a disk image and generates the necessary libvirt XML configuration on its own.

     

    As part of this, Lin also updated QML modules, which are KDE's building blocks for creating user interfaces. These are now used for a more standard way of handling application components.

     

    Most of the recent work, however, has focused on building a SPICE client from scratch. SPICE, if you're unaware, is a remote desktop protocol that handles rendering the guest's display, audio, and inputs. Lin said he spent a lot of time just getting the virtual machine's display to show up properly inside a native KDE window.

     

    The process of taking the raw display data from SPICE and drawing it on screen was tricky. At first, the image was full of weird colors and transparency glitches.

    Wierd display artifacts in the early stages of development

    After trying different ways to handle the image data, he discovered the root cause was a timing problem: his code was trying to read the display data at the same moment SPICE was trying to write it, causing a garbled mess. The fix was simple enough: he just made a quick copy of the data before displaying it, and it ended up looking much better:

    Karton running Fedora

    With the display rendering, user inputs like mouse clicks and keyboard presses are now forwarded to the virtual machine. A small headache is that Qt key events use evdev scancodes while SPICE expects the older PC XT format, forcing a manual mapping for now.

     

    After months of hard work, here's a screen recording of Karton running a Fedora virtual machine:

     

     

    From the video, things are quite laggy when you scroll, but this should be addressed in a future update.

     

    As for what's next, Lin acknowledges the current rendering method is inefficient and causes tearing. He hopes to investigate SPICE's gl-scanout property for more optimized performance.

     

    He also plans to implement audio forwarding and proper mouse drag events, as well as rework the UI to include a sidebar, like you have in UTM, the virtual machine manager designed for Apple platforms like macOS.

    Screenshot of the UTM app with the sidebar

    If you're interested in the project, you can check out its GitLab page and read Lin's full update on the KDE Blogs.

     

    Source


    Hope you enjoyed this news post.

    News posts... 2023: 5,800+ | 2024: 5,700+ | 2025 (till end of June): 2,864

    RIP Matrix | Farewell my friend  


    User Feedback

    Recommended Comments

    There are no comments to display.



    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...