Weird Wireless Mouse problem with combination of Logitech and TLP

Hi everybody,

I am using Logitech combo MX Keys for keyboard and MX Master gaming mouse.

While keyboard works flawlessly with Zorin OS, when using the mouse for any normal task the cursor works fine for five minutes or so, then suddenly and randomly, takes on a mind of it's own and either registers click when I haven´t clicked anything (causing me problems during typing) or if I would just run the mouse in circles, it starts registering clicks or right-clicks randomly, rendering it unusable.

I have tried the touchpad and it works fine, so I know the problem lies with the mouse.
Possible culprit might be TLP, which I installed recently (I didn´t had these problems before installing it), so I tried to turn it off and restart PC - it did not happened immediately, but after some minutes mouse started to work correctly.

Since I would like to be able to use TLP (becasue otherwise my battery is drained pretty quickly), I am posting my settings here - can somebody have a look at them and suggest what might be wrong? I should be using the default settings, haven´t touched anything yet.

I also have Solaar (SW for managing Logitech peripherals) installed and enabled, but haven´t set it up in any way.
Using latest Zorin OS 17.2 Core:

--- TLP 1.5.0 --------------------------------------------

+++ Configured Settings:
/etc/tlp.conf L0029: TLP_ENABLE="0"
defaults.conf L0005: TLP_WARN_LEVEL="3"
defaults.conf L0006: TLP_PERSISTENT_DEFAULT="0"
defaults.conf L0007: DISK_IDLE_SECS_ON_AC="0"
defaults.conf L0008: DISK_IDLE_SECS_ON_BAT="2"
defaults.conf L0009: MAX_LOST_WORK_SECS_ON_AC="15"
defaults.conf L0010: MAX_LOST_WORK_SECS_ON_BAT="60"
defaults.conf L0011: CPU_ENERGY_PERF_POLICY_ON_AC="balance_performance"
defaults.conf L0012: CPU_ENERGY_PERF_POLICY_ON_BAT="balance_power"
defaults.conf L0013: SCHED_POWERSAVE_ON_AC="0"
defaults.conf L0014: SCHED_POWERSAVE_ON_BAT="1"
defaults.conf L0015: NMI_WATCHDOG="0"
defaults.conf L0016: DISK_DEVICES="nvme0n1 sda"
defaults.conf L0017: DISK_APM_LEVEL_ON_AC="254 254"
defaults.conf L0018: DISK_APM_LEVEL_ON_BAT="128 128"
defaults.conf L0019: DISK_APM_CLASS_DENYLIST="usb ieee1394"
defaults.conf L0020: DISK_IOSCHED="keep keep"
defaults.conf L0021: SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
defaults.conf L0022: SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
defaults.conf L0023: AHCI_RUNTIME_PM_ON_AC="on"
defaults.conf L0024: AHCI_RUNTIME_PM_ON_BAT="auto"
defaults.conf L0025: AHCI_RUNTIME_PM_TIMEOUT="15"
defaults.conf L0026: PCIE_ASPM_ON_AC="default"
defaults.conf L0027: PCIE_ASPM_ON_BAT="default"
defaults.conf L0028: RADEON_DPM_PERF_LEVEL_ON_AC="auto"
defaults.conf L0029: RADEON_DPM_PERF_LEVEL_ON_BAT="auto"
defaults.conf L0030: RADEON_POWER_PROFILE_ON_AC="default"
defaults.conf L0031: RADEON_POWER_PROFILE_ON_BAT="default"
defaults.conf L0032: WIFI_PWR_ON_AC="off"
defaults.conf L0033: WIFI_PWR_ON_BAT="on"
defaults.conf L0034: WOL_DISABLE="Y"
defaults.conf L0035: SOUND_POWER_SAVE_ON_AC="1"
defaults.conf L0036: SOUND_POWER_SAVE_ON_BAT="1"
defaults.conf L0037: SOUND_POWER_SAVE_CONTROLLER="Y"
defaults.conf L0038: BAY_POWEROFF_ON_AC="0"
defaults.conf L0039: BAY_POWEROFF_ON_BAT="0"
defaults.conf L0040: BAY_DEVICE="sr0"
defaults.conf L0041: RUNTIME_PM_ON_AC="on"
defaults.conf L0042: RUNTIME_PM_ON_BAT="auto"
defaults.conf L0043: RUNTIME_PM_DRIVER_DENYLIST="mei_me nouveau radeon"
defaults.conf L0044: USB_AUTOSUSPEND="1"
defaults.conf L0045: USB_EXCLUDE_AUDIO="1"
defaults.conf L0046: USB_EXCLUDE_BTUSB="0"
defaults.conf L0047: USB_EXCLUDE_PHONE="0"
defaults.conf L0048: USB_EXCLUDE_PRINTER="1"
defaults.conf L0049: USB_EXCLUDE_WWAN="0"
defaults.conf L0050: USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN="0"
defaults.conf L0051: RESTORE_DEVICE_STATE_ON_STARTUP="0"
defaults.conf L0052: RESTORE_THRESHOLDS_ON_BAT="0"
defaults.conf L0053: NATACPI_ENABLE="1"
defaults.conf L0054: TPACPI_ENABLE="1"
defaults.conf L0055: TPSMAPI_ENABLE="1"

+++ System Info
System         = Hewlett-Packard Type1ProductConfigId HP OMEN Pro 15         
BIOS           = F.23
OS Release     = Zorin OS 17.2
Kernel         = 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov  6 17:42:15 UTC 2 x86_64
/proc/cmdline  = BOOT_IMAGE=/boot/vmlinuz-6.8.0-49-generic root=UUID=c5f90153-9080-49eb-8566-28405b8bc762 ro quiet splash vt.handoff=7
Init system    = systemd v249 (249.11-0ubuntu3.12)
Boot mode      = UEFI

+++ TLP Status
State          = disabled
RDW state      = disabled (TLP disabled)
Last run       = unknown
Mode           = unknown
Power source   = AC

+++ Processor
CPU model      = Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz

/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver    = intel_cpufreq
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor  = schedutil
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors = conservative ondemand userspace powersave performance schedutil 
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq  =   800000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq  =  3600000 [kHz]

/sys/devices/system/cpu/cpu1..cpu7: omitted for clarity, use -v to show all

/sys/devices/system/cpu/intel_pstate/status            = passive
/sys/devices/system/cpu/intel_pstate/min_perf_pct      =  22 [%]
/sys/devices/system/cpu/intel_pstate/max_perf_pct      = 100 [%]
/sys/devices/system/cpu/intel_pstate/no_turbo          =   0
/sys/devices/system/cpu/intel_pstate/hwp_dynamic_boost = (not available)
/sys/devices/system/cpu/intel_pstate/turbo_pct         =  35 [%]
/sys/devices/system/cpu/intel_pstate/num_pstates       =  29

/sys/devices/system/cpu/cpu0/power/energy_perf_bias    =  6 (default) [EPB]

/sys/module/workqueue/parameters/power_efficient       = Y
/proc/sys/kernel/nmi_watchdog                          = 1

+++ Platform Profile
/sys/firmware/acpi/platform_profile                    = (not available)
/sys/firmware/acpi/platform_profile_choices            = (not available)

+++ Temperatures
CPU temp               =    54 [°C]
Fan speed (fan1)       =  7680 [/min]
Fan speed (fan2)       =   256 [/min]

+++ File System
/proc/sys/vm/laptop_mode               =     0
/proc/sys/vm/dirty_writeback_centisecs =   500
/proc/sys/vm/dirty_expire_centisecs    =  3000
/proc/sys/vm/dirty_ratio               =    20
/proc/sys/vm/dirty_background_ratio    =    10

+++ Disks
Devices = nvme0n1 sda

/dev/nvme0n1: not present.

/dev/sda:
  Type       = SATA
  Disk ID    = ata-SAMSUNG_MZHPU512HCGL-000H1_S1L5NYAG501264
  Model      = SAMSUNG MZHPU512HCGL-000H1              
  Firmware   = UXM62H1Q
  APM Level  = none/disabled
  Status     = active/idle
  TRIM       = supported
  Host       = ../devices/pci0000:00/0000:00:1c.0/0000:07:00.0/ata5/host4/target4:0:0/4:0:0:0/block/sda
  Scheduler  = none [mq-deadline] (multi queue)

  Runtime PM:
    /sys/block/sda/device/power/control = on, autosuspend_delay_ms = -1

  SMART info:
      9 Power_On_Hours            =     9183 [h]
     12 Power_Cycle_Count         =     1355 
    177 Wear_Leveling_Count       =       90 [%]
    178 Used_Rsvd_Blk_Cnt_Chip    =      574 
    179 Used_Rsvd_Blk_Cnt_Tot     =      949 
    180 Unused_Rsvd_Blk_Cnt_Tot   =     9547 

+++ AHCI Link Power Management (ALPM) :: SATA Links
/sys/bus/pci/devices/0000:00:1f.2/ata1/host0/scsi_host/host0/link_power_management_policy = med_power_with_dipm 
/sys/bus/pci/devices/0000:00:1f.2/ata2/host1/scsi_host/host1/link_power_management_policy = med_power_with_dipm 
/sys/bus/pci/devices/0000:00:1f.2/ata3/host2/scsi_host/host2/link_power_management_policy = med_power_with_dipm 
/sys/bus/pci/devices/0000:00:1f.2/ata4/host3/scsi_host/host3/link_power_management_policy = med_power_with_dipm 
/sys/bus/pci/devices/0000:07:00.0/ata5/host4/scsi_host/host4/link_power_management_policy = keep_firmware_settings  -- sda

+++ AHCI Port Runtime Power Management :: SATA/ATA Ports
/sys/bus/pci/devices/0000:00:1f.2/ata1/power/control     = on 
/sys/bus/pci/devices/0000:00:1f.2/ata2/power/control     = on 
/sys/bus/pci/devices/0000:00:1f.2/ata3/power/control     = on 
/sys/bus/pci/devices/0000:00:1f.2/ata4/power/control     = on 
/sys/bus/pci/devices/0000:07:00.0/ata5/power/control     = on  -- sda

+++ Intel Graphics
/sys/class/drm/card1/device/driver           = i915

/sys/class/drm/card1/power/rc6_enable        =  1 (enabled)
/sys/kernel/debug/dri/1/i915_fbc_status      = FBC disabled: stolen memory not initialised
/sys/kernel/debug/dri/1/i915_edp_psr_status  = PSR mode: disabled

/sys/class/drm/card1/gt_min_freq_mhz         =   200 [MHz]
/sys/class/drm/card1/gt_max_freq_mhz         =  1200 [MHz]
/sys/class/drm/card1/gt_boost_freq_mhz       =  1200 [MHz]
/sys/class/drm/card1/gt_RPn_freq_mhz         =   200 [MHz] (GPU min)
/sys/class/drm/card1/gt_RP0_freq_mhz         =  1200 [MHz] (GPU max)

+++ Wireless
bluetooth = on
nfc       = none (no device)
wifi      = on
wwan      = none (no device)

hci0(btusb)                   : bluetooth, not connected
wlo1(iwlwifi)                 : wifi, connected, power management = on

+++ Audio
/sys/module/snd_hda_intel/parameters/power_save            = 1
/sys/module/snd_hda_intel/parameters/power_save_controller = Y

+++ PCIe Active State Power Management
/sys/module/pcie_aspm/parameters/policy = [default] performance powersave powersupersave (using BIOS preferences)

+++ PCIe Runtime Power Management
Enable devices    = (disabled)
Disable devices   = (disabled)
Device denylist   = (disabled)
Driver denylist   = mei_me nouveau radeon

/sys/bus/pci/devices/0000:00:00.0/power/control = on   (0x060000, Host bridge, no driver)
/sys/bus/pci/devices/0000:00:01.0/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:02.0/power/control = auto (0x030000, VGA compatible controller, i915)
/sys/bus/pci/devices/0000:00:03.0/power/control = auto (0x040300, Audio device, snd_hda_intel)
/sys/bus/pci/devices/0000:00:14.0/power/control = on   (0x0c0330, USB controller, xhci_hcd)
/sys/bus/pci/devices/0000:00:16.0/power/control = on   (0x078000, Communication controller, mei_me)
/sys/bus/pci/devices/0000:00:1b.0/power/control = auto (0x040300, Audio device, snd_hda_intel)
/sys/bus/pci/devices/0000:00:1c.0/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1c.4/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1c.5/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1d.0/power/control = on   (0x0c0320, USB controller, ehci-pci)
/sys/bus/pci/devices/0000:00:1f.0/power/control = on   (0x060100, ISA bridge, lpc_ich)
/sys/bus/pci/devices/0000:00:1f.2/power/control = on   (0x010601, SATA controller, ahci)
/sys/bus/pci/devices/0000:00:1f.3/power/control = auto (0x0c0500, SMBus, i801_smbus)
/sys/bus/pci/devices/0000:01:00.0/power/control = on   (0x030200, 3D controller, no driver)
/sys/bus/pci/devices/0000:07:00.0/power/control = on   (0x010601, SATA controller, ahci)
/sys/bus/pci/devices/0000:08:00.0/power/control = auto (0xff0000, Unassigned class [ff00], rtsx_pci)
/sys/bus/pci/devices/0000:09:00.0/power/control = on   (0x028000, Network controller, iwlwifi)

+++ USB
Autosuspend       = enabled
Device allowlist  = (not configured)
Device denylist   = (not configured)
Exclude audio     = enabled
Exclude bluetooth = disabled
Exclude phones    = disabled
Exclude printers  = enabled
Exclude WWAN      = disabled

Bus 001 Device 002 ID 8087:8000 control = auto, autosuspend_delay_ms =    0 -- Intel Corp. Integrated Rate Matching Hub (hub)
Bus 001 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms =    0 -- Linux Foundation 2.0 root hub (hub)
Bus 003 Device 001 ID 1d6b:0003 control = auto, autosuspend_delay_ms =    0 -- Linux Foundation 3.0 root hub (hub)
Bus 002 Device 004 ID 064e:9314 control = auto, autosuspend_delay_ms = 2000 -- Suyin Corp. HP TrueVision Full HD (uvcvideo)
Bus 002 Device 003 ID 8087:07dc control = auto, autosuspend_delay_ms = 2000 -- Intel Corp. Bluetooth wireless interface (btusb)
Bus 002 Device 005 ID 04f3:2016 control = on,   autosuspend_delay_ms = 2000 -- Elan Microelectronics Corp. Touchscreen (usbhid)
Bus 002 Device 002 ID 046d:c52b control = on,   autosuspend_delay_ms = 2000 -- Logitech, Inc. Unifying Receiver (usbhid)
Bus 002 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms =    0 -- Linux Foundation 2.0 root hub (hub)

+++ Battery Care
Plugin: generic
Supported features: none available

+++ Battery Status: BAT0
/sys/class/power_supply/BAT0/manufacturer                   = 13142
/sys/class/power_supply/BAT0/model_name                     = RR04058
/sys/class/power_supply/BAT0/cycle_count                    =      0 (or not supported)
/sys/class/power_supply/BAT0/energy_full_design             =  39915 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  39915 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  39915 [mWh]
/sys/class/power_supply/BAT0/power_now                      =      0 [mW]
/sys/class/power_supply/BAT0/status                         = Full

/sys/class/power_supply/BAT0/charge_control_start_threshold = (not available) 
/sys/class/power_supply/BAT0/charge_control_end_threshold   = (not available) 

Charge                                                      =  100.0 [%]
Capacity                                                    =  100.0 [%]

Update:

After more tinkering with it it seems the real culprit is actually the laptop keyboard:

if I have an external monitor plugged in, and I close the lid (I have my lid set up, so it won´t turn off the PC when it is closed - HandleLidSwitch=ignore), then the external mouse + keyboard starts behaving erratically after some time, but when it is opened, it works fine.

I tried to turn on also TLP, which I though was the original culprit - it has no effect, meaning if the lid open, the external mouse+ keyboard behaves fine, if it is closed, all the erratic behavior described in the original post starts few minutes afterwards.

Based on this, I think when the lid is closed, it still might be getting some input from the build in keyboard or something.

Is there any way to turn it off, while my external one is plugged in (and when I unplug it, it would automatically turn on)?

It sounds like to me, that the system power management features, are putting the wireless mouse to sleep, and this is the core issue of the problem.

I have my system set to ignore the lid switch, cause I don't want my computer putting my system to sleep when the lid is closed, as I am using the notebook as a desktop machine.

Also, now that you brought this up, I remember having the exact same issue, with my Logitech MX Master 3 wireless mouse, that I got several years ago. When it was brand new, it worked fine. After I put a year or so on it, the mouse started acting irradic just as you described.

In the end, it forced me to go back to wired mice, and just use a cord bungee on it. So this issue that you have described, may not have anything to do with what you installed per say, it could have just been a coincidence. Your mouse may have just decided to begin failing.

I never found out what went wrong specifically with my mouse, I just shelved it, literally. I switched to the Razor Deadadder Elite, used that mouse for 4 years, then I switched to the Logitech G502 mouse, I used that for 2 years. And now I am using the SteelSeries Aerox 5 mouse.

But again, in your specific use case, you admit this only happens when you close the notebook lid, which is what is leading me to believe that this is a power management issue for you.

This is my current power settings as they are now. A couple of settings that stand out to me, that might be of some use to you are...

Automatic suspend, set that to battery, so that while you keep the computer plugged in, it doesn't suspend on you.

Wi-Fi, if your mouse is most certainly using wifi transmission, you might want to keep the toggle off, so it doesn't suspend.

Bluetooth, if your mouse is using bluetooth transmission, you may want to toggle this off, so it doesn't suspend.


taking a shot in the dark here ...
while back i also had erratic mouse behaviour , turned out my keyboard somehow thought it was a mouse or something to that effect.
in mouse and touchpad settings , devices drop down , disabled USB USB keyboard consumer control .
that solved it .
you might look at your devices under mouse settings ? if there's anything "keyboard" ,try disable it and see (i mean why is there a keyboard device under mouse settings right?)

Hi,

Thanks for a reply, I had a look at the settings and found mine were almost the same as your, apart from Dim feature, which should have no effect no this:


And you are probably right, I also think now this might be power management issue.

Hi,

I had a look, and in the official settings there is not much to set:

Neither gnome tweak settings reveal anything suspicious:

A red flag that I just noticed, is that Automatic Power Save, is toggled on. You need to turn that off, because anytime you let your machine enter a power saving state, that might turn off hardware components, or reduce power to them rather, that you peripherals need to operate.


Okay, I will try to turn that off, but it will take me a few days to test it out.

USB3 can interfere with 2.4GHz signals.
I was having issues with both keyboard and mouse on two different systems using three different keyboards and mouse.
The dongle was plugged in the back usb 2 ports next to usb 3 ports under the desk. I fixed the issue by using a usb extension cable to minimize the distance between the receiver and the mouse/KB. Problem fixed Instantly.

1 Like

I tried it for several days, it does return back sometimes, just as I thought, so this is not the source of the problem.

This. This must be it.

Since all of my USB ports are in the back + this is an older laptop, I would not be surprised if these would not be as well insulated as they should have been.

Since I am using the laptop only to exercise, it makes no sense for me to invest into any kind of extension (plus its kinda impractical when moving the laptop around) I will survive it somehow till am back home and next time I might use the thunderbolt extension I have at home.

If you hunt around you should be able to find them cheaper. A 3 foot cable should not cause much stress when moving laptop.

1 Like