Wine recognizes GeForce GTX 560 as GeForce 8300GS

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Lauri
Level 1
Level 1
Posts: 7
Joined: Tue Oct 25, 2011 9:36 am

Wine recognizes GeForce GTX 560 as GeForce 8300GS

Post by Lauri »

Pretty much all games and steam recognize my graphics card as GeForce 83000GS. I think this causes games to run slowly and even freeze/crash when i try to set graphic details to high. Setting VideoMemorySize from registry to the correct amount doesn't help at all. Also setting VideoPciDeviceID and VideoPciVendorID makes things even worse because then it's detected as Direct3D HAL.

Is there any way to get wine to detect my video card properly or is this a bug in wine?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Wine recognizes GeForce GTX 560 as GeForce 8300GS

Post by vitamin »

Lauri wrote:Wine recognizes GeForce GTX 560 as GeForce 8300GS
What Wine version? Current Wine should detect "NVIDIA GeForce GTX 560 Ti". Unless yours is not Ti.
Lauri
Level 1
Level 1
Posts: 7
Joined: Tue Oct 25, 2011 9:36 am

Re: Wine recognizes GeForce GTX 560 as GeForce 8300GS

Post by Lauri »

vitamin wrote: What Wine version? Current Wine should detect "NVIDIA GeForce GTX 560 Ti". Unless yours is not Ti.
Wine version 1.3.31

Mine isn't Ti, just plain NVIDIA GeForce GTX 560
claudio
Level 2
Level 2
Posts: 13
Joined: Fri Oct 28, 2011 2:57 pm

Re: Wine recognizes GeForce GTX 560 as GeForce 8300GS

Post by claudio »

Lauri wrote:
vitamin wrote: What Wine version? Current Wine should detect "NVIDIA GeForce GTX 560 Ti". Unless yours is not Ti.
Wine version 1.3.31

Mine isn't Ti, just plain NVIDIA GeForce GTX 560
what is your deviceid? There are many missing and wrongly named entries in the wined3d pci device list.

why they don't use
http://developer.nvidia.com/content/device-id-list
is beyond me.

There is in particular a check for a set of directx 10+ cards in the code that on failure defaults to the GeForce 8300GS.

Tweaking that code with a patch might get you some results (or not).

If you want to play with the code yourself I can give you more pointers into the code.
claudio
Level 2
Level 2
Posts: 13
Joined: Fri Oct 28, 2011 2:57 pm

Re: Wine recognizes GeForce GTX 560 as GeForce 8300GS

Post by claudio »

otherwise just give me your deviceid.
You can easily get your deviceid from the nvidia-settings program of the proprietary nvidia driver package.
slopoke
Level 2
Level 2
Posts: 48
Joined: Thu Oct 20, 2011 4:40 pm

Post by slopoke »

I have a similar problem. How would I read/access this "wined3d pci device list"?

This is the first I've heard of such a thing.
claudio
Level 2
Level 2
Posts: 13
Joined: Fri Oct 28, 2011 2:57 pm

Post by claudio »

slopoke wrote:I have a similar problem. How would I read/access this "wined3d pci device list"?

This is the first I've heard of such a thing.
http://source.winehq.org/git/wine.git/b ... /directx.c

http://source.winehq.org/git/wine.git/b ... _private.h
slopoke
Level 2
Level 2
Posts: 48
Joined: Thu Oct 20, 2011 4:40 pm

Post by slopoke »

I looked at the links. My card is in the list. Nvidia 9600 GT, ID 0622.

I have 1.3.30. Distro doesn't have 1.3.31 yet. Does that make a difference?
claudio
Level 2
Level 2
Posts: 13
Joined: Fri Oct 28, 2011 2:57 pm

Post by claudio »

slopoke wrote:I looked at the links. My card is in the list. Nvidia 9600 GT, ID 0622.

I have 1.3.30. Distro doesn't have 1.3.31 yet. Does that make a difference?
there does not seem to be changes for your card (9600GT) between 1.3.30 and 1.3.31 I could see.

