+1 a focus screen not properly seated can cause all sorts of issues with focus too.Both of my D5100s are off by nearly 1 degree in the same direction! I didn't notice it for a while until I started shooting some water scenes. I wasn't using liveview and the on-screen gridlines as I was trying to conserve what was left of my battery for more shots. So I leveled the water horizon carefully to the outermost AF points. All those shots were consistently clockwise from level by about 0.8 degrees. ARGHH! I've yet to send them in to see if they can straighten them out, likely the reflex mirror is a bit tilted as everything else seems to be optically well aligned.
Minor random point, but it's unlikely to be the reflex mirror (light for AF passes through portions of the reflex mirror that are beam splitters). Most likely, the focus screen is not straight - could be the mounting bracket is off, or the screen isn't seated properly. Not sure if the D5100 has a user-replaceable focus screen, but if so, you could try adjusting that.
I don't know if the 5100s focus screen is interchangeable, I haven't checked.
But here's what I've done to check the relative alignment of things.
I've spent some time trying to find the cause of the problem before I send it in to Nikon.
I've tested 5 D5100 bodies, 2 of my own.
4 of them had significant right-rotation issues of between 0.5 and 1 degree.
1 (store demo) was nearly perfect.
First, i set up a 3 ft straightedge (construction level) on a table, leveled it then aligned a heavy tripod with geared head, etc. to test the cameras. I used an old Nikkor 105mm f/2.8 macro lens, chipped for modern body metering compatibility, for the tests; It's an excellent lens, very flat-field and very low distortion.
I aligned the outer AF points to the straightedge then used the gearhead's vertical axis to compare the AF points to the viewfinder top and bottom edges. No discernable misalignment, essentially parallel.
turn on live-view and electronic alignment grid.
The straight-edge, aligned to the viewfinder edges and outer AF points, is now tilted relative to the electronic grid lines.
That determined the viewfinder/AF point misalignment to the sensor.
I then set a D5100 on a gear head tripod and lined it up as well as I could and took photos of the body and mount/mirror-box, mirror down and then locked up, using a Rebel with a 60mm macro on it. With the lenses and mounts as parallel and coaxial as I could align them, I took a few shots to examine in more detail in PS.
This last part was not the most precise type of measurement I could hope for but what I found was that the top and bottom of the D5100's sensors were also about perfectly parallel to the camera body base.
Sensors were also in good alignment to the mirror-box edges.
What I think I could see though, was a slight angular difference between the edge of the camera body (and hence the sensor) and the edge of the lowered mirror. This was about half the angle of the overall rotational error. (overall error = 2x mirror-angle-error seems to make sense)
I can not adequately check whether the whole penta-mirror+viewfinder assembly is in proper alignment to the mirror box.
When examining what a I can see of the mirror pivot points, actuation and return spring, there's enough asymmetry there that, considering the cost-point of the camera, it's possible for the return spring to slightly lift one side of the mirror and cause a bit of a tilt in the viewed image versus the sensor-acquired image.
I also tested the AF point accuracy while I was at it, more out of curiousity as I often use the 5100 for macro and close-up work.
Using the finely adjustable 105mm macro lens (LOVE those smooth old manual lenses!) I manually focused a target under each AF point to get the AF confirm lamp to stay on, then checked the focus using magnified live view. Every one is impressively spot-on.
With all that done, about the only conclusion I can draw is that the mirror hinge points on either side are slightly out of alignment or the whole focus-screen viewfinder assembly is a bit out of alignment.
Either way, at this time I don't know enough about the camera's construction to mess around with it and, since they've got plenty of warranty left, I'm going to send one in for repair and see if they can accomplish a fix. If successful, they can work on the second one.
I also found that Imaging-resource noticed this same problem when reviewing a 5100 for their site and a few similar complaints scattered around some photography forums. When speaking to Nikon, I did not expect them to confirm a known problem of this sort, and they did not. But the person I spoke to eagerly encouraged me to send it in. marked for his attention. I'll do that next week.
Since I had all the equipment set up, I then tested all my camera bodies for viewfinder to live-view level accuracy and also compared all the cameras I have with in-body electronic artificial horizon ability to the construction level. This is how I found that all my Canon's were very good or at least close-enough to rely on, and my D800 has a slight calibration error. But now that I know what the D800's error is I have a method to compensate for it in the field that is very quick and provides acceptable results.
Yup, being horizonally challenged caused me to spend a few hours doing this but that's provided me with useful information to get the best level out of my equipment in the field and leaves me with nothing to blame other than myself for not getting it right.
Except for the D5100s; I can still blame them!
They've got no easy way to compensate for the rotational error except for me to remember to do the entire composition then try to judge how much to rotate the body to make the image come out where I want it to. Or use live-view a lot more and run my batteries down much faster.