ValveSoftware / Dota-2

Tracker for issues specific to Linux and Mac in the Reborn client. If you have a general issue or non-system-specific feature request please go to dev.dota2.com
471 stars 38 forks source link

Dota 2 new macOS 14 black screen after run Dota #2357

Closed rbasa349 closed 1 year ago

rbasa349 commented 1 year ago

Your system information

Please describe your issue in as much detail as possible:

After launching DotA 2, the game does not start and continues to be in a black screen endlessly maybe this is due to the new Game mode (there is no disable function)?

Steps for reproducing this issue:

  1. Update macOS to ver. 14 (Developer beta)
  2. Run Dota 2
  3. Enjoy
2023-06-06 в 15 11 06
pashunya08 commented 1 year ago

same

bushaev-denis commented 1 year ago

same shit

ntehseen commented 1 year ago

I'm surprised that Valve still hasn't fixed it yet. Trash level Infinity 🌀

Yingqiao1998 commented 1 year ago

same problem on. my mbp14 2021 system report: https://gist.github.com/Yingqiao1998/31395b75c5c2ada107d84872439c22fd

Athanian commented 1 year ago

Did anyone of you found any alternative yet ??

bushaev-denis commented 1 year ago

With -phased_window_create launch option i have a dota logo, but it still stuck on it :(

dracula92107 commented 1 year ago

same

ThePundik commented 1 year ago

Did anyone of you found any alternative yet ?

ntehseen commented 1 year ago

Yes, a different MacBook with Mac OS Ventura installed in it.

bushaev-denis commented 1 year ago

@ntehseen stop shitposting, please.

ntehseen commented 1 year ago

@ntehseen stop shitposting, please.

Im talking about the alternative, if you have found any other solution then you can share that.

bushaev-denis commented 1 year ago

@ntehseen, the community never welcomed solutions like "just use worked device"

bushaev-denis commented 1 year ago

Shorter answer: Developers just need to update the allowed macos version, and dota will run properly.

I found the solution but it's very-very dirty trick. When I run the dota with dota.sh, I got an error like This macOS version is not supported.

NOTICE: all we do may break your current installed macos, but do it at your own risk. Some apps which strictly check macos 14+ version will not run (also system settings and other system apps)

Schema of what we do below:

  1. Allow writing in the root (system files)
  2. Spoof macOS version
  3. Sign our version of system files (if we do not it, macOS revert all our thing back)
  4. Reboot
  5. Run dota

Detailed info on how we can do it:

  1. do this thing: https://stackoverflow.com/a/73422893 (except the last step)
  2. then you should change your macOS version sudo nano ~/rootmount/System/Library/CoreServices/SystemVersion.plist replace 14.0 to 13.4 (should be 2 matches) ctrl+x, y, enter
  3. Sign the version of system files sudo bless --mount "$HOME/rootmount/System/Library/CoreServices/" --setBoot --create-snapshot
  4. reboot
  5. Run dota

Proof: https://www.youtube.com/watch?v=K-ZBZAnE0v4

After you play and you need to go to work, enable SIP back and macos do all things back

PS: BECAUSE I CAN!

YuraLazarev commented 1 year ago

wow ultra dirty)) plz give me trace dota2.sh after change version. I want find this checker version in source

image
bushaev-denis commented 1 year ago

@YuraLazarev can you message me in tg, nickname same as in gh

bushaev-denis commented 1 year ago

@YuraLazarev

