Difference between revisions of "Smooth Quake"

From QWiki
Line 87: Line 87:
 
===Sync technologies===
 
===Sync technologies===
 
<big></big>
 
<big></big>
* FreeSync and GSync/compatible provide a tearless image. It will keep your fps and Hz synced without additional input lag.<br>
+
* Vertical syncronization (vsync) should be disabled while playing. It causes input lag.
 +
* FreeSync and GSync/compatible provide a tearless image. It will keep your fps and monitor Hz synced without additional input lag.<br>
 
<big></big>
 
<big></big>
* Motion Blur Reduction strobes the backlight synchronized with Hz for a CRT motion clarity.<br> Brands use different names for it. This adds a bit of input lag and creates a double image effect called crosstalk.<br>However Nvidia launched ULMB2 wich looks very promising without these downsides.<br><br>[https://www.youtube.com/watch?v=evjZGLdqUu8 Nvidia ULMB2 announcement]<br> [https://youtu.be/3Cykx2GQq4k Optimum Tech ULMB2 comparison]
+
* Motion Blur Reduction (MBR) strobes the backlight synchronized with Hz for CRT-like motion clarity (Cathode-ray tube).<br> Brands use different names for MBR. This adds a bit of input lag and creates a double image effect called crosstalk.<br>However Nvidia launched ULMB2 which looks very promising, and without these downsides.<br><br>[https://www.youtube.com/watch?v=evjZGLdqUu8 Nvidia ULMB2 announcement]<br> [https://youtu.be/3Cykx2GQq4k Optimum Tech ULMB2 comparison]
  
 
===Mouse===
 
===Mouse===

Revision as of 17:06, 27 July 2023

This page contains solutions and tips for various tearing, lagging, jerky and sucky Quake configurations.
Some of the tunings are for advanced users only. Do not change anything unless you know what you are doing.

Hardware

Monitor

Ideally, an IPS panel with at least 240Hz minimum is recommended. But any 144hz or more screen will work great!
Why IPS? TN has bad colors and viewing angles, VA has slow response time and OLED has higher input lag.
The pixels response time must stay inside de refresh cycle (1000/Hz) to avoid blur and take full advantage of the monitor's Hz.
Example: the refresh cycle of a 240hz monitor is 1000/240=4.16ms, if the pixel response time is above that, its going to generate blur.
You can read about the pixel response time for your monitor here. Sort the column by rise/fall time.

Some monitors have a fast enough response time but at the cost of ghosting. Take this into account.
UFO Test shows how your monitor responds so you can select a proper overdrive setting.

Example products: Asus VG279QM Aperture Grille's review.

On CRT displays you can lower resolution to get higher refresh rates. Your video card drivers probably have a custom refresh rate feature. If not, you can use an external program like Powerstrip or Refresh Lock.

Mouse

Any modern mouse should be ok.
Most mouse companies add smoothing after a certain DPI level (more info) but a few brands have smoothing disabled for all DPI ranges.
Smoothing is bad!
You should only use native DPI values to avoid interpolation. 1000Hz and DPI of 800 minimum is recommended.
A good sensor should not have problems such as smoothing, angle snapping, jitter and DPI deviation.
Example products: Pixart 3389 sensor (1600 DPI no smoothing added).
Battle(non)sense DPI analysis.
Optimum Tech DPI analysis

Note: with 1000Hz+ mouse and keyboard you should use separate dedicated usb chips or a PCIe USB card.

Keyboard

1000Hz minimum is ideal simply because it has lower input lag than regular 125hz keyboards. Explanation.
Example products: EVGA Z20 and Corsair K70 Rapidfire/Champion models are fast but expensive.

Configuration

BIOS

Do not change anything unless you know what you are doing!
Suggestions:

  • Spread Spectrum ; Memory Scrambler: Disable
  • Extreme Memory Profile (XMP): Enable


Windows

Suggestions:

  • Start > Settings > Privacy > Background apps > Disable all but "Windows Security"
  • Control Panel > Mouse > Pointer Options > Untick 'Enhance pointer precision' and leave pointer speed at 6th notch.
  • Control Panel > Power Options > High performance > Change plan settings > Change advanced settings > PCI Express > ASPM: disable

  • MSI Interrupt Mode Utility: Change supported devices to MSI. A negative value means it's working. Do not enable devices if the supported modes field doesn't include MSI. Interrupt priority should be undefined for all. Windows sets SATA to high and some ethernet drivers too.


NVIDIA

Suggestions:

AMD/ATI

(to be added...)

ezQuake

ezQuake launch

You can change Windows power plan to High Performance while playing and restore its value back to Balanced when finished.
Open command line and type powercfg -l to see their GUID. They should match the ones below.
Devices interrupts go to cpu0 by default. Excluding it for ezQuake will improve fps and stabilize frametime. If your cpu has Hyper-Threading you need to exclude cpu0 and cpu1. Cpu affinity calculator shows you what hexadecimal value you need to set in the cmdline after the /affinity (replace the word <HexVal> with the value you got from the calculator). Open notepad and place these 3 lines (without the comment), change game path, and save as .bat extension.
powercfg -s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (#high performance power profile)
start "" /wait /affinity <HexVal> "<your Quake path and executable ex.: D:\QW\ezquake>" -mem 1024
powercfg -s 381b4222-f694-41f0-9685-ff5bb260df2e (#balanced power profile)

Adding -mem 1024 or -mem 512 to your command line is recommended because ezQuake usually uses windows pagefile (virtual memory stored in your storage media), creating a hard page fault event, which can affect frametime, depending on the computer's background activity. Setting a higher mem value such as the ones recommended will prevent ezQuake making that many pagefile calls. The Basics of Page Faults

ezQuake settings

Suggestions:
cl_maxfps 1001 (is the minimum recommended and there is no need for more)
cl_newlerp 0.1 (smooths projectiles movement)
gl_simpleitems 1 (combined with gl_externalTextures_world 0, there is fps gain)
r_particles_count 1024 (is enough unless you use tons of effects)
r_farclip 8192 (is enough for long distances)

Tools to check performance:

  • timedemo
  • hud_frametime (combine with hud_frametime_max_reset_interval 2 and hud_performance_average 0)
  • hud_fps (combine with hud_fps_drop -1 and hud_fps_style 2)
  • hud_net
  • hud_ping
  • hud_speed

Sync technologies

  • Vertical syncronization (vsync) should be disabled while playing. It causes input lag.
  • FreeSync and GSync/compatible provide a tearless image. It will keep your fps and monitor Hz synced without additional input lag.

  • Motion Blur Reduction (MBR) strobes the backlight synchronized with Hz for CRT-like motion clarity (Cathode-ray tube).
    Brands use different names for MBR. This adds a bit of input lag and creates a double image effect called crosstalk.
    However Nvidia launched ULMB2 which looks very promising, and without these downsides.

    Nvidia ULMB2 announcement
    Optimum Tech ULMB2 comparison

Mouse

Use in_raw 1 (default) for Raw mouse input. This should provide the cleanest mouse input data, as opposed to what SDL input provides with in_raw 0, which might suffer from Windows's built-in acceleration curves and other limitations.

Issues

Network: lag spikes

  • Proxy: with default nQuake settings, the server browser automatically finds proxies. It can connect to a server using more than one.
    Follow these steps to know if one of them or the one it's using is the culprit.
    console > hud_net_show 1. If "dev" (deviation) is 1ms+, type cl_proxyaddr and write IPs down.
    Server Browser > select a server > press 'enter'

In the help shortcut keys box, "Route" indicates how many proxies were found. Press 'n'. This will connect directly bypassing proxies.
If deviation improves then some proxy causes issues.
With the IPs you wrote, set cl_proxyaddr with just one until you find wich one is bad. Sb_ignoreproxy can exclude it from future updates.

Keyboard shortcuts in ezQuake server browser
  • Network Throttling: enabled reduces latency in ethernet driver but if you don't exclude cpu0 from ezQuake this will cause alot of deviation.

If you have high deviation to any server, disable this to see if connection improves:
Winkey+R > regedit > HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile > NetworkThrottlingIndex = ffffffff (Hex value to disable).
If there is no improvement, enable it again ([10-70] range in decimal. default 10).

  • Interrupt Moderation: if you feel lag even with low ping, disable in ethernet properties.


As an example, here are the settings tested with Xperf for the ethernet driver (ndis.sys). Values are shown in microseconds (usecs).
NT off causes more latency and IM on is not worth it. A good combination for these values is NT 70 + IM off.

DPC with Xperf

Network: packet loss

If you are experiencing packetloss, you can try to connect to a proxy. But if the problem is your own connection, this won't do anything. In this situation it makes sense to duplicate (dupe) the network packets sent from and to the QuakeWorld server, so less packets are loss.
Dupe commands expect a numeric argument ([1-3] range). The numeric argument represents the number of duplicate packets.
The default is of course 0, representing 0 duplicated packets.

  • Console > setinfo dupe 1 (This tells the server to send to your client 1 duplicated packet). Set it in cl_onload alias for permanent use.
  • Console > cl_c2sdupe 1 (This tells your client to send to the server 1 duplicated packet). This is a client setting, so it is saved in your cfg file.


Note: Ensure you have at least /rate 50000. To duplicate packets will increase your bandwidth needs. In case your rate is not enough for the number of packets being received/sent, rate cut will happen.

The yellow lines on the netgraph represent rate cut. You can also see the absolute value, 18%

Performance: unstable FPS

If you feel like the game runs smooth for a while but you recognize small disturbing semi-periodic interrupts, those can be caused by background applications. Start by opening Task Manager (ctrl+alt+del) and checking whethe some other processes are consuming the CPU time.
You can also reduce the number of processes that run on the startup process of your OS.

If that doesn't help you, use following tools:

  • Process Explorer - Contains CPU Usage graph where you can track for CPU spikes and display what process is causing them. If it's the "System" process, check for wrongly uninstalled/conflicting firewalls or buggy drivers.
  • FileMon - Simple tool to show you which Windows applications are accessing your hard-drive
  • In Windows 7, you can use Resource Monitor: enter "resmon" in start menu search box.

Here's some other things you can do:

  • Uninstall or disable any RGB software (monitor; mouse; keyboard). It causes issues with the system.
  • NVCP > ezQuake profile > Power management mode > prefer maximum performance (sets gpu at max frequency).
    If the GPU jumps frequency often it will cause stutters (leads to a small fps drop). You can check this using MSI Afterburner.
    If the GPU jumps to boost frequency and down to max frequency often you can lock the gpu at boost frequency.
    Type gtx or rtx depending on wich GPU you have in the search below (CTRL+F).

Winkey+R > regedit > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class > CTRL+F > gtx (or) rtx > New DWORD > DisableDynamicPstate = 1

Advanced Windows Settings

Interrupt affinity

Interrupt affinity
You can set devices interrupts to a specific cpu. Mouse interrupts by default go to cpu1 and it can affect frametime since ezQ threads will most likely be in cpu1/2 (you can check this using Process Explorer). Usually the least used cpus are the last ones. With Hyper-Threading you need to assign physical cpus rather than logical ones. USB devices can't bet set individually.
In device manager select your mouse then view devices by connection and the branch goes up to XHCI. Select XHCI in the affinity tool.

Other OS

Linux

See Smooth Quake in Linux

Mac

ezQuake is in general the recomended client, but you can also try fuh if everything fails :P Binary version of Fuhquake > http://dreamolers.binaryriot.org/fuhquake/

Finding help

Discord
Advanced Configuration forum in QuakeWorld.nu is a good place to start. Use search.

Link to a previous version of this page, obsolete: Older Smooth Quake