cups: Can't add Canon ipp printer after cups version 2.4.6

Before you write the report Read the REPORTING_ISSUES.md file in the main repository and prepare data mentioned there which looks relevant to you issue.

Describe the bug Can’t add Canon ipp printer after cups version 2.4.6. Tested with all ubuntu versions one by one from 22.04 to 24.04. Mantic is the last one that works. I use Fedora 40 as the daily driver which also does not work.

To Reproduce

hannu@hannu-Standard-PC-Q35-ICH9-2009:~$ lpadmin -p canon -v ipp://192.168.20.7/ipp/print -E -m everywhere
lpadmin: Unable to create PPD: No IPP attributes.
  • with cups 2.4.7 and ubuntu
  • same behaviour with Fedora 40 cups-2.4.10-3.fc40.x86_64

Expected behavior Printer was added

Screenshots If applicable, add screenshots to help explain your problem.

System Information:

  • OS and its version: Ubuntu 24.04, Fedora 40
  • CUPS version 2.4.7, 2.7.10

Additional context I tested with ipptool. this does not work even on older cups versions, however the printer can be added and works when adding with lpadmin and manually changing the driver to generic IPP driver via Gnome printer settings on older versions.

ipptool

ipptool -tv ipp://192.168.20.7/ get-printer-attributes.test
"get-printer-attributes.test":
    Get-Printer-Attributes:
        attributes-charset (charset) = utf-8
        attributes-natural-language (naturalLanguage) = en
        printer-uri (uri) = ipp://192.168.20.7:631/
        requested-attributes (keyword) = all
    Get printer attributes using get-printer-attributes                  [FAIL]
        RECEIVED: 0 bytes in response
        status-code = server-error-internal-error (Unable to read response.)
        IPP request failed with status server-error-internal-error (Unable to read response.)

I captured traffic with wireshark during the above command. Printer responds and gives IPP parameters, however the ipptool says it did not get any. I will attach the wireshark capture to this report. Same behaviour with older or newer versions of the tested operating systems and cups versions

** Text representation of the reply from printer, whole capture as an attachment **

  • github would not allow wireshrk pcapng files so zipped it
Internet Printing Protocol
    [Request In: 5]
    [Response Time: 0.014304757 seconds]
    version: 2.0
    status-code: Successful (successful-ok)
    request-id: 20825
    operation-attributes-tag
        attributes-charset (charset): 'utf-8'
            name: attributes-charset
            charset value: utf-8
        attributes-natural-language (naturalLanguage): 'en-fi'
            name: attributes-natural-language
            naturalLanguage value: en-fi
    printer-attributes-tag
        printer-uri-supported (1setOf uri): 'ipp://192.168.20.7:631/ipp/print','ipp://192.168.20.7:631/ipp'
            name: printer-uri-supported
            uri value: ipp://192.168.20.7:631/ipp/print
            uri value: ipp://192.168.20.7:631/ipp
        uri-security-supported (1setOf keyword): 'none','none'
            name: uri-security-supported
            keyword value: none
            keyword value: none
        uri-authentication-supported (1setOf keyword): 'none','none'
            name: uri-authentication-supported
            keyword value: none
            keyword value: none
        printer-name (nameWithoutLanguage): 'MF645C'
            name: printer-name
            nameWithoutLanguage value: MF645C
        printer-location (textWithoutLanguage): ''
            name: printer-location
            textWithoutLanguage value: 
        printer-info (textWithoutLanguage): 'http://www.canon.com'
            name: printer-info
            textWithoutLanguage value: http://www.canon.com
        printer-more-info (uri): 'http://192.168.20.7:80/airprint.html'
            name: printer-more-info
            uri value: http://192.168.20.7:80/airprint.html
        printer-make-and-model (textWithoutLanguage): 'CNMF645C'
            name: printer-make-and-model
            textWithoutLanguage value: CNMF645C
        printer-state (enum): idle
            name: printer-state
            printer-state: idle (3)
        printer-state-reasons (keyword): 'none'
            name: printer-state-reasons
            keyword value: none
        ipp-versions-supported (1setOf keyword): '2.0','1.1','1.0'
            name: ipp-versions-supported
            keyword value: 2.0
            keyword value: 1.1
            keyword value: 1.0
        ipp-features-supported (keyword): 'airprint-1.8'
            name: ipp-features-supported
            keyword value: airprint-1.8
        operations-supported (1setOf enum): Print-Job,Validate-Job,Create-Job,Send-Document,Cancel-Job,Get-Job-Attributes,Get-Jobs,Get-Printer-Attributes,Identify-Printer
            name: operations-supported
            operations-supported: Print-Job (2)
            operations-supported: Validate-Job (4)
            operations-supported: Create-Job (5)
            operations-supported: Send-Document (6)
            operations-supported: Cancel-Job (8)
            operations-supported: Get-Job-Attributes (9)
            operations-supported: Get-Jobs (10)
            operations-supported: Get-Printer-Attributes (11)
            operations-supported: Identify-Printer (60)
        charset-configured (charset): 'utf-8'
            name: charset-configured
            charset value: utf-8
        charset-supported (charset): 'utf-8'
            name: charset-supported
            charset value: utf-8
        color-supported (boolean): true
            name: color-supported
            boolean value: True
        compression-supported (keyword): 'none'
            name: compression-supported
            keyword value: none
        copies-default (integer): 1
            name: copies-default
            integer value: 1
        copies-supported (rangeOfInteger): 1-99
            name: copies-supported
            rangeOfInteger value: 1-99
        document-format-default (mimeMediaType): 'application/octet-stream'
            name: document-format-default
            mimeMediaType value: application/octet-stream
        document-format-supported (1setOf mimeMediaType): 'application/octet-stream','image/urf','image/pwg-raster','image/jpeg','application/pdf'
            name: document-format-supported
            mimeMediaType value: application/octet-stream
            mimeMediaType value: image/urf
            mimeMediaType value: image/pwg-raster
            mimeMediaType value: image/jpeg
            mimeMediaType value: application/pdf
        generated-natural-language-supported (naturalLanguage): 'en-fi'
            name: generated-natural-language-supported
            naturalLanguage value: en-fi
        jpeg-features-supported (keyword): 'none'
            name: jpeg-features-supported
            keyword value: none
        jpeg-k-octets-supported (rangeOfInteger): 0-51200
            name: jpeg-k-octets-supported
            rangeOfInteger value: 0-51200
        jpeg-x-dimension-supported (rangeOfInteger): 0-15000
            name: jpeg-x-dimension-supported
            rangeOfInteger value: 0-15000
        jpeg-y-dimension-supported (rangeOfInteger): 1-15000
            name: jpeg-y-dimension-supported
            rangeOfInteger value: 1-15000
        media-default (keyword): 'iso_a4_210x297mm'
            name: media-default
            keyword value: iso_a4_210x297mm
        media-bottom-margin-supported (integer): 500
            name: media-bottom-margin-supported
            integer value: 500
        media-left-margin-supported (integer): 500
            name: media-left-margin-supported
            integer value: 500
        media-right-margin-supported (integer): 500
            name: media-right-margin-supported
            integer value: 500
        media-top-margin-supported (integer): 500
            name: media-top-margin-supported
            integer value: 500
        multiple-document-jobs-supported (boolean): false
            name: multiple-document-jobs-supported
            boolean value: False
        natural-language-configured (naturalLanguage): 'en-fi'
            name: natural-language-configured
            naturalLanguage value: en-fi
        orientation-requested-default (enum): portrait
            name: orientation-requested-default
            orientation: portrait (3)
        orientation-requested-supported (1setOf enum): portrait,landscape,reverse-landscape,reverse-portrait,none
            name: orientation-requested-supported
            orientation: portrait (3)
            orientation: landscape (4)
            orientation: reverse-landscape (5)
            orientation: reverse-portrait (6)
            orientation: none (7)
        pdl-override-supported (keyword): 'attempted'
            name: pdl-override-supported
            keyword value: attempted
        printer-device-id (textWithoutLanguage): 'MFG:Canon;MDL:MF645C UFR II;CLS:PRINTER;DES:Canon MF645C UFR II;CID:CA_XPS_OIP;CMD:LIPSLX,CPCA;PESP:V1;'
            name: printer-device-id
            textWithoutLanguage value: MFG:Canon;MDL:MF645C UFR II;CLS:PRINTER;DES:Canon MF645C UFR II;CID:CA_XPS_OIP;CMD:LIPSLX,CPCA;PESP:V1;
        printer-icons (1setOf uri): 'http://192.168.20.7:80/en/media/dev_icon_128x128.png','http://192.168.20.7:80/en/media/dev_icon_512x512.png'
            name: printer-icons
            uri value: http://192.168.20.7:80/en/media/dev_icon_128x128.png
            uri value: http://192.168.20.7:80/en/media/dev_icon_512x512.png
        printer-is-accepting-jobs (boolean): true
            name: printer-is-accepting-jobs
            boolean value: True
        print-quality-default (enum): normal
            name: print-quality-default
            print-quality: normal (4)
        print-quality-supported (1setOf enum): draft,normal
            name: print-quality-supported
            print-quality: draft (3)
            print-quality: normal (4)
        printer-resolution-default (resolution): 300x300dpi
            name: printer-resolution-default
            resolution value: 300x300dpi
        printer-resolution-supported (resolution): 300x300dpi
            name: printer-resolution-supported
            resolution value: 300x300dpi
        printer-up-time (integer): 56785
            name: printer-up-time
            integer value: 56785
        printer-uuid (uri): 'urn:uuid:6d4ff0ce-6b11-11d8-8020-f4a997cc5b53'
            name: printer-uuid
            uri value: urn:uuid:6d4ff0ce-6b11-11d8-8020-f4a997cc5b53
        queued-job-count (integer): 0
            name: queued-job-count
            integer value: 0
        urf-supported (1setOf keyword): 'ADOBERGB24','CP255','DM1','PQ4','RS300','SRGB24','W8-16','FN3','IS1-4','OB10-40','V1.4'
            name: urf-supported
            keyword value: ADOBERGB24
            keyword value: CP255
            keyword value: DM1
            keyword value: PQ4
            keyword value: RS300
            keyword value: SRGB24
            keyword value: W8-16
            keyword value: FN3
            keyword value: IS1-4
            keyword value: OB10-40
            keyword value: V1.4
        pdf-versions-supported (keyword): 'iso-32000-1_2008'
            name: pdf-versions-supported
            keyword value: iso-32000-1_2008
        printer-dns-sd-name (nameWithoutLanguage): 'Canon MF645C'
            name: printer-dns-sd-name
            nameWithoutLanguage value: Canon MF645C
        printer-firmware-name (nameWithoutLanguage): 'Main Controller'
            name: printer-firmware-name
            nameWithoutLanguage value: Main Controller
        printer-firmware-string-version (textWithoutLanguage): '13.01'
            name: printer-firmware-string-version
            textWithoutLanguage value: 13.01
        printer-firmware-version (octetString): '1301\000\000\000\000\000\000\000\000\000\000\000\000'
            name: printer-firmware-version
            octetString value: 1301
        media-col-supported (1setOf keyword): 'media-size','media-bottom-margin','media-left-margin','media-right-margin','media-top-margin','media-type','media-source','media-source-properties','media-auto-dimension'
            name: media-col-supported
            keyword value: media-size
            keyword value: media-bottom-margin
            keyword value: media-left-margin
            keyword value: media-right-margin
            keyword value: media-top-margin
            keyword value: media-type
            keyword value: media-source
            keyword value: media-source-properties
            keyword value: media-auto-dimension
            collection {x-dimension,y-dimension}
         [truncated]job-creation-attributes-supported (1setOf keyword): 'copies','finishings','media','orientation-requested','output-bin','print-quality','printer-resolution','sides','media-col','output-mode','print-color-mode','ipp-attribute-fid
            name: job-creation-attributes-supported
            keyword value: copies
            keyword value: finishings
            keyword value: media
            keyword value: orientation-requested
            keyword value: output-bin
            keyword value: print-quality
            keyword value: printer-resolution
            keyword value: sides
            keyword value: media-col
            keyword value: output-mode
            keyword value: print-color-mode
            keyword value: ipp-attribute-fidelity
            keyword value: job-name
            keyword value: multiple-document-handling
            keyword value: page-ranges
         [truncated]media-col-default (collection): {media-size{x-dimension,y-dimension},media-bottom-margin,media-left-margin,media-right-margin,media-top-margin,media-type,media-source,media-source-properties{media-source-feed-direction,media-so
            name: media-col-default
            collection {media-size{x-dimension,y-dimension},media-bottom-margin,media-left-margin,media-right-margin,media-top-margin,media-type,media-source,media-source-properties...}
        print-color-mode-default (keyword): 'auto'
            name: print-color-mode-default
            keyword value: auto
        print-color-mode-supported (1setOf keyword): 'auto','color','monochrome','auto-monochrome'
            name: print-color-mode-supported
            keyword value: auto
            keyword value: color
            keyword value: monochrome
            keyword value: auto-monochrome
        printer-geo-location (uri): 'geo:0.000000,0.000000'
            name: printer-geo-location
            uri value: geo:0.000000,0.000000
        page-ranges-supported (boolean): true
            name: page-ranges-supported
            boolean value: True
        multiple-operation-time-out (integer): 60
            name: multiple-operation-time-out
            integer value: 60
        print-scaling-default (keyword): 'auto'
            name: print-scaling-default
            keyword value: auto
        print-scaling-supported (1setOf keyword): 'auto','auto-fit','fill','fit','none'
            name: print-scaling-supported
            keyword value: auto
            keyword value: auto-fit
            keyword value: fill
            keyword value: fit
            keyword value: none
        print-content-optimize-default (keyword): 'auto'
            name: print-content-optimize-default
            keyword value: auto
        print-content-optimize-supported (keyword): 'auto'
            name: print-content-optimize-supported
            keyword value: auto
        multiple-document-handling-default (keyword): 'separate-documents-collated-copies'
            name: multiple-document-handling-default
            keyword value: separate-documents-collated-copies
        multiple-document-handling-supported (1setOf keyword): 'separate-documents-collated-copies','separate-documents-uncollated-copies'
            name: multiple-document-handling-supported
            keyword value: separate-documents-collated-copies
            keyword value: separate-documents-uncollated-copies
        multiple-operation-time-out-action (keyword): 'abort-job'
            name: multiple-operation-time-out-action
            keyword value: abort-job
        printer-config-change-date-time (dateTime): 2024-08-13T19:32:49.0+0300
            name: printer-config-change-date-time
            dateTime value: 2024-08-13T19:32:49.0+0300
        printer-state-change-date-time (dateTime): 2024-08-14T11:19:14.0+0300
            name: printer-state-change-date-time
            dateTime value: 2024-08-14T11:19:14.0+0300
        printer-state-change-time (integer): 1723623554
            name: printer-state-change-time
            integer value: 1723623554
        document-format-preferred (mimeMediaType): 'application/pdf'
            name: document-format-preferred
            mimeMediaType value: application/pdf
        printer-current-time (dateTime): 2024-08-14T11:19:14.0+0300
            name: printer-current-time
            dateTime value: 2024-08-14T11:19:14.0+0300
        printer-strings-languages-supported (naturalLanguage): 'en'
            name: printer-strings-languages-supported
            naturalLanguage value: en
        printer-strings-uri (no-value)
            out-of-band value: no-value (0x13)
        finishings-default (enum): none
            name: finishings-default
            finishings: none (3)
        finishings-supported (enum): none
            name: finishings-supported
            finishings: none (3)
        identify-actions-default (keyword): 'flash'
            name: identify-actions-default
            keyword value: flash
        identify-actions-supported (1setOf keyword): 'flash','sound'
            name: identify-actions-supported
            keyword value: flash
            keyword value: sound
         [truncated]media-col-ready (collection): {media-size{x-dimension,y-dimension},media-bottom-margin,media-left-margin,media-right-margin,media-top-margin,media-type,media-source,media-source-properties{media-source-feed-direction,media-sour
            name: media-col-ready
            collection {media-size{x-dimension,y-dimension},media-bottom-margin,media-left-margin,media-right-margin,media-top-margin,media-type,media-source,media-source-properties...}
        media-ready (keyword): 'iso_a4_210x297mm'
            name: media-ready
            keyword value: iso_a4_210x297mm
        output-bin-default (keyword): 'face-down'
            name: output-bin-default
            keyword value: face-down
        output-bin-supported (keyword): 'face-down'
            name: output-bin-supported
            keyword value: face-down
        pages-per-minute (integer): 21
            name: pages-per-minute
            integer value: 21
        pages-per-minute-color (integer): 21
            name: pages-per-minute-color
            integer value: 21
         [truncated]printer-input-tray (1setOf octetString): 'type=other;mediafeed=0;mediaxfeed=0;maxcapacity=1;level=0;status=3;name=auto;','type=sheetFeedAutoNonRemovableTray;mediafeed=0;mediaxfeed=0;maxcapacity=1;level=0;status=3;name=Stack Byp
            name: printer-input-tray
            octetString value: type=other;mediafeed=0;mediaxfeed=0;maxcapacity=1;level=0;status=3;name=auto;
            octetString value: type=sheetFeedAutoNonRemovableTray;mediafeed=0;mediaxfeed=0;maxcapacity=1;level=0;status=3;name=Stack Bypass;
            octetString value: type=sheetFeedAutoRemovableTray;mediafeed=29700;mediaxfeed=21000;maxcapacity=150;level=150;status=0;name=Drawer1;
        printer-output-tray (octetString): 'type=unRemovableBin;maxcapacity=100;remaining=-2;status=5;name=Tray1;stackingorder=firstToLast;pagedelivery=faceDown;'
            name: printer-output-tray
            octetString value: type=unRemovableBin;maxcapacity=100;remaining=-2;status=5;name=Tray1;stackingorder=firstToLast;pagedelivery=faceDown;
        printer-supply-info-uri (uri): 'http://192.168.20.7:80/airprint.html'
            name: printer-supply-info-uri
            uri value: http://192.168.20.7:80/airprint.html
        sides-default (keyword): 'one-sided'
            name: sides-default
            keyword value: one-sided
        sides-supported (1setOf keyword): 'one-sided','two-sided-long-edge','two-sided-short-edge'
            name: sides-supported
            keyword value: one-sided
            keyword value: two-sided-long-edge
            keyword value: two-sided-short-edge
        number-up-default (integer): 1
            name: number-up-default
            integer value: 1
        number-up-supported (1setOf integer): 1,2,4,6,8,9,16
            name: number-up-supported
            integer value: 1
            integer value: 2
            integer value: 4
            integer value: 6
            integer value: 8
            integer value: 9
            integer value: 16
        presentation-direction-number-up-default (keyword): 'toright-tobottom'
            name: presentation-direction-number-up-default
            keyword value: toright-tobottom
        presentation-direction-number-up-supported (1setOf keyword): 'toright-tobottom','toleft-tobottom'
            name: presentation-direction-number-up-supported
            keyword value: toright-tobottom
            keyword value: toleft-tobottom
        landscape-orientation-requested-preferred (enum): 4
            name: landscape-orientation-requested-preferred
            enum value: 4
        marker-colors (1setOf nameWithoutLanguage): '#000000','#00FFFF','#FF00FF','#FFFF00'
            name: marker-colors
            nameWithoutLanguage value: #000000
            nameWithoutLanguage value: #00FFFF
            nameWithoutLanguage value: #FF00FF
            nameWithoutLanguage value: #FFFF00
        marker-high-levels (1setOf integer): 100,100,100,100
            name: marker-high-levels
            integer value: 100
            integer value: 100
            integer value: 100
            integer value: 100
        marker-levels (1setOf integer): 78,98,99,96
            name: marker-levels
            integer value: 78
            integer value: 98
            integer value: 99
            integer value: 96
        marker-low-levels (1setOf integer): 7,7,7,7
            name: marker-low-levels
            integer value: 7
            integer value: 7
            integer value: 7
            integer value: 7
        marker-names (1setOf nameWithoutLanguage): 'Canon Cartridge 054 Black Toner','Canon Cartridge 054 Cyan Toner','Canon Cartridge 054 Magenta To','Canon Cartridge 054 Yellow Ton'
            name: marker-names
            nameWithoutLanguage value: Canon Cartridge 054 Black Toner
            nameWithoutLanguage value: Canon Cartridge 054 Cyan Toner
            nameWithoutLanguage value: Canon Cartridge 054 Magenta To
            nameWithoutLanguage value: Canon Cartridge 054 Yellow Ton
        marker-types (1setOf keyword): 'toner','toner','toner','toner'
            name: marker-types
            keyword value: toner
            keyword value: toner
            keyword value: toner
            keyword value: toner
        media-source-supported (1setOf keyword): 'auto','by-pass-tray','tray-1'
            name: media-source-supported
            keyword value: auto
            keyword value: by-pass-tray
            keyword value: tray-1
        media-type-supported (1setOf keyword): 'stationery','stationery-lightweight','stationery-heavyweight','envelope','labels'
            name: media-type-supported
            keyword value: stationery
            keyword value: stationery-lightweight
            keyword value: stationery-heavyweight
            keyword value: envelope
            keyword value: labels
        output-mode-default (keyword): 'auto'
            name: output-mode-default
            keyword value: auto
        output-mode-supported (1setOf keyword): 'auto','monochrome','auto-monochrome','color'
            name: output-mode-supported
            keyword value: auto
            keyword value: monochrome
            keyword value: auto-monochrome
            keyword value: color
        pdf-k-octets-supported (rangeOfInteger): 0-256000
            name: pdf-k-octets-supported
            rangeOfInteger value: 0-256000
        printer-kind (1setOf keyword): 'document','envelope','postcard'
            name: printer-kind
            keyword value: document
            keyword value: envelope
            keyword value: postcard
        finishings-col-database (collection): {finishing-template}
            name: finishings-col-database
            collection {finishing-template}
        finishings-col-default (collection): {finishing-template}
            name: finishings-col-default
            collection {finishing-template}
        finishings-col-ready (collection): {finishing-template}
            name: finishings-col-ready
            collection {finishing-template}
        finishings-col-supported (keyword): 'finishing-template'
            name: finishings-col-supported
            keyword value: finishing-template
        finishings-ready (enum): none
            name: finishings-ready
            finishings: none (3)
        finishing-template-supported (keyword): 'none'
            name: finishing-template-supported
            keyword value: none
        job-pages-per-set-supported (boolean): true
            name: job-pages-per-set-supported
            boolean value: True
        overrides-supported (1setOf keyword): 'media','media-col','document-numbers','pages'
            name: overrides-supported
            keyword value: media
            keyword value: media-col
            keyword value: document-numbers
            keyword value: pages
        pwg-raster-document-sheet-back (keyword): 'normal'
            name: pwg-raster-document-sheet-back
            keyword value: normal
        pwg-raster-document-resolution-supported (resolution): 300x300dpi
            name: pwg-raster-document-resolution-supported
            resolution value: 300x300dpi
        pwg-raster-document-type-supported (1setOf keyword): 'srgb_8','sgray_8','rgb_8'
            name: pwg-raster-document-type-supported
            keyword value: srgb_8
            keyword value: sgray_8
            keyword value: rgb_8
        mopria-certified (textWithoutLanguage): '1.3'
            name: mopria-certified
            textWithoutLanguage value: 1.3
        print_wfds (nameWithoutLanguage): 'T'
            name: print_wfds
            nameWithoutLanguage value: T
    end-of-attributes-tag

ipp-canon.zip

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 32 (16 by maintainers)

Commits related to this issue

Most upvoted comments

@somepaulo it looks like your printer sometimes returns “Not found” for IPP Get-Printer-Attributes request, which looks like a printer issue 😦 - URI looks good and attrs too… Unfortunately the second capture is useless without session keys - all traffic is encrypted, but the output passed the test, so connection to the printer via the URI supports IPP Everywhere, so it can be installed with ‘everywhere’ model and work.

Is the URI from the one before the last ipptool command really the one from lpinfo -v ? I forgot to mention libcups or avahi encodes ipp/ipps into the mDNS hostname, so you should not get ipps scheme with _ipp service name in the mDNS hostname.

UPDATE I just did a firmware update and I was successful adding and printing a test page. I also noticed some CUPS updates (I’d been gone a week). So, between the two, it seems to be working now.

We can continue here…

The wrong URI was being sent in all of the cases:

[master 4bada6c6c] Fix IPP everywhere printer setup (Issue #1033)

[2.4.x 313c388db] Fix IPP everywhere printer setup (Issue #1033)