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

How to play Bloodborne on Linux #1409

Open
PrimalSmite opened this issue Oct 18, 2024 · 9 comments
Open

How to play Bloodborne on Linux #1409

PrimalSmite opened this issue Oct 18, 2024 · 9 comments

Comments

@PrimalSmite
Copy link

I have an already installed Bloodborne pkg with 1.09 patch. It runs on my Windows, but it not runs on my Arch Linux on the same machine. It just black screen. I know, that in the past, it was possible to run Bloodborne on Linux with hacked shadPS4 build, but now the hacked builds for Bloodborne are expired. Is it possible to run Bloodborne on Linux now?

@Bettehem
Copy link

Use this patch

diff --git a/src/core/libraries/kernel/thread_management.cpp b/src/core/libraries/kernel/thread_management.cpp
index 39c0eaf8..a8cee07c 100644
--- a/src/core/libraries/kernel/thread_management.cpp
+++ b/src/core/libraries/kernel/thread_management.cpp
@@ -1075,7 +1075,16 @@ ScePthread PThreadPool::Create(const char* name) {
         }
     }
 
+#ifdef _WIN64
     auto* ret = new PthreadInternal{};
+#else
+    // TODO: Linux specific hack
+    static u8* hint_address = reinterpret_cast<u8*>(0x7FFFFC000ULL);
+    auto* ret = reinterpret_cast<PthreadInternal*>(
+        mmap(hint_address, sizeof(PthreadInternal), PROT_READ | PROT_WRITE,
+             MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0));
+    hint_address += Common::AlignUp(sizeof(PthreadInternal), 4_KB);
+#endif
     ret->is_free = false;
     ret->is_detached = false;
     ret->is_almost_done = false;

Then rebuild and enjoy :D

@KrisCris
Copy link
Contributor

Or use ngoquang2708's build: https://github.com/ngoquang2708/shadPS4/actions

@Litnesslegitimate
Copy link

It runs on my Windows, but it not runs on my Arch Linux on the same machine. It just black screen.

I was having the same issue, using ngoquang2708's build fixed the black screen on arch for me. https://github.com/ngoquang2708/shadPS4/actions

But once I loaded into the game, there was an issue rendering things. It turns out RADV can't properly render bloodborne or something (Example: https://www.youtube.com/watch?v=cYJ8NdJzyTQ), so I had to make ShadPS4 launch with the AMDGPU-PRO driver: https://wiki.archlinux.org/title/Vulkan
After installing them I moved them to their own special location in /opt/amdgpu-stuff/ (Not needed, just wanted to make sure it only uses the PRO if I call it to)

Then you can launch shad with env VK_ICD_FILENAMES=/opt/amdgpu-stuff/amd_pro_icd64.json /ShadLocation/Shadps4-qt.AppImage
(If you don't want to move the driver it'll be env VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd64.json /ShadLocation/Shadps4-qt.AppImage)

A more convenient way I found to launch it was through steam though, I prefer having the desktop icon to launching it from the terminal every time (I also have it running with mangohud)
image

@LordDaveTheKind
Copy link

LordDaveTheKind commented Nov 1, 2024

It works great on my AMD card (Radeon RX6900XT), but not on my NVIDIA one (RTX3090).

NVIDIA Vulkan libraries are available and running fine for all the other games on my machine. Anything else I might need to check?

EDIT: nvm. It's actually a Wayland issue. Running it on Xorg works alright.

@TerminusDeus
Copy link

TerminusDeus commented Nov 1, 2024

@LordDaveTheKind maybe it would be helpful: I managed to run Bloodborne on KDE wayland with proprietary nvidia drivers under gamescope with qt appimage fetched from diegolix29's repo actions filtered by MainBB branch & FullBB branch.

@LordDaveTheKind
Copy link

@LordDaveTheKind maybe it would be helpful: I managed to run Bloodborne on KDE wayland with proprietary nvidia drivers under gamescope with qt appimage from fetched from diegolix29's repo actions filtered by MainBB branch & FullBB branch.

@TerminusDeus thank you. I can confirm the game runs perfectly with KDE wayland and gamescope. Even just by getting shadps4 from this repository, patching it and building it, it works as expected.

@ilya-zlobintsev
Copy link

Gamescope isn't actually needed, the issue appears to be related to the emulator not behaving properly on Wayland. Gamescope just forces xwayland incidentally, it seems to run fine for me just with QT_QPA_PLATFORM=xcb.

@gnusenpai
Copy link

For me, gamescope does make the difference for whatever reason. It just blackscreens under Xwayland, in either rootless or rootful mode. Maybe a Hyprland quirk?

@LordDaveTheKind
Copy link

Gamescope just forces xwayland incidentally, it seems to run fine for me just with QT_QPA_PLATFORM=xcb.

It doesn't work for me with Gnome Wayland and QT_QPA_PLATFORM=xcb. But it does work with gamescope, Gnome Wayland and QT_QPA_PLATFORM=wayland. I would keep this configuration for the time being.

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

No branches or pull requests

8 participants