Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setting.mem_level is set to an undocumented value by default #878

Open
eth481642 opened this issue May 30, 2016 · 16 comments
Open

setting.mem_level is set to an undocumented value by default #878

eth481642 opened this issue May 30, 2016 · 16 comments
Labels

Comments

@eth481642
Copy link

when i set shader quality on very high(default) the game is completely unplayable because of terrible artifacts
when i set shader quality on medium most artifacts are disapear, but for example i cant see a hands of my character when i play for Terr but when i play for CT hands of character looks normally,although i can see a black artifact instead of water
on previous versions of the game everything worked good on very high options, i tried to reinstall the game but no changes
ubuntu 14.04.4,kernel 4.2

@Tele42
Copy link
Contributor

Tele42 commented May 30, 2016

Please include a screenshot and your full system information as requested at https://github.com/ValveSoftware/csgo-osx-linux#system-information (in particular the video card chipset and driver version in use).

@eth481642
Copy link
Author

GeForce GT 630 driver 352.63
the first screenshot is at very high shader quality, the other screens are at medium shader quality
20160531004843_1
20160531005839_1
20160531005742_1

@ovdeathiam
Copy link

ovdeathiam commented May 31, 2016

I can confirm this. Strangely if you lose your hand texture and move to a dark/shadowy area like CT spawn on dust2 the hands reappear.

Steps to reproduce:

  1. Ensure your video.txt file is not vanilla i.e. change at least one thing via video options.
  2. While in game enter video settings menu. After a short stutter the bug starts. The higher the video settings the longer the stutter.

Bug symptoms:

  • All materials seem to be reloaded and some of them dissapear
  • FXAA turns itself off despite my in-game setting
  • Shadows are set to low despite in-game setting
  • Texture filtering is set to low despite in-game setting
  • Model detail is set to low despite in-game setting

__
GPU: GeForce GTX 750
Nvidia driver: 361.42 (ubuntu 16.04 repo)
OS: Ubuntu 16.04

@ovdeathiam
Copy link

ovdeathiam commented May 31, 2016

I've found out that this damn line in video.txt causes the bug for me:

...
"setting.mem_level" "-1"
...

On my windows machine it is set to 2.
In my windows videodefaults.txt it is also set to 2.
In my linux videodefaults.txt it doesn't exist.
When the game autogenerates video.txt on linux it is set to -1.

When entering the video settings menu game reads video.txt and if the game finds that like set to -1 it causes all settings go to super-low and causes material errors.
If i set it manually to 2 the problem is solved and the game no longer sets it to -1 on changing video settings.

@eth481642 can you please check your setting.mem_level and if it's -1 set it to 2 or to a value from videodefaults.txt?

@eth481642
Copy link
Author

eth481642 commented May 31, 2016

@ovdeathiam
yes,you are right
my setting.mem_level was set to 0, when i set it to 2 all works normally,without any artifacts,although i dont have setting.mem_level option in videodefaults.txt
and i can confirm that all artifacts started since i entered a video settings menu in a game and changed some options

@ovdeathiam
Copy link

ovdeathiam commented May 31, 2016

Some more finds:

  • The game is unable to determine what video card i'm using thus setting VendorID and DeviceID to generic values of 1 in videodefaults.txt. In Windows it is set to NVidia unknown. Valve's plan here was to give all weak cards specific lower than the highest settings. Unknown means all videocard settings are maxed out. On linux however the game generates videodefaults.txt without using a moddefaults.txt template so I'm assuing defaults are hardcoded. Those defaults (VendorID 1, DeviceID 1) are missing aniso and grain settings.

    "VendorID" "1" // Windows sets it to "4318"
    "DeviceID" "1" // Windows sets it to "4993"

  • The generic videodefaults.txt is missing three lines from it's windows counterpart. First line is probably missing because the game is unable to determine how much memory we have as there is no setting -1 for any ammount of memory in moddefaults.txt. Other two lines are missing probably because the game not beeing able to find correct setting in videodefaults.txt generates defaults using hardcoded template which probably is missing those lines altogether.

    "setting.mem_level" "2"
    "setting.mat_forceaniso" "4"
    "setting.mat_grain_scale_override" "1"

I'm unsure whether this is a bug, and if so it is a minor one:

  • first line in both vanila video.txt and videosettings.txt is "config" but after changing video settings it is changed to "VideoConfig"

@LumpBloom7
Copy link

When "setting.mem_level" is set to 0, and all video setting set to low, scope of the sg553 freezes the graphics, unscoping it resumes normal gameplay.

@ovdeathiam
Copy link

ovdeathiam commented Jun 2, 2016

@LumpBloom7 Acording to #moddefaults.txt# the setting.mem_level value should be ram dependant:

    {
        "name" "memory [0-1024)"
        "min megabytes" "0"
        "max megabytes" "1200"
        "setting.mem_level" "0"
    }
    "9"
    {
        "name" "memory [1024-1536)"
        "min megabytes" "1200"
        "max megabytes" "1800"
        "setting.mem_level" "1"
    }
    "10"
    {
        "name" "memory [1536-)"
        "min megabytes" "1800"
        "max megabytes" "65535"
        "setting.mem_level" "2"
    }

As you can see, the 0 value is for up to 1GiB of RAM and since the game requires minimum of 2GiB of RAM it is reasonable to say that "0" may be unsupported. The problem described above is due to it beeing set to "-1". Since the game is unable to recognise what specs we have it sets a value of -1.

They could at least set it to "2" instead of "-1" as a fallback value since it is in the game requirements.

@tanmaysachan
Copy link

i have the exact same bug.
on low and medium settings, the hands on the T side dissappear(not the gloves, same case here).
and on high and very high shader settings entire player models, everyone in the game dissappears(except their weapons).
anyone found a fix?

@LumpBloom7
Copy link

You could follow the above procedure to fix the problem. Worked like a charm in my case.

@0xBADEAFFE
Copy link

I can confirm this issue on Ubuntu 16.04 with Nvidia.

@perkele1989
Copy link

Just wanted to make this visible here: #1170 (comment)

Not only does it fix the problem, I also get a huge performance boost by setting memlevel to 2 on integrated Intel GPU. I think this could be important for both Valve and Intel developers to notice.

@davidw-valve
Copy link
Contributor

We will be shipping an attempt to fix this issue in the next update.

@Tele42
Copy link
Contributor

Tele42 commented Aug 19, 2016

Per "– Fix a bug where some users would have a bad mem_level set which would cause poor performance." in the 2016-08-18 client update, please retest and comment if this has improved.

@ovdeathiam
Copy link

ovdeathiam commented Aug 20, 2016

I can confirm that I can't get any material to dissapear, but I can also deny this bug got fixed as my mem_level sets it's self to undocumented value "-1".

My test procedure:

  • Move userdata so it's not used but I have a backup
    mv .steam/userdata ~/
  • Start the game to get video.txt created
  • Check the video.txt for the value
    grep settings.mem_level .steam/userdata/*/730/video.txt
    Result: no mem_level at all in the file.

Further testing:

  • start local bot game on dust2
  • in the game video settings set shadow from "Auto: Very high" to "Low"
    Result: Game hung for like more than 120 secconds. settings.Mem_level "-1" got added to the video.txt file
  • setting shadow quality from "Low" to "Auto: Very high".
    Result: settings.mem_level still set to "-1"

Changing shader detail does not make any material dissapear, so that probably got fixed.
Previously after the long game hangup it was 100% sure to get the material dissapear to get triggered.

@Tele42
Copy link
Contributor

Tele42 commented Aug 20, 2016

Thanks for retesting. I'll let @davidw-valve decide if he wishes to pursue this any further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants