# Clone mode bug with Intel HD 5600

**URL:** <https://discourse.glfw.org/t/clone-mode-bug-with-intel-hd-5600/769>\
**Category:** support\
**Created:** [September 23, 2016, 1:25am UTC](https://discourse.glfw.org/t/clone-mode-bug-with-intel-hd-5600/769 "2016-09-23T01:25:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sheado](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Sheado](https://discourse.glfw.org/u/Sheado)\
**Post date:** [September 23, 2016, 1:25am UTC](https://discourse.glfw.org/t/clone-mode-bug-with-intel-hd-5600/769/1 "2016-09-23T01:25:10Z")

</div>

Hi,

I’m testing on an MSI laptop that has an Intel HD 5600 + NVIDIA GTX960M. When the laptop is configured to automatically choose a video card, it chooses the Intel card for my game.

The bug happens when the game is running on the Intel card in dual screen clone mode. On exiting the application, some threads linger and keep the process from closing all the way (eventually preventing a new launch of the game because it thinks its already running). When debugging, I found that the lingering thread is stuck in ig8icd32.dll - Intel’s shader compiler according to this forum post [https://software.intel.com/en-us/forums/graphics-driver-bug-reporting/topic/591322](https://software.intel.com/en-us/forums/graphics-driver-bug-reporting/topic/591322)

Any ideas how to fix this?  
Note: If I switch to the NVIDIA card on the same laptop, there are no problems.

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [September 23, 2016, 10:39am UTC](https://discourse.glfw.org/t/clone-mode-bug-with-intel-hd-5600/769/2 "2016-09-23T10:39:23Z")

</div>

See [the section on Windows specific cmake options and GLFW\_USE\_HYBRID\_HPG](http://www.glfw.org/docs/latest/compile.html#compile_options_win32) for forcing your app to use the discrete card and not an integrated GPU on such systems.

As for the Intel issue, the best place for that is the forum you linked to.

---

<div class="post-metadata">

**Author:** ![Sheado](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Sheado](https://discourse.glfw.org/u/Sheado)\
**Post date:** [September 23, 2016, 6:54pm UTC](https://discourse.glfw.org/t/clone-mode-bug-with-intel-hd-5600/769/3 "2016-09-23T18:54:06Z")

</div>

oh wow… thanks for pointing that out.

Any reason it’s defaulted to OFF? Is there a risk with enabling it?

---

<div class="post-metadata">

**Author:** ![mmozeiko](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/mmozeiko/32/29_2.png) [@mmozeiko](https://discourse.glfw.org/u/mmozeiko)\
**Post date:** [September 23, 2016, 7:44pm UTC](https://discourse.glfw.org/t/clone-mode-bug-with-intel-hd-5600/769/4 "2016-09-23T19:44:16Z")

</div>

Because everybody doesn’t need to use most powerful GPU in system. Example would be laptop users where it sometimes matters to conserve battery and use integrated GPU.

You can easily make your application use Nvidia GPU without changing glfw code.  
Just add these two exports (one for nvidia, one for amd) to your main executable: [https://github.com/glfw/glfw/blob/e6a32db7b9553d835931673203602b9f657bd922/src/win32\_init.c#L38](https://github.com/glfw/glfw/blob/e6a32db7b9553d835931673203602b9f657bd922/src/win32_init.c#L38)  
And OS will prefer to use Nvidia or Amd if system has one together win Intel GPU.

---

<div class="post-metadata">

**Author:** ![Sheado](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Sheado](https://discourse.glfw.org/u/Sheado)\
**Post date:** [September 23, 2016, 8:56pm UTC](https://discourse.glfw.org/t/clone-mode-bug-with-intel-hd-5600/769/5 "2016-09-23T20:56:42Z")

</div>

Awesome,  
Thanks for the tip @mmozeiko
