# Screen corruption after CUDA program execution

**URL:** <https://forums.developer.nvidia.com/t/screen-corruption-after-cuda-program-execution/23076>\
**Category:** CUDA Programming and Performance\
**Created:** [June 17, 2011, 10:20am UTC](https://forums.developer.nvidia.com/t/screen-corruption-after-cuda-program-execution/23076 "2011-06-17T10:20:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![szamil](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/szamil/32/9991_2.png) [@szamil](https://forums.developer.nvidia.com/u/szamil)\
**Post date:** [June 17, 2011, 10:20am UTC](https://forums.developer.nvidia.com/t/screen-corruption-after-cuda-program-execution/23076/1 "2011-06-17T10:20:53Z")

</div>

Hi,

I’m new in CUDA programming.  
I have some simple example codes (and SDK samples), successfully compiled them and run. But sometimes after several execution screen blinks and random pixels artifacts appear. These pixels are changing while I’m moving widows - refreshing screen. I’ve attached screenshot - looks even worse: on right monitor wallpaper seems to be teared down. Pixel copy from buffer problems?.

I need to restart my laptop to bring it back to work.

My configuration:  
Dell Precision M6300  
CPU: Intel(R) Core™2 Duo CPU T9300 @ 2.50GHz  
nVidia Quadro FX 1600M

Linux 2.6.32-24-generic Ubuntu 10.04

NVIDIA Driver Version: 270.41.19  
Cuda toolkit: 4.0.17  
gcc: (Ubuntu 4.4.3-4ubuntu5) 4.4.3

Does anyone has have similar issue? What could be wrong? Or simply how to restart driver without restarting system?

Best Regards

PS. I’m not sure if it’s correct forum group. If not, please move it.

 ![zrzut_ekranu.jpg](https://global.discourse-cdn.com/nvidia/original/2X/9/9f2a8a4f195044c40b271bb22cfe254c65d47c5a.jpeg)

 ![zrzut_ekranu.jpg](https://global.discourse-cdn.com/nvidia/original/3X/9/c/9ccf54b43c645a5c3dddbce12e7052f2bbe61969.jpeg)

---

<div class="post-metadata">

**Author:** ![szamil](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/szamil/32/9991_2.png) [@szamil](https://forums.developer.nvidia.com/u/szamil)\
**Post date:** [June 17, 2011, 10:20am UTC](https://forums.developer.nvidia.com/t/screen-corruption-after-cuda-program-execution/23076/2 "2011-06-17T10:20:53Z")

</div>

Hi,

I’m new in CUDA programming.  
I have some simple example codes (and SDK samples), successfully compiled them and run. But sometimes after several execution screen blinks and random pixels artifacts appear. These pixels are changing while I’m moving widows - refreshing screen. I’ve attached screenshot - looks even worse: on right monitor wallpaper seems to be teared down. Pixel copy from buffer problems?.

I need to restart my laptop to bring it back to work.

My configuration:  
Dell Precision M6300  
CPU: Intel(R) Core™2 Duo CPU T9300 @ 2.50GHz  
nVidia Quadro FX 1600M

Linux 2.6.32-24-generic Ubuntu 10.04

NVIDIA Driver Version: 270.41.19  
Cuda toolkit: 4.0.17  
gcc: (Ubuntu 4.4.3-4ubuntu5) 4.4.3

Does anyone has have similar issue? What could be wrong? Or simply how to restart driver without restarting system?

Best Regards

PS. I’m not sure if it’s correct forum group. If not, please move it.

---

<div class="post-metadata">

**Author:** ![brera76](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@brera76](https://forums.developer.nvidia.com/u/brera76)\
**Post date:** [June 18, 2011, 11:18am UTC](https://forums.developer.nvidia.com/t/screen-corruption-after-cuda-program-execution/23076/3 "2011-06-18T11:18:59Z")

</div>

Hi,

sometimes I had a similar problem, where my mousepointer looks different (coarse pixel) or my screen get totally white.

The reason was a bug in my GPU/kernel code, especially a buffer overrun.

I hope this helps a little bit :)

bye

---

<div class="post-metadata">

**Author:** ![DrAnderson42](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@DrAnderson42](https://forums.developer.nvidia.com/u/DrAnderson42)\
**Post date:** [June 18, 2011, 12:00pm UTC](https://forums.developer.nvidia.com/t/screen-corruption-after-cuda-program-execution/23076/4 "2011-06-18T12:00:52Z")

</div>

This use to happen with every buffer overrun w/ CUDA 0.8. Its been improving over time, there is supposed to be protected memory on the GPU (i.e. one context cannot write into another contexts’s space, or into the driver’s memory), but it seems there are still problems with that.

Run your program with cuda-memcheck (cuda-memcheck executable arguments). It can generally identify what kernel and thread is writing past the end of the buffer. If you compile with -G -g command line options, you can run with cuda-gdb and it will break on the exact line of code that is performing the write.
