Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 195532 - Since upgrading from FC4 to FC5 "lpr file" always prints in Landscape
Summary: Since upgrading from FC4 to FC5 "lpr file" always prints in Landscape
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: 5
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
: 194580 (view as bug list)
Depends On:
Blocks: FC6Target
TreeView+ depends on / blocked
Reported: 2006-06-15 16:11 UTC by Tim Waugh
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-07-01 22:50:10 UTC

Attachments (Terms of Use)
/etc/cups/printers.conf file (deleted)
2006-06-20 12:50 UTC, Kern Sibbald
no flags Details

Description Tim Waugh 2006-06-15 16:11:40 UTC
[Restored from email; originally bug #194580]

Description of problem:
If I send a file to my Postscript printer directly with "lpr filename", it 
always prints the output in Landscape orientation rather than Portrait.

Version-Release number of selected component (if applicable):

How reproducible:
Print any file using the "lpr" command.  Note, if I print using OpenOffice or 
Konqueror, the output is formatted correctly.

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
This is a network printer Dell 3100cn, and in checking all the places I know 
(control panel, web access to the printer) for setting the orientation, they 
are all set to Portrait, including the values stored in the printer.  The 
printer has worked perfectly fine for a long time under FC4.

I defined this same printer on a different FC5 that was installed rather than 
upgraded, and it works just fine, so that implies something got messed up in 
the upgrade.

I removed /etc/cups, reinstalled all the cups rpms using --force, and 
redefined the printer using the ppd from the FC5 system where printing works 
correctly, but the problem still exists -- all "lpr filename" commands print 
in Landscape.

Comment 1 Tim Waugh 2006-06-15 16:12:48 UTC
What does 'lpoptions' say?

Comment 2 Kern Sibbald 2006-06-19 17:26:09 UTC
# lpoptions
job-sheets=none,none printer-info='Dell 3100cn printer' 
printer-is-accepting-jobs=1 printer-is-shared=1 printer-make-and-model='Dell 
3100cn printer' printer-state=3 printer-state-change-time=1150270156 
printer-state-reasons=none printer-type=13

PS: I've been in bed since Thur with a nasty virus, which is why I was slow at 

Comment 3 Tim Waugh 2006-06-20 10:14:54 UTC
*** Bug 194580 has been marked as a duplicate of this bug. ***

Comment 4 Tim Waugh 2006-06-20 10:24:37 UTC
Does 'lpr /usr/share/cups/data/' also come out portrait?

Please attach /etc/cups/printers.conf.  Thanks.

Comment 5 Kern Sibbald 2006-06-20 12:47:17 UTC
Does 'lpr /usr/share/cups/data/' also come out portrait?  No, it 
comes out in landscape.  If I print the same filename on a newly installed FC5 
machine (rather than my upgraded development machine), it prints in Portrait.

Also, on the newly installed FC5 machine, the output from lpoptions is 
# lpoptions -p Dell
job-sheets=none,none printer-info='Dell 3100cn printer' 
printer-is-accepting-jobs=1 printer-is-shared=1 printer-make-and-model='Dell 
3100cn printer' printer-state=3 printer-state-change-time=1150220468 
printer-state-reasons=none printer-type=4180

In particular, the printer-type is 4180 rather than 13.  I don't know what 
that means.  I'll see if I can read up on lpoptions and if I can change the 
type, I'll see if that has any effect.

I'll attach the printers.conf file next.

Comment 6 Kern Sibbald 2006-06-20 12:50:23 UTC
Created attachment 131183 [details]
/etc/cups/printers.conf file

Comment 7 Kern Sibbald 2006-06-20 12:58:43 UTC
Well, doing:

lpoptions -o printer-type=4180

seems to have corrected the problem.  

As far as I am concerned you can close the bug.  

However, I would really like to know what the printer-type codes mean and why 
would it have been messed up during the upgrade of my machine?  Also, it would 
be good to know where these values are stored as it seems they are not 
in /etc/cups since I deleted that file and it was re-created during the forced 
re-install of the cups rpms.

Comment 8 Tim Waugh 2006-06-20 13:16:55 UTC
No, that's not what you're meant to do!  Don't touch the printer-type attribute;
it's automatically generated.

Did you do that command as root, or as a normal user?  I'd like to undo it so
that we can continue debugging.

Comment 9 Kern Sibbald 2006-06-20 14:51:35 UTC
Yes, I figured it was automatically generated.  

Yes, I did the command as root, as I do with any command that I know will be 
digging into system files.

I've set printer_type back to 13, which causes the problem to re-appear for 
both text files and the printer test ps page.

Let me know what you need to debug it.

At least I know how to fix it when I need to print -- it is incredibly 
(amazingly) annoying to try to read normal text in landscape.

Comment 10 Tim Waugh 2006-06-20 16:32:56 UTC
What does 'cat /etc/cups/lpoptions' say now?  If it has a printer-type attribute
in it anywhere, please remove it.

Comment 11 Kern Sibbald 2006-06-20 21:07:24 UTC
It has exactly one line that reads:

Default Dell printer-type=13

Do you want me to delete the whole line?  The whole file?

Note, on the machine that works, there is no /etc/cups/lpoptions file.

Comment 12 Tim Waugh 2006-06-22 11:00:01 UTC
Please remove the file.

So, now that's been undone.

What does 'lpstat -s' say?

Comment 13 Kern Sibbald 2006-06-22 12:51:29 UTC
After deleting /etc/cups/lpoptions 'lpstat -s' says the same thing as before:
system default destination: Dell
device for Dell: socket://

In addition, 'lpoptions' no reports:
job-sheets=none,none printer-info='Dell 3100cn printer' 
printer-is-accepting-jobs=1 printer-is-shared=1 printer-make-and-model='Dell 
3100cn printer' printer-state=3 printer-state-change-time=1150980929 
printer-state-reasons=none printer-type=135252

and printing seems to work fine either directly printing a text file or 
printing the printer test page (ps).

Comment 14 Tim Waugh 2006-06-22 14:12:44 UTC
So the landscape problem is gone?

Comment 15 Kern Sibbald 2006-06-22 14:40:39 UTC
Yes, when I deleted /etc/cups/lpoptions, the Landscape problem went away.

Comment 16 Tim Waugh 2006-06-22 16:28:54 UTC
How strange.  Well, probably CUPS should prevent the user from explicitly
setting the printer-type attribute; I can only think that that was the original
problem somehow(!).

Comment 17 Tim Waugh 2006-06-22 16:32:27 UTC
Filed upstream:

Comment 18 Kern Sibbald 2006-06-22 17:20:32 UTC
The only time I explicitly set anything on this printer was during the bug 
reporting and I noted everything I did.  If you think that was the original 
problem, I imagine you must have a hard time resolving bugs because that is 
not a logical conclusion from what you have seen during this bug reporting.

I think your suggestion to prevent the user from setting the printer-type 
attribute would block a means for the user to correct a bug that exists 
someplace in the rpm upgrade code.

Comment 19 Tim Waugh 2006-06-22 17:46:57 UTC
Well, comment #2 showed me that you had 'printer-type=13' originally, and
comment #13 shows me that without an lpoptions file to corrupt it the correct
value is 135252, so I think you can see why I still believe the conclusion to be

Incidentally, these numbers are bit-fields, and convey information about whether
the printer is local or remote, what capabilities it has, etc.

Comment 20 Kern Sibbald 2006-06-25 17:14:33 UTC
Just to let you know that the problem is back (everything is printing in 
Landscape except programs that explicitly set the orientation).  I don't know 
why, perhaps because my machine froze and I rebooted it. Anyway, nothing I do 
corrects the problem.

This is probably not worth debugging because I have given up on Fedora. As 
soon as I find a suitable distro, I will be blasting FC5 into history ...

Comment 21 Kern Sibbald 2006-07-01 19:03:26 UTC
As I am now switching distros, I was in the process of cleaning out all 
my .xxx files, and I found what was causing the bug.  I leave it to you to 
determine how it got that way and why I couldn't reset it using the standard 
configure programs.

The file .lpoptions contained:

Dest Brother
Default Dell PreFilter=Level1 orientation-requested=4
Special Advanced%20Faxing%20Tool%20(ksendfax)
Special Mail%20PDF%20File
Special Print%20to%20File%20(PDF)
Special Print%20to%20File%20(PostScript)
Special Send%20to%20Fax

Once I removed orientation-requested=4, the printer prints correctly in 

Comment 22 Tim Waugh 2006-07-01 22:50:10 UTC
Oh, you ran 'lpoptions' as root rather than the user submitting the job then, in
comment #2.

Note You need to log in before you can comment on or make changes to this bug.