https://bugs.winehq.org/show_bug.cgi?id=45084
Bug ID: 45084 Summary: 'winehid' service failed to start and slow down wineserver (then all wine app) Product: Wine Version: 3.7 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: hid Assignee: wine-bugs@winehq.org Reporter: andy86@fastwebnet.it Distribution: ArchLinux
All wineprefix, included clean wineprefix, are slow to start due to:
0015:err:service:process_send_command receiving command result timed out 0029:err:plugplay:handle_bus_relations Failed to load driver L"WineHID"
and, investigating with "warn+all", due to:
0029:warn:ntoskrnl:ZwLoadDriver failed to start service L"\Registry\Machine\System\CurrentControlSet\Services\WineHID"
and, if I delete that key, wine start very fast, also after "wineserver -k". (this is definitive proof that slowdown is due of that)
Note bug is present also in wine 3.6
https://bugs.winehq.org/show_bug.cgi?id=45084
--- Comment #1 from andy andy86@fastwebnet.it --- Created attachment 61240 --> https://bugs.winehq.org/attachment.cgi?id=61240 wine default output (without any debug option)
https://bugs.winehq.org/show_bug.cgi?id=45084
--- Comment #2 from andy andy86@fastwebnet.it --- Created attachment 61241 --> https://bugs.winehq.org/attachment.cgi?id=61241 wine output with "WINEDEBUG=+plugplay,+ntoskrnl"
'+ntoskrnl' is for limit log to channel of warn found with "warn+all"
https://bugs.winehq.org/show_bug.cgi?id=45084
--- Comment #3 from andy andy86@fastwebnet.it --- Created attachment 61242 --> https://bugs.winehq.org/attachment.cgi?id=61242 reg export of winehid key (see about in first comment)
https://bugs.winehq.org/show_bug.cgi?id=45084
andy andy86@fastwebnet.it changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #61242|reg export of winehid key |reg export of winehid key description|(see about in first |(see about in description) |comment) |
https://bugs.winehq.org/show_bug.cgi?id=45084
--- Comment #4 from andy andy86@fastwebnet.it --- Comment on attachment 61241 --> https://bugs.winehq.org/attachment.cgi?id=61241 wine output with "WINEDEBUG=+plugplay,+ntoskrnl"
Note that log is made in clean wineprefix running only winecfg.
https://bugs.winehq.org/show_bug.cgi?id=45084
andy andy86@fastwebnet.it changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andy86@fastwebnet.it
https://bugs.winehq.org/show_bug.cgi?id=45084
hash HASH.DuOrden@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |HASH.DuOrden@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45084
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=45084
--- Comment #5 from andy andy86@fastwebnet.it --- Already present in wine 3.9, also hid device do not detect most probably due to this.
I try codeweavers "hid.exe" application for testing HID joysticks and gamepad, and said "no gamepad detected".
https://bugs.winehq.org/show_bug.cgi?id=45084
Andrey andrey.gursky@e-mail.ua changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andrey.gursky@e-mail.ua
https://bugs.winehq.org/show_bug.cgi?id=45084
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #6 from Fabian Maurer dark.shadow4@web.de --- Can you confirm that this issue only appears when a gamepad is connected? For me it's fast when I disconnect my controller.
https://bugs.winehq.org/show_bug.cgi?id=45084
--- Comment #7 from andy andy86@fastwebnet.it --- Not. For me is slow also i disconnect gamepad.
Anyway it's wouldn't a solution, because HID is for use a gamepad with certain game that not support neither dinput nor xinput.
https://bugs.winehq.org/show_bug.cgi?id=45084
Nathan version2013@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |version2013@protonmail.com
--- Comment #8 from Nathan version2013@protonmail.com --- Created attachment 61727 --> https://bugs.winehq.org/attachment.cgi?id=61727 wine slow to start
Wine-3.11 using clean wineprefix, no gamepads connected. winecfg slow to start
https://bugs.winehq.org/show_bug.cgi?id=45084
--- Comment #9 from Nathan version2013@protonmail.com --- Wine-3.0.2
on distro 2 with: # gcc --version gcc (GCC) 4.3.4 # uname -r 3.0.66 # ldd --version ldd (GNU libc) 2.10.1
using clean wineprefix, no gamepads connected. wine slow to start
In addition, wine debugger pops up and app crashes after about 30-40 seconds.
--------------------
on two other distros, using clean wineprefix, no gamepads connected, wine is slow to start, but apps do not crash with wine debugger.
distro 1: # gcc --version gcc (GCC) 4.2.2 # uname -r 2.6.30.5 # ldd --version ldd (GNU libc) 2.6.1
distro 3: # gcc --version gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4 # uname -r 3.14.56 # ldd --version ldd (Ubuntu EGLIBC 2.19-0ubuntu6.6) 2.19
https://bugs.winehq.org/show_bug.cgi?id=45084
--- Comment #10 from Nathan version2013@protonmail.com --- Possible related bugs?: https://bugs.winehq.org/show_bug.cgi?id=44946 https://bugs.winehq.org/show_bug.cgi?id=44923
On my system, there is a roughly 10 second delay when starting any wine command, except for the initial winecfg, and seeing any activity in the terminal.
Wine-3.0.1 - negligible delay Wine-3.0.2 - noticeable delay
bisect: ae347f99a40c35ce526cd689d99bdec8c29a3700 is the first bad commit commit ae347f99a40c35ce526cd689d99bdec8c29a3700 Author: Alistair Leslie-Hughes leslie_alistair@hotmail.com Date: Sat Mar 24 23:37:48 2018 +0000
winedevice: Wait until driver has started before returning.
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org (cherry picked from commit 57268241f745686e86bae41f44214bd05f98c723) Signed-off-by: Michael Stefaniuc mstefani@winehq.org
:040000 040000 2fc5fafd330a992f4e0270b3f0d82c6f81e14e08 9fdbb5724bd69fa4f8fbb978000be2cfb1f200ca M programs
https://bugs.winehq.org/show_bug.cgi?id=45084
Nathan version2013@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair@hotmail.com
https://bugs.winehq.org/show_bug.cgi?id=45084
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Regression SHA1| |ae347f99a40c35ce526cd689d99 | |bdec8c29a3700 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Summary|'winehid' service failed to |winebus blocks startup for |start and slow down |several seconds when HID |wineserver (then all wine |devices are detected via |app) |udev CC| |z.figura12@gmail.com Component|hid |winebus.sys
--- Comment #11 from Zebediah Figura z.figura12@gmail.com --- Confirming and filling some fields.
When winebus encounters a new device, it loads the driver, which potentially means loading winehid. In the driver entry point a thread to do this for udev devices is spun off, and normally this thread executes asynchronously, but at first an initial list of devices is built and the main thread blocks until this occurs (see the "init_done" event in dlls/winebus.sys/bus_udev.c). As far as I understand the driver point is executed under the SCM database lock (programs/services/services.c, scmdatabase_[un]lock[_startup]()). According to Aric Stewart the driver is supposed to be loaded asynchronously, but I can't tell where the asynchronicity is supposed to occur.
https://bugs.winehq.org/show_bug.cgi?id=45084
--- Comment #12 from andy andy86@fastwebnet.it --- Hello. I've encountered problem with sdl gamepad support ([url=https://forum.winehq.org/viewtopic.php?f=2&t=30909%5Ddetails%5B/url]).
Can it be related to this bug? Or this bug related to it?
Example if wineHID service don't start, HID device isn't available for use.
Or if SDL support missing in compilation, wineHID service can't start.
https://bugs.winehq.org/show_bug.cgi?id=45084
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=45084
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|winebus.sys |ntoskrnl
--- Comment #13 from Zebediah Figura z.figura12@gmail.com --- StartService() locks the service database, even for drivers (this can be tested by introducing a delay into the test driver and then attempting to asynchronously start the spooler while that's running).
However, ZwLoadDriver() should execute synchronously, and can be executed from within DriverEntry() without deadlocks.
I don't know what the right way to solve this is.
https://bugs.winehq.org/show_bug.cgi?id=45084
--- Comment #14 from Zebediah Figura z.figura12@gmail.com --- Taking a closer look at the services/winedevice infrastructure, I think I have a better idea of how to go about this. I don't think we have to go through StartService, but calling SetServiceStatus() inside of ZwLoadDriver() should give us what we need.
https://bugs.winehq.org/show_bug.cgi?id=45084
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |z.figura12@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45084
--- Comment #15 from Zebediah Figura z.figura12@gmail.com --- Created attachment 62115 --> https://bugs.winehq.org/attachment.cgi?id=62115 refactor most of winedevice into Zw[Un]loadDriver()
This patch fixes the problem for me. Can anyone else who is experiencing it try it, and make sure it doesn't break anything else?
https://bugs.winehq.org/show_bug.cgi?id=45084
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #62115|0 |1 is obsolete| |
--- Comment #16 from Zebediah Figura z.figura12@gmail.com --- Created attachment 62116 --> https://bugs.winehq.org/attachment.cgi?id=62116 refactor most of winedevice into Zw[Un]loadDriver()
Apologies, botched the upload.
https://bugs.winehq.org/show_bug.cgi?id=45084
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1|ae347f99a40c35ce526cd689d99 |57268241f745686e86bae41f442 |bdec8c29a3700 |14bd05f98c723 Resolution|--- |FIXED Status|NEW |RESOLVED Fixed by SHA1| |c18f8e4c3235d0417bfb9fdba2d | |938bf2e42ee65 Assignee|z.figura12@gmail.com |wine-bugs@winehq.org
--- Comment #17 from Zebediah Figura z.figura12@gmail.com --- Fixed by https://source.winehq.org/git/wine.git/commitdiff/c18f8e4c3235d0417bfb9fdba2....
https://bugs.winehq.org/show_bug.cgi?id=45084
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #18 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.15.