Massive stutter introduced when launching Gtuner IV on PC

Gtuner IV general support. Operation, questions, updates, feature request.

Massive stutter introduced when launching Gtuner IV on PC

Postby pablosscripts » Sat Jun 13, 2020 5:38 pm

As you know I've been using my T2 on my PC for a while now.

What I've realised is about 20% of the time when I launch Gtuner IV, I get a huge stutter introduced and every 5 seconds or so my mouse and keyboard become frozen. It freezes up for a split second and repeats roughly every 5 seconds. Any ideas how I can fix this? Closing Gtuner doesn't fix it, and requires a full reboot which is very frustrating if I'm in the middle of a multiplayer match.
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Brigadier General
Brigadier General
 
Posts: 1976
Joined: Tue Nov 24, 2015 6:27 am

Re: Massive stutter introduced when launching Gtuner IV on P

Postby Scachi » Sat Jun 13, 2020 5:43 pm

When you close gtuner IV, does the stutter stop ?
take a look the output panel, perhaps your script is spamming too many messages, that may cause short stutter.
Also when playing with mouse/keyboard take a look at your T2 cpu load, on unoptimized scripts for direct input/connected keyboard/mouse high cpu load >=100% can cause stutter on the output side of the T2.
Also check the T2 cpuload when you hold down multiple keys, the firebutton and move the mouse around.
Unload the active slot, switch to a minimalist script for the passthru and test if it still stutters.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Massive stutter introduced when launching Gtuner IV on P

Postby pablosscripts » Sat Jun 13, 2020 5:53 pm

Scachi wrote:When you close gtuner IV, does the stutter stop ?


Nope this is always the first thing I try and it never fixes it.

Scachi wrote:take a look the output panel, perhaps your script is spamming too many messages, that may cause short stutter.


Not possible as I delete all my output messages when I finalise a script. I also just did a quick search and there's none in any of my scripts.

Scachi wrote:Also when playing with mouse/keyboard take a look at your T2 cpu load, on unoptimized scripts for direct input/connected keyboard/mouse high cpu load >=100% can cause stutter on the output side of the T2.

Also check the T2 cpuload when you hold down multiple keys, the firebutton and move the mouse around.
Unload the active slot, switch to a minimalist script for the passthru and test if it still stutters.


Ok will do.
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Brigadier General
Brigadier General
 
Posts: 1976
Joined: Tue Nov 24, 2015 6:27 am

Re: Massive stutter introduced when launching Gtuner IV on P

Postby pablosscripts » Sun Jun 14, 2020 12:26 am

Yikes, so it's hitting about 150% CPU usage.

However, it doesn't always cause an issue, and only when I boot up Gtuner IV. Shouldn't this be causing me a lot of problems even without Gtuner?
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Brigadier General
Brigadier General
 
Posts: 1976
Joined: Tue Nov 24, 2015 6:27 am

Re: Massive stutter introduced when launching Gtuner IV on P

Postby Scachi » Sun Jun 14, 2020 3:53 am

I have no idea, I hope j2kbr sees your post.

Does switching the T2 slots fix your stutter issue ? Is it a single game that has that issue ?
Have you tried a minimalistic script with just those two passthru lines for keyboard/mouse, if it still happens then ?

key_status calls can easily rise the cpu usage with direct connected mouse/keyboard.
make sure to only use the keys used for controls like movement in the main loop.
For special keys to start some special combos/functions put them in a combo that gets called with if (time_elapsed()) combo_run() and/or experiment with some wait(0); wait(1); times in that helper combo to read key_status to reduce the cpu load.

It is like moving the move does cause the T2 to reparse the current key_status and start functions as fast as you move the mouse/the mouse as it is causing new events.
So putting the non critical stuff in a combo that reads the extra key_status every time_elapsed or slower only will reduce the cpu load.

A combination of passthru function calls in combination with extra key_set or mouse_set stuff can result in choppy/ingored outputs too.I have seen this with my USB HID anti recoil script when used in combination with a xim, it may depend on the game if it is able to parse the output. I worked around that issue for my script with individual passthru like functions.
My USB hid anti recoil script source code is available in the online resource if you want to try that approach.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Massive stutter introduced when launching Gtuner IV on P

Postby J2Kbr » Wed Jun 17, 2020 9:10 am

Hi pablosscripts, could you please PM me your script, so I can reproduce your setup and try find the cause. thanks.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Massive stutter introduced when launching Gtuner IV on P

Postby pablosscripts » Thu Jun 18, 2020 1:00 am

J2Kbr wrote:Hi pablosscripts, could you please PM me your script, so I can reproduce your setup and try find the cause. thanks.


No problem, I can do this, however I am wondering whether it has anything to do with my script at all.

As I said, my script can hit as high as 150% CPU usage. However all my other scripts run at no more than about 10% usage.

The other day, I was using one of my scripts that max out at 10%, and I went to swap my mouse with another one. By doing so, the stutter began happening. I was surprised.

I then switched scripts - it was still there.

I unplugged and replugged my T2 - still there.

I restarted my PC - still there.

The only reliable way of fixing this is to turn my PC off entirely then turn it back on again.

I have since repeated this 3 more times, it seems that the common factor is swapping mice or keyboards, or opening Gtuner IV. I don't think the script has anything to do with it.
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Brigadier General
Brigadier General
 
Posts: 1976
Joined: Tue Nov 24, 2015 6:27 am


Return to Gtuner IV Support

Who is online

Users browsing this forum: No registered users and 90 guests

cron