Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 10-18-11, 07:34 PM   #1
lexa2
Registered User
 
Join Date: Jul 2011
Location: Moscow, Russian Federation
Posts: 58
Send a message via ICQ to lexa2 Send a message via Skype™ to lexa2
Exclamation Regression in "KB:The Legend" when run under Wine with drivers v.285.05.09

Just had run into regression that occurs in "King's Bounty: The Legeng" game when run under Wine (tested with versions 1.3.29, 1.3.30 and today's wine-git) with nVIDIA Linux 32bit drivers v.285.05.09 installed. Downgrading drivers version to 280.13 fixes the problem.

Problem manifests itself as "main game character and NPCs being not rendered correctly". Most likely it is some kind of depth-buffer issue as "not rendered correctly" in this case means "huge parts of the model mesh are simply not being visible". Pretty much that's it.

I had also spotter another regression in 285.05.09 drivers that happens under certain circumstances under Wine 1.3.29+ in Half-Life 2: Episode One (most possible there are places where it might be spotted in HL2, HL2:EP2 and other source-based games but I hadn't tested them so can't prove it). This regression manifests itself as incorrectly rendered "screens" when Wine's OffscreenRenderMode setting is set to "backbuffer". The "screens" I talk about are ones that had been causing huge performance drop in Wine prior to 1.3.29 (bug #13313 that was fixed in 1.3.29). I can provide additional details and savegame from affected place if requested. Downgrading drivers to 280.13 fixes this bug too.

P.S. I'm not totally sure who should be blamed for this bugs - nVIDIA or Wine devteam - but I assume that if the bug get's fixed by just downgrading driver version and not touching anything in Wine it is a good sign that the regression is in the drivers.
lexa2 is offline   Reply With Quote
Old 10-18-11, 08:01 PM   #2
Dizzle7677
Registered User
 
Dizzle7677's Avatar
 
Join Date: May 2008
Location: Relativity
Posts: 194
Default Re: Regression in "KB:The Legend" when run under Wine with drivers v.285.05.09

Quote:
Originally Posted by lexa2 View Post
OffscreenRenderMode setting is set to "backbuffer"
Direct3D/OffscreenRenderMode is set to 'fbo' {Frame Buffer Object} by default for a reason.

Also there's the new Direct3D key in w.i.n.e v1.3.30 called 'AlwaysOffscreen' which helps some games with graphical errors { mainly Dues Ex:HR } because as it states 'the main effect that it 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.'

http://wiki.winehq.org/UsefulRegistryKeys
__________________
Elephants can fly but they have no reason to.
------------------------------------------
Phenom II X3 720 @ 3.5Ghz | Asus M4A785-M | 2 Gig Crucial DDR2 @ 960 Mhz | GeForce GT 440 1024 MB | Linux 3.6.1 / Ubuntu 12.04 / W.I.N.E v1.5.14
Dizzle7677 is offline   Reply With Quote
Old 10-18-11, 09:41 PM   #3
lexa2
Registered User
 
Join Date: Jul 2011
Location: Moscow, Russian Federation
Posts: 58
Send a message via ICQ to lexa2 Send a message via Skype™ to lexa2
Default Re: Regression in "KB:The Legend" when run under Wine with drivers v.285.05.09

Quote:
Originally Posted by Dizzle7677 View Post
Direct3D/OffscreenRenderMode is set to 'fbo' {Frame Buffer Object} by default for a reason.

Also there's the new Direct3D key in w.i.n.e v1.3.30 called 'AlwaysOffscreen' which helps some games with graphical errors { mainly Dues Ex:HR } because as it states 'the main effect that it 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.'

http://wiki.winehq.org/UsefulRegistryKeys
Thank you Captain. I'm well aware not only about the reasons behind orm being set to fbo by default, but also about what does "fbo" mean, how does it differ from "backbuffer" and about the actual render paths used when rendering in each of those modes. Having fbo be the default choice (just because it is faster on the current generation hardware and allows more complicated things to be done easily) isn't an excuse for broken rendering orm=backbuffer mode. Make it simple: if the same code had been working with earlier version of drivers and don't work with fresh one - who is most probably to be blamed for it? This report is about the bug that needs to be fixed and not the invitation to the discussion about the valid reasons to use backbuffer as a target for offscreen rendering tasks.

I'm also well aware about "AlwaysOffscreen" registry setting that had been added to wine by commit 620c81dc. First Wine release to support this setting was 1.3.27 and not 1.3.30 you had mentioned in your post. As you had cleverly quoted, this setting had been added to workaround bugs and/or fallbacks penalties caused by some buggy drivers. Our goal is to have bug-free driver because it's simply better than to stick with workarounds while using buggy ones. Having "KB: The Legend" under Wine working bugs-free with 280.13 and render incorrectly with 285.05.09 is a very-very good sign of a possible regression in drivers.

So, thanks once again for informing me on the things that every experienced Wine user knows, but have you anything to post on topic? Reproducing these bugs on your rig would be helpful. Posting reports about similar render errors in other apps (especially in native linux apps) that had been introduced with 285.05.09 drivers would have even more value. Anything else unrelated is merely off-topic.

Last edited by lexa2; 10-20-11 at 02:19 AM. Reason: spelling
lexa2 is offline   Reply With Quote
Old 10-28-11, 05:50 AM   #4
lexa2
Registered User
 
Join Date: Jul 2011
Location: Moscow, Russian Federation
Posts: 58
Send a message via ICQ to lexa2 Send a message via Skype™ to lexa2
Default Re: Regression in "KB:The Legend" when run under Wine with drivers v.285.05.09

Tested with 290.03 (beta) drivers, bug still occurs. Rolling back to 280.13 fixes the problem.
lexa2 is offline   Reply With Quote
Old 04-14-12, 07:22 AM   #5
lexa2
Registered User
 
Join Date: Jul 2011
Location: Moscow, Russian Federation
Posts: 58
Send a message via ICQ to lexa2 Send a message via Skype™ to lexa2
Default Re: Regression in "KB:The Legend" when run under Wine with drivers v.285.05.09

Bug still occur, retested with latest nVIDIA driver (295.40), latest Wine release (1.5.2) and freshly downloaded/installed Steam version of "King's Bountly: The Legend". Reverting back to driver 280.13 or 275.09.07 fixes the problem.
lexa2 is offline   Reply With Quote
Old 04-14-12, 10:10 AM   #6
Plagman
NVIDIA Corporation
 
Plagman's Avatar
 
Join Date: Sep 2007
Posts: 254
Default Re: Regression in "KB:The Legend" when run under Wine with drivers v.285.05.09

Has there been a Wine bug filed about this?
Plagman is offline   Reply With Quote
Old 04-14-12, 09:52 PM   #7
lexa2
Registered User
 
Join Date: Jul 2011
Location: Moscow, Russian Federation
Posts: 58
Send a message via ICQ to lexa2 Send a message via Skype™ to lexa2
Default Re: Regression in "KB:The Legend" when run under Wine with drivers v.285.05.09

No, as I had asked one of Wine's wined3d developers in a personal mail about his thoughts concerning this bug and his answer was "as downgrading drivers fixes the thing - most likely it is a driver bug, so try to report to nVIDIA and see what would be their answer". It's no problem for me to file a report to Wine's bugzilla if you assure me that it's an issue in Wine and not in nVIDIA linux drivers. Still, it looks pretty suspicious to me that an app is to be blamed for if it was working well under old version of drivers and broke with a fresh ones.

Unfortunately I haven't got access to any PC with non-nVIDIA GPU so I can't test if this issue affects systems running drivers from other GPU vendors, but I would try to do so if an opportunity would come.
lexa2 is offline   Reply With Quote
Old 04-15-12, 10:00 AM   #8
Plagman
NVIDIA Corporation
 
Plagman's Avatar
 
Join Date: Sep 2007
Posts: 254
Default Re: Regression in "KB:The Legend" when run under Wine with drivers v.285.05.09

I think there's value in reporting a Wine bug even if it's believed to be an NVIDIA driver bug.

Primarily, Wine developers might chime in and post more info about what part of WineD3D is exposing the potential driver bug, which always helps a lot considering how convoluted the Wine code is and the challenges it raises for debugging.

It would also be more visible to other people that might be running into the same issue, and they could chime in with their own data, which could help narrow this down.

Moreover, the fact that it goes away when downgrading the driver does not _always_ (even if likely) mean that it's an NVIDIA driver bug; it could be a slight change in behavior that interacts poorly with an assumption in the Wine code, for example.
Plagman is offline   Reply With Quote

Old 04-15-12, 03:48 PM   #9
lexa2
Registered User
 
Join Date: Jul 2011
Location: Moscow, Russian Federation
Posts: 58
Send a message via ICQ to lexa2 Send a message via Skype™ to lexa2
Default Re: Regression in "KB:The Legend" when run under Wine with drivers v.285.05.09

I agree on the most part with all the arguments you post, but you know, it's almost always comes down to a "game" like "bug in Wine's bugzilla being closed NOTABUG WONTFIX blaming GPU drivers, while driver support team blames Wine to do the wrong thing" :-). So, no problem, I would proceed with filing up a new bugreport to Wine's bugzilla in hopes that Henri and/or Stefan would be able to provide us with a hint about the root cause of a bug.

What else could I do to get this one tracked down? Would apitrace logs be helpful?
lexa2 is offline   Reply With Quote
Old 04-15-12, 11:39 PM   #10
lexa2
Registered User
 
Join Date: Jul 2011
Location: Moscow, Russian Federation
Posts: 58
Send a message via ICQ to lexa2 Send a message via Skype™ to lexa2
Default Re: Regression in "KB:The Legend" when run under Wine with drivers v.285.05.09

I've got a question answering which could be critial to pinpointing the root cause of this bug: is it possible for userland process to somehow corrupt the internal state of the nvidia GPU driver to a point that it would kind-a misbehave up until the next restart of the Xserver? The "corruption" I'm asking about should be of a "persistent" kind, affecting each and every process which uses libGL.so.1 and not only the initial one which caused the corruption. I.e., might it be possible that after running an app A (which corrupts the driver state somehow) and terminating it later on, I would observe libGL misbehavior caused by this corruption in totally unrelated app B which gets started up way after the termination of original app A?
lexa2 is offline   Reply With Quote
Old 04-16-12, 12:13 AM   #11
lexa2
Registered User
 
Join Date: Jul 2011
Location: Moscow, Russian Federation
Posts: 58
Send a message via ICQ to lexa2 Send a message via Skype™ to lexa2
Default Re: Regression in "KB:The Legend" when run under Wine with drivers v.285.05.09

Unfortunate followup: well, the idea I've been thinking of when asking previous question turned out not to be related to this bug.

Here is a long story about apitrace vs. this bug.

Prior to filing up a report to Wine's bugzilla I had tried to record apitrace logs demonstrating the problem with driver versions 275.09.07 and 285.05.09. It yielded to a pretty interesting results.

In case you don't know what the apitrace is, it is an app that allows to capture virtually all calls an app does to libGL alongside with the data passed to that calls (textures, e.t.c.) and writes captured data to a special log file that can be "replayed" later at any time you need. Thus for our case it is possible to take the Wine out of consideration and stick with linux-native glretrace binary that does "the magic" replaying problematic sequence of libGL calls.

To record the trace I had installed 285.05.09, started up problematic app and checked if the bug happens. It had been in place, so I proceeded with recording an apitrace log illustrating problematic behavior, and then killed Xserver, installed driver 275.09.07 and recorded another trace illustrating behavior without this bug. Then I tried to replay apitrace log recorded with drivers 285.05.09 to see if it would show incorrect rendering results under driver 275.09.07. During the replay process there was a problem related to a fact that driver 275.09.07 unable to properly handle SRGB texture format that was used under 285.05.09 which resulting in somewhat dark render results, but except for this everything else seemed to be rendered correctly.

So I went on and re-installed driver 285.05.09 and tried to replay apitrace logs with it. It had turned out that this bug doesn't happen immediately after the Xserver startup - replaying problematic apitrace log in a loop for about 5 minutes (while /bin/true; do /misc/Raid5/Software/apitrace/bin/glretrace ./kb-thelegend-nvidia-285.05.09-full.trace ; done) right after the X startup produced correct rendering results. At first it made me into thinking that an app somehow manages to corrupt the driver state so it starts to misbehave, and that this corruption most probably happens some other way than simply using libGL calls. Thinking about it I had stopped trace playback loop with a Ctrl+C press and posted a message to this thread you can read above.

Right after that posting I had tried to start up the trace playback loop once again - and viola!, the bug shown itself up. No Wine, no original app, just a small native glretrace binary + trace log + wait some amount of time to pass since X server startup - and that's enough for bug to appear. As a side note, as soon as bug appeared - it affected glretrace playback of both traces, including one recorded under 275.09.07 driver.

Long things short, now it's obvious that this bug is really a bug in drivers and not in Wine as it can be reproduced by retracing problematic libGL call sequence. Question is, what should I do to help nVIDIA track this one down? I could upload problematic traces to my personal web-server so they could be fetched by nVIDIA engineers from there, but the files itself are pretty big (~200MB each) and I'm not sure if nVIDIA corporate policy permits downloading arbitary files from third-parties.
lexa2 is offline   Reply With Quote
Old 04-16-12, 02:10 PM   #12
Plagman
NVIDIA Corporation
 
Plagman's Avatar
 
Join Date: Sep 2007
Posts: 254
Default Re: Regression in "KB:The Legend" when run under Wine with drivers v.285.05.09

The traces would help along with steps detailing how to reproduce them for scratch, yes. If hosting is a problem you can drop them off on our VDPAU samples FTP, see the sticky about how to report VDPAU bugs.
Plagman is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:07 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.