Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
CUPS does not support the colord color management framework on Linux #3808
Comments
|
CUPS.org User: mike For CUPS 1.5; Richard, please see my separate email about the CUPS Contributor Agreement we'll need you to sign... |
|
CUPS.org User: hughsient Cool, thanks. I'm just running the contribution agreement through the Red Hat legal team. It hopefully won't take too long. Thanks. |
|
CUPS.org User: mike Pushing out pending licensing... |
|
CUPS.org User: mike Some integration notes:
|
|
CUPS.org User: hughsient
I'll experiment with this. The reason "temp" was chosen was so that we didn't get "dead" devices listing in the colord UI's -- only connected devices. It's likely that I'll need to add an 'Active' property or something to make a sane UI. When I've done that I'll update the patch on this bug.
All devices get added an explicit grayscale profile, even if they are "color" devices.
Fair point, changed.
Good catch, I've set the Vendor property from ppd->manufacturer and the Model property from ppd->modelname.
Good catch, thanks.
Certainly soft, only user-defined mappings are defines as hard.
Fixed, thanks. |
|
CUPS.org User: hughsient I've committed this to colord: commit 8033b6a64c4e9ab0305dff7bd65068386bd05f09
|
|
CUPS.org User: hughsient The new patch changes four things:
Richard. |
|
CUPS.org User: hughsient I've uploaded the patch with a BSD license on the advice of Richard Fontana. Please let me know if this is okay. Thanks. |
|
CUPS.org User: hughsient New version fixes DeleteDevice to actually use an object path, not an object ID, so hot-removing devices DTRT. Note: We've included versions of this patch in Fedora for 10 months now. It's also being included in the other distributions for a few weeks. It would be great to actually get this upstream. Thanks, Richard |
|
CUPS.org User: mike Starting on this next (probably tomorrow) after I finish the last Avahi bits in libcups. |
|
CUPS.org User: mike Attached the initial integration of the supplied code; still needs to be tested. Aside from the usual code and formatting cleanup, I pulled the retry-connection code from the register_printer and unregister_printer functions and made a macro to create the D-Bus messages. |
|
CUPS.org User: mike Wow, one typo in r10491 (missing semicolon). Checking that change in now. Richard, please test and verify that I haven't messed anything up... |
|
CUPS.org User: hughsient The colord support seems to work well when a device is hotplugged (i.e. USB add) but doesn't seem to work for me when cupsd starts up and does the initial scan for printers, i.e. at coldplug. This could be something on my system if you want me to debug further, but it seems at coldplug time the device isn't registered with colord. I really appreciate the review and rework, btw. Thanks. |
|
CUPS.org User: mike Ok, I know what the problem is. I forgot to add re-registration of existing queues in cupsdStartColor; this was previously done in cupsdSetPrinterAttrs, but I had removed from there because of performance concerns... |
|
CUPS.org User: mike Richard, Try TOT or the attached patch - it adds registration of existing printers in cupsdStartColor(). |
|
CUPS.org User: hughsient
svn head now works beautifully, many thanks. |
|
CUPS.org User: mike Perfect, thanks for testing! |
|
"0001-Add-colord-support-to-CUPS-which-allows-Linux-printe.patch": From 748f52e2fc550b48a622b14b57caf8ab0e283459 Mon Sep 17 00:00:00 2001 scheduler/Makefile | 1 + diff --git a/scheduler/Makefile b/scheduler/Makefile
+/*
+/*
+out:
+/*
+/*
+out:
+/*
+/*
+/*
+/*
+out:
+#endif /* HAVE_DBUS /
-#ifdef APPLE
/* -#ifdef APPLE
diff --git a/scheduler/printers.c b/scheduler/printers.c include <sys/vfs.h>#endif /* HAVE_SYS_VFS_H */ +#ifdef HAVE_DBUS /*
+/*
+/_
+/_
+/_
/*
/*
@@ -1488,6 +1544,12 @@ cupsdRenamePrinter( /*
@@ -2700,6 +2762,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t p)/ I - Printer to setup / /*
diff --git a/scheduler/printers.h b/scheduler/printers.h /*1.7.4.1 |
|
"0001-Add-colord-support-to-CUPS-which-allows-Linux-printe_v2.patch": From 473d63e13b6681af66c2f34c9f8d8bbda0ed8964 Mon Sep 17 00:00:00 2001 scheduler/Makefile | 1 + diff --git a/scheduler/Makefile b/scheduler/Makefile
+/*
+/*
+out:
+/*
+/*
+out:
+/*
+/*
+/*
+/*
+#endif /* HAVE_DBUS /
-#ifdef APPLE
/* -#ifdef APPLE
diff --git a/scheduler/printers.c b/scheduler/printers.c include <sys/vfs.h>#endif /* HAVE_SYS_VFS_H */ +#ifdef HAVE_DBUS /*
+/*
+/_
+/_
+/_
/*
/*
@@ -1414,6 +1470,12 @@ cupsdRenamePrinter( /*
@@ -2626,6 +2688,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t p)/ I - Printer to setup / /*
diff --git a/scheduler/printers.h b/scheduler/printers.h /*1.7.4.1 |
|
"0001-Add-colord-support-to-CUPS-which-allows-Linux-printe_v3.patch": From dda7106a7a40191704545b3fa2f88b6207aad2f5 Mon Sep 17 00:00:00 2001 scheduler/Makefile | 1 + diff --git a/scheduler/Makefile b/scheduler/Makefile
+/*
+/*
+out:
+/*
+/*
+out:
+/*
+/*
+/*
+/*
+#endif /* HAVE_DBUS /
-#ifdef APPLE
/* -#ifdef APPLE
diff --git a/scheduler/printers.c b/scheduler/printers.c include <sys/vfs.h>#endif /* HAVE_SYS_VFS_H */ +#ifdef HAVE_DBUS /*
+/*
+/_
+/_
+/_
/*
/*
@@ -1411,6 +1467,12 @@ cupsdRenamePrinter( /*
@@ -2647,6 +2709,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t p)/ I - Printer to setup / /*
diff --git a/scheduler/printers.h b/scheduler/printers.h /*1.7.5.1 |
|
"0001-Add-colord-support-to-CUPS-which-allows-Linux-printe_v4.patch": From 294f3d07c957734a32a4679def6a9590a691ee71 Mon Sep 17 00:00:00 2001 This functionality is possible because of lots of help from Tim Waugh -- thanks!scheduler/Makefile | 1 + diff --git a/scheduler/Makefile b/scheduler/Makefile
+/*
+/*
+out:
+/*
+/*
+out:
+/*
+/*
+/*
+/*
+#endif /* HAVE_DBUS /
-#ifdef APPLE
/* -#ifdef APPLE
diff --git a/scheduler/printers.c b/scheduler/printers.c include <asl.h>#endif /* APPLE */ +#ifdef HAVE_DBUS /*
+/*
+/_
+/_
+/_
/*
/*
@@ -1418,6 +1474,12 @@ cupsdRenamePrinter( /*
@@ -2644,6 +2706,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t p)/ I - Printer to setup / /*
diff --git a/scheduler/printers.h b/scheduler/printers.h /*1.7.6 |
|
"0001-Add-colord-support-to-CUPS-which-allows-Linux-printe_v5.patch": From 28b511590cc841feb301ad781f99687580cee475 Mon Sep 17 00:00:00 2001 This functionality is possible because of lots of help from Tim Waugh -- thanks!scheduler/Makefile | 1 + diff --git a/scheduler/Makefile b/scheduler/Makefile
+/*
+/*
+out:
+/*
+/*
+out:
+/*
+/*
+/*
+/*
+#endif /* HAVE_DBUS /
-#ifdef APPLE
/* -#ifdef APPLE
diff --git a/scheduler/printers.c b/scheduler/printers.c include <asl.h>#endif /* APPLE */ +#ifdef HAVE_DBUS /*
+/*
+/_
+/_
+/_
/*
/*
@@ -1418,6 +1474,12 @@ cupsdRenamePrinter( /*
@@ -2644,6 +2706,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t p)/ I - Printer to setup / /*
diff --git a/scheduler/printers.h b/scheduler/printers.h /*1.7.6 |
|
"0001-Add-colord-support-to-CUPS-which-allows-Linux-printe_v6.patch": From db29c24e3ff75938775aa1f4072e346aeb7f6a9c Mon Sep 17 00:00:00 2001 This functionality is possible because of lots of help from Tim Waugh -- thanks!scheduler/Makefile | 1 + diff --git a/scheduler/Makefile b/scheduler/Makefile
+/*
+/*
+out:
+/*
+/*
+out:
+/*
+/*
+/*
+/*
+/*
+#endif /* HAVE_DBUS /
-#ifdef APPLE
/* -#ifdef APPLE
diff --git a/scheduler/printers.c b/scheduler/printers.c include <asl.h>#endif /* APPLE */ +#ifdef HAVE_DBUS /*
+/*
+/_
+/_
+/_
/*
/*
@@ -1418,6 +1474,12 @@ cupsdRenamePrinter( /*
@@ -2644,6 +2706,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t p)/ I - Printer to setup / /*
diff --git a/scheduler/printers.h b/scheduler/printers.h /*1.7.6.2 |
|
"str3808.patch": Index: scheduler/colorman.c--- scheduler/colorman.c (revision 10490)
@@ -41,6 +115,28 @@
@@ -56,7 +152,8 @@ #elif defined(HAVE_DBUS)
@@ -69,7 +166,7 @@
@@ -82,7 +179,8 @@
@@ -98,7 +196,7 @@ #elif defined(HAVE_DBUS)
@@ -239,7 +337,6 @@
- }
- q2_choice = NULL;
- q3_attr = ppdFindAttr(ppd, "DefaultResolution", NULL);
- }
- profile_id = _ppdHashName(attr->spec);
profile = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, if (ColorSyncUnregisterDevice != NULL)
- */
@@ -805,10 +869,626 @@
+static void
-/* colord stuff goes here */
+out:
+/*
+out:
+/*
+out:
+/*
+out:
+/*
+/*
+out:
+/*
+/*
+/*
|
|
"str3808p2.patch": Index: scheduler/colorman.c--- scheduler/colorman.c (revision 10492)
colord_con = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
|
michaelrsweet commentedMar 2, 2011
Version: 1.6-feature
CUPS.org User: hughsient
A daemon called colord[1] now provides a system color management policy service on Linux (not unlike some aspects of ColorSync) which interfaces with the session for settings. GNOME Color Manager currently uses colord to get the policy for display correction on Linux.
Myself and Tim Waugh have been working on CUPS to allow it to register devices and profiles with colord, much like ColorSync.
Till Kamppeter has recently merged my patch to the CUPS ghostscript filters that now query colord for the default ICC profile to use when using Linux. I have sent other patches to Till for the foomatic filter also.
With the attached patch to CUPS, the cupsd daemon adds devices and profiles to colord, which can then have priorities or match rules (we call these 'qualifiers') so that the user can manually assign a manufacturer supplied profile, or even generate a profile themselves using tools like argyllcms.
I've used a local git-svn mirror to generate the patch against svn trunk, although if should apply fine if you use the patch -p1 option.
To test, you need to have colord installed. If colord isn't present then no devices or profiles are added and we continue like normal without errors.
The obvious next step would be to move all the ColorSync-specific code from ipp.c to a new colorsync.c and then call the code in colorsync.c from the new cupsdCmsRegisterPrinter() hooks in printer.c
I could make a patch for this change if required, although it might be better if my patch was merged first from a diffstat size point of view. The current minimal patch also appears to apply against 1.4.
I'm happy to rework the code as required, and can contribute the code under any license required. I'm also happy to maintain the colord specific code if this is required.
Thanks.
Richard Hughes