You are not logged in.

#1 2017-05-08 01:20:32

Thorned_Rose
Member
From: New Zealand
Registered: 2015-12-30
Posts: 40

[SOLVED] CUPS ignores print settings (won't print in mono, A4, etc.)

I successfully set up my network printer (connected to our home network via a switch), a Brother HL-3040CN colour laser printer. I used the brother-hl3040cn (v1.1.2-3) package on AUR for the driver.

I can print in colour fine. However, the magenta toner has run out and now it refuses to print even though I am selecting to print in mono(chrome). We can print in mono with other computers on the network (Windows 10) fine so this is unique to my computer (the only Arch Linux computer on the network currently).

In the CUPS web gui (localhost:631) I set the the color mode to "Mono" in the default settings. No difference.

Here's the PPD: https://pastebin.com/ev109DAd

cups-files.conf:

#
# File/directory/user/group configuration file for the CUPS scheduler.
# See "man cups-files.conf" for a complete description of this file.
#

# List of events that are considered fatal errors for the scheduler...
#FatalErrors config

# Do we call fsync() after writing configuration or status files?
#SyncOnClose No

# Default user and group for filters/backends/helper programs; this cannot be
# any user or group that resolves to ID 0 for security reasons...
User daemon
Group lp

# Administrator user group, used to match @SYSTEM in cupsd.conf policy rules...
# This cannot contain the Group value for security reasons...
SystemGroup printadmin


# User that is substituted for unauthenticated (remote) root accesses...
#RemoteRoot remroot

# Do we allow file: device URIs other than to /dev/null?
#FileDevice No

# Permissions for configuration and log files...
#ConfigFilePerm 0640
#LogFilePerm 0644

# Location of the file logging all access to the scheduler; may be the name
# "syslog". If not an absolute path, the value of ServerRoot is used as the
# root directory.  Also see the "AccessLogLevel" directive in cupsd.conf.
AccessLog /var/log/cups/access_log

# Location of cache files used by the scheduler...
#CacheDir /var/cache/cups

# Location of data files used by the scheduler...
#DataDir /usr/share/cups

# Location of the static web content served by the scheduler...
#DocumentRoot /usr/share/cups/doc

# Location of the file logging all messages produced by the scheduler and any
# helper programs; may be the name "syslog". If not an absolute path, the value
# of ServerRoot is used as the root directory.  Also see the "LogLevel"
# directive in cupsd.conf.
ErrorLog /var/log/cups/error_log

# Location of fonts used by older print filters...
#FontPath /usr/share/cups/fonts

# Location of LPD configuration
#LPDConfigFile xinetd:///etc/xinetd.d/cups-lpd

# Location of the file logging all pages printed by the scheduler and any
# helper programs; may be the name "syslog". If not an absolute path, the value
# of ServerRoot is used as the root directory.  Also see the "PageLogFormat"
# directive in cupsd.conf.
PageLog /var/log/cups/page_log

# Location of the file listing all of the local printers...
#Printcap /etc/printcap

# Format of the Printcap file...
#PrintcapFormat bsd
#PrintcapFormat plist
#PrintcapFormat solaris

# Location of all spool files...
#RequestRoot /var/spool/cups

# Location of helper programs...
#ServerBin /usr/lib/cups

# SSL/TLS keychain for the scheduler...
#ServerKeychain ssl

# Location of other configuration files...
#ServerRoot /etc/cups

# Location of Samba configuration file...
#SMBConfigFile 

# Location of scheduler state files...
#StateDir /run/cups

# Location of scheduler/helper temporary files. This directory is emptied on
# scheduler startup and cannot be one of the standard (public) temporary
# directory locations for security reasons...
#TempDir /var/spool/cups/tmp

On the off chance it made any difference, I have tried using system-config-printer and gtklp with no difference. I did note that in using system-config-printer, there was an option for "print-color-mode" that I could select either color or monochrome from (Job Options > Other Options (Advanced)). However everytime I tried to select Monochrome, it would revert back to color upon clicking "Apply". So I changed that setting using the command lpotions -o print-color-mode=Monochrome. Made no difference. When I run system-config-printer, print-color-mode still appears as "color".
gtklp has an option "Printing in Black" (HP-GL/2 > Options) but enabling it made no difference.

lpoptions outputs:

blackplot=true BRBlue=0 BRBrightness=0 BRColorMatching=Normal BRContrast=0 BREnhanceBlkPrt=OFF BRGray=OFF BRGreen=0 brightness=100 BRImproveOutput=OFF BRMonoColor=Mono BRRed=0 BRResolution=600dpi BRSaturation=0 collate=false copies=1 device-uri=lpd://Turbolaser/BINARY_P1 finishings=3 InputSlot=AutoSelect job-cancel-after=10800 job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=1494204777 marker-colors=#000000,#00FFFF,#FFFF00,#FF00FF,none,none,none,none,none,none marker-levels=-1,-1,-1,-1,-1,88,83,83,83,83 marker-names='Black\ Toner\ Cartridge,Cyan\ Toner\ Cartridge,Magenta\ Toner\ Cartridge,Yellow\ Toner\ Cartridge,Waste\ Toner\ Box,Belt\ Unit,Black\ Drum\ Unit,Cyan\ Drum\ Unit,Magenta\ Drum\ Unit,Yellow\ Drum\ Unit' marker-types=toner,toner,toner,toner,waste-toner,other,opc,opc,opc,opc MediaType=Plain number-up=2 number-up-layout=btlr outputorder=normal page-ranges=1 PageSize=A4 position=center print-color-mode=color print-quality=3 printer-commands=AutoConfigure,Clean,PrintSelfTestPage printer-info='Brother HL3040CN colour laser on local network' printer-is-accepting-jobs=true printer-is-shared=true printer-location=Office printer-make-and-model='Brother HL3040CN CUPS' printer-state=3 printer-state-change-time=1494204777 printer-state-reasons=none printer-type=8564812 printer-uri-supported=ipp://localhost/printers/Brother-HL3040CN TonerSaveMode=OFF wrap=false

Thanks in advance.

Last edited by Thorned_Rose (2017-05-20 00:05:38)

Offline

#2 2017-05-08 12:14:41

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,957

Re: [SOLVED] CUPS ignores print settings (won't print in mono, A4, etc.)

Some programs ( like office applications ) use their own print options, there are also document types (like pdf ) that embed print options inside the document.

To test if either is the cuplrit in your case, i suggest creating  a short text file in a simple editor (like nano) , then try to print that.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2017-05-10 09:37:07

Thorned_Rose
Member
From: New Zealand
Registered: 2015-12-30
Posts: 40

Re: [SOLVED] CUPS ignores print settings (won't print in mono, A4, etc.)

Lone_Wolf wrote:

Some programs ( like office applications ) use their own print options, there are also document types (like pdf ) that embed print options inside the document.

To test if either is the cuplrit in your case, i suggest creating  a short text file in a simple editor (like nano) , then try to print that.

Ok, I have tested using the lpr command and that worked to print a simple txt document.

Testing printing a PDF - no matter what program I use, even though in settings for each program the colour is set to Mono, it still refuses to print. I tried Okular (set colour to greyscale) and I tried Adobe Reader 9 (Wine). When I looked through the print settings of Adobe Reader, it uses this as the print command:

lpr -P Brother-HL3040CN -o PageSize=A4 -o PageRegion=A4 -o InputSlot=AutoSelect -o BRResolution=600dpi -o BRMonoColor=Mono -o MediaType=Plain -o BRColorMatching=Normal -o BRGray=OFF -o BREnhanceBlkPrt=OFF -o TonerSaveMode=OFF -o BRImproveOutput=OFF -o BRBrightness=0 -o BRContrast=0 -o BRRed=0 -o BRGreen=0 -o BRBlue=0 -o BRSaturation=0

You can see it's specifying BRMonoColor=Mono but it's still trying to use the colour toner.

I thought perhaps converting the file to greyscale/black and white would make a difference so I opened the PDF in GIMP and set the colour mode to Grayscale. But it still would not print (I double checked that Mono was set in the print settings).

If I save the spread sheet as an xlsx file, open it in Libreoffice Calc, remove all greyscale and colours (so it's only black text and lines) it will print. BUT it ignored me setting it to print landscape and instead printed in the default portrait. It's like some of the settings are being ignored.

I've also tried printing from Firefox and have the same problem. Even though the print dialog options are also set to mono, it will not print without the colour toner. sad

Offline

#4 2017-05-10 14:19:04

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,957

Re: [SOLVED] CUPS ignores print settings (won't print in mono, A4, etc.)

It's a longshot, but try changing the ColorDevice in the ppd to False .

*%==== Basic Device Capabilities =============
*LanguageLevel: "3"
*ColorDevice: True

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2017-05-10 23:06:26

Thorned_Rose
Member
From: New Zealand
Registered: 2015-12-30
Posts: 40

Re: [SOLVED] CUPS ignores print settings (won't print in mono, A4, etc.)

Lone_Wolf wrote:

It's a longshot, but try changing the ColorDevice in the ppd to False .

*%==== Basic Device Capabilities =============
*LanguageLevel: "3"
*ColorDevice: True

Unfortunately made no difference sad

Offline

#6 2017-05-17 16:01:35

kszonek
Member
Registered: 2011-10-12
Posts: 13

Re: [SOLVED] CUPS ignores print settings (won't print in mono, A4, etc.)

I am facing similar problem, I want to print Mono on my brand new MFC-J200, but it prints in color all the time, no matter what software I print from and no matter were I try to change settings.

Problem for me started with paper size - I use A4, while default is "Letter", failing to change that resulted with top of the page not being printed. I found that configuration file: "/opt/brother/Printers/mfcj200/inf/brmfcj200rc" has all the settings with default values and modifying them (paper size) did a difference. It also solves an issue with printer not going mono, but... Sometimes I wish to use my color ink (if not I would have bought mono printer). Unfortunately only way is to modify this file by hand, each time going from color to mono and back.

Maybe someone has a solution to allow cups mess around with this config file? All CUPS settings are completely ignored while printing, only this file content is used, so I guess this is just a matter of forcing cups to write to this file.

Offline

#7 2017-05-19 04:39:31

Thorned_Rose
Member
From: New Zealand
Registered: 2015-12-30
Posts: 40

Re: [SOLVED] CUPS ignores print settings (won't print in mono, A4, etc.)

kszonek wrote:

I found that configuration file: "/opt/brother/Printers/mfcj200/inf/brmfcj200rc" has all the settings with default values and modifying them (paper size) did a difference. It also solves an issue with printer not going mono, [...] Unfortunately only way is to modify this file by hand, each time going from color to mono and back.

Maybe someone has a solution to allow cups mess around with this config file? All CUPS settings are completely ignored while printing, only this file content is used, so I guess this is just a matter of forcing cups to write to this file.

I can confirm that altering this file works to get the printer to print in mono. In my case the file is /opt/brother/Printers/hl3040cn/inf/brhl3040cnrc. However this is not a practical long term solution. And the other problem is that it is printing out in landscape despite all my settings (both cups and the program from which I'm printing) being set to portrait. So clearly it's still ignoring some/all settings sad

Last edited by Thorned_Rose (2017-05-19 04:40:30)

Offline

#8 2017-05-19 13:04:10

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,957

Re: [SOLVED] CUPS ignores print settings (won't print in mono, A4, etc.)

Like most laserprinters the brother HL-3040CN does have a web interface that may allow to change these settings directy on the printer.

get the ip-address of the printer, and goto http;//ipaddress  from a browser.
If you have not changed them, default username is admin  and password  is access .


P.S. Don't forget to change username/password !

Last edited by Lone_Wolf (2017-05-19 13:04:50)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#9 2017-05-19 23:07:36

Thorned_Rose
Member
From: New Zealand
Registered: 2015-12-30
Posts: 40

Re: [SOLVED] CUPS ignores print settings (won't print in mono, A4, etc.)

Lone_Wolf wrote:

Like most laserprinters the brother HL-3040CN does have a web interface that may allow to change these settings directy on the printer.

get the ip-address of the printer, and goto http;//ipaddress  from a browser.
If you have not changed them, default username is admin  and password  is access .


P.S. Don't forget to change username/password !

Yes, access directly to the printer through web interface. However nothing in those settings allows me to change default page orientation or colour. Even if there was, there are several computers on our home network that all need printer access. So it wouldn't be practical to repeatedly have to change the settings due to one computer not being able to print as it should sad

Offline

#10 2017-05-20 00:02:42

Thorned_Rose
Member
From: New Zealand
Registered: 2015-12-30
Posts: 40

Re: [SOLVED] CUPS ignores print settings (won't print in mono, A4, etc.)

Well, I found what the problem is thanks to someone posting the solution on the AUR driver file (https://aur.archlinux.org/packages/brot … 40cn/#news).

It's a permissions issue where the lp group does not have write access to the opt/model/Printers/make/inf/rc file. This appeared in my CUPS debug log (/var/log/cups/error_log after debug mode has been turned on*) as

[20/May/2017:11:35:34 +1200] [Job 45] Error: /opt/brother/Printers/hl3040cn/inf/brhl3040cnrc.old :cannot open file !!

Note the "cannot open file !!"

To fix:

(sudo or root)

chown root:lp /opt/-yourprintermake-/Printers/-yourprintermodel-/inf/

then

chmod g+w /opt/-yourprintermake-/Printers/-yourprintermodel-/inf/

For example, my printer's opt configuration file is /opt/brother/Printers/hl3040cn/inf/brhl3040cnrc so I would enter "chown root:lp /opt/brother/Printers/hl3040cn/inf/"

* How to enable CUPS debug: https://www.papercut.com/kb/Main/HowToEnableDebugCUPS

Offline

Board footer

Powered by FluxBB