Can't start fvwm when using nvidia's xorg configuration

I’m still trying to figure out the problems related to my previous posts, but I’ve narrowed things down a lot.

I’m running Ubuntu 12.04 on a Dell latitude E6520 and have just installed a new video driver.
VGA compatible controller: NVIDIA Corporation GF119 [Quadro NVS 4200M] (rev a1)
When I use this driver, together with the xorg.conf file generated by nvidia-settings, everything works fine if I use GNOME as my desktop manager, but of course I want to use fvwm.

The problem I’m having appears to be that if I set up any kind of xorg.conf file other than an essentially empty one, i.e.,

Section "Device" Identifier "Default Device" Option "NoLogo" "True" EndSection

then I can’t even get to fvwm, i.e., I have

[code]

Module FvwmDebug -d 4 -l /home/simon/fvwmDebug
[/code]

in my fvwm startup file, it has what you would expect when I use the empty xorg.conf, but when I use the nvidia one, fvwmDebug is empty.

The problem is arising somewhere between the point where im-switch is called and where fvwm is called. This is clear from comparing my xession-error files:

when I use nvidia’s xorg.conf and can’t connect to fvwm, I get

when I use my empty xorg.conf

so somehow, nvidia’s xorg configuration is stopping me from getting past the call to im-switch. Maybe the problem is that I need a special xinput.d file for fvwm??? The system default /etc/X11/xinit/xinput.d/default is essentially empty.

Has anybody got fvwm running with other some kind of nvidia driver that works with a Dell E6520 running ubuntu?

Any help would be most appreciated.