forum

[Archived] [Solved] Lag spikes/freezes (SwapBuffer spikes)

posted
Total Posts
6
Topic Starter
Chikishi
A bit of history: recently, on Angelsim(AngelMegumin) stream i've seen his input lag, it was like 0.7-0.4 ms, so i checked my own - 4-6 ms, that's when i decided to switch from my integrated graphic card to GPU(960M) (1.3-1.6 ms which is pretty good and comfortable to play with). Due to this changes, i started to suffer from this problem.
The problem itself (Probably a lot of users are aware of this)

My spec:
  1. CPU Type: QuadCore Intel Core i7-6700HQ, 3500 MHz (35 x 100)
  2. Video Adapter: Intel(R) HD Graphics 530 (1 GB)
  3. Motherboard Chipset: Intel Sunrise Point HM170, Intel Skylake-H
  4. System Memory: 8100 MB (DDR4-2133 DDR4 SDRAM)
  5. BIOS Version: E1795IMS.109
  6. GPU: GeForce GTX 960M
Problem description: lag spikes resulting in increased latency and game freeze.
When this appeared i decided to google in order to find solution, i did not succeed. But i gathered some information that might be useful:
  1. Despite the fact that everyone says that it's random, it's actually not, those lags are constant and appear every minute, literally, time between two spikes is literally 60 seconds, i tested it (at least it's like this in my case)(performance.log also says so).
  2. A lot of Nvidia users suffer from this, but recently i found that also AMD users might have something similar (forum link).
  3. Nothing like this appears in other games, tested in McOsu(not sure that it is suitable as an example), and Grim Dawn(i don't have any other games).
  4. I tried monitoring resources usage with MSI Afterburner, but there was nothing unusual, that might serve as evidence of system unstability
  5. No overheat was detected. CPU, Memory, Disk usage was normal during gameplay.
During tests no other programs were opened(no Shadowplay, no Chrome, everything that could affect game performance was closed). All drivers are up to date(i believe).
Things i tried
  1. Compatibility mode
    Input latency increased by 0.4-0.6 ms, still lags.
  2. Fullscreen
    Latency reduced by 0.2 ms, still lags.
  3. Compatibility mode + Fullscreen
    Latency goes up to 4 ms, uncomfortable to play, still lags.
  4. Reduce dropped frames and/or Detect performance issues
    No changes.
  5. Debug option in cuttingedge version
    None of them helped
  6. Background video / storyboard
    Always play without them(for a test i tried enabling it, and nothing changed)
  7. Changing osu! release
    All versions have the same behavior, execept for fallback(this one seems most unstable for me, with DirectX it acts like other versions, maybe worse, but while running with OpenGL it lags pretty bad, i think it's a different problem. since there is no way to monitor frame time, i am not sure about this)
  8. Disabling everything from startup>restart
    No effect, hence, it's not related to any program.
  9. Closing every task related to Nvidia
    No effect.
  10. Changing osu! priority
    By standard osu! runs with high priority(not sure if it's supposed to be like that), changing it to any option don't have any effect.
  11. Changing affinity
    Running osu! with only one CPU core was a pretty bad idea, it starts to lags due to fact that one CPU is unable to handle it, but those spikes was still there. Also tried different combinations - no effect.
  12. Running osu! with integrated graphics
    Lags disappeared(or maybe i just haven't noticed them), but high latency comes instead, 4-6 ms, it feels so uncomfortable and hard to play(i do know i may act like a spoiled child at this point, but please don't blame me for that).
  13. 3D settings in Nvidia Control Panel
    None of them helped except for one. Enabling Threaded optimization do have some effect, even though lags stays the same(appears once a minute) the cause of it looks different(example). In this case lags caused not by "SwapBuffer"(i can't really tell what it is), but by "Draw" and "BetweenFrames"(same with these, i have no knowledge about these things).
  14. Changing drivers
    I tried a couple of Nvidia drivers and sadly none of them had any effect, some old drivers even caused increased latency. Also tried changing Intel HD Graphics drivers, also zero changes.
  15. Disabling SLI(consider it as possible solution)
    There was a post on reddit(i lost link, but i can try to find it, if it's necessary) which describes similar problem, author said that he was able to solve it by disabling SLI. Since i'm using laptop with one GPU, there is no SLI.
  16. Disabling/Uninstalling antivirus
    No effect.
  17. Reinstalling osu!
    Had no effect, i even tried installing "clear" osu!(yes i deleted every beatmap i had so far, nevertheless i had some packs which i used. I even got rid of every single skin). Tried to play single uploaded map with standard skin, and had the same lags.
  18. Changing osu! resolution
    As expected - no effect, except for reduced latency by 0.2ms.(lowering resolution from 1920x1080 to 1152x864
The only thing i did not tried, it's reinstalling my operating system, and i don't really want do that.(but if it's necessary, i will do that)

Summing up everything mentioned earlier i can say that while playing osu! every minute happening "something" that causes this lags. There is 2 possibilities( at least i can only see 2, if there is something else i missed, please mention it). First one, there is some kind of method(function) in osu! that being called ones a minute, and causes this lags(since i have no access to osu! code, i can't really be sure about this). Second one: it's somehow related to Nvidia GPU, or maybe drivers.
It might also be that both possibilities happens simultaneously ,meaning that the problem lies within both cases.

P.S. If there is any other useful information i can provide please mention it. A lot of osu! players(including me) suffer from this problem, that's why i'd like to provide any kind of information that might help in resolving this.
I think i described as much as i could, this is probably the most complete explanation,sadly i did not come to solution via those tests.

Edit: recently in AIDA I found something that might be useful. So I have a question - does OpenCL (C not G) version means anything. My integrated graphics has OpenCL 2.0, when my GPU has OpenCL 1.2 Cuda 8.0.0 (Not sure if it's related to problem or not).

osu! version: 20160801.2cuttingedge
Lacrimosa
Try running osu!.exe in compatibility mode for Windows XP (Service Pack 3). For that, right click on the osu! icon, and go to Properties -> Compatibility.
Topic Starter
Chikishi

Nikosbks wrote:

Try running osu!.exe in compatibility mode for Windows XP (Service Pack 3). For that, right click on the osu! icon, and go to Properties -> Compatibility.
Unfortunately still the same.
Topic Starter
Chikishi
Today i managed to fix my problem, but i'm not entirely sure those lags are gone(they did not appeared today/i have not noticed them in tests)

Solution: there was a couple of things I did, so i'm sure what exactly fixed this problem:
  1. First thing i did, is checked my drivers and the only driver I updated was Realtek HD Audio(I doubt the problem was within this).
  2. Second - I got rid of Virtual Memory(previously size was automatically managed by windows, apparently the fact that it was dynamic was the problem). Maybe setting it to zero is too drastic change, so setting it to a custom value may be enough(initial and maximum size should be equal). I don't reccomend users with RAM lower or equal than 4GB setting it zero, it might badly affect your system performance, so instead, try setting custom to 2048MB(initial and maximum size)
  3. Third - updated my windows. Today I checked windows updates and got Anniversary Update(not sure if it's even related, but i had to mention it)
Also my Nvidia drivers got updated to 369.00, but it says that last update check was today at 6:38AM, when i did everything mentioned earlier at around 7 PM, and i also tried playing osu! between those hours and lags was there(i also tried to manually install 369 driver version a couple of days ago and it had no effect).
Also there was a cuttinedge update, but i haven't found anything related to this in changelog(there was only osu!mania fixes)(maybe devs did fixed it but forgot to mention it).

Summing up everything mentioned above, i think that problem was caused due to dynamic Virtual Memory. If anyone else have similar problem try considering this as possible solution.
Spiritreader
Although you found this out 11 months ago, this has helped me a lot.

I would get SwapBuffer framespikes every 4-6 minutes. I've also pretty much tried everything but a fresh install (but my install is only 2 weeks old anyways)

Setting Virtual Memory to a static 4096MB on my SSD (16GB RAM) fixed it.

Thank you so much for posting your solution!

Edit: Never mind, still there :?

Edit2: Well, the SwapBuffer Spikes are not as severe now, but it still stutters quite noticably.

Edit3: Displayfusion caused the spikes. Removed it, now it works.
Potsu
I know this is really old but turning off the pagefile (16GB or RAM here) actually stopped the swapbuffer frame drop I was having.

I did have it on dynamically allocated by the OS (on my SSD so I thought it was ok) so I guess it was updating the size every few minutes and that caused a tiny lag.
Please sign in to reply.

New reply