[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): FC5 cups-1.2.1-1.9 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: 1. 2. 3. 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.
What does 'lpoptions' say?
# 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 responding.
*** Bug 194580 has been marked as a duplicate of this bug. ***
Does 'lpr /usr/share/cups/data/testprint.ps' also come out portrait? Please attach /etc/cups/printers.conf. Thanks.
Does 'lpr /usr/share/cups/data/testprint.ps' 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 different: # 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.
Created attachment 131183 [details] /etc/cups/printers.conf file
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.
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.
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.
What does 'cat /etc/cups/lpoptions' say now? If it has a printer-type attribute in it anywhere, please remove it.
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.
Please remove the file. So, now that's been undone. What does 'lpstat -s' say?
After deleting /etc/cups/lpoptions 'lpstat -s' says the same thing as before: system default destination: Dell device for Dell: socket://192.168.68.102 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).
So the landscape problem is gone?
Yes, when I deleted /etc/cups/lpoptions, the Landscape problem went away.
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(!).
Filed upstream: http://cups.org/str.php?L1791
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.
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 plausible. Incidentally, these numbers are bit-fields, and convey information about whether the printer is local or remote, what capabilities it has, etc.
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 ...
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 portrait.
Oh, you ran 'lpoptions' as root rather than the user submitting the job then, in comment #2.