when 12.04.02 LTS was installed with kernel 3.2 - there seemed to be no problem regarding gdm, x-windows and clamtk.
( I refer to link here: Why running clamtk on 12.04 with kernel-update of today crashes the system? )
Now since update with kernel 3.5 - after log-in a gnome-session is switched back to gdm-login when about 20 minutes passed by. Or clam-tk with recursive check as user (whole file-system) is switched back to gdm-login after the first files. uefi-bios is disabled - with today - but has no effect. After your patched files concerning x-Libraries the crash-effect seems to be the same.
grub and nvidia-drivers are not involved in this effect.
it is located between x-server-xorg and gdm or xdm ?