Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
20977 Discussions

Intel's graphics driver is calling Sleep when vsync is enabled

HTaka17
Beginner
4,592 Views

On OpenGL-Based applications, Intel's driver use Sleep!

I guess the driver is doing that to decrease CPU usage.

This is a serious problem that causes fps drop. How can I avoid this problem?

Is disabling vsync the only way to avoid this problem?

From callstack, I could see that Intel's driver is calling Sleep in the SwapBuffers() call.

However when I launch the app with fullscreen mode, the problem goes away.

>kernel32.dll!SleepStub() ig75icd64.dll!00007ffe145e849d() ig75icd64.dll!00007ffe145d8ed0()

Updating the graphics driver to 15.36.7.64.3960 didn't solve the problem.

https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=24348 https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=24348

0 Kudos
12 Replies
Allan_J_Intel1
Employee
2,038 Views

Thanks for joining the Graphics community.

I would need more information in regards to your system configuration:

Which version of Windows do you have?

Also, the exact processor model and the graphics controller:

http://www.intel.com/support/graphics/sb/CS-009482.htm Graphics Drivers — How to Identify Your Intel® Graphics Controller

Click the Windows icon, and then right-click Computer.

Select Properties.

Find System Type on the Properties window, and then note the processor model.

What is the computer model number?

We Graphics report generated within the Intel Graphics Control Panel.

http://www.intel.com/support/graphics/sb/cs-009476.htm Graphics Drivers — Intel® Graphics Driver Report

Does this problem occur with customized drivers from your computer manufacturer?

Allan.

0 Kudos
HTaka17
Beginner
2,038 Views

Processor model is Core i7-4700MQ, adapter type is Intel HD Graphics 4600, and Windows is 8.1.

Computer model is TOSHIBA dynabook Satellite B754/88LR. Yes, this problem ocuured with pre-installed driver.

Don't other windows devices equipped with Intel HD Graphics have the same problem?

Aside from this sleep problem, I could see some rendering artifacts in fullscreen mode when I enable late swap tearing, and it was not tearing, since I could see that in the scene with no moving objects.

This may not have to do with sleep problem though.

Generated report:

Intel(R) HD Graphics 4600

Report Date: Tuesday, December 2, 2014

Report Time [hh:mm:ss]: 7:36:24 PM

Driver Version: 10.18.10.3960

Operating System: Windows* 8.1 (6.3.9600)

Default Language: Japanese (Japan)

Physical Memory: 8104 MB

Vendor ID: 8086

Device ID: 0416

Device Revision: 06

Graphics Output Protocol (GOP) Version: 5.0.1032

Current Resolution: 1920 x 1080

Processor: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz

Processor Speed: 2394 MHz

Processor Graphics in Use: Intel(R) HD Graphics 4600

Shader Version: 5.0

OpenGL* Version: 4.3

OpenCL* Version: 1.2

* Microsoft DirectX* *

Runtime Version: 11.2

Hardware-Supported Version: 11.1

* Devices connected to the Graphics Accelerator *

Active Displays: 1

* Built-in Display *

Display Type: Digital

DDC2 Protocol: Supported

Gamma: 2.2

Connector Type: Embedded DisplayPort

Device Type: Built-in Display

Maximum Image Size

Horizontal Size: 13.78 inches

Vertical Size: 7.48 inches

Supported Modes

1920 x 1080 (60p Hz)

Power Management Support

Standby Mode: Supported

Suspend Mode: Supported

Active Off Mode: Supported

Raw EDID:

00 FF FF FF FF FF FF 00 30 E4 48 04 00 00 00 00

00 17 01 04 95 23 13 78 EA 9E 95 A2 58 55 9F 26

0D 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01

01 01 01 01 01 01 2E 36 80 A0 70 38 1F 40 30 20

35 00 59 C2 10 00 00 19 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 FE 00 4C

47 20 44 69 73 70 6C 61 79 0A 20 20 00 00 00 FE

00 4C 50 31 35 36 57 46 34 2D 53 50 4A 31 00 DE

* Other names and brands are the property of their respective owners.

0 Kudos
Allan_J_Intel1
Employee
2,038 Views

Thanks for the information.

May I know what steps have you tried to correct the issue?

What is the name of the OpenGL application?

Please provide step by step information and we will try to replicate this issue. If possible include screenshots or links with videos explaining this problem.

Allan.

0 Kudos
HTaka17
Beginner
2,038 Views

Sorry for replying late. I uploaded a program that reproduces this problem.

https://www.dropbox.com/s/5l87y0bj66djy0i/Starling_Demo_iojs_20150211.zip?dl=0 https://www.dropbox.com/s/5l87y0bj66djy0i/Starling_Demo_iojs_20150211.zip?dl=0

In Benchmark Scene, the scene is not drawn at 60fps because of Sleep problem.

 

Also In Filters Scene, app crashes after calling glFrameBufferRenderBuffer two times.

These problems don't happen on NVIDIA GPU.

These are the source code of this app, written mainly in Haxe and converted to JavaScript that io.js can run. Rest of the app is written in C++.

https://github.com/vroad/openfl vroad/openfl · GitHub

https://github.com/vroad/lime vroad/lime · GitHub

https://github.com/vroad/starling-openfl vroad/starling-openfl · GitHub

https://github.com/vroad/nodejs-std vroad/nodejs-std · GitHub

https://github.com/vroad/node-ndll vroad/node-ndll · GitHub

0 Kudos
HTaka17
Beginner
2,038 Views

I've already confirmed that Sleep was called by Intel's driver. It's ig75icd32.dll.

0 Kudos
Allan_J_Intel1
Employee
2,038 Views

Thanks for the information.

Does this problem occur with latest video drivers?

https://downloadcenter.intel.com/SearchResult.aspx?lang=eng&ProdId=3720 https://downloadcenter.intel.com/SearchResult.aspx?lang=eng&ProdId=3720

Please report back if this problem remains with driver version 10.18.14.4080.

Thanks

Allan.

0 Kudos
HTaka17
Beginner
2,038 Views

Yes it occurs with driver version 10.18.14.4080.

0 Kudos
Allan_J_Intel1
Employee
2,038 Views

Thanks for the information; I have forwarded this matter to our graphics department. I am waiting for their response. As soon as I get any update, I will come back here.

Allan.

0 Kudos
ROBERT_U_Intel
Employee
2,038 Views

@ vroad,

Our OGL developers have made the following suggestion.

Real vsync (screen update on hw vblanc) is performed only in full-screen mode. In such case screen refresh is clocked by hw, so you can have 60fps, 30fps, 15fps etc. In particular FPS like for example 58 is not possible.

In case of applications in window mode we emulate vsync using sleep. We do is like in case of hw vsync, so allowed FPS will also be 60, 30, 15 etc.

For the cases when graphics cannot achieve in a stable manner 60fps additional extension was created: https://www.opengl.org/registry/specs/EXT/wgl_swap_control_tear.txt WGL_EXT_swap_control_tear.

To use it you shall set swap interval to negative value, ie instead of:

wglSwapIntervalEXT(1)

use

wglSwapIntervalEXT(-1)

As an effect vsync will be used only when application can render 60fps or more. When framerate drops vsync will be effectively disabled.

This applies to both full-screen and window mode.

Thanks

Robert

0 Kudos
HTaka17
Beginner
2,038 Views

I have already been using that in my demo, and that doesn't solve the problem completely.

My app can render graphics at 60fps with "wglSwapIntervalEXT(-1)" but not as smooth as NVIDIA GPU.

Why you use Sleep for emulating vsync? At least, that's not what NVIDIA driver does, they are using techniques diffrent from yours.

Can't you use more accurate timer like these?

http://stackoverflow.com/questions/7827062/is-there-a-windows-equivalent-of-nanosleep winapi - Is there a Windows equivalent of nanosleep? - Stack Overflow

0 Kudos
HTaka17
Beginner
2,038 Views

Java VM implements Sys.nanotime() with QueryPerformanceCounter on windows.

https://blogs.oracle.com/dholmes/entry/inside_the_hotspot_vm_clocks Inside the Hotspot VM: Clocks, Timers and Scheduling Events - Part I - Windows (David Holmes' Weblog)

0 Kudos
HTaka17
Beginner
2,038 Views

I decided to implement vsync in windowed mode with another method. Sleep is not accurate, spin waiting uses CPU power a lot, so I think I should use method described in here.

https://code.google.com/p/chromium/issues/detail?id=467617 Issue 467617 - chromium - How to dramatically improve Chrome's requestAnimationFrame VSYNC accuracy in Windows - An o…

0 Kudos
Reply