Dungeons & Dragons Neverwinter Forum

This is a community forum and not official technical support. — If you need official support: Contact Us

The following comments are owned by whoever posted them. We are not responsible for them in any way.

Back to Threads Reply to Thread

Mouse Tips & Tricks

(Maybe an Advocate can move this to the Tips & Tricks area..I don't have access.)

After a frustrating amount of research and testing over the past couple months, I believe I've solved all the mouse issues with this game, or at least discovered the tools you can use to do it. Many of these fixes actually improved mouse performance in Linux in general too, so that's a plus.


Issue: Mouse Input Lag

Symptom: Your view moves slower than your mouse. In other words, you move the mouse and the view needs to "catch up" to where you just moved the mouse to. This problem starts out kinda bad when you log in and gets worse very quickly. The game is unplayable with this issue.

Fix: Neverwinter Launcher --> Options. In the "Advanced Command Line" text box, add "-enablerawinputsupport 0"


Issue: Extreme Mouse Pointer Acceleration

Symptom: Barely moving your mouse causes your view (or the mouse pointer if in alt mode) to move extremely fast even with the in-game mouse movement setting at it's lowest value. Reducing the mouse speed in the Xfce/GNOME/KDE config panel won't help either.

Fix: This issue is caused by software mouse acceleration and appears to be worst in high performance/gaming mice. The tool you use to fix this is 'xinput'. xinput manages the interaction between your input devices and X. Since this is working with X directly, I don't recommend using the GUI tools found in Xfce/GNOME/KDE once you've made adjustments here. Since Window Mangers and Desktop Environments (like Xfce) reside in an abstraction layer above X, using tools at that layer are likely to overwrite all your changes you made with xinput. This is also why xinput will work no matter which DE your using.

Open a shell window and just type 'xinput' to see what's attached to your X session. For example:


$ xinput
⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
⎜   ↳ Razer DeathAdder Razer DeathAdder           id=10    [slave  pointer  (2)]
⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard                 id=5    [slave  keyboard (3)]
    ↳ Power Button                                id=6    [slave  keyboard (3)]
    ↳ Video Bus                                   id=7    [slave  keyboard (3)]
    ↳ Video Bus                                   id=8    [slave  keyboard (3)]
    ↳ Power Button                                id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard                id=11    [slave  keyboard (3)]
    ↳ HP WMI hotkeys                              id=12    [slave  keyboard (3)]

In this example, I'm on Fedora 18 with a Razer DeathAdder mouse and the id=10. Oddly, this same mouse shows up as two devices on Ubuntu 13.10 so YMMV.

Most xinput commands can use either a number or the text of the device surrounded in quotes; e.g. "Razer DeathAdder Razer DeathAdder" is equivalent to 10.

To see the current settings, type 'xinput list-props <id>'. Example:


$ xinput list-props 10
Device 'Razer DeathAdder Razer DeathAdder':
    Device Enabled (144):    1
    Coordinate Transformation Matrix (146):    1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (270):    0
    Device Accel Constant Deceleration (271):    1.000000
    Device Accel Adaptive Deceleration (272):    1.000000
    Device Accel Velocity Scaling (273):    0.050000
    Device Product ID (261):    5426, 22
    Device Node (262):    "/dev/input/event5"
    Evdev Axis Inversion (274):    0, 0
    Evdev Axes Swap (276):    0
    Axis Labels (277):    "Rel X" (154), "Rel Y" (155), "Rel Vert Wheel" (269)
    Button Labels (278):    "Button Left" (147), "Button Middle" (148), "Button Right" (149), "Button Wheel Up" (150), "Button Wheel Down" (151), "Button Horiz Wheel Left" (152), "Button Horiz Wheel Right" (153), "Button Side" (265), "Button Extra" (266), "Button Forward" (267), "Button Back" (268), "Button Unknown" (264), "Button Unknown" (264), "Button Unknown" (264), "Button Unknown" (264)
    Evdev Middle Button Emulation (279):    0
    Evdev Middle Button Timeout (280):    50
    Evdev Third Button Emulation (281):    0
    Evdev Third Button Emulation Timeout (282):    1000
    Evdev Third Button Emulation Button (283):    3
    Evdev Third Button Emulation Threshold (284):    20
    Evdev Wheel Emulation (285):    0
    Evdev Wheel Emulation Axes (286):    0, 0, 4, 5
    Evdev Wheel Emulation Inertia (287):    10
    Evdev Wheel Emulation Timeout (288):    200
    Evdev Wheel Emulation Button (289):    4
    Evdev Drag Lock Buttons (290):    0

The important properties are:


Device Accel Constant Deceleration (271):
Device Accel Adaptive Deceleration (272):
Device Accel Velocity Scaling (273):

Constant and Adaptive Dec. will probably be set at 1.000000 and Scaling will likely be at 10.000000. Velocity Scaling is the most influential prop. Try taking that down to 1.0 to start with but feel free to go < 1.0 as I have until you get it where you like it. To adjust a property, type 'xinput set-prop <dev id> <prop id or string> <new val>'. For example:


$ xinput 10 273 0.05

The two Deceleration properties will slow down your pointer speed as the number gets higher not lower. Adaptive Decelration (272) seems to have the most effect. Try a value of 3 or 5 and see what you think. Once you find a value you like for Adaptive, I'd suggest using the same val for Constant (271). Also, if your mouse shows up as two devices as mine does in Ubuntu, just make the same exact change for both devices.

Some people prefer to disable mouse acceleration entirely. To do that assign the value -1 to "Device Accel Profile (270)":


$ xinput 10 270 -1

For a full explanation of what each prop does, have a look at the official x.org page on pointer acceleration. Another good resource is the man page on xinput and also the one on xset.

Keep in mind that these changes will not be permanent so, if you reboot you'll be back to the old settings. I may follow this post up later with a couple solutions for applying your settings at boot/login time if there's interest.


Issue: Low Mouse Polling Rate

Symptom: If you slowly and consistently move the mouse in one direction across your desk, the view rotates but every second (or less) goes in the opposite direction for a fraction of a second and then resumes travelling in the correct direction. So let's say you move the mouse very slowly left. The view moves slowly left but every second or so it quickly moves right just for a moment and then resumes moving slowly left. It has the effect of looking like the movement is "stuttering" or "jittery" and will drive you insane. This is actually the issue that put me on this path of figuring out how to adjust mouse input. Actually, it took quite a while and lots of testing before I even discovered the problem to be with mouse input settings in the first place. Ugh...

The cause is that there's some sort of mismatch happening between the polling rate of the mouse and what Neverwinter expects. Interestingly, I've never had this issue in any other game whether native or Wine-based. I also tried a number of different gaming and normal/slow mice to confirm it wasn't a single mouse brand or model with the issue. It's definitely worse with gaming (high perf.) mice, though. Much worse.

The default polling rate for mice in Linux is 125Hz and a higher/faster polling rate will help here. The possible values are:


val        Hz
 1    =  1000
 2    =   500
 3    =   250
 4    =   125
 5    =   100

Changing this value will require you to have sudo or root access. You'll need to update a modprobe file but the location of that file will depend on your distro. Regardless of the distro, you'll add the following text:


-r usbhid
usbhid mousepoll=2

In this example, I'm setting it to 500Hz which worked well for my Razer mice. The higher the polling rate, the more CPU utilization will be required but it's negligible on modern CPUs. I wouldn't expect to notice any CPU impact even with the 1000Hz value and I've seen some posts supporting this.

For Ubuntu, you'll want to add that text to the /etc/modules file.

On Fedora, you'll need to make a new file under /etc/modprobe.d but you can call it anything you want as long as it has a .conf extention. I'd suggest /etc/modprobe.d/mymouse.conf or something similar.

Once you've created/updated the file, you'll need to reboot for it to take effect. It's possible to make the update with the system running but I wouldn't suggest it since it's too easy to mess something up and then have no mouse or keyboard access and, thus, require a hard boot. Not fun.

Check out this page for making the adjustment in Arch Linux. That page also has a nice table relating the Hz values to ms.

To confirm the new value after you've rebooted:

$ cat /sys/module/usbhid/parameters/mousepoll

  • Keep in mind that the output of this will be '0' until you've made the change.

This is one of the best explanations I've seen for DPI and polling rate:

http://www.howtogeek.com/182702/mouse-dpi-and-polling-rates-explained-do-they-matter-for-gaming/


Let me know if this helps anyone or if you have any questions!

UPDATE

After some more research and tweaking, I've discovered that there's a direct relationship between Velocity Scaling and the polling rate. Here's the formula:
Velocity Scaling = 1000 / mousepoll Hz
So if you set your mouse polling rate to 500Hz (mousepoll=2), then you'd set Velocity Scaling to a value of 2 (i.e. 1000/500). As an example, my mouse is device 10 and I'm using a polling rate of 500Hz so I'd use:
xinput set-prop 10 "Device Accel Velocity Scaling" 2
Remember that you can use the string "Device Accel Velocity Scaling" or it's id of 273, both are equivalent.

It's really amazing what a difference it makes to have these two settings configured correctly if you have a high performance mouse.

Mouse Polling Rate in Fedora

Another thing I discovered recently was that adjusting the polling rate via adding parameters to /etc/modules as I outlined in the first post will not work on Fedora. This is because Fedora actually compiles the usbhid driver into the kernel instead of leaving it as a module. Here's how you can confirm this:
``# zgrep CONFIG_USB_HID= /boot/config-uname -r````
If this var is set to 'y' then the driver is compiled in and you can't adjust it via modprobe or /etc/modules. If it's an 'm' then that means it's a module; this is what you'll see on Ubuntu and Arch.

To adjust the mouse polling rate on Fedora, do the following:

  1. Edit /etc/default/grub and append usb.mousepoll=<value> to the end of the GRUB_CMDLINE_LINUX= line. Example:
    GRUB_CMDLINE_LINUX="rd.md=0 rd.dm=0 $([ -x /usr/sbin/rhcrashkernel-param ] && /usr/sbin/rhcrashkernel-param || :) rd.lvm.lv=vg00/root rd.luks=0 vconsole.keymap=us rhgb quiet usbhid.mousepoll=2"

  2. Rebuild the grub2 config:
    # grub2-mkconfig -o /boot/grub2/grub.cfg

  3. Reboot.

  4. Check it with:
    $ cat /sys/module/usbhid/parameters/mousepoll
    If the output of this is still '0' then it's still not set correctly.

Thank you very, very much for your detailled post. That is excellent.

I was experiencing the mouse lag issue and have added the -enablerawinputsupport 0 value and it solved it completely. I had given up on this game.

I have also been experienceing a similar issue in Star Trek Online, but not to the same degree. I'm going to try the same fix and see if that works.

Thanks again.

CrossOver Forums: the place to discuss running Windows applications on Mac and Linux

CodeWeavers or its third-party tools process personal data (e.g. browsing data or IP addresses) and use cookies or other identifiers, which are necessary for its functioning and required to achieve the purposes illustrated in our Privacy Policy. You accept the use of cookies or other identifiers by clicking the Acknowledge button.
Please Wait...
eyJjb3VudHJ5IjoiVVMiLCJsYW5nIjoiZW4iLCJjYXJ0IjowLCJ0enMiOi01LCJjZG4iOiJodHRwczpcL1wvbWVkaWEuY29kZXdlYXZlcnMuY29tXC9wdWJcL2Nyb3Nzb3Zlclwvd2Vic2l0ZSIsImNkbnRzIjoxNzI1OTE2ODI4LCJjc3JmX3Rva2VuIjoiN0tBTnF0WnVHVkZLVUt1WiIsImdkcHIiOjB9