ValveSoftware / csgo-osx-linux

Counter-Strike: Global Offensive
http://counter-strike.net
782 stars 69 forks source link

[Linux] Incorrect rendering with intel broadwell gpus #443

Open mbouron opened 9 years ago

mbouron commented 9 years ago

os: arch linux 64bit graphic driver: mesa (i965) version >= 10.6 to git as of today libdrm version is 2.4.64 kernel version is 4.1.6 xf86-video-intel version is 1:2.99.917+381+g5772556 cpu: Intel(R) Core(TM) i7-5600U with 1x4+1x8GB DDR3 cpu: Intel(R) Core(TM) i5-5250U with 2x4GB DDR3

CS:GO is not rendered correctly on intel broadwell gpus (hd5500, hd6000) whereas it works on ivy bridge gpus (hd4000).

Here are some screenshots comparing the output from an intel hd4000 (mesa 10.6.1) on the left of the screnshots and the hd5500 on the right.

It looks like the hdr/bloom postprocessing filters are missing, causing the game to render darker in a lot of areas which makes it unplayable in those.

http://0x5c.me/intel2/02.png http://0x5c.me/intel2/03.png http://0x5c.me/intel2/04.png http://0x5c.me/intel2/05.png

I also experience better framerates with the ivy bridge setup (Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz). At the same resolution, using the same video settings on the following benchmark test http://steamcommunity.com/sharedfiles/filedetails/?id=500334237:

The issue has also been reported on the mesa i965 bug tracker: https://bugs.freedesktop.org/show_bug.cgi?id=91617

alexandersvozil commented 9 years ago

I also have a similar problem, but i use a AMD/ATI Radeon HD7850. My os is Ubuntu 15.04. http://imgur.com/mTLFAbn . Also I cannot use the brightness slider to modify brightness.

mbouron commented 9 years ago

It might not be the same issue as I have the same rendering using an nvidia card on this map. Can you take screenshots on inferno and see if it matches the screenshots i've attached ?

alexandersvozil commented 9 years ago

You are right, it is not the same issue. Inferno looks fine for me on all your positions.

ubitux commented 8 years ago

http://imgur.com/a/bydpS Hello darkness my old friend...

damienalexandre commented 8 years ago

Same issue on Ubuntu 15.10.

Processor Information:
    Vendor:  GenuineIntel
    CPU Family:  0x6
    CPU Model:  0x5e
    CPU Stepping:  0x3
    CPU Type:  0x0
    Speed:  3500 Mhz
    8 logical processors
    4 physical processors
    HyperThreading:  Supported
    FCMOV:  Supported
    SSE2:  Supported
    SSE3:  Supported
    SSSE3:  Supported
    SSE4a:  Unsupported
    SSE41:  Supported
    SSE42:  Supported

Network Information:
    Network Speed:  

Operating System Version:
    Ubuntu 15.10 (64 bit)
    Kernel Name:  Linux
    Kernel Version:  4.4.0-040400-generic
    X Server Vendor:  The X.Org Foundation
    X Server Release:  11702000
    X Window Manager:  GNOME Shell
    Steam Runtime Version:  steam-runtime-release_2015-06-12

Video Card:
    Driver:  NVIDIA Corporation GeForce GTX 960M/PCIe/SSE2

    Driver Version:  4.5.0 NVIDIA 355.11
    OpenGL Version: 4.5
    Desktop Color Depth: 24 bits per pixel
    Monitor Refresh Rate: 59 Hz
    VendorID:  0x10de
    DeviceID:  0x139b
    Number of Monitors:  1
    Number of Logical Video Cards:  1
    Primary Display Resolution:  3840 x 2160
    Desktop Resolution: 3840 x 2160
    Primary Display Size: 13,62" x 7,64"  (15,59" diag)
                                            34,6cm x 19,4cm  (39,6cm diag)
    Primary Bus: PCI Express 16x
    Primary VRAM: 2048 MB
    Supported MSAA Modes:  2x 4x 8x 16x 

Sound card:
    Audio device: Realtek ALC3266

Memory:
    RAM:  15893 Mb

Miscellaneous:
    UI Language:  English
    LANG:  en_US.UTF-8
    Microphone:  Not set
    Total Hard Disk Space Available:  825540 Mb
    Largest Free Hard Disk Block:  659546 Mb
perkele1989 commented 8 years ago

I get the same error. I can't believe this has been open since 2015, Valve what the hell? It should be trivial to fix.

Arch Linux 64 bit, Kernel 4.6.4 , Mesa 12.0.1, Intel HD 530.

perkele1989 commented 8 years ago

Found this info in console:

Requesting texture value from var "$basetexture" which is not a texture value (material: dev/bloomadd)
Requesting texture value from var "$basetexture" which is not a texture value (material: dev/no_pixel_write)
Requesting texture value from var "$basetexture" which is not a texture value (material: dev/lumcompare)
Requesting texture value from var "$basetexture" which is not a texture value (material: dev/blurgaussian_3x3)
Requesting texture value from var "$basetexture" which is not a texture value (material: dev/fade_blur)
Requesting texture value from var "$basetexture" which is not a texture value (material: dev/halo_add_to_screen)
PutClientInServer: no info_player_start on level

I'd put big money into this being the issue.

cs_office0002

mbouron commented 8 years ago

Got the same issue with the new Intel NUC Skull Canyon (Intel(R) Core(TM) i7-6770HQ CPU @ 2.60GHz / Iris 580 Pro) with mesa 12.0.3.

ubitux commented 7 years ago

We still can't see anything with recent mesa 13.0.3:

image image image image image

Can we have a hint on what GL setting/feature is not honored here so we can attempt debugging on the open source side?

vmivanov commented 7 years ago

I've been experiencing the exact same problem for quite a while on two different Skylake machines, one with Intel HD Graphics 520 on a mobile i7-6500U and the other with Iris Pro Graphics 580 on an i7-6770HQ - the Intel NUC6i7KYK.

Both systems have identical software setup:

The version Mesa doesn't seem to make a difference even when downgrading to Mesa 13.0.5.

Having done some testing, I've been led to believe that this problem is likely not specific to Linux and neither to CS:GO. The same "too dark" issue is present on Windows 10 on both machines. It's also present in Left 4 Dead 2 on both Windows and Linux most noticeably on darker maps such as Dark Carnival or No Mercy so it would appear to be related to Source engine games in general. The issue is reproducible every time. I have yet to try with other Source-based games.

This video shows another peculiar aspect of the issue where the brightness momentarily goes up after dying in CS:GO (my personal experience is exactly as in the video). However, this doesn't happen in L4D2 where the game just stays dark.

Inspired by a post on the L4D2 community forums I can confirm that the following steps will resolve the issue on the client side, at least until fixed upstream (if ever).

For CSGO:

  1. Navigate to your Steam installation directory
  2. Navigate to: userdata/<your steam id>/730/local/cfg
  3. Open video.txt with a basic text editor and add the following line to the list of options between the { braces }: "setting.mat_tonemapping_occlusion_use_stencil" "1"
  4. Save and close the file
  5. Mark the file as read-only: chmod a-w video.txt

Note: mat_tonemapping_occlusion_use_stencil doesn't appear to be a valid developer console command so it can't be changed in-game.

If the above doesn't work straight away try the following:

  1. If previously set to read-only: change the permissions of the video.txt file to read/write: chmod u+w video.txt
  2. From Steam, add -autoconfig as a launch option to the game. This will reset the video settings to the ones automatically selected by the game
  3. Run the game and update your video settings to your preferred ones from within the game
  4. Quit the game
  5. Remove the -autoconfig launch paramter.
  6. Repeat the previous set of steps

For Left 4 Dead 2 the steps are exactly the same except the video.txt file is located in steamapps/common/Left 4 Dead 2/left4dead2/cfg as mentioned in the linked post.

incognico commented 6 years ago

It is also an issue on Windows with the official Intel HD Graphics Windows driver: https://github.com/ValveSoftware/Source-1-Games/issues/2523

oolongtea commented 2 years ago

@vmivanov's fix worked for me for left4dead2! thank you!

computer specs:

My installation was at

~/.steam/steam/steamapps/common/Left 4 Dead 2/left4dead2/cfg

I edited video.txt and added inside the curly brackets

    "setting.mat_tonemapping_occlusion_use_stencil"     "1"

then I ran

chmod a-w video.txt

once I ran L4D2, no more dim screen!