libretro / LRPS2

GNU General Public License v2.0
159 stars 47 forks source link

PCSX2 core does not work on Linux (sort of) - Flatpak stable works without issue, AppImage and compiling do not #225

Open mknepper opened 1 year ago

mknepper commented 1 year ago

So, this is going to be a little bit weird. What I can safely say is the compiling from source (Debian stable - using the Githib master repo) does not seem to work. When attempting to run the PCSX2 core, this happens:

Illegal instruction

Maybe I'm missing libaio1 and libaio-dev. So, I install them. Same thing:

Illegal instruction

Okay, fine. I'll try the AppImage (latest from the website as of the date of this issue):

Illegal instruction

Hmm, okay. Maybe my PC doesn't support PCSX2 (I have a Ryzen 2700x and an RX 580 8GB), but why not? Let's try running PCSX2 by itself. It has no problems and works without issue.

Huh. Well, that's strange. I'll try the latest stable Flatpak from Flathub. And guess what? It works!

So I tried everything again, this time with Debian testing. All the same issues. I made sure, 100%, that I had a PS2 BIOS. In the Flatpak version, I just used one single file (scph10000.bin) and it worked flawlessly. So, it shouldn't be the BIOS (why would it work in the Flatpak and nowhere else?).

Anyway, I've tried compiling/AppImages on Ubuntu 20.04 LTS, Debian Stable/testing, the latest Linux Mint (Cinnamon) and it's always the same problem: Illegal instruction

Note, again, the Flatpak works flawlessly and PCSX2 by itself always works. I even tried it on different hardware (a crappy A6-5400k) and everything was the same.

So, what's different in the Flatpak from all these machines/distros that allows it to work so well but nowhere else? Note I am using Flathub as my Flatpak repo.

I know other Linux users have complained about the pcsx2 core not wanting to work, and I think it's important to point out it works just fine in the stable Flatpak release. It might be useful for devs.

I will edit this post as I do more digging and also reply. I want to figure out what is missing from most standard AppImage and compiles that is not missing from Flathub's release.

Edit: After running "Update core info files" in RetroArch and updating all installed cores, PCSX2 no longer works on my A6-5400k machine (latest stable from Flathub).

hizzlekizzle commented 1 year ago

Can you post a full verbose log of you trying and failing to use the core? Is it failing on game launch or earlier (e.g., when loading the core in the first place)?

HoJo215 commented 1 year ago

Compiled it just now on Ubuntu 22.04 with no problems.

git clone https://github.com/libretro/pcsx2.git && cd pcsx2 && mkdir build && cd build
cmake .. -DLIBRETRO=ON -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)

Dependencies:

sudo apt install cmake g++-12-multilib libaio-dev libasound2-dev libcairo2-dev libegl-dev 
        libegl1-mesa-dev libgdk-pixbuf2.0-dev libgirepository-1.0-1 libgl-dev libgl1-mesa-dev 
        libgl1-mesa-dri libgles-dev libgles-dev libgles2-mesa-dev libglib2.0-dev libglu1-mesa-dev 
        libglu1-mesa libglvnd-dev libglx-dev libglx-mesa0 libglx0 libgtk-3-dev libgtk2.0-dev 
        libharfbuzz-dev libllvm10 liblzma-dev libpango1.0-dev libpcap0.8-dev libpulse-dev 
        libsdl2-dev libsamplerate0-dev libsoundtouch-dev libwxgtk3.0-gtk3-0v5 libwxgtk3.0-gtk3-dev 
        libx11-xcb-dev libxext-dev libxft-dev libxml2-dev portaudio19-dev zlib1g-dev ccache