Bug 10186 - Driver can only be associated to a printer when 32-Bit drivers are uploaded too
Driver can only be associated to a printer when 32-Bit drivers are uploaded too
Status: RESOLVED WONTFIX
Product: Samba 4.0
Classification: Unclassified
Component: printing
4.0.10
x64 All
: P5 normal
: ---
Assigned To: printing-maintainers
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-08 19:55 UTC by Marc Muehlfeld
Modified: 2014-05-15 08:33 UTC (History)
0 users

See Also:


Attachments
level 10 debug logs (3.68 MB, application/x-bzip2)
2013-10-08 19:55 UTC, Marc Muehlfeld
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Muehlfeld 2013-10-08 19:55:01 UTC
Created attachment 9256 [details]
level 10 debug logs

I validated this problem on a complete fresh Samba 4.0.10 print server installation (followed my Wiki HowTo).


If you upload a x64 printer driver through the add printer wizzard (I only tried it on Win7 64-Bit), then the driver can't be associated with a printer, because the driver list stays empty.

BUT: If I additionally or only upload a x86 driver, it is shown in the list and I can associate it with the printer.


This is the dialog window where the driver can be assigned to the printer: https://wikiupload.samba.org/images/e/e4/Choose_driver.png


As a workaround the driver can be associated with the printer with the following command when only a x64 driver is on the server:
# rpcclient localhost -U administrator -c 'setdriver "MyDemoPrinter" "HP Universal Printing PS"'


I attached some level 10 debug logs:
1: Upload of a x64 bit driver through the add printer wizzard
2: Opening the printer properties, go to the advanced tab an open the empty driver list combobox.
--- Here I reset samba to a empty installation ---
3: Upload of a x86bit driver through the add printer wizzard
4: Opening the printer properties, go to the advanced tab an open the driver list combobox, which contains the driver name now.


As driver I used a Sharp MX-2600n x64/x86 driver. But it happens with other drivers too.
Comment 1 David Disseldorp 2013-10-08 21:34:00 UTC
Hi Marc!

Indeed, Windows clients only permit driver association when an uploaded driver matches the architecture reported by the spoolss server.

Samba reports "Windows NT x86" by default, but can be changed to report "Windows x64" via the (undocumented) "spoolss: architecture = <arch_string>" smb.conf option.

Please confirm that you can associate the 64-bit driver when configured with:
spoolss: architecture = "Windows x64"

I'd previously discussed with Günther and Andreas the possibility of always returning an architecture string that matches the client, which may be possible if it's known prior to the GetPrinterDataEx(<server>, "Architecture") request.

For now, we should at least document the "spoolss: architecture" smb.conf parameter.
Comment 2 Marc Muehlfeld 2013-10-09 16:28:15 UTC
(In reply to comment #1)
> Indeed, Windows clients only permit driver association when an uploaded driver
> matches the architecture reported by the spoolss server.
>
> Samba reports "Windows NT x86" by default, but can be changed to report
> "Windows x64" via the (undocumented) "spoolss: architecture = <arch_string>"
> smb.conf option.

I didn't knew that. I'll add this to my Print Server HowTo in the Wiki.




> Please confirm that you can associate the 64-bit driver when configured with:
> spoolss: architecture = "Windows x64"

I reset my test server, set this value in the [global] section and started Samba.

But now the add-printer-wizzard doesn't appear any more if I click to the "add" button ("drivers" tab in the "print server properties" window). If I remove the parameter and restart Samba, the button starts working again. Let me know if you need debug logs this.





> I'd previously discussed with Günther and Andreas the possibility of always
> returning an architecture string that matches the client, which may be 
> possible if it's known prior to the GetPrinterDataEx(<server>, 
> "Architecture") request.
>
> For now, we should at least document the "spoolss: architecture" smb.conf
> parameter.

I think at least it should be like like how a Windows printserver handles that (what I guess it is the current situation, right?). But your idea with returning the architecture string that is matching the client is good, I think.

But this behaviour should be documentend in the manpage of smb.conf. And I'll add it to the Wiki this evening.
Comment 3 David Disseldorp 2013-10-13 16:20:58 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Indeed, Windows clients only permit driver association when an uploaded driver
> > matches the architecture reported by the spoolss server.
> >
> > Samba reports "Windows NT x86" by default, but can be changed to report
> > "Windows x64" via the (undocumented) "spoolss: architecture = <arch_string>"
> > smb.conf option.
> 
> I didn't knew that. I'll add this to my Print Server HowTo in the Wiki.
> 

Sounds good. I think some of this is already documented at:

https://wiki.samba.org/index.php/Samba_as_a_print_server#Uploading_printer_drivers_for_Point.27n.27Print_driver_installation


> > Please confirm that you can associate the 64-bit driver when configured with:
> > spoolss: architecture = "Windows x64"
> 
> I reset my test server, set this value in the [global] section and started
> Samba.
> 
> But now the add-printer-wizzard doesn't appear any more if I click to the "add"
> button ("drivers" tab in the "print server properties" window). If I remove the
> parameter and restart Samba, the button starts working again. Let me know if
> you need debug logs this.

Sorry, bad instructions. The configuration should be without quotes:

spoolss: architecture = Windows x64

Please retry.
Comment 4 Marc Muehlfeld 2013-10-13 16:50:02 UTC
(In reply to comment #3)
> Sounds good. I think some of this is already documented at:
> 
> https://wiki.samba.org/index.php/Samba_as_a_print_server#Uploading_printer_drivers_for_Point.27n.27Print_driver_installation

Yes. I already had added that note after your last comment. :-)



> Sorry, bad instructions. The configuration should be without quotes:
> 
> spoolss: architecture = Windows x64

This works. Now I can upload only x64 drivers and assign them to a driver.



Should I add a note about that option to the Wiki, too? Some days ago, there was a discussion on samba-technical about undocumented options (http://samba.2283325.n4.nabble.com/reminder-undocumented-options-not-allowed-td4654730.html) and it sounds a bit like this kind of options are more developer tweaks.

If this option can be published, can you add a short description to the manpage? I think it is usefull. And I would add it to the Wikii page then too.
Comment 5 David Disseldorp 2013-10-13 22:00:01 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Sounds good. I think some of this is already documented at:
> > 
> > https://wiki.samba.org/index.php/Samba_as_a_print_server#Uploading_printer_drivers_for_Point.27n.27Print_driver_installation
> 
> Yes. I already had added that note after your last comment. :-)

Thanks :)

> > Sorry, bad instructions. The configuration should be without quotes:
> > 
> > spoolss: architecture = Windows x64
> 
> This works. Now I can upload only x64 drivers and assign them to a driver.
> 
> 
> 
> Should I add a note about that option to the Wiki, too? Some days ago, there
> was a discussion on samba-technical about undocumented options
> (http://samba.2283325.n4.nabble.com/reminder-undocumented-options-not-allowed-td4654730.html)
> and it sounds a bit like this kind of options are more developer tweaks.
> 
> If this option can be published, can you add a short description to the
> manpage? I think it is usefull. And I would add it to the Wikii page then too.

Björn opened 10188 to track this, I'll upload the man page patch tomorrow. I think this bug can be closed, if driver upload and assignment is now working for you.
Comment 6 Marc Muehlfeld 2013-10-14 06:13:24 UTC
(In reply to comment #5)
> Björn opened 10188 to track this, I'll upload the man page patch tomorrow. I
> think this bug can be closed, if driver upload and assignment is now working
> for you.

Yes, you can close this bug report.

And tonight I'll add some notes about it to the Wiki.

Thanks.


Regards,
Marc
Comment 7 Marc Muehlfeld 2014-05-15 08:33:24 UTC
I'll close this bug report, as it is meanwhile documented in the smb.conf manpage and the wiki