Forgot Password
Pentax Camera Forums Home

Show Printable Version Search this Thread
Debug focus adjustment various pentax models.
Posted By: Mike Gallagher, 10-03-2014, 07:14 PM

I have succesfully adjusted my K10D but the hunt for info and the experimentation took me two months. Now I have lenses from 18mm to 600mm that work.
I've written a blow-by-blow account of how to do it but it covers only K10D with firmware versions 1.0 and 1.1.
I'd like to start a How-to and have others with experience of other individual Models and Firmware updates to add their specific instuctions to it.
Do you think this would be worth doing? And what ideas could you suggest to me? And where in the Forum should it go?
Views: 5,213
10-03-2014, 07:34 PM   #2
Site Webmaster
Adam's Avatar

Join Date: Sep 2006
Location: Arizona
Photos: Gallery | Albums
Posts: 49,793
This section is the place for articles- go ahead and post your guide

Adam Webmaster (Site Usage Guide | Site Help | My Photography) server and development costs are user-supported. You can help cover these costs by donating. Or, buy your photo gear from our affiliates, Adorama, B&H Photo, KEH, or Topaz Labs, and get FREE Marketplace access - click here to see how! Trusted Pentax retailers:

10-03-2014, 10:06 PM - 2 Likes   #3
Junior Member

Join Date: Mar 2014
Posts: 29
Original Poster
Debug focus adjustment various pentax models.

Posted By: Mike Gallagher, Today, 03:14 PM (Online)
October 2014
Please - if you have first-hand experience making these adjustments to other models and Firmware versions (they're all different) would you join me in compiling a directory that will save a lot of heartache and consternation? ps - feel free to copy any part of the following that you feel helps and is applicable. Mike.

FINE FOCUS ADJUSTMENT. K10D Firmware Version 1.0 (It worked for me.) This is done in the camera, not on individual lenses and will apply to all lenses used on the camera. (I think perhaps it shifts the sensor.)
As you make focus adjustments take more test shots until you’re satisfied.
(I couldn’t reach a volcanic cone on the horizon with a 600mm mirror lens. Now I can focus on it BEFORE I hit the stop at the Infinity symbol. Perfect! Took + 280um to do it though. Now my collection of lenses from 18mm to 600mm, manual and Auto-focus, all work!)
DEBUG MODE. (Secret mode – you won’t find it in the camera manual.)
TO ENTER : These entry instructions are peculiar to the PENTAX K10D, V1.0 (& V1.1 which I don’t have.) Entry route was changed after that. And kept secret. Other models use different routes and firmware versions for entry. They’re secret too. But they’re being written about.
FIRMWARE VERSION 1.0 (Others say Version 1.1 is needed.)
BEGINNING - Ensure a fully charged battery is in the camera. Apparently damage can be caused by the battery running out and the camera turning off while in DEBUG MODE. Start with the camera turned off.
1 Hold “Playback” button and “Enter” while turning camera ON. (Playback is the little blue arrowhead.) Now the camera’s current Firmware version shows. If that’s all you want to know just keep taking photos. But to continue -
2 Within 5 seconds press Fn > Fn > Info > Menu. Secret Menu shows with DEBUG MODE showing.
3 Change DEBUG MODE “<DIS>” to <EN> (Disable/Enable)
4 Click “OK”. The screen goes black.
5 Click MENU. Rec. Mode shows.
6 Click RIGHT > RIGHT. Set-up shows.
7 Click “Up” (on the control ring) “Test Mode” screen shows.
8 Select “AF TEST”.
9 Click RIGHT. “AF Test” menu shows.
10 Select “Focus Corr”(ect.) Focus can now be moved nearer the camera in ( + ) increments of 10 um (um = Micron – 1,000 microns per millimetre) or further away by ( - ) 10 um increments. (Adjustment by 200 um is not uncommon.) Here’s where the ‘trial & error’ begins. Your first adjustment might not be enough because you’re only guessing. Default setting is zero (0) um but if it’s at a different value you’re in there to change it anyway. As you add, or subtract, that action shows but the central setting won’t show, even though it takes effect, until you come back to the same screen at which time you’ll see the new total adjustment. The camera can be used normally while in Debug Mode (just ½ press the shutter button) but –
11 To turn Debug Mode off - start from the beginning but at Step 3 select Debug <DIS> (Disable).
12 Click OK or turn the camera off - DONE!

Last edited by Mike Gallagher; 10-03-2014 at 10:14 PM. Reason: correction to ambiguity.
10-01-2017, 01:13 PM   #4
New Member

Join Date: Jun 2011
Location: USA
Posts: 5
Mike, I am disappointed this thread has gone nowhere in three years. I think it is a great idea to post this info all in one place. I am struggling with a K10D and K100D Super that do not focus to infinity. There are many relevant posts even just within this forum but they are mostly incomplete or mutually contradictory. Right now I have the K10D working with most lenses (up from NOT working with most lenses). I will post what I learn when I am more sure of it.

Right now I can add that there are at least three ways to get into debug mode. You use magic button presses. This is the one that works in the field but it is also the one that is most camera specific and for many models the magic buttons are unknown. Second way is with software. PK-Tether and some hack from Russia are two options. Finally, you can get into debug mode by placing magic text files on an SD card. (This last is what worked for me.)

As you note, most sources say your magic button sequence works only for a K10D with firmware 1.10. You said you got it to work with 1.0 but I could not. Usually there are three digits when firmware versions are quoted so I am wondering if you left out a digit? I could not get it to work with 1.11 either.

10-06-2017, 02:54 PM   #5
New Member

Join Date: Jun 2011
Location: USA
Posts: 5
Here are instructions for the K200D from have added some things in red based on my experience with my own K200D. At the link above you can also find a more detailed list of instructions particularly aimed at Windows users not accustomed to editing configuration files.That does say you cannot take pictures in debug mode but I seem to be doing that. Others have confirmed that you can with various other Pentax models. In fact some folks leave cameras permanently in debug mode so they can tweak settings for each lens.

K200D autofocus fine tuning. (from polur101 elsewhere on this site)

make a text file in the root folder of SD card.
name it MODSET.445
type the following in the text file.

to enable debug mode type


to disable debug mode type


You must hit return at the end of each command line, just as you have to do when entering a user name, password, or a number into a spreadsheet cell. I would not put both these commands on the same card at the same time. Use the first to get into debug mode. Then edit the file on the card to make it look like the second command when you are ready to turn off debug mode.

put the SD card in the camera
leave the card door open!

Power on while holding the menu button.
camera enters debug mode.
Have faith. There is no explicit indication this has happened.
press menu button again.
go to setup menu (right arrow twice)
looks normal!!
press up arrow once
go to AF TEST
If you don't see AF TEST something went wrong. Try again and if it still does not work recheck all the instructions and check the file on the SD card for typos. I have only confirmed this for Version 1.00 of the firmware. Another user confirmed it for 1.1.
adjust AF compensation.
negative for front focus
positive for back focus
Positive is what you need for lenses that do not focus to infinity.
Mine needed -60um

To run debug disable edit the line in the SD card to say.


put the SD card in the camera
leave the card door open!

Power on while holding the menu button.


---------- Post added 10-06-17 at 06:14 PM ----------

K100D Super
From the thread cited above (sorry the link does not work for me and I don't know how to fix it)

It turns out that the instructions posted in PF for debug on the k200d worked for my k100d super, except that the modset file needed to be renamed modset.459. With that change, these instructions worked for my K100d super.

I can confirm this for my K100D Super with firmware 1.00. However, when it goes into debug mode I get WAIT HS... on the big LCD. I waited and nothing happened so I just turned off the camera and was in debug mode when I turned it back on. Then rather than a notice of debug mode being on in the top left corner of my big LCD I get cryptic numbers and letters across the top and bottom of the screen. If I take a picture the instant playback is covered with such letters and numbers and is useless. So I turned it off.

Read more at: K100d super k100ds debug mode - AF adjust -
10-06-2017, 04:12 PM   #6
New Member

Join Date: Jun 2011
Location: USA
Posts: 5

Mike explained how to get into debug mode pressing magic buttons. You can also use the method above for the K200D with minor modifications. For my cameras with Firmware 1.00 and 1.11 the name for the file I put on the SD card is


and what you need to type into it (followed by a Return/Enter) is


You can turn the camera on with the SD card door closed. Rather than enter debug mode silently this will give you a menu that lets you turn it on or off as you wish. It includes various other mysterious options.

I now have the files for the K10D, K100D Super, and K200D all on the same SD card and they do not seem to be fighting with one another. The same card works in all three cameras.

Here is a tentative table from uttam.hathi that lists other Pentax cameras that you can get into debug mode with a file on an SD card and what the name of the file needs to be. Except as noted elsewhere in this thread I have not confirmed any of this. Note also that different cameras or firmwares may require different commands inside the file

*istDS, debug is built-in, no need for a modset file.
procedure: During switch on, press the AEL-L and INFO buttons at the same time.
After that, you have approximately 5 seconds to press the MENU button twice, then the INFO button. Voilá!
Edit: You now see the debug menu, the cursor positioned on the first item DEBUG <OFF>. Change it to <ON>.
To cancel debug mode, start the camera the same way, but now confirm the "DEBUG <OFF>".
Read more at:

K10D with firmware v1.20 -v1.30: MODSET.TXT
GX10 with firmware v1.20-v1.30:MODSET.TXT
K10D with firmware v1.10: MODSET.421
GX10 with firmware v1.10: MODSET.429
K20D: MODSET.442
K20D v1.03:MODSET.442
K200D: MODSET.445 -the SD card door must be open instead (can be closed immediately after switching on).
K200D v1.00.00.03 :MODSET.445 -the SD card door must be open instead (can be closed immediately after switching on).?
GX20 v1.01, v1.03:MODSET.454
Km : MODSET.464
Km v1.10: MODSET.464 press "Delete" during turn-on
K7: MODSET.474
K7 v1.01: MODSET.474
K2000 v1.10: MODSET.482 press "Delete" during turn-on
Kx: MODSET.492
k-5 MODSET.505
10-14-2017, 08:42 AM - 1 Like   #7
New Member

Join Date: Jun 2011
Location: USA
Posts: 5
* ist D, DS, DS2, DL and the just plain K100D

This sequence, embedded in one of the quotes above, has been tested and confirmed on the original * ist D and the K100D (non-Super) both with 1.00 firmware. It is claimed on DPReview to work for the models in between but I am unable to confirm that.

*istDS, debug is built-in, no need for a modset file.
procedure: During switch on, press the AEL-L and INFO buttons at the same time.
After that, you have approximately 5 seconds to press the MENU button twice, then the INFO button. Voilá!
Edit: You now see the debug menu, the cursor positioned on the first item DEBUG <OFF>. Change it to <ON>.
To cancel debug mode, start the camera the same way, but now confirm the "DEBUG <OFF>".

---------- Post added 10-14-17 at 12:29 PM ----------

This is the story of how I came to gather this information and post it all together here in one place as Mike suggested so long ago.

I started shooting film in 1955. Around the turn of the century I explored digital with a Canon A300 and later an S70. After carefully researching DSLRs for a long time I bought a new * ist D, which I liked very much. In fact, I wore it out. Over the years I bought on eBay a used K100D and K100D Super and liked those, too. And another * ist D to replace my original -- for sentimental reasons. (It has pro features missing on the 100 series, but the 100s have some updated features, such as SD cards and a bigger display.) During a flush period, I decided to go full-frame, and after waiting a long time for Pentax to do the same, I bought a Canon 6D. I didn't like it at all so I sold that and bought a Pentax K5. That was OK but I found I liked my little Pentaxes better, so I sold the K5 as well. I don't really remember what possessed me to buy a K10 -- possibly finding one with a very low shutter count from a reputable seller on eBay -- for about $60 as I recall. I loved it! It looked brand new and took great pictures -- except for the fact that it kept locking up on me and refusing to take pictures. It had a 30-day return policy and I debated the whole 30 days and consulted with the seller, who offered a full refund, but had no idea how to solve the problem. After much experimentation I concluded that the problem was that when trying to focus on a distant object, the motor in the body would push the lens up against the stop at infinity, still not feel things were in focus, and so block the shutter release. (Later I discovered that the camera would work reliably with a rarely used Pentax/Tamron 18-250 zoom, presumably because the focus ring will go past infinity.)

Here and at other sites online I found out about debug mode. I decided to keep the K10D and sit on it until I got up the courage to mess with debug mode. In the meantime I bought another used K10, That cost more and was not in as good apparent shape, but it always worked. It became my default camera. I monitored things online and more info appeared and I was able to sort out some apparently conflicting information. Then my K100D Super developed the same problem! I tried replacing that with a K200, but that never felt right in my hands, though I have kept it. So, I decided to take the plunge into debug mode and see if I could get my K100D Super back as well as a second working K10.

I gathered up all the info I could online, then went through it and tried to distill what seemed most likely to work. I saw Mike's post here, as well as innumerable posts from others seeking this information, or saying the posted instructions did not work. So I decided to test the instructions for any camera I owned and post the results here. The outcome for me is that both cameras now work fine. The K10 needed a +150 adjustment to work with all my lenses, while the K100D Super only needed +100. (I live in New Hampshire so it is not hard to find distant mountains to focus on.) I did NOT make any attempt to get anything to focus perfectly. I was only interested in the more basic question of whether the camera refused to take pictures. Because I do not own any Pentax cameras newer than a K200, I don't expect to add cameras to this thread, though I welcome additions from others. I also welcome questions or corrections to what is posted here. I would really like this to be a one-stop source for people having focus problems. The fact I did with two out of seven Pentax DSLRs suggests the problem is not rare.

  • Submit Thread to Facebook Facebook
  • Submit Thread to Twitter Twitter
  • Submit Thread to Digg Digg
Tags - Make this thread easier to find by adding keywords to it!
adjustment various pentax, back-focus, camera, card, debug, debug focus adjustment, file, firmware, focus, front-focus, info, instructions, k10, k100d, k10d, k200d, lens focus, menu, mode, pentax, pictures, post, sd
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
K10D focus adjustment with debug mode cem.kumuk Pentax DSLR Discussion 12 01-16-2016 07:11 PM
Does upgrading firmware reset debug-mode focus adjustment? Tom Woj Troubleshooting and Beginner Help 4 03-16-2013 06:28 PM
Looking for K-5 debug focus adjustment help in NYC hut234 Pentax K-5 2 12-02-2012 09:50 PM
Microfocus adjustment settings on various Pentax cameras mgvh Pentax DSLR Discussion 6 05-26-2012 01:38 PM
For those who did AF adjustment (via DEBUG) on your camera frank Pentax DSLR Discussion 16 09-21-2007 04:00 AM

All times are GMT -7. The time now is 05:52 AM. | See also:, part of our network of photo forums!
  • Red (Default)
  • Green
  • Gray
  • Dark
  • Dark Yellow
  • Dark Blue
  • Old Red
  • Old Green
  • Old Gray
  • Dial-Up Style
Hello! It's great to see you back on the forum! Have you considered joining the community?
Creating a FREE ACCOUNT takes under a minute, removes ads, and lets you post! [Dismiss]