The printer driver is one of the most important and challenging components in a printing environment. The following is a technical definition of a printer driver, which clearly states that it plays a major role in how the print job is created, formatted, and sent to the spooler:
A printer driver is an OS extension that helps the OS and applications, create a device ready print data stream for a specific print device.
Approximately 90% of most printing issues are printer driver related. The other 10% being related to Microsoft print spooler (spoolsv.exe) or the Citrix Print Manager service (cpsvc.exe).
A stable set of printer drivers are needed for a good stable printing environment, without a good base any system is likely to have challenges and fail. Stable drivers mean a stable Print Spooler which means a stable Citrix Print Manager service which equals to a healthy printing environment.
Windows Server 2003 was more difficult than Windows Server 2008 R2 to have a stable printing environment, as all it took was one bad driver to bring the printing environment to a halt.
Consider the following scenario:
A user with printer XYZ using driver XYZ and the driver is not signed by Microsoft.
The message “driver is not signed” states that it was not tested for multi-user use for Terminal Services/ Remote Desktop or XenApp. It was tested as a one-to-one use case (one printer with one user). So the user connects the Citrix Print Manager service, makes the call to the Print Spooler service on behalf of the user to auto create the printer with driver XYZ which is already installed on the server.
When the print spooler tries to execute the add printer function, and it does not work as expected, it crashes the spooler and one of the threads do not complete or hangs.
All users who connect with their printers after this is stuck on this thread from the bad printer driver “XYZ” and nothing else can complete because the spooler has crashed, thus bringing the printing environment to a halt.
Complete the following steps to fix the issue:
Contact the manufacturer of the printer driver to verify if they are aware of the issue and obtain an updated or recommended driver.
Use the Citrix Universal Driver.
Isolate the printer driver if Windows Server 2008 R2 is used.
Note: A recommended method is to use the Citrix Universal Driver for as many printers as needed. If any driver does not work, it is then recommended to use the manufacturer's driver.
There is a tool to test the basic add/delete function of printer drivers against the print spooler called “Stress Printers” which should be used to test any non-signed drivers. It is just a basic test and if it fails this basic test the driver should not be implemented in your environment.
The following are some of the options for isolation:
Shared Mode – The print driver is run in a separate process from the spooler and other print drivers can share this process.
Isolated – The printer is running completely in its own isolated process and no other printers can share this process.
None – The normal operation of the printer driver being run directly by the print spooler process.
Some drivers can share the process and some cannot. It all depends on how the driver was designed. Contact the manufacturer of the printer driver to confirm this.
There is also an additional process that runs on the XenApp server called “printisolationhost.exe”. If every driver is running in “Shared mode”, it is similar to running them all in “None” mode as one driver can still hang or crash the one “printisolationhost.exe” shared by all the printers.
Test the drivers in the environment and inspect which drivers need to be isolated. If isolation is needed, then determine which drivers can share a single “printisolationhost.exe” and which printer drivers require their own process.
Ideally any driver that has to be isolated should not be used, as that is an indication of a problematic driver.
Though isolating the process can help keep the print spooler more stable it still does not fix the driver. The driver can still hang or crash the “printisolationhost.exe”. So if a problematic driver is found, contact the manufacturer of the driver to have it corrected, or verify if they can recommend a replacement driver.
Note: In case of 32-bit applications running on a 64-bit server, things can become further complicated, as a separate process on the server called “splwow64.exe” is launched to handle that translation.
The best recommendation is to have the print server OS match the XenApp/Terminal Server/Remote Desktop OS.
Because the name of the driver is the same, it does not necessarily mean that the driver is actually the same. As simple as a different driver version number can cause the printer not to connect and fail.
If the print server OS is the same as the XenApp/Terminal Server/Remote Desktop OS, then most of issues do not occur. Matching the servers and drivers saves issues in the future. Now with XenApp 6.0 and 6.5 there is a Universal Print Server that uses the Universal Print Driver. This can be used for most if not all of your needs. (This can be downloaded from under the product software download for XenApp).
Some drivers that need a special tray or pin number to print might arise and the Universal Print Driver might not work for those drivers. So if every feature and function is required, use the manufacturer's driver and have the OS of the print server match the OS of the XenApp/Terminal Server/ Remote Desktop.
CTX109374 - StressPrinters 1.3.2 for 32-bit and 64-bit Platforms
CTX129574 - How to Use the Stress Printer Tool
Citrix eDocs - Universal Print Server
MSDN - Printer Driver Isolation (Windows Drivers)