Are you sure the lens is fitting properly? Some Vivitar lenses have an oversized guard beside the aperture lever, which has to be removed or cut down before use. You would be able to easily tell, as the lens would fit in the camera's mount, but it wouldn't turn and lock like a normal lens does. If you can post a picture of the Vivitar lens mount, we can also identify the issue for you.
Aside from that, I'm not sure what the issue could be. What mode are you shooting with?
Originally posted by Deimos maybe try enabling aperture ring in your k-5 menus
Ha, or that! Why do I always forget that setting.