If you got your deviceid from the nvidia-settings (and also check the GL renderer string) - I assume you have the nvidia binary driver installed - you can check that the select_card_nvidia_binary function in directx.c chooses the right card.

Since your card is a directx 10 card look at the first "if".
If you look at the end of the if you can see how the 8300GS is chosen as fallback if the GPU is not in the list yet.

Code: Select all

    /* Geforce8-compatible fall back if the GPU is not in the list yet */
    return CARD_NVIDIA_GEFORCE_8300GS;
Just above that you see how the code expects the "GT 140" or "9600" string in the GL renderer string.

Code: Select all

            {"GT 140",      CARD_NVIDIA_GEFORCE_9600GT},    /* Geforce 9 - midend */
            {"9600",        CARD_NVIDIA_GEFORCE_9600GT},    /* Geforce 9 - midend */
claudio
Level 2
Level 2
Posts: 13
Joined: Fri Oct 28, 2011 2:57 pm

Re: Wine recognizes GeForce GTX 560 as GeForce 8300GS

Post by claudio »

Lauri wrote: Wine version 1.3.31
Mine isn't Ti, just plain NVIDIA GeForce GTX 560
Support for the GTX 560 is very recent, and only for one particular model (Ti). It might be possible to add support for your card, if you can get the deviceid and opengl renderer string, as well as video memory size.

Launch the nvidia-settings program to get that information for your particular card, it will be the easiest way.
slopoke
Level 2
Level 2
Posts: 48
Joined: Thu Oct 20, 2011 4:40 pm

Post by slopoke »

I really appreciate what you are doing for the two of us, but all I can do with code is look at it. I don't know what a "opengl renderer string" is or where to find it. I don't understand what you want me/us to do. No offense, but you are way over my head here. That's my fault, not yours.

My card specs are: 9600GT, 1GB of video RAM, Shader 4. Yes, I'm using the Nvidia binary driver, version 280.13. I hope that answers what questions I think you're asking.

Now that Wine has reached this point in dealing with graphic cards, all I want to do is have some relatively useful way to tell Wine what my card is so the info can be passed to whatever game or other app I'm using. Useful being: I can not code. Frankly, it sounds like Lauri might tend in that direction also (sorry if I misunderstand).
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Wine recognizes GeForce GTX 560 as GeForce 8300GS

Post by vitamin »

claudio wrote:Support for the GTX 560 is very recent, and only for one particular model (Ti).
Check your facts. Wine doesn't care what card you have, but what features it provides.

For some stupid games that make decisions based on card manufacturer and model, use registry to override both. See http://wiki.winehq.org/UsefulRegistryKeys for details.
claudio
Level 2
Level 2
Posts: 13
Joined: Fri Oct 28, 2011 2:57 pm

Post by claudio »

slopoke wrote:I really appreciate what you are doing for the two of us, but all I can do with code is look at it. I don't know what a "opengl renderer string" is or where to find it. I don't understand what you want me/us to do. No offense, but you are way over my head here. That's my fault, not yours.

My card specs are: 9600GT, 1GB of video RAM, Shader 4. Yes, I'm using the Nvidia binary driver, version 280.13. I hope that answers what questions I think you're asking.
No prob then..
As I understand it, if I can try to summarize the problem, when initializing wined3d, for each adapter wine collects a lot of information to determine how to use the card internally [...]

This is because there are many subtly different video cards, with different frequency, amount of RAM, shader pipelines, quirks etc.

Something in the specific check that tries to select the correct nvidia adapter goes wrong in your case, and falls back to a kinda "default" for nvidia cards with directx >= 10, the 8300GS.
Quirks and GL capabilities are applied based on that.

After that, if you provide a vendorid/deviceid manually, that information overrides what wine has guessed for (at least) the purpose of reporting the information to the application.
Now that Wine has reached this point in dealing with graphic cards, all I want to do is have some relatively useful way to tell Wine what my card is so the info can be passed to whatever game or other app I'm using. Useful being: I can not code. Frankly, it sounds like Lauri might tend in that direction also (sorry if I misunderstand).
What you want to do makes a lot of sense, but telling wine what card you have is not as straightforward as it might seem.
Changes to the wined3d code are at least currently necessary to support each card variant basically, even just a few lines, until they have built a good collection.

note: I am just a wine user like you.. I often had to hack the wine code to kick the thing into running though.

Lauri's problem seems similar, even though a little bit different: his vendorid/deviceid is probably currently not in the table at all. It might be just a couple lines of codes to add it, but still.

If you want to try to investigate further, you might give me the gl renderer string of your video card, and the real vendorid/deviceid reported by your card, and I could try giving you a patch. But then you would have to learn how to manage the source, apply patches, build from source etc. Otherwise no prob, I understand. Cheers
claudio
Level 2
Level 2
Posts: 13
Joined: Fri Oct 28, 2011 2:57 pm

Re: Wine recognizes GeForce GTX 560 as GeForce 8300GS

Post by claudio »

vitamin wrote:
claudio wrote:Support for the GTX 560 is very recent, and only for one particular model (Ti).
Check your facts. Wine doesn't care what card you have, but what features it provides.

For some stupid games that make decisions based on card manufacturer and model, use registry to override both. See http://wiki.winehq.org/UsefulRegistryKeys for details.
I did check my facts (although I can make mistakes anyway).
The entry for the 560Ti is very recent. It does affect the wine "guess". Your assertion that registry overrides both is true. Only when it happens, stuff has already happened.
The override happens only on init_driver_info, after quirks have been applied, for example.
Check your facts/code?
claudio
Level 2
Level 2
Posts: 13
Joined: Fri Oct 28, 2011 2:57 pm

Re: Wine recognizes GeForce GTX 560 as GeForce 8300GS

Post by claudio »

btw vitamin is a wine developer, so I am sure he can help better than I can.

Still, vitamin, besides the override-after-quirks-applied,
(NB: I noticed that some quirks look at vendorid/deviceid)
the topic as the OP titled it is about recognizing the card correctly in wine.
So if the guess function returns a wrong guessed result, it still needs fixing. no?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Wine recognizes GeForce GTX 560 as GeForce 8300GS

Post by vitamin »

claudio wrote: Your assertion that registry overrides both is true. Only when it happens, stuff has already happened.
I repeat myself, Wine does not care what card you have. It does not use detected vendor or model.

The only thing Wine "uses" out of that table is VRAM size to track it's use and report to application. In reality Wine doesn't need this either, only to tell game when it "ran out of vram". Which is an oxymoron for OpenGL, which has no concepts of size of VRAM.

So all 3 things can be overrided via registry, only necessary for game and won't affect Wine.
Lauri
Level 1
Level 1
Posts: 7
Joined: Tue Oct 25, 2011 9:36 am

Post by Lauri »

PCI Device ID: 0x1201
PCI Vendor ID: 0x10de
Memory: 1024 MB
OpenGL renderer string: GeForce GTX 560/PCI/SSE2
claudio
Level 2
Level 2
Posts: 13
Joined: Fri Oct 28, 2011 2:57 pm

Post by claudio »

Lauri wrote:PCI Device ID: 0x1201
PCI Vendor ID: 0x10de
Memory: 1024 MB
OpenGL renderer string: GeForce GTX 560/PCI/SSE2
to vitamin I suggest this patch:

wined3d: rename nVidia GTX560 to GTX560TI, add GTX560 with correct deviceid

http://www.niceties.it/0001-wined3d-ren ... 560-.patch

to Lauri: the easiest thing you can do while this gets integrated is to provide manual overrides for your vendorid/deviceid/memory using the link vitamin cited before (useful registry keys).
Open the registry with the "regedit" command.
Go to HKEY_CURRENT_USER/Software/Wine
Create the Direct3D key if not present.
Create the VideoMemorySize string value, set it to "1024".
Create the VideoPciDeviceID DWORD value, set it to hex 1201.
Create the VideoPciVendorID DWORD value, set it to hex 10de.
Lauri
Level 1
Level 1
Posts: 7
Joined: Tue Oct 25, 2011 9:36 am

