You might want to scan for the 4wd "C" codes. Better yet, use a Tech 2 or other capable scanner to compare the "commanded" vs "actual" mode. I had success diagnosing mine, where the actual mode wasn't what was being commanded.
This could easily be a symptom of the encoder motor going bad on the transfer case. Those can be replaced as a unit, or just the internal range position sensor.
Best to get a capable scanner on it to diagnose.
Yea I need to get the proper scanner. Will HP tuners scan for those 4wd codes? I've got HP tuners and credits still.
Some history on this yukon. When I bought it he had posted the 4wd didn't work. I did all sorts of research and bought it. He had removed the front driveshaft. Imagine assuming because it was getting stuck in 4wd.
My research pointed to the shift motor/encoder.
I tried the replacing the switch first because it's a simple thing and it did nothing so I just returned it. Then I bought the new shift motor as a whole. So the shift motor and encoder in there are only a year and a half old. Granted, parts these days aren't exactly great. On top of that, encoders are a sensitive thing.
After replacing that it was perfect for about a year. Then about 6 months ago it randomly would be in 4wd when I would start it up. All I would do is turn it off, turn it on, hold 2wd button, and it would go back into 2wd. But the symptoms are inconsistent. Sometimes it would be in 4wd hig and sometimes in 4lo. Usually 4 hi. You don't get much noise going in and out of 4Hi. But 4lo is different. You get that solid clunk.
I'm hopeful that the encoder is fine and that the switch is needing to be replaced (since it's the original one as far as I know). But either way. Since that last issue I had, then played with the switch, it hasn't done it again yet, and ice had to use the 4wd a couple times since then. It went right in the got it right back out when I needed it to.
If it does it again. I'll try to get the 4wd codes read somehow. I thought when I researched this a while back that HP tuners couldn't read the in depth stuff from the 4wd system but I could be wrong.
Thanks for the tips.