Console Hacking 2016: Postscript

Another year, another console hacking talk! This talk picks off where our lighting talk last year left off, and goes into detail of how we ported Linux to the PS4.

If you haven’t watched it, take a look before reading the rest of this post:

Slides: Online · Download / source code

Last year we demoed Linux on the PS4. Since then, we’ve gotten 3D graphics working, polished a number of drivers, and wrote some new ones. Linux on the PS4 is now actually quite a usable OS, with some minor caveats. We can run Steam OS and many games stably (e.g. Portal 2, but most games that run well on Linux should work). The current kernel is based on Linux 4.9.

Continuing last year’s theme of focusing on the Linux port and loader instead of on exploits, this year’s talk focused on the hardware and what it takes to bring up Linux on a very much non-PC-compatible x86 platform. We also covered how we originally got kernel binary dumps via a hardware PCI Express man-in-the-middle attack two years ago, and Radeon reverse engineering tools.

So, what’s next? Well, last year we said we’d like to upstream some of the work into the Linux kernel, and we still plan to do so. Now that the drivers have been cleaned up a bit, that is starting to look more likely.

In addition, we are working on PS4 Pro support. Linux currently boots on it, but the GPU driver needs fixups. We are also interested in adding PS4 support to the newer AMDGPU kernel driver, so it might make sense to defer graphics work on the Pro until that is ready.

The platform is mostly limited by its CPU, as the PS4 has 8 rather weak cores while most PC games are optimized for 1 or 2 fast cores. Nonetheless, even the Dolphin emulator runs surprisingly well; it currently seems to be bottlenecked on CPU geometry processing, which might be caused by the Radeon driver (and might improve if we make improvements to that or switch to AMDGPU). In practice, we get anywhere from 3 to 30FPS on Wind Waker, mostly in the 20-30FPS range depending on how much geometry is in the direction of the viewport (the 3FPS moments seem to be some kind of degenerate case and are rare). With the Null GPU mode we do get ~30FPS, so the Gekko CPU emulation seems to be just about fast enough. There is plenty of pixel performance, so rendering GameCube games at 1080p or even beyond is no problem (we accidentally switched to 4K rendering at one point and it wasn’t even that slow). The PS4 Pro should work better, obviously.

We also need to work on performance switching and power management. Right now I’m not sure if the fan is doing the right thing, and the CPU performance mode is hardcoded in an init script, as the kernel CPU scaling is not working properly. The GPU might not be working in its maximum performance mode either. We’ll be taking a look at those issues soon.

As we said last year, we are not planning to release our exploits, as we believe that there are plenty of people capable of developing their own exploits for the PS4 userland and kernel; we are leaving that to the community. That said, we previously offered to help out anyone with an exploit who wants to run Linux, and our offer still stands: if you have a way to run kernel code on your PS4 and you want to run Linux, feel free to drop me a line. We had several people do so throughout the year and that helped fix some Linux bugs and improve ps4-kexec.

As usual, our repositories are all on GitHub:

30 Comments

Pavel

Useless wo kernel exploit for 99.999999999999999999999999999% ps4 owners.

Furyhunter

Yo, that's super disrespectful and selfish of you to complain about that.

bla bla

and what do you want to do with linux on your ps4 ???

Pavel

Who cares about Linux. Even on ps3 it's abandoned.

Homebrew rules. :-)

There's no point in attacking PS4 OS except for piracy

This is cool, your PS4 can play steam games now if you're clever enough to break webkit and sony-freebsd (as well as do actual useful PC things)

Stop bellyaching dudeguy you can write your homebrew on this

Pavel

Look at list of Linux games in steam and soft. Bugged amd drivers for Linux. :-)

I clever to play steam games and work on windows.

Can the PS4 technically run Windows 10 and support DirectX?

robin994

tetechnically it can, and technically we could run ps4's Os on pc's

SirBacon

Yes, but good luck getting the source code to make the changes required to run.

samljer22

of course, i mean technically, the PS4 is just an AMD APU based home PC.
regardless of what he said, it IS a pc.

Regardless of how "custom" the hardware is, its still an AMD 86_x64

taking some of the hardware off 1 chip, and adding it back in another
doesnt mean it suddenly not a pc. it means
you have to be more crafty to get to the devices.

further in, he called sony lazy for doing it, which is also ridiculous; it
was never made to run linux. it was made for a custom OS. which
it does perfectly fine.

tl;dr its not a standard pc, but still a pc. it will need some custom shit done
to get there.

Phoenix

No, Windows as it stands today would not run on the hardware in the PS4. Windows targets PC hardware, which the PS4 is not.

It could probably be made to work, but it would be very difficult.

nisse

It's <tr><td> not tl dir

Chris

Thank you for investing so much time in getting this to work - impressive! I really had to laugh at the part with the PCI-E MITM attack over serial bus, but hey you got what you wanted.
Do those hardware quirkses (SATA-USB bridge; DP-HDMI converter, non-standard configs) fulfill any special aim (like obfuscation) or were they just hacked together by sony to get this thing working?

Ram R

hack this bitch for free play

Fabio Di Peri

Impressive work as always guys! I'm genuinely curious about one thing tho: you worked on Sony and Nintendo consoles from this and the past generations, why not Xbox?

Nikki

Will these hacks also work on the PS4 slim?

XXXsaras

i think if team make any tool for jailbreak ps4 and open section here can wim big money

http://forum.gsmhosting.com...

Virusgunz

does the 4.05 exploit also alows remote code execution like in 1.76 ?

Γιάννης ο Sniper

First you talk about "community" and then refuse to share your findings WITH the community.
Communities, are a funny thing, aren't they?

victor cranz

hello, ladies and mans.
I am victor. I am very interesting console hacking-2016.
I have some problems.
How to connect between the Atom Motherboard and Marvell chip?
If you know the PCIe bus layout, i'd like to tell me.

Yell Bots

The whole community is relying on a webkit sandbox exploit backdoored by microsoft or something. come up with something else.

𝔇𝔯𝔞𝔤𝔲𝔩𝔞

Can't wait for the day you guys achieve this on the Xbox One X.

I would like to thank you for your articles and the video. It was super interesting. One thing I was wondering about throughout the video: how long did it take for you to get to this point? It sounds like months of work just to get the Linux kernel to execute

Would it be possible to just solder a proper DP connector to the GPU's DP output instead of using the internal DP2HDMI Converter?

marcan

For Linux use, yes. For Orbis, no, because it wouldn't know what to do about something other than the DP-HDMI converter that's normally on there.