Patch to fix colord getting killed on Wayland

Here is a quick patch to revert

original bug this was added for

https://bugs.kde.org/show_bug.cgi?id=359677

This allows colord to load on a wayland session and to actually have VCGT tags loaded into the video card with the current basic colord support. this does NOT fix the largely broken colord-kde settings UI under wayland and still requires setting a profile with colormgr

i.E

colormgr get-devices-by-kind display

colormgr find-profile-by-filename /var/lib/colord/icc/'icc file name'

colormgr device-add-profile 'display id' 'profile id'

colormgr device-make-profile-default 'display id' 'profile id'

In regards to how to fix the UI i have no idea how or where to start, this was easy to fix and i havent noticed any problems but that doesnt mean there arent any.

here is the patch

--- a/colord-kded/ColorD.cpp	2023-09-09 03:23:28.000000000 -0500
+++ b/colord-kded/ColorD.cpp	2023-10-02 04:36:29.204683428 -0500
@@ -29,7 +29,6 @@
 
 #include <lcms2.h>
 
-#include <QApplication>
 #include <QDBusConnection>
 #include <QDBusMetaType>
 #include <QDBusReply>
@@ -50,12 +49,6 @@
 ColorD::ColorD(QObject *parent, const QVariantList &)
     : KDEDModule(parent)
 {
-    if (QApplication::platformName() != QLatin1String("xcb")) {
-        // Wayland is not supported
-        qCInfo(COLORD, "X11 not detect disabling");
-        return;
-    }
-
     // Register this first or the first time will fail
     qRegisterMetaType<CdStringMap>();
     qDBusRegisterMetaType<CdStringMap>();

If on Arch i also have a pkgbuild for trying it, as the readme states there may be dragons.

I repeat this does NOT fix the UI or color management, this only prevents colord getting mercd on login.

2 Likes

Thanks for the patch! However patches submitted here won’t get reviewed by developers. Can you re-submit it at Merge requests · Graphics / colord-kde · GitLab?

Im aware, was hoping for some brave souls willing to test it before I looked into how to submit a patch (never done it before) as only I’ve tested it :sweat_smile:

1 Like

The patch looks simple and straightforward. If you want more people to test, they’re more likely to do so if you submit it on invent as a merge request. :slight_smile:

I seem to be to be blocked from registering for a KDE Identity due to some sort of anti spam measures which prevents me from accessing the gitlab. :man_shrugging:

likely is related to my VPN provider which is unfortunate

EDIT: managed to get it to allow me to register

Looking at the file that commit touched, it seems to be doing a bunch of X11 things, and add profiles depending on X11 outputs? Not sure how that’ll interact with the KWin colord plugin which adds the output devices on Wayland…

FYI for Plasma 6 I’d like to remove colord from the equation for display profiles, in favor of integrating a setting for it into the display settings page.

Well the system rejected my MR email anyway :joy: I might be doing things wrong as im following a gitlab guide to the best of my ability but if youre gonna drop it anyway no point in doing it :+1:

I also read on the color management issue VCGT loading may get the boot also? If theyre both going then this is only sorta maybe useful/not completely broken right this moment.

Im not sure either, but its also what is forcing colord to be killed on wayland atm. Its not causing any problems on my end with this patch and otherwise you have to manually restart colord or create a systemd service that upholds colord. If youre removing colord for displays this may as well stay as a patch brave souls can apply if they want to their current kde install.