Skip to content

Commit 168c28d

Browse files
committed
Wait for device to initialize before addDevice
For some reason, hidpp20 device names were badly set (e.g. 'Wireless Mouse MWireless' instead of 'Wireless Mouse MX Master'). Adding a 100ms delay to addDevice seems to have fixed it.
1 parent 9607c32 commit 168c28d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/logid/backend/raw/DeviceMonitor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ void DeviceMonitor::run()
101101

102102
if (action == "add")
103103
task::spawn([this, name=devnode]() {
104+
// Wait for device to initialise
105+
std::this_thread::sleep_for(std::chrono::milliseconds(100));
104106
auto supported_reports = backend::hidpp::getSupportedReports(
105107
RawDevice::getReportDescriptor(name));
106108
if(supported_reports)

0 commit comments

Comments
 (0)