[GH-ISSUE #1409] How to play Bloodborne on Linux #471

Closed
opened 2026-02-27 21:06:27 +03:00 by kerem · 22 comments
Owner

Originally created by @PrimalSmite on GitHub (Oct 18, 2024).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/1409

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?

Originally created by @PrimalSmite on GitHub (Oct 18, 2024). Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/1409 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?
kerem closed this issue 2026-02-27 21:06:27 +03:00
Author
Owner

@Bettehem commented on GitHub (Oct 18, 2024):

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

<!-- gh-comment-id:2423382148 --> @Bettehem commented on GitHub (Oct 18, 2024): 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
Author
Owner

@KrisCris commented on GitHub (Oct 19, 2024):

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

<!-- gh-comment-id:2423903764 --> @KrisCris commented on GitHub (Oct 19, 2024): Or use ngoquang2708's build: https://github.com/ngoquang2708/shadPS4/actions
Author
Owner

@Litnesslegitimate commented on GitHub (Oct 20, 2024):

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

<!-- gh-comment-id:2425113230 --> @Litnesslegitimate commented on GitHub (Oct 20, 2024): > 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](https://github.com/user-attachments/assets/85a02582-5b93-48e1-9f66-d09533996ab7)
Author
Owner

@LordDaveTheKind commented on GitHub (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.

<!-- gh-comment-id:2451517017 --> @LordDaveTheKind commented on GitHub (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.
Author
Owner

@TerminusDeus commented on GitHub (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.

<!-- gh-comment-id:2452628917 --> @TerminusDeus commented on GitHub (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.
Author
Owner

@LordDaveTheKind commented on GitHub (Nov 2, 2024):

@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.

<!-- gh-comment-id:2453051247 --> @LordDaveTheKind commented on GitHub (Nov 2, 2024): > @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.
Author
Owner

@ilya-zlobintsev commented on GitHub (Nov 3, 2024):

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.

<!-- gh-comment-id:2453549313 --> @ilya-zlobintsev commented on GitHub (Nov 3, 2024): 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`.
Author
Owner

@gnusenpai commented on GitHub (Nov 3, 2024):

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?

<!-- gh-comment-id:2453599266 --> @gnusenpai commented on GitHub (Nov 3, 2024): 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?
Author
Owner

@LordDaveTheKind commented on GitHub (Nov 5, 2024):

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.

<!-- gh-comment-id:2457808509 --> @LordDaveTheKind commented on GitHub (Nov 5, 2024): > 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.
Author
Owner

@GHU7924 commented on GitHub (Nov 18, 2024):

Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.11.7-300.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 6 × Intel® Core™ i5-8600K CPU @ 3.60GHz
Memory: 31.3 ГиБ of RAM
Graphics Processor: NVIDIA GeForce RTX 3070/PCIe/SSE2

Build ac30fdd (by ngoquang2708)
If I select my video card, I get a black screen.
If I select another option (screenshot), I can get into the game, but the character creation screen freezes.
Снимок экрана_20241118_230605
Снимок экрана_20241118_225426

In this topic #1540, it was indicated why this is happening, but I do not know how plausible it is. I play without mods.

I have a question too:
Why is there no 'User' folder next to the 'Shadps4-qt.AppImage' file?
I could solve the hang problem by adding a save file, but I don't have folder 'User' to host this file.
Снимок экрана_20241118_230649

I wanted to compare the performance of the emulator for different operating systems, but so far it has not worked out.

<!-- gh-comment-id:2484041236 --> @GHU7924 commented on GitHub (Nov 18, 2024): Operating System: Fedora Linux 41 KDE Plasma Version: 6.2.3 KDE Frameworks Version: 6.8.0 Qt Version: 6.8.0 Kernel Version: 6.11.7-300.fc41.x86_64 (64-bit) Graphics Platform: Wayland Processors: 6 × Intel® Core™ i5-8600K CPU @ 3.60GHz Memory: 31.3 ГиБ of RAM Graphics Processor: NVIDIA GeForce RTX 3070/PCIe/SSE2 Build ac30fdd (by ngoquang2708) If I select my video card, I get a black screen. If I select another option (screenshot), I can get into the game, but the character creation screen freezes. ![Снимок экрана_20241118_230605](https://github.com/user-attachments/assets/daca79f2-18db-4036-a3e8-92c6c09e9a41) ![Снимок экрана_20241118_225426](https://github.com/user-attachments/assets/9363b9f5-6a77-4971-8184-1a8369b2c828) In this topic #1540, it was indicated why this is happening, but I do not know how plausible it is. I play without mods. I have a question too: Why is there no 'User' folder next to the 'Shadps4-qt.AppImage' file? I could solve the hang problem by adding a save file, but I don't have folder 'User' to host this file. ![Снимок экрана_20241118_230649](https://github.com/user-attachments/assets/eda21e4f-36fa-4c05-997d-de7113b46541) I wanted to compare the performance of the emulator for different operating systems, but so far it has not worked out.
Author
Owner

@ChetanSaini726 commented on GitHub (Nov 19, 2024):

@GHU7924 Maybe the user folder is in the ~/.local directory. May you please share the save file you have.

<!-- gh-comment-id:2484851213 --> @ChetanSaini726 commented on GitHub (Nov 19, 2024): @GHU7924 Maybe the user folder is in the ~/.local directory. May you please share the save file you have.
Author
Owner

@ngoquang2708 commented on GitHub (Nov 19, 2024):

It is in .local/share/shadPS4 by default.

<!-- gh-comment-id:2484866838 --> @ngoquang2708 commented on GitHub (Nov 19, 2024): It is in ```.local/share/shadPS4``` by default.
Author
Owner

@ngoquang2708 commented on GitHub (Nov 19, 2024):

savedata.zip

<!-- gh-comment-id:2484872913 --> @ngoquang2708 commented on GitHub (Nov 19, 2024): [savedata.zip](https://github.com/user-attachments/files/17811151/savedata.zip)
Author
Owner

@GHU7924 commented on GitHub (Nov 19, 2024):

@ChetanSaini726 @ngoquang2708 Thanks I found it))
But has it always been like this, or has the path been changed? I just remember what was different or I'm just confusing it with another emulator?

In which case, if someone urgently needs it, you can download the save on NexusMods - Save file after character creator.
(If it is not possible to create the file yourself in another operating system)

The save file has just been created in the Main Build Win-qt.
It didn't work out any further anyway, the emulator closes with a critical failure.
Снимок экрана_20241119_143353
Снимок экрана_20241119_142717

[Debug] signals.cpp:SignalHandler:76: Unreachable code!
Unhandled access violation at code address 0x7fe30e6c880e: Read from address 0x7fdf085c5b58

shad_log.txt

Next attempt

[Debug] liverpool.cpp:operator():298: Assertion Failed!
NOP hint is missing in CB setup sequence

shad_log.txt

Next attempt 2
If you do not press anything in the main menu and the video starts, it will be:

[Debug] liverpool.cpp:ProcessGraphics:200: Unreachable code!
Unsupported PM4 type 0

shad_log1.txt

Next attempt 3
If you do not press anything in the main menu and the video starts, it will be:
Снимок экрана_20241119_145929

[Debug] signals.cpp:SignalHandler:76: Unreachable code!
Unhandled access violation at code address 0x9026bc1c3: Read from address 0xd2

shad_log2.txt

I still can't play Bloodborne on Linux))
Maybe I didn't say anything new, but nevertheless, this is my experience of using ShadPS4 on Linux.

<!-- gh-comment-id:2485558522 --> @GHU7924 commented on GitHub (Nov 19, 2024): @ChetanSaini726 @ngoquang2708 Thanks I found it)) But has it always been like this, or has the path been changed? I just remember what was different or I'm just confusing it with another emulator? In which case, if someone urgently needs it, you can download the save on NexusMods - Save file after character creator. (If it is not possible to create the file yourself in another operating system) The save file has just been created in the Main Build Win-qt. It didn't work out any further anyway, the emulator closes with a critical failure. ![Снимок экрана_20241119_143353](https://github.com/user-attachments/assets/94c40078-9175-450e-b565-9cfec871ba2a) ![Снимок экрана_20241119_142717](https://github.com/user-attachments/assets/718ad2e5-1a92-4acd-a668-393761bdbd03) >[Debug] <Critical> signals.cpp:SignalHandler:76: Unreachable code! >Unhandled access violation at code address 0x7fe30e6c880e: Read from address 0x7fdf085c5b58 [shad_log.txt](https://github.com/user-attachments/files/17814659/shad_log.txt) Next attempt >[Debug] <Critical> liverpool.cpp:operator():298: Assertion Failed! >NOP hint is missing in CB setup sequence [shad_log.txt](https://github.com/user-attachments/files/17814879/shad_log.txt) Next attempt 2 If you do not press anything in the main menu and the video starts, it will be: >[Debug] <Critical> liverpool.cpp:ProcessGraphics:200: Unreachable code! >Unsupported PM4 type 0 [shad_log1.txt](https://github.com/user-attachments/files/17814904/shad_log1.txt) Next attempt 3 If you do not press anything in the main menu and the video starts, it will be: ![Снимок экрана_20241119_145929](https://github.com/user-attachments/assets/dcdc5f04-3166-4f88-b503-793426896b77) >[Debug] <Critical> signals.cpp:SignalHandler:76: Unreachable code! >Unhandled access violation at code address 0x9026bc1c3: Read from address 0xd2 [shad_log2.txt](https://github.com/user-attachments/files/17814939/shad_log2.txt) I still can't play Bloodborne on Linux)) Maybe I didn't say anything new, but nevertheless, this is my experience of using ShadPS4 on Linux.
Author
Owner

@ngoquang2708 commented on GitHub (Nov 19, 2024):

@GHU7924 Try my linux-hack branch

<!-- gh-comment-id:2485606313 --> @ngoquang2708 commented on GitHub (Nov 19, 2024): @GHU7924 Try my ```linux-hack``` branch
Author
Owner

@ngoquang2708 commented on GitHub (Nov 19, 2024):

bb and bb-more-kernel include unstable PRs

<!-- gh-comment-id:2485611019 --> @ngoquang2708 commented on GitHub (Nov 19, 2024): ```bb``` and ```bb-more-kernel``` include unstable PRs
Author
Owner

@GHU7924 commented on GitHub (Nov 19, 2024):

There is no difference. Okay, I can still play on Windows-qt build, maybe I'll come back later to test builds for Linux.

<!-- gh-comment-id:2485753862 --> @GHU7924 commented on GitHub (Nov 19, 2024): There is no difference. Okay, I can still play on Windows-qt build, maybe I'll come back later to test builds for Linux.
Author
Owner

@kingopai1 commented on GitHub (Nov 21, 2024):

Hey ngoquang, how do you try your linux-hack branch?

<!-- gh-comment-id:2489802256 --> @kingopai1 commented on GitHub (Nov 21, 2024): Hey ngoquang, how do you try your linux-hack branch?
Author
Owner

@Hermiten commented on GitHub (Dec 14, 2024):

A lot of things have been made since this issue and the solution.
I'm closing it and we will open a fresh one if needed

<!-- gh-comment-id:2543080468 --> @Hermiten commented on GitHub (Dec 14, 2024): A lot of things have been made since this issue and the solution. I'm closing it and we will open a fresh one if needed
Author
Owner

@Barionak commented on GitHub (Apr 5, 2025):

Используйте этот патч

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;

Затем перестройте и наслаждайтесь :D

<!-- gh-comment-id:2781044329 --> @Barionak commented on GitHub (Apr 5, 2025): > Используйте этот патч > > ``` > 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; > ``` > > Затем перестройте и наслаждайтесь :D
Author
Owner

@Barionak commented on GitHub (Apr 5, 2025):

Where should I enter this?

<!-- gh-comment-id:2781044519 --> @Barionak commented on GitHub (Apr 5, 2025): Where should I enter this?
Author
Owner

@StevenMiller123 commented on GitHub (Apr 5, 2025):

This is an ancient hack that's no longer needed to run Bloodborne on Linux-based devices.

<!-- gh-comment-id:2781045034 --> @StevenMiller123 commented on GitHub (Apr 5, 2025): This is an ancient hack that's no longer needed to run Bloodborne on Linux-based devices.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#471
No description provided.