I gave up on this Isue....
without chdk i can do manual focus perfectly
and with chdk i just use Auto focus and its perfect
but with chdk and manual focus Just dont work for crud .
as i said
its just like the Focus range has been cut back in manual mode.Cause of this Isue i dont use CHDK mutch now.
I cant help out on this as i am trying to move and take care of my Disabled mother.
so i dont have alot of time on my hands to upload Raw images all over the place and things.
And I am NOT the Only one that has noticed this isue with the sx40.
this shot was taken with Auto focus.

and here is the manual focus at its MAX (Inf)
As i turn the manual focus i can watch the image get better and better but it wont quite reach were it shuld........
just like there is not quite enough ... its like its just 3 steps away from good.
