Tuesday, November 8, 2022

Mouse latency response time in linux

 lsusb

Find your mouse. 

Bus 001 Device 003: ID 1a7c:0191 Evoluent VerticalMouse 4

sudo usbhid-dump -s 1:3 -f -e stream

From the manual we get what the parameters mean:
man usbhid-dump
 -s =bus[:dev]
Replace -s 1:3 with the Bus Device for your device

Output is in the form
BUS:DEVICE:INTERFACE:ENTITY TIMESTAMP

.001:003:000:STREAM             1667902900.482858
 00 00 00 FC FF 00 00

.001:003:000:STREAM             1667902900.490787
 00 00 00 FE FF 00 00

.001:003:000:STREAM             1667902900.498863
 00 01 00 FC FF 00 00

Timestamp is in seconds before the point and subdivisions of seconds after the point.
First 3 digits milliseconds next 3 digits microseconds.
So the difference between two events is in my case is 8ms.
Note the speed dpi choise does not affect this. This is the maximum physical transmit speed.

usbhid-dump will disconect you mouse/device.
if you mess up just remove the receiver and plug-it back in or wait 60 seconds.

It is a WiFi Evoluent Vertical Mouse 4.

Configure Mouse Buttons X11
xinput
press a button and run in terminal to find the number associated with each button
xinput query-state id-nr
or
xev | grep button


xinput set-button-map "Kingsis Peripherals Evoluent VerticalMouse 4" 1 2 3 4 5 6 7 9 2 8

90-evoluent.conf /usr/share/X11/xorg.conf.d/conf
Section "InputClass" Identifier "Evoluent VerticalMouse 4" MatchUSBID "abcd:0123" # input id: 1 2 3 4 5 6 7 8 9 10 Option "ButtonMapping" "1 2 3 4 5 6 7 9 2 8" EndSection


Tuesday, November 1, 2022

Nofap - block porn

 Change the dns on your router in the DHCP section, with the dns from cisco OpenDNS  FamilyShield

https://www.opendns.com/setupguide/#familyshield

208.67.222.123
208.67.220.123

Use cloudflare warp - set it to familly mode full (malweare + adult)
Chrome - uses and external google dns to bypass it.
chrome://net-internals/?#dns  --- you can check here what dns record it returns
To disable external google dns go to:
Settings - Privacy and security - Security : chrome://settings/security - 
at the bottom of the page Use secure dns - With your current service provider - and it will use warp/cloudflare settings.

Youtube - click the profile picture in right top corner - and select Restrcited Mode - On - but the downside is it disables the comment section.

Android - Settings - Google  - Settings for Google apps (last one) - Search, Assitant & Voice (last one) - Hide Explicit results - On