Post by Lauri »

claudio wrote:
Lauri wrote:PCI Device ID: 0x1201
PCI Vendor ID: 0x10de
Memory: 1024 MB
OpenGL renderer string: GeForce GTX 560/PCI/SSE2
to vitamin I suggest this patch:

wined3d: rename nVidia GTX560 to GTX560TI, add GTX560 with correct deviceid

http://www.niceties.it/0001-wined3d-ren ... 560-.patch

to Lauri: the easiest thing you can do while this gets integrated is to provide manual overrides for your vendorid/deviceid/memory using the link vitamin cited before (useful registry keys).

Open the registry with the "regedit" command.
Go to HKEY_CURRENT_USER/Software/Wine
Create the Direct3D key if not present.
Create the VideoMemorySize string value, set it to "1024".
Create the VideoPciDeviceID DWORD value, set it to hex 1201.
Create the VideoPciVendorID DWORD value, set it to hex 10de.
Like I said in my first post setting VideoPciDeviceID to 1201 doesn't help because then the video card is detected as Direct3D HAL. But I downloaded wine 1.3.31 source and added the info for GTX560 to directx.c and wined3d_private.h and compiled it. Now the video card gets detected properly. Oh well, if I had just waited for a bit I could have used your patch.

Thanks for the help.
claudio
Level 2
Level 2
Posts: 13
Joined: Fri Oct 28, 2011 2:57 pm

Post by claudio »

Lauri wrote: Like I said in my first post setting VideoPciDeviceID to 1201 doesn't help because then the video card is detected as Direct3D HAL. But I downloaded wine 1.3.31 source and added the info for GTX560 to directx.c and wined3d_private.h and compiled it. Now the video card gets detected properly. Oh well, if I had just waited for a bit I could have used your patch.

Thanks for the help.
Happy it worked! The registry override should have worked, but evidently something else does go wrong in wine.
As I suggested earlier, I think there might be a problem with the order things happen, as some of the quirks are applied based on the guessed deviceid/vendorid, before the values are overridden by the registry entries.
slopoke
Level 2
Level 2
Posts: 48
Joined: Thu Oct 20, 2011 4:40 pm

Post by slopoke »

Congratulations, Lauri. Glad it worked out for you.

I, however, still have a question. claudio asked us to find the renderer string. Based on what Lauri posted and the dialog between claudio and vitamin, I found everything we were asked to find. In my regedit memory, vendor id, and device id are already there and correct. I don't see anywhere to put the render string. The "UsefulRegistryKeys" entry shows the following. I only have the last three. Should I add any or all of the rest?

