What adapter are you using? Are you toggling the auto/manual switch
on the lens to manual so that the aperture actually stops down. If left on auto the aperture stays wide open no matter what you set the ring to. Your lens also has to be screwed in far enough so that the auto/manual lock release is depressed. Otherwise the switch will lock and you can't change it. Some third party adapters might not depress the lock release.
Using K-30 With Older Lenses | Pentax Support
To set up your PENTAX K-30 to use older PENTAX lenses:
Press the Menu button
Using the buttons on the four-way controller on the back of the camera, navigate to the [C Custom Setting 4] menu.
Navigate to [23 Using Aperture Ring] and select [Enable]. Press the OK button and then the Menu button to exit.
20120810-114611.JPG20120810-114626.JPG20120810-114631.JPG
(This setting allows the camera to operate with older PENTAX lenses which do not have an aperture controlled by the camera body such as PENTAX K-series and M-series lenses).
Press the Menu button
Using the buttons on the four-way controller on the back of the camera, navigate to the [Rec. Mode 4] menu, select [E-Dial Programming]. Press the right button twice on the four-way controller.
20120810-114646.JPG20120810-114658.JPG20120810-114729.JPG
Press the down button to highlight the line beginning with “M” and press the right button on the four-way controller. Highlight [P Line] and press the right button on the four-way controller. Highlight [Tv Shift] and press the OK button. Press the Menu button three times to exit the menu.
(This setting allows easy and accurate exposure metering using older lenses without an "A" setting on the aperture ring. When the Green button is pressed in Manual exposure mode, the lens "stops down", the camera's meter measures the light passing through the lens, and an appropriate shutter speed is automatically set based on that measurement).
Note: when using lenses without an "A" setting on the aperture ring, Manual exposure mode must be used. Exposure can be set by adjusting the lens aperture ring and/or adjusting the shutter speed on the camera.
Note: If Shake Reduction is enabled when using an older lens, you will need to manually select the closest matching focal length from the Input Focal Length menu. To do this:
Turn the camera off. Mount the non-"A" series lens. Turn the camera on.
The Input Focal Length screen will appear. Use the rear e-dial to select a focal length which is closest to the focal length of the lens you are using. If you are using a zoom lens, choose a focal length close to the midpoint of the zoom range of the camera. Press the OK button when you have made a selection.