http://bugs.winehq.org/show_bug.cgi?id=30184
Bug #: 30184 Summary: Take advantage of xrandr 1.3 features Product: Wine Version: 1.4-rc6 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: winex11.drv AssignedTo: wine-bugs@winehq.org ReportedBy: adys.wh@gmail.com Classification: Unclassified
See bug 30154
""" (In reply to comment #18)
Wine is a user level application, it's by definition a kernel/vidoe driver bug if doing a simple video modes query (just once at start up!) makes X block for several seconds.
I don't think anyone denied there was a driver/hardware bug involved as well. But that doesn't change the fact that the way XRandR is currently used in Wine causes completely unnecessary EDID polls.
This doesn't happen just once on startup either. As the linked source shows, calling XRRGetScreenInfo() causes a poll. X11DRV_XRandR_GetCurrentMode() calls XRRGetScreenInfo(). This is what is used to implement the ENUM_CURRENT_SETTINGS part of the EnumDisplaySettings*() calls, and it's certainly not unheard of for applications to call those.
You can certainly argue that this bug isn't a very high priority for Wine, and that it's more important to get the driver fixed so that polls aren't so expensive. You can't argue that Wine doesn't cause these polls.
Wine doesn't do anything of the listed below things as the reporter claims:
- wine is requesting the information again and again
Calls to EnumDisplaySettings*() with ENUM_CURRENT_SETTINGS do this.
- and is forcing xrandr to do a reprobe instead of just getting the current
information.
Just about any XRandR 1.2 query will do this. The way to fix it is to use XRandR 1.3 RRGetScreenResourcesCurrent for querying, and e.g. RRScreenChangeNotify events to get notified of configuration changes. This is practically needed for proper multi-head support anyway, and listening for the appropriate events will also fix the issue where applications are unaware of mode changes by other applications. """
http://bugs.winehq.org/show_bug.cgi?id=30184
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement
http://bugs.winehq.org/show_bug.cgi?id=30184
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE
--- Comment #1 from Jerome Leclanche adys.wh@gmail.com 2012-03-16 21:08:48 CDT --- dup
*** This bug has been marked as a duplicate of bug 30154 ***
http://bugs.winehq.org/show_bug.cgi?id=30184
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Jerome Leclanche adys.wh@gmail.com 2012-03-16 21:08:54 CDT --- closing
http://bugs.winehq.org/show_bug.cgi?id=30184
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED Resolution|DUPLICATE |
--- Comment #3 from Jerome Leclanche adys.wh@gmail.com 2012-03-26 08:00:25 CDT --- Reopening
http://bugs.winehq.org/show_bug.cgi?id=30184
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mikopp@gmail.com
--- Comment #4 from Jerome Leclanche adys.wh@gmail.com 2012-03-26 08:00:32 CDT --- *** Bug 30154 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=30184
Knightlain pastorrub@msn.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pastorrub@msn.com
http://bugs.winehq.org/show_bug.cgi?id=30184
Ralf Jung ralfjung-e@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ralfjung-e@gmx.de
--- Comment #5 from Ralf Jung ralfjung-e@gmx.de 2012-06-30 05:09:02 CDT --- *** Bug 31014 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=30184
--- Comment #6 from Ralf Jung ralfjung-e@gmx.de 2012-06-30 05:11:02 CDT --- The recent change to always ask the swapchain about the current mode instead of some old work-around for swapchain 0 (commit 70008999486651b62bef641196a31f6c7002d0e5) made this more pressing as EnumDisplaySettingsExW is now more often called then earlier (also see http://bugs.winehq.org/show_bug.cgi?id=31014)
http://bugs.winehq.org/show_bug.cgi?id=30184
Anton Romanov theli.ua@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |theli.ua@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=30184
--- Comment #7 from Ralf Jung ralfjung-e@gmx.de 2012-07-05 12:10:05 CDT --- Created attachment 40871 --> http://bugs.winehq.org/attachment.cgi?id=40871 A patch implementing xrandr 1.3 (by Henri Verbeet)
I updated the patch from bug 30986 to apply cleanly to wine 1.5.8. I also changed it so that when *setting* a mode, the current mode information is polled to make sure we don't do that with outdated information. When just *getting* the current mode, the cached value is used.
Is something blocking this patch from getting into wine, or can we hope for a fix soon?
http://bugs.winehq.org/show_bug.cgi?id=30184
James Eder jimportal@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jimportal@gmail.com
--- Comment #8 from James Eder jimportal@gmail.com 2012-07-05 13:15:17 CDT --- (In reply to comment #7)
Is something blocking this patch from getting into wine, or can we hope for a fix soon?
I think the big question is whether xrandr 1.3 supported well enough for this kind of change or should there be some kind of fallback mechanism to use the older protocol?
I suspect (wild guessing really) most systems have a recent enough version of the xrandr library and Wine will be able to load the library fine. However, some drivers (NVIDIA BLOB) only recently started advertising support for >= 1.3 in their release notes. So I guess my question boils down to is if 1.3 xrandr libraries gracefully handle the case where they're matched up with older, less capable, drivers.
We could just do it, call it an upstream problem, and be done with it but it would be nice to cover all the bases if we can. Please forgive my ignorance if this really is a non issue.
I suspect at a minimum there should be a configure check for >= 1.3 headers.
http://bugs.winehq.org/show_bug.cgi?id=30184
--- Comment #9 from Ralf Jung ralfjung-e@gmx.de 2012-07-05 13:31:47 CDT --- (In reply to comment #8)
I suspect (wild guessing really) most systems have a recent enough version of the xrandr library and Wine will be able to load the library fine. However, some drivers (NVIDIA BLOB) only recently started advertising support for >= 1.3 in their release notes. So I guess my question boils down to is if 1.3 xrandr libraries gracefully handle the case where they're matched up with older, less capable, drivers.
Actually, as far as I am informed, previous proprietary NVidia drivers do not have any xrandr support at all. At least xrandr entirely ceased to work on my machine with an NVidia card.
http://bugs.winehq.org/show_bug.cgi?id=30184
--- Comment #10 from Henri Verbeet hverbeet@gmail.com 2012-07-05 13:32:24 CDT --- That patch was mostly just a proof of concept.
http://bugs.winehq.org/show_bug.cgi?id=30184
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |2b4a7912ec00e1c69e98ccb1d2e | |810d8df572027 Status|REOPENED |RESOLVED Resolution| |FIXED
--- Comment #11 from Austin English austinenglish@gmail.com 2012-07-16 14:25:23 CDT --- Initial 1.3 support is in: http://source.winehq.org/git/wine.git/commitdiff/2b4a7912ec00e1c69e98ccb1d2e...
http://bugs.winehq.org/show_bug.cgi?id=30184
--- Comment #12 from Ralf Jung ralfjung-e@gmx.de 2012-07-17 11:34:54 CDT --- I can confirm that this fixes the Audiosurf regression. Thanks a lot :)
http://bugs.winehq.org/show_bug.cgi?id=30184
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org 2012-07-17 13:52:34 CDT --- Closing bugs fixed in 1.5.9.