+-Direct3D
| |
| +->AlwaysOffscreen
| | [Use offscreen rendering for all render targets. The main effect this has is
| | avoiding the depth buffer copy between offscreen and onscreen targets, which
| | introduces fallbacks in some drivers and exposes bugs in others. There may be a
| | performance hit depending on the specific driver. Set to "enabled" to enable.]
| |
| +->DirectDrawRenderer
| | [Select what backend to use for ddraw. Valid options are:
| | gdi - Use GDI to draw on the screen
| | opengl - Use OpenGL (default)
| | The "gdi" option mostly exists for legacy reasons. Aside from bugs in the GL
| | renderer, only change this if you have a setup without OpenGL. Installing a software
| | GL implementation is the preferred solution in that case though.]
| |
| +->Multisampling
| | [Set to "disabled" to prevent applications from seeing Wine's multisampling support.
| | This is another legacy option that will most likely disappear at some point. There
| | should be no reason to set this.]
| |
| +->OffscreenRenderingMode
| | [Select the offscreen rendering implementation.
| | backbuffer - Render offscreen render targets in the backbuffer
| | fbo - Use framebuffer objects for offscreen rendering (default)]
| |
| +->RenderTargetLockMode
| | [Selects which mode is used for mapping onscreen render targets.
| | disabled - Effectively disables render target locking
| | readdraw - Uses glReadPixels for reading, glDrawPixels for writing
| | readtex - Reading with glReadPixels, writing by drawing a textured quad (default)]
| |
| +->StrictDrawOrdering
| | [This option ensures any pending drawing operations are submitted to the driver, but at
| | a significant performance cost. Set to "enabled" to enable.]
| |
| +->UseGLSL
| | [When set to "disabled", this disables the use of GLSL for shaders.
| | In general disabling GLSL is not recommended, only use this for debugging purposes.]
| |
| +->VideoMemorySize
| | [Sets the amount of reported video memory (in megabytes). The default is a simple
| | auto-detection based on the card type guessed from OpenGL capabilities.]
| |
| +->VideoPciDeviceID
| | [DWORD Value (REG_DWORD): sets the pci device id of the video card. See next value.]
| |
| +->VideoPciVendorID
| [DWORD Value (REG_DWORD): sets the pci vendor id of the video card. By default Wine estimates
| these values based on OpenGL info but this doesn't work well in all cases. If you want to
| override our estimates check the output of e.g. lspci -n on Linux. For a video card this
| could show 05:00.0 0300: 10de:0402 (rev a1). In this result 0x10de (Nvidia) is the pci vendor
| id and '0x0402' (Geforce 8600GT) is the pci device id. The '0x0300' means video card.]



There is also an "OpenGL" key with the following entries. [Sorry about the dots, neither multiple spaces or tab works]

Name................................Type..............Data
(Default)..........................REG_SZ.......(value not set)
DisabledExtensions......REG_SZ.......GL_ARB_vertex_buffer_object

Is the first entry where the renderer string goes?
claudio
Level 2
Level 2
Posts: 13
Joined: Fri Oct 28, 2011 2:57 pm

Post by claudio »

slopoke wrote:Congratulations, Lauri. Glad it worked out for you.

I, however, still have a question. claudio asked us to find the renderer string.
Yes, because the opengl renderer string is checked in the wine "guess" function to map to a certain deviceid.
In your case, since the deviceid and vendorid are already present and correct, I suspected something might not work right in the opengl renderer string check. Just a guess.

There is no need to pass the opengl renderer string to wine, it is something it can do alone very easily by calling a GL library function.

The wine code as it is now maps strings containing "GT 140" or "9600" to the GEFORCE 9600GT. What is your real opengl renderer string?

If you open a terminal you can type something like "glxinfo | grep -i render"
slopoke
Level 2
Level 2
Posts: 48
Joined: Thu Oct 20, 2011 4:40 pm

Post by slopoke »

This matches what the Nvidia settings GUI has.

GeForce 9600 GT/PCI/SSE2

Although this is an exercise in learning, what is behind it is that I still can't turn my video settings in WOW any higher than "Fair".
tparker
Level 5
Level 5
Posts: 354
Joined: Tue Feb 24, 2009 3:06 pm

Wine recognizes GeForce GTX 560 as GeForce 8300GS

Post by tparker »

On 10/30/2011 06:11 PM, slopoke wrote:
This matches what the Nvidia settings GUI has.

GeForce 9600 GT/PCI/SSE2

Although this is an exercise in learning, what is behind it is that I still can't turn my video settings in WOW any higher than "Fair".
For most settings in WoW you will not be able to turn the graphics
higher, or much higher, than fair even if your card is detected
correctly. At this time Wine only handles the graphics allowed by Direct
X 9, anything in the game that uses over that (DX 10 and/or 11) won't be
available until Wine development catches up to those.
slopoke
Level 2
Level 2
Posts: 48
Joined: Thu Oct 20, 2011 4:40 pm

Post by slopoke »

OK, well that piece of info, along with everything else we've done in this thread, has been very worthwhile. I hope MS hasn't made DX 10/11 to hard to "catch up to". Hope for the best, I guess.

Thank you all for all the help and info.
Locked