Default [Q] Problem when turning display off

After I install almost any rom, the screen no longer turns off normally. Theres always a little flash before the display shuts off. At first I thought it was linked to the crt animation, however even when I disable crt and disable the animations from the developers settings, the flash always stays. I believe there was a rom that i installed that didnt have this problem, and im pretty sure that one didnt have a crt animation setting. But I can't really find that rom or any rom without crt animation anymore to test with.



Theres a link to a video where I try to show this. Its hard to actually capture since its all very fast, and Im not too good with cameras. But you could still see it.
The first time is turning it on and off with the default rom that came with the phone -- Display turns off normally, no flash before turning off.
The second is with CM10.2 right after installation -- There is a flash before the screen shuts off, but its hard to see with the crt animation.
The third is also with CM10.2 with crt and animations off -- There is still a flash before the screen turns off (seen best in the 2nd to last instance)

The flash mostly comes from the upper right corner area if that helps.
Its hard to see on video because of the changing in lighting from turning the phone on and off, but its very noticable in person.

How can i fix this, or is this a condition on all phones?

Edit: You can see it a lot better in this video after i turned it off and on with a black background