You are not logged in.

#1 2024-05-27 11:23:24

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

[SOLVED] QT Core bug: Logitech mouse random disconnects

Hi All,

Ever since the last full system upgrade (which I performed around 18th of May) I keep getting random disconnects from my Logitech MX Anywhere 2s mouse (connected via its own receiver, not Bluetooth). Every time that happens, I get in the system log the following two lines, then, after a 2 seconds glitch, the mouse reconnects:

May 27 14:11:39 amd org_kde_powerdevil[1269]: qt.core.qobject.connect: QObject::disconnect: Unexpected nullptr parameter
May 27 14:11:39 amd org_kde_powerdevil[1269]: qt.core.qobject.connect: QObject::disconnect: Unexpected nullptr parameter

A grep in journalctl's output for "Unexpected nullptr parameter" also yields a couple of appearances of the same error coming from konsole.

My question here is if & how can I further drill down for relevant details so I can open a bug report to the QT guys (I guess).

Thanks in advance.

Last edited by mdcclxv (2024-05-27 18:57:28)

Offline

#2 2024-05-27 12:40:29

FishBoneEK
Member
Registered: 2023-09-26
Posts: 60

Re: [SOLVED] QT Core bug: Logitech mouse random disconnects

I don't think it's a QT bug, perhaps the disconnection triggered a bug in KDE or QT library, thus showing the error message, but it's not the reason that caused the disconnection. 
Perhaps you can try

killall org_kde_powerdevil

to rule out the possibility that it's powerdevil that disconnected your mouse.

Other than these, I have no idea...or try record the time when your mouse disconnects, and look up the error messages in `sudo journalctl -b 0` and `sudo dmesg -H`?

Offline

#3 2024-05-27 12:48:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,979

Re: [SOLVED] QT Core bug: Logitech mouse random disconnects

"Qt" - and no, it's not a Qt bug for sure.
QObject::disconnect is part of Qt's signal and slot system (callback functions) and there's apparently a bug in powerdevil but that's not disconnecting your input device.

You're looking for some powersaving thing, maybe https://wiki.archlinux.org/title/Power_ … utosuspend ("usbcore.autosuspend=-1" will disable it but nb. that userspace tools like TLP can and will override that at runtime and you've to configure it there!)
Other than that: does the mouse disconnect mid-movement or is only slow to respond after you ignored it for a while?
In that case, does clicking any of the buttons make it re-connect faster?

Offline

#4 2024-05-27 14:33:28

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOLVED] QT Core bug: Logitech mouse random disconnects

FishBoneEK wrote:

I don't think it's a QT bug, perhaps the disconnection triggered a bug in KDE or QT library, thus showing the error message, but it's not the reason that caused the disconnection. 
Perhaps you can try

killall org_kde_powerdevil

to rule out the possibility that it's powerdevil that disconnected your mouse.

Other than these, I have no idea...or try record the time when your mouse disconnects, and look up the error messages in `sudo journalctl -b 0` and `sudo dmesg -H`?

Not sure why boot stuff has any relevance, because my issue is happening during system usage, long after the boot is finished.

Offline

#5 2024-05-27 14:55:15

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOLVED] QT Core bug: Logitech mouse random disconnects

seth wrote:

"Qt" - and no, it's not a Qt bug for sure.
QObject::disconnect is part of Qt's signal and slot system (callback functions) and there's apparently a bug in powerdevil but that's not disconnecting your input device.

You're looking for some powersaving thing, maybe https://wiki.archlinux.org/title/Power_ … utosuspend ("usbcore.autosuspend=-1" will disable it but nb. that userspace tools like TLP can and will override that at runtime and you've to configure it there!)

I've added the following rule in /etc/udev/rules.d/, but I'm getting an "Invalid key/value pair, ignoring" error. Is there any reference of valid udev keys for each subsystem?

ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto", ATTR{power/autosuspend}=-1
seth wrote:

Other than that: does the mouse disconnect mid-movement or is only slow to respond after you ignored it for a while?
In that case, does clicking any of the buttons make it re-connect faster?

Now that you've asked me this, I find that the mouse stays disconnected for as long as I don't touch it and reconnects in a split second when I move it.

Last edited by mdcclxv (2024-05-27 14:56:09)

Offline

#6 2024-05-27 15:29:16

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,979

Re: [SOLVED] QT Core bug: Logitech mouse random disconnects

That's most likely the mouse's powersaving.
The rule there is wrong.

ATTR{power/control}="auto"

does the straight opposite of what you'd want and "usbcore.autosuspend=-1" is a https://wiki.archlinux.org/title/Kernel_parameters

Offline

#7 2024-05-27 15:58:03

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOLVED] QT Core bug: Logitech mouse random disconnects

seth wrote:

That's most likely the mouse's powersaving.
The rule there is wrong.

ATTR{power/control}="auto"

does the straight opposite of what you'd want and "usbcore.autosuspend=-1" is a https://wiki.archlinux.org/title/Kernel_parameters

I got that usbcore.autosuspend is a kernel parameter, but I don't have a boot-loader so I would have to mess with EFI boot entries. I figured I would first try a udev rule, since the "power/autosuspend" attribute is documented in udev wiki.

I tried the following rule (using Logitech's receiver usb vendor&device IDs), still the same error of "Invalid key/value pair". Looks to me like the "Power Management" wiki is outdated on the "power/autosuspend" attribute part.

ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c52b", ATTR{power/autosuspend}=-1

I will add the usbcore.autosuspend kernel param and come back with the result.

Offline

#8 2024-05-27 16:09:52

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,979

Re: [SOLVED] QT Core bug: Logitech mouse random disconnects

ATTR{power/control}="on"

Idk whether the "-1" works here as "invalid" delay to disable it but you'd have to quote it.

Offline

#9 2024-05-27 18:57:11

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOLVED] QT Core bug: Logitech mouse random disconnects

My bad, I totally missed the quoting mistake sad

So far it looks like the rule bellow does the trick:

ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c52b", ATTR{power/autosuspend}="-1"

So the wiki is up-to-date smile

Ok, so there's a workaround for me to use the mouse, but the "QObject::disconnect: Unexpected nullptr parameter" issue still remains. I will mark this topic as solved and open a bug on powerdevil project.

Thanks again(!) for your help smile

Offline

#10 2024-06-09 01:33:43

leeli
Member
Registered: 2023-05-31
Posts: 1

Re: [SOLVED] QT Core bug: Logitech mouse random disconnects

archlinux org_kde_powerdevil[1672]: qt.core.qobject.connect: QObject::disconnect: Unexpected nullptr parameter

I have the same problem and I couldn't use my bluetooth connected keyboard. After disable the autosuspend in the configuration file /etc/tlp.conf by set

# Set to 0 to disable, 1 to enable USB autosuspend feature.                                   
# Default: 1                                                                                  
                                                                                              
USB_AUTOSUSPEND=0 

I can use my keyboard now, while the errors continue emerge in the log.

Offline

Board footer

Powered by FluxBB