Trace ``` Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libengine2.dylib, got 0x26e8490 Using breakpad crash handler [S_API] SteamAPI_Init(): Loaded '/Users/denis/Library/Application Support/Steam/Steam.AppBundle/Steam/Contents/MacOS/steamclient.dylib' OK. Setting breakpad minidump AppID = 570 Forcing breakpad minidump interfaces to load Looking up breakpad interfaces from steamclient Calling BreakpadMiniDumpSystemInit found breakpad via in process memory: '/Users/denis/Library/Application Support/Steam/Steam.AppBundle/Steam/Contents/MacOS/Frameworks/Breakpad.framework/Versions/A/Resources' Installing breakpad crash handler Looking up breakpad interfaces from steamclient Calling BreakpadMiniDumpSystemInit SteamID: 0, universe Public SteamInternal_SetMinidumpSteamID: Caching Steam ID: 76561198062743781 [API loaded yes] SteamInternal_SetMinidumpSteamID: Setting Steam ID: 76561198062743781 SteamID: 76561198062743781, universe Public SteamID: 0, universe Public Setting breakpad minidump AppID = 373300 Loaded libSDL2-2.0.0.dylib, got 0x26eb0a0 2023-06-10 14:46:01.313 dota2[15322:197576] Unable to find feedback application. Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libtier0.dylib, got 0x26ebe90 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libfilesystem_stdio.dylib, got 0x26ea890 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libinputsystem.dylib, got 0x26edef0 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/liblocalize.dylib, got 0x26eadf0 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/librendersystemvulkan.dylib, got 0x26e5910 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libresourcesystem.dylib, got 0x26eb340 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libschemasystem.dylib, got 0x26eb5a0 [mvk-info] MoltenVK version 1.2.3, supporting Vulkan version 1.2.239. The following 87 Vulkan extensions are supported: VK_KHR_16bit_storage v1 VK_KHR_8bit_storage v1 VK_KHR_bind_memory2 v1 VK_KHR_buffer_device_address v1 VK_KHR_copy_commands2 v1 VK_KHR_create_renderpass2 v1 VK_KHR_dedicated_allocation v3 VK_KHR_depth_stencil_resolve v1 VK_KHR_descriptor_update_template v1 VK_KHR_device_group v4 VK_KHR_device_group_creation v1 VK_KHR_driver_properties v1 VK_KHR_dynamic_rendering v1 VK_KHR_external_fence v1 VK_KHR_external_fence_capabilities v1 VK_KHR_external_memory v1 VK_KHR_external_memory_capabilities v1 VK_KHR_external_semaphore v1 VK_KHR_external_semaphore_capabilities v1 VK_KHR_fragment_shader_barycentric v1 VK_KHR_get_memory_requirements2 v1 VK_KHR_get_physical_device_properties2 v2 VK_KHR_get_surface_capabilities2 v1 VK_KHR_imageless_framebuffer v1 VK_KHR_image_format_list v1 VK_KHR_maintenance1 v2 VK_KHR_maintenance2 v1 VK_KHR_maintenance3 v1 VK_KHR_multiview v1 VK_KHR_portability_subset v1 VK_KHR_push_descriptor v2 VK_KHR_relaxed_block_layout v1 VK_KHR_sampler_mirror_clamp_to_edge v3 VK_KHR_sampler_ycbcr_conversion v14 VK_KHR_separate_depth_stencil_layouts v1 VK_KHR_shader_draw_parameters v1 VK_KHR_shader_float_controls v4 VK_KHR_shader_float16_int8 v1 VK_KHR_shader_subgroup_extended_types v1 VK_KHR_spirv_1_4 v1 VK_KHR_storage_buffer_storage_class v1 VK_KHR_surface v25 VK_KHR_swapchain v70 VK_KHR_swapchain_mutable_format v1 VK_KHR_timeline_semaphore v2 VK_KHR_uniform_buffer_standard_layout v1 VK_KHR_variable_pointers v1 VK_EXT_buffer_device_address v2 VK_EXT_debug_marker v4 VK_EXT_debug_report v10 VK_EXT_debug_utils v2 VK_EXT_descriptor_indexing v2 VK_EXT_fragment_shader_interlock v1 VK_EXT_hdr_metadata v2 VK_EXT_host_query_reset v1 VK_EXT_image_robustness v1 VK_EXT_inline_uniform_block v1 VK_EXT_memory_budget v1 VK_EXT_metal_objects v1 VK_EXT_metal_surface v1 VK_EXT_pipeline_creation_cache_control v3 VK_EXT_post_depth_coverage v1 VK_EXT_private_data v1 VK_EXT_robustness2 v1 VK_EXT_sample_locations v1 VK_EXT_scalar_block_layout v1 VK_EXT_separate_stencil_usage v1 VK_EXT_shader_stencil_export v1 VK_EXT_shader_viewport_index_layer v1 VK_EXT_subgroup_size_control v2 VK_EXT_surface_maintenance1 v1 VK_EXT_swapchain_colorspace v4 VK_EXT_swapchain_maintenance1 v1 VK_EXT_texel_buffer_alignment v1 VK_EXT_texture_compression_astc_hdr v1 VK_EXT_vertex_attribute_divisor v3 VK_AMD_gpu_shader_half_float v2 VK_AMD_negative_viewport_height v1 VK_AMD_shader_image_load_store_lod v1 VK_AMD_shader_trinary_minmax v1 VK_IMG_format_pvrtc v1 VK_INTEL_shader_integer_functions2 v1 VK_GOOGLE_display_timing v1 VK_MVK_macos_surface v3 VK_MVK_moltenvk v37 VK_NV_fragment_shader_barycentric v1 VK_NV_glsl_shader v1 [mvk-info] GPU device: model: Apple M1 type: Integrated vendorID: 0x106b deviceID: 0xd0303ef pipelineCacheUUID: A46DFDE1-0D03-03EF-0000-000000000000 supports the following Metal Versions, GPU's and Feature Sets: Metal Shading Language 2.3 GPU Family Apple 7 GPU Family Apple 6 GPU Family Apple 5 GPU Family Apple 4 GPU Family Apple 3 GPU Family Apple 2 GPU Family Apple 1 GPU Family Mac 2 GPU Family Mac 1 GPU Family Common 3 GPU Family Common 2 GPU Family Common 1 macOS GPU Family 2 v1 macOS GPU Family 1 v4 macOS GPU Family 1 v3 macOS GPU Family 1 v2 macOS GPU Family 1 v1 [mvk-info] Created VkInstance for Vulkan version 1.1.0, as requested by app, with the following 4 Vulkan extensions enabled: VK_KHR_get_physical_device_properties2 v2 VK_KHR_surface v25 VK_MVK_macos_surface v3 VK_MVK_moltenvk v37 [mvk-info] Vulkan semaphores using Metal implicit guarantees within a single queue. [mvk-info] Created VkDevice to run on GPU Apple M1 with the following 12 Vulkan extensions enabled: VK_KHR_create_renderpass2 v1 VK_KHR_depth_stencil_resolve v1 VK_KHR_descriptor_update_template v1 VK_KHR_dynamic_rendering v1 VK_KHR_image_format_list v1 VK_KHR_maintenance1 v2 VK_KHR_maintenance2 v1 VK_KHR_swapchain v70 VK_KHR_swapchain_mutable_format v1 VK_EXT_pipeline_creation_cache_control v3 VK_EXT_separate_stencil_usage v1 VK_EXT_subgroup_size_control v2 [mvk-info] Created 3 swapchain images with initial size (2560, 1080) and contents scale 1.0 for screen LG ULTRAWIDE. Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libmaterialsystem2.dylib, got 0x26eba80 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libmeshsystem.dylib, got 0x26e5b90 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libworldrenderer.dylib, got 0x26e5df0 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libvscript.dylib, got 0x26e2d80 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libnetworksystem.dylib, got 0x26e2050 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libanimationsystem.dylib, got 0x26e22c0 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libvphysics2.dylib, got 0x26e2520 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libsoundsystem.dylib, got 0x26e2780 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libscenesystem.dylib, got 0x26e29f0 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libparticles.dylib, got 0x26e2fd0 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/dota/bin/osx64/libserver.dylib, got 0x26e5210 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/dota/bin/osx64/libclient.dylib, got 0x26eaaf0 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libpanorama.dylib, got 0x26e1670 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libpanorama_text_pango.dylib, got 0x26e1940 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libv8system.dylib, got 0x26fc920 Loaded libmpg123.dylib, got 0x26fa920 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libfreetype.dylib, got 0x26fffe0 Fontconfig warning: "/Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/core/panorama/fonts/conf.d/41-repl-os-win.conf", line 148: Having multiple values in isn't supported and may not work as expected Fontconfig warning: "/Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/core/panorama/fonts/conf.d/41-repl-os-win.conf", line 160: Having multiple values in isn't supported and may not work as expected Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libcairo.dylib, got 0x26fa2f0 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libengine2.dylib, got 0x26e8490 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/dota/bin/osx64/libhost.dylib, got 0x26fa530 Loaded /Volumes/SSD/SteamLibrary/steamapps/common/dota 2 beta/game/bin/osx64/dota2.app/Contents/MacOS/libscenefilecache.dylib, got 0x26ee810 ```

I`m not very familiar with source engine, and not sure if we can change something, thing steam just redownload changed files :(

bushaev-denis commented 1 year ago

@kisak-valve can you move the matter forward, please 🙏

AyushyaChitransh commented 1 year ago

Dota might not know, but there is a big fanbase who are playing dota on macbooks, and currently this issue has caused dota to be unplayable on macs.

Currently only beta testers of macos, who have opted in to mac beta testing, have updated their OS and are experiencing this issue. There will be a huge crowd coming soon as more people opt in beta of macos. Moreover, when there is a full release it will have a much bigger impact. Affecting all mac users.

Please help this move forward. Incase you require support from us, as users or developers, we are there with you. Lets work together to get this closed asap.

YuraLazarev commented 1 year ago

@dez64ru thanks )) I wrote to support in steam. I think lib libclient.dylib have checker os version and I start analyze this lib.

bushaev-denis commented 1 year ago

@YuraLazarev i wrote them twice, but they sent the shitty botlike message like "thanks, and we cannot do this anything" 🗿

rylm commented 1 year ago

Having the same issue

YuraLazarev commented 1 year ago

heh. its not Dota bug)) its source 2. if looks open source 1 code)

ifdef POSIX
    case k_eMacOSUnknown:
        return "Mac OS";
    case k_eMacOS104:
        return "MacOS 10.4";
    case k_eMacOS105:
        return "MacOS 10.5";
    case k_eMacOS1058:
        return "MacOS 10.5.8";
    case k_eMacOS106:
        return "MacOS 10.6";
    case k_eMacOS1063:
        return "MacOS 10.6.3";
    case k_eMacOS107:
        return "MacOS 10.7";
    case k_eLinuxUnknown:
        return "Linux";
    case k_eLinux22:
        return "Linux 2.2";
    case k_eLinux24:
        return "Linux 2.4";
    case k_eLinux26:
        return "Linux 2.6";
#endif
    default:
    case k_eOSUnknown:
        return "Unknown";
    }

I think... source 2 has equal logic and he knowns macOS 14

@dez64ru 2xdirty trick? change version to macOS 15 or 16, 20, 0.0.0)) what you get to exception ? "Assertion Failed: Unsupported macOS version 16.0.0" or "Assertion Failed: Unsupported macOS " or "Assertion Failed: Unsupported Unknown"

elif defined(OSX)
    if ( eOSVersion == k_eOSUnknown )
    {
        SInt32 MajorVer = 0;
        SInt32 MinorVer = 0;
        SInt32 PatchVer = 0;
        OSErr err = noErr;
        err = Gestalt( gestaltSystemVersionMajor, &MajorVer );
        if ( err != noErr )
            return k_eOSUnknown;
        err = Gestalt( gestaltSystemVersionMinor, &MinorVer );
        if ( err != noErr )
            return k_eOSUnknown;
        err = Gestalt( gestaltSystemVersionBugFix, &PatchVer );
        if ( err != noErr )
            return k_eOSUnknown;
`

P.S I'm looking for where it's based src/vstdlib/osversion.cpp. .. but I think its no real. its source.... source 2

bushaev-denis commented 1 year ago

@YuraLazarev

for the 15.0

src/vstdlib/osversion.cpp (393) : Assertion Failed: Unsupported macOS version 15.0.0
src/vstdlib/osversion.cpp (393) : Assertion Failed: Unsupported macOS version 15.0.0

PS: i don't want set version 0.0.0 because than i cannot launch any programs to revert this changes :)

bushaev-denis commented 1 year ago

I tried to walkaround with substitution of dylib (which can be override open(fopen) functionality for spoof SystemVersion.plist for the specific process), but this functionality broked in sonoma see

birbbit commented 1 year ago

I got a mac instead of a gaming PC because I play only Dota, and now I can't do it on the most powerful macbook pro. We shouldn't need to manually change macOS version. Please fix ASAP.

TheralSadurns commented 1 year ago

I got a mac instead of a gaming PC because I play only Dota, and now I can't do it on the most powerful macbook pro. We shouldn't need to manually change macOS version. Please fix ASAP.

As much as I want to agree with this statement... Sonoma is a developer beta that is out for less than a week. Everyone knows NOT to install dev betas on their primary machine if they have no alternatives for work (and play).

Valve also only got access to Somoma a week ago. Plus the number of DotA Mac players is like 1 % of all DotA players. This is even more obvious if you look at the crappy Mac version of DotA that is not optimized at all, it's basically the laziest of ports.

I'm in the same boat as you are... and, knowing the risks, updated to the first available beta of Somoma after only verifying that the most important apps, that I rely on, work. They do. DotA doesn't. It sucks. It's annoying me. But as much as I want to blame Valve for this... I can't. It's my fault, and my fault only. And this only changes if DotA is STILL broken come fall when Sonoma is officially released. Because what we have now... developer betas... they are MEANT for developers such as Valve, to test their apps and games and then fix them... if they don't work, to be ready when the release takes place.

YuraLazarev commented 1 year ago

src/vstdlib/osversion.cpp its part of source 2 engine. it needs updated. Dota update not fixed this

P.S i tested apple game porting toolkit 60 avg fps crashes to menu sound trash and freezing) don't usable for Dota(

rylm commented 1 year ago

I was able to successfully launch Dota by injecting a dylib with modified open().

What I did:

  1. Created fake_SystemVersion.plist with the same changes that @dez64ru had suggested (14.0 replaced with 13.4). You can find the original file at /System/Library/CoreServices/SystemVersion.plist.
  2. Compiled
    
    #include <stdio.h>
    #include <unistd.h>
    #include <string.h>
    #include <fcntl.h>

define DYLD_INTERPOSE(_replacement, _replacee) \

__attribute__((used)) static struct         \
{                                           \
    const void *replacement;                \
    const void *replacee;                   \
} _interpose_##_replacee                    \
    __attribute__((section("__DATA,__interpose"))) = {(const void *)(unsigned long)&_replacement, (const void *)(unsigned long)&_replacee};

int my_open(const char *filename, int flags, int mode) { int fd; if (strstr(filename, "SystemVersion.plist") != NULL) { printf("=== FAKING SystemVersion.plist \n"); filename = "/fake_SystemVersion.plist"; } fd = open(filename, flags, mode); return fd; }

DYLD_INTERPOSE(my_open, open)


using `gcc -arch x86_64 -o inject.dylib -dynamiclib inject.c` (replace path in code).

3. Placed `inject.dylib` into `<path to 'dota 2 beta' folder>/game`
4. Added `export DYLD_INSERT_LIBRARIES=inject.dylib` into `dota.sh` in the same folder (before the while loop).

**Please use at your own risk, I have no idea if you can get VAC banned for this.**
bushaev-denis commented 1 year ago

@rylm huge, dude. i had been so close) inject dylib should not lead to blocking, because we dont touch dota files, and this functionality builtin in dota (see launch options), commonly used for some linux DM (but for now i decide rollback to prev macos version until sonoma not published)

danginsburg commented 1 year ago

I've checked in a fix for this issue, it should be in the next Dota 2 Client update. Thanks for the reports.

AyushyaChitransh commented 1 year ago

Its fixed in this release. I can play once again. We can close this ticket now. If others can also play successfully, give a thumbs up, or thumbs down.

Edit: missed some 'c'. Typo fixes.