Speeding up Samba Printing in Windows XP

Samba Logo

This problem could have been a real pain if I had not stumbled on the solution quickly thanks to Google. A client got in touch with a complaint that the print dialog box in Windows XP Service Pack 2 took a long time to appear when printing to a Samba3/CUPS based printer. Printing the document itself was fine but making any changes to the default print setup caused long pauses in between applying the changes.

It turns out the issue is specific to Windows XP SP2 and the source of the problem lies within the Windows Registry (surprise, surprise). It can be fixed by opening up REGEDIT, browsing to HKEY_CURRENT_USER/Printers and removing any references to DevModes, DevModes2 and DevModePerUser. Nobody on the Net seems quite sure what these entries do (apart from slow down Samba printing). On each of the desktops I applied the change to the print dialog box responsiveness improved markedly after a restart. More than likely this issue will be resolved in a future release of Samba but in the meantime it is just something you have to watch out for in XP SP2.

Update

If your Windows client is part of a Samba domain then you can automate this process by having the relevant registry values cleaned out on each domain login. To do so add the following entries to the login script batch file:

echo off
reg delete HKEY_CURRENT_USER\Printers\DevModePerUser /va /f
reg delete HKEY_CURRENT_USER\Printers\DevModes /va /f
reg delete HKEY_CURRENT_USER\Printers\DevModes2 /va /f
echo on