can you describe the issue a little more? Is the AF slow, or does it just never lock? Or does it lock focus, but the photo is misfocused?
Originally posted by iamarunr Tried in Auto, Av, P and Sv. The manual focus seems to be working
This should not matter. Auto doesn't let you choose AF modes, but the others let you choose AF.S, AF.A or AF.C and AF point selection. Either way, this should not be a big effect on locking focus, only on where the camera looks for focus and whether it looks for focus once, or continuously.
The DA 50mm f1.8 is a really fast aperture lens, so it should be able to lock focus even in lower light conditions than the DA 18-135mm. But at wide apertures (low f-number), the Depth of focus will be very shallow, so the tolerance of "correct" focus is much higher. If you misfocus only a little at f1.8, it will be quickly visible.
General recommendations I can give:
a) Update camera firmware to the latest version. This is a good idea any time you are using a newer lens, just in case that lens wasn't included in the firmware. Note this can change some of your settings back to defaults. And you need to use a formatted SD card
b) Do a test with tripod and 2 sec timer, Centre point AF.S in good daylight, pointed at an obvious, contrasty subject.
c) Make sure lens is clean and free of damage, grime. Check the back lens element and camera mount. Check the aperture lever works normally
These might not fix the issue directly, but hopefully they will lead to indicators as to what the problem is.