WineHQ
Bug Tracking Database – Bug 34630

 Bugzilla

 

Last modified: 2014-02-08 01:03:26 UTC  

Some games don't detect the correct number of display drivers (graphic cards) and their names

Bug 34630 - Some games don't detect the correct number of display drivers (graphic cards) and their names
Some games don't detect the correct number of display drivers (graphic cards)...
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: d3d
1.7.3
x86 Linux
: P2 minor
: ---
Assigned To: Erich E. Hoover
https://archive.org/download/DrakanOr...
: download, regression
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-09-30 06:32 UTC by WineBuG
Modified: 2014-02-08 01:03 UTC (History)
3 users (show)

See Also:
Regression SHA1: b0cefe897c6dbd846b0525e3f3aab59cae75eb6d
Fixed by SHA1: eba5132bfa351b52fdec513a532450497306b09e
Distribution: ---
Staged patchset:


Attachments
Drakan Demo Log (440 bytes, text/plain)
2013-09-30 06:32 UTC, WineBuG
Details
ddraw: Make DirectDrawEnumerateEx only enumerate secondary display devices when requested. (4.35 KB, patch)
2013-12-08 19:12 UTC, Erich E. Hoover
Details | Diff
+ddraw log (without patch) (16.10 KB, text/plain)
2013-12-11 19:47 UTC, Béla Gyebrószki
Details
+ddraw log (patch applied) (16.11 KB, text/plain)
2013-12-11 19:51 UTC, Béla Gyebrószki
Details
ddraw: Return the appropriate identifier for GetDeviceIdentifier. (2.77 KB, patch)
2014-02-08 01:03 UTC, Erich E. Hoover
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description WineBuG 2013-09-30 06:32:18 UTC
Created attachment 46148 [details]
Drakan Demo Log

In a preferences window that shows up when you launch the game there are two display drivers (instead of one), and they're named DirectDraw HAL, and not the same as your graphics card (which is the case on Windows). Only one of them supports Windowed Mode.
Comment 1 WineBuG 2013-09-30 06:33:25 UTC
Tested with:
Windows Vista (without Wine), GeForce 9600M GS--the program works fine here
Ubuntu 13.04, GeForce 9600M GS (NVIDIA driver 313)
Mac OS X 10.7.5, ATI HD 2600 Pro, Mac Driver/X11
Comment 2 WineBuG 2013-10-05 13:49:04 UTC
It seems that this bug affects not only this game. I get a different number of display drivers for example in Evil Islands, Star Wars Racer, or Soul Reaver (here there are 6 display drivers instead of 4 on Windows Vista).

I'm changing the name of this report to something more appropriate.

I wonder whether the fact that some games, for instance Serious Sam HD and SWKOTOR (bug 22268), report that your graphic drivers are outdated is connected with this issue.
Comment 3 WineBuG 2013-10-19 16:46:48 UTC
Because many older applications are affected by this bug, and it possibly might cause other problems than just the wrong number of display drivers and strange naming of these, I'm changing importance to 'minor'.
Comment 4 Béla Gyebrószki 2013-11-29 00:31:31 UTC
I can reproduce the problem in Drakan demo and in other games as well.
The problem is present since

b0cefe897c6dbd846b0525e3f3aab59cae75eb6d is the first bad commit
commit b0cefe897c6dbd846b0525e3f3aab59cae75eb6d
Author: Erich Hoover <ehoover@mines.edu>
Date:   Mon Sep 17 14:18:39 2012 -0600

    ddraw: Enumerate wined3d interfaces with DirectDrawEnumerateEx.

:040000 040000 a13b9ad2954682911591a3bb020c32dd69d6cb9e 3a7e575a6c27386a3d93bf318ce5953aca1f1f65 M	dlls

wine-1.7.7-86-g6d0d018
Fedora 19
X.Org X Server 1.14.4
Nvidia gfx card / binary drivers 325.15
Comment 5 Erich E. Hoover 2013-11-29 11:22:43 UTC
(In reply to comment #4)
> I can reproduce the problem in Drakan demo and in other games as well.
> The problem is present since
> ...
>     ddraw: Enumerate wined3d interfaces with DirectDrawEnumerateEx.
> ...

Thanks GyB for making me aware of this issue, I'll try to take a look this weekend and see what I can find out.
Comment 6 Erich E. Hoover 2013-11-29 11:30:02 UTC
It would be helpful to me if I could get a couple of lists from people:
1) What Windows returns
2) What Wine currently returns

I suspect that the problem may just be that we're returning "DirectDraw HAL" for everything.
Comment 7 Erich E. Hoover 2013-12-08 19:12:10 UTC
Created attachment 46808 [details]
ddraw: Make DirectDrawEnumerateEx only enumerate secondary display devices when requested.

I've finally had some time to look into this a bit.  Please try the attached patch, it should correct the problem :)
Comment 8 Béla Gyebrószki 2013-12-11 11:00:11 UTC
(In reply to comment #7)
> Created attachment 46808 [details]
> ddraw: Make DirectDrawEnumerateEx only enumerate secondary display devices
> when requested.
> 
> I've finally had some time to look into this a bit.  Please try the attached
> patch, it should correct the problem :)

The patch indeed fixes the issue in Drakan2 demo, but other games still show multiple instances of the display driver in their configuration tool (e.g. Simon the Sorcerer 3D).
Comment 9 Erich E. Hoover 2013-12-11 14:00:52 UTC
(In reply to comment #8)
> ...
> 
> The patch indeed fixes the issue in Drakan2 demo, but other games still show
> multiple instances of the display driver in their configuration tool (e.g.
> Simon the Sorcerer 3D).

Could you send me a WINEDEBUG="+ddraw" trace from one of these applications?
Comment 10 Béla Gyebrószki 2013-12-11 19:47:35 UTC
Created attachment 46831 [details]
+ddraw log (without patch)

This is the +ddraw log when running Simon the Sorcerer 3D without your patch.
Comment 11 Béla Gyebrószki 2013-12-11 19:51:26 UTC
Created attachment 46832 [details]
+ddraw log (patch applied)

This is the +ddraw log with your patch applied. 
There are 2 instances of <Directdraw HAL> display driver in the game setup screen, whether your patch applied or not.
I tried the game in Virtualbox, and there's only one <Primary display driver> option is present there.
Comment 12 Erich E. Hoover 2013-12-13 15:27:24 UTC
(In reply to comment #11)
> Created attachment 46832 [details]
> +ddraw log (patch applied)
> 
> This is the +ddraw log with your patch applied. 
> There are 2 instances of <Directdraw HAL> display driver in the game setup
> screen, whether your patch applied or not.
> I tried the game in Virtualbox, and there's only one <Primary display
> driver> option is present there.

What that probably means is that the VirtualBox driver does not support 3D graphics features (so only one driver should be displayed).  What we should display is:
1) DirectDraw HAL (equivalent to "Primary display driver")
2) <3D drivers> (currently reports "DirectDraw HAL")

I can easily add a fix that reports roughly the correct driver string, but to my knowledge there's not currently a way in Wine to detect whether a graphics card supports 3D graphics features.  Would it be sufficient for your application to report two display drivers ("DirectDraw HAL" and whatever is appropriate for the graphics card)?  If the application requests DDENUM_ATTACHEDSECONDARYDEVICES (which this one does) then, to my knowledge, it _should_ report more than one driver on any system that supports 3D.
Comment 13 Erich E. Hoover 2014-01-09 13:24:56 UTC
This should now be fixed by commit 639f9335c2405832b9962a4bc5b95b053bf596a9 and eba5132bfa351b52fdec513a532450497306b09e.  Please note that:
1) Wine uses "DirectDraw HAL" instead of "Primary display driver" for compatibility with QuickTime
2) Wine should always display at least one secondary device (now named appropriately), but this should not interfere with any normal application behavior*

* Windows does not always show a secondary device, but this seems to only occur when the display driver does not support accelerated 3D rendering.
Comment 14 Henri Verbeet 2014-02-04 04:42:37 UTC
Resolving FIXED.
Comment 15 WineBuG 2014-02-07 09:43:30 UTC
In Drakan I now get one display driver instead of two. But it is still named DirectDraw HAL, and on Windows I get the name of my GPU here.

Are SURE it is fixed? Maybe it should be like that, I don't know.
Comment 16 Alexandre Julliard 2014-02-07 13:06:22 UTC
Closing bugs fixed in 1.7.12.
Comment 17 Erich E. Hoover 2014-02-08 01:03:26 UTC
Created attachment 47464 [details]
ddraw: Return the appropriate identifier for GetDeviceIdentifier.

(In reply to comment #15)
> ...
> Are SURE it is fixed? Maybe it should be like that, I don't know.

Hi WineBuG, it looks like that application uses DirectDrawEnumerateA instead of DirectDrawEnumerateExA.  I just ran some tests and this is what I see:

**DirectDrawEnumerateA**
1) Primary Display Driver
**DirectDrawEnumerateExA**
1) Primary Display Driver
2) Intel(R) HD Graphics

This matches Wine (except that we report "DirectDraw HAL" instead of "Primary Display Driver" for compatibility reasons).  So, this is bug is pretty much fixed.  However, downloading your application and giving it a try appears to display:
Primary Display Driver (Intel(R) HD Graphics)
where Wine reports:
DirectDraw HAL (DirectDraw HAL)

Investigating this shows that the problem is in GetDeviceIdentifier when it is _not_ passed the DDGDI_GETHOSTIDENTIFIER flag.  I've attached a patch that corrects this information, if you could please give that a try (and open a new bug to report the results) then I would really appreciate it.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers