I woke up this morning to find my computer frozen and my graphics were not rendering correctly either. I had to press Ctrl + Alt + F1 to regain control of the system.
At first I thought it was my NVidia drivers, because some times they mess up when my screen goes to sleep, because I have a dual monitor set up with 1080p and when Nvidia detects my monitors it detects them wrong and resizes my display, which crashes Compiz. But this time I don't think that is the issue.
I recently upgraded my kernel to 3.2.0-58-generic and when that happened it didn't finish the post install correctly. My theory is that the Nvidia kernel module didn't update. so I tried to install the drivers from Nvidia. I couldn't get them to work so I ended up removing them and reinstalling the Ubuntu nvidia-current and nvidia-settings packages. This brought my system back up. but I'm still experiencing the same issue with my screen freezing, and artifacts displaying on the screen, with or without the second monitor.
I have started to suspect my hardware mainly graphics card or power supply. It seems if I remove the power supply and run off of battery it runs just fine. So I thought perhaps my power supply is supplying dirty power, so I swapped it out with a new one, but I'm still experiencing the same issue with a different power supply.
How do I fix Unity from freezing and artifacts on my screen when I'm charging my laptop?
I'm running a System 76 GazP6 on Ubuntu 12.04 kernel 3.2.0-58-general nvidia GeForce GTX 560M
Here is some information from my Xorg.0.log that may help:
[ 1074.299] [mi] EQ overflowing. Additional events will be discarded until existing events are processed.
[ 1074.299]
Backtrace:
[ 1074.321] 0: /usr/bin/X (xorg_backtrace+0x26) [0x7f5099a05a86]
[ 1074.321] 1: /usr/bin/X (mieqEnqueue+0x263) [0x7f50999e6163]
[ 1074.321] 2: /usr/bin/X (0x7f509987d000+0x62a44) [0x7f50998dfa44]
[ 1074.321] 3: /usr/bin/X (xf86PostMotionEvent+0xd8) [0x7f509991d128]
[ 1074.321] 4: /usr/lib/xorg/modules/input/synaptics_drv.so (0x7f5091668000+0x4148) [0x7f509166c148]
[ 1074.321] 5: /usr/lib/xorg/modules/input/synaptics_drv.so (0x7f5091668000+0x61b0) [0x7f509166e1b0]
[ 1074.321] 6: /usr/bin/X (0x7f509987d000+0x8af47) [0x7f5099907f47]
[ 1074.321] 7: /usr/bin/X (0x7f509987d000+0xb0d4a) [0x7f509992dd4a]
[ 1074.321] 8: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f5098ba3000+0xfcb0) [0x7f5098bb2cb0]
[ 1074.321] 9: /usr/lib/x86_64-linux-gnu/xorg/extra-modules/nvidia_drv.so (0x7f50925e8000+0x13abf1) [0x7f5092722bf1]
[ 1074.321] 10: /usr/lib/x86_64-linux-gnu/xorg/extra-modules/nvidia_drv.so (0x7f50925e8000+0x1450a7) [0x7f509272d0a7]
[ 1074.321] 11: /usr/lib/x86_64-linux-gnu/xorg/extra-modules/nvidia_drv.so (0x7f50925e8000+0x146f48) [0x7f509272ef48]
[ 1074.321] 12: /usr/lib/x86_64-linux-gnu/xorg/extra-modules/nvidia_drv.so (0x7f50925e8000+0x148001) [0x7f5092730001]
[ 1074.321] 13: /usr/lib/x86_64-linux-gnu/xorg/extra-modules/nvidia_drv.so (0x7f50925e8000+0x14b8f5) [0x7f50927338f5]
[ 1074.321] 14: /usr/lib/x86_64-linux-gnu/xorg/extra-modules/nvidia_drv.so (0x7f50925e8000+0x16a9ed) [0x7f50927529ed]
[ 1074.321] 15: /usr/lib/x86_64-linux-gnu/xorg/extra-modules/nvidia_drv.so (0x7f50925e8000+0x135eb4) [0x7f509271deb4]
[ 1074.321] 16: /usr/lib/x86_64-linux-gnu/xorg/extra-modules/nvidia_drv.so (0x7f50925e8000+0x4acd42) [0x7f5092a94d42]
[ 1074.321] 17: /usr/lib/x86_64-linux-gnu/xorg/extra-modules/nvidia_drv.so (0x7f50925e8000+0x4b82e1) [0x7f5092aa02e1]
[ 1074.321] 18: /usr/bin/X (0x7f509987d000+0x4e8a1) [0x7f50998cb8a1]
[ 1074.321] 19: /usr/bin/X (0x7f509987d000+0x3d7ba) [0x7f50998ba7ba]
[ 1074.321] 20: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xed) [0x7f5097a2376d]
[ 1074.321] 21: /usr/bin/X (0x7f509987d000+0x3daad) [0x7f50998baaad]
[ 1074.321] [mi] These backtraces from mieqEnqueue may point to a culprit higher up the stack.
[ 1074.321] [mi] mieq is *NOT* the cause. It is a victim.