Advertising (This ad goes away for registered users. You can Login or Register)

[Tutorial] Installing Steam on PS4 Linux

Post here your guides, tips, How-to, etc...
Locked
OsirisX
Posts: 26
Joined: Fri Apr 22, 2016 11:11 pm

[Tutorial] Installing Steam on PS4 Linux

Post by OsirisX »

You may have seen my video running Steam on the PS4 and this tutorial will explain the procedure. Originally I intended to use Ubuntu for this guide since there's already a tutorial for that but I was having problems enabling graphics acceleration. Instead I chose Fedora which seems to work fine.

Required Hardware:
1. PS4 with FW 1.76
2. USB disk with at least 8 GB

Required Downloads:
1. Fedora-Live-Workstation-x86_64-23-10.iso
2. ps4-radeon-rpms.zip
3. bZimage & initramfs.cpio.gz (Use my bZimage & sdhci-pci.ko for wifi & bluetooth support)
4. VirtualBox

Boot up Fedora using VirtualBox (with your usb disk attached) and wait until it reaches the welcome screen.
Image
Before we actually install Fedora, we need to partition the usb disk. Open up a terminal and type the following the commands.

Code: Select all

su
fdisk -l
Find your usb disk location (Ex: /dev/sda) and use parted to partition it.

Code: Select all

parted /dev/sda
mklabel msdos
mkpart primary fat32 1MiB 513MiB
mkpart primary ext4 513MiB 100%
quit
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
Image
Keeping the terminal open, go back to the welcome screen and click “Install to Hard Drive”. Click on “Installation Destination” once the summary page comes up.
Image
Select your disk and click on “I will configure partitioning” under storage options. Then click “Done”.
Image
Once the next screen comes up, select /dev/sda2 partition on the left. Use the mount point root “/” and select “Reformat” next to File System. Then click on “Update Settings”
Image
Click on “Done” and then “Accept Changes” when the change summary page comes up.
Image
Finally, click on “Begin Installation” when we’re back at the summary page. At this point, you should configure your root password and user.
Image
Before shutting down Fedora, we need to install the ps4 Radeon drivers.

Go back to the open terminal and mount the partition that you just installed Fedora to.

Code: Select all

mount /dev/sda2 /mnt
Enable ssh server.

Code: Select all

systemctl restart sshd
Find the ip address of your VM.

Code: Select all

ifconfig
Image
We also need to set a password for root to do file transfer with ssh.

Code: Select all

passwd root
Use WinSCP or Filezilla from your host to transfer over ps4-radeon-rpm.zip to /mnt/tmp. Use the ip address of your virtual machine, the user as root, and the password you set for root.
(Note: If you get connection errors, you may need to set your network adapter to bridged in VirtualBox network settings)

Go back to the VM’s terminal and chroot into installed Fedora.

Code: Select all

cd /mnt
mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/
chroot /mnt
Now we can install the patched Radeon drivers.

Code: Select all

cd /tmp
unzip ps4-radeon-rpms.zip
cd ps4-radeon-rpms
dnf install --nogpgcheck *.rpm
If you get an error with drm-utils, do

Code: Select all

rm -rf drm-utils-2.4.65-1.fc23.i686.rpm
dnf install --nogpgcheck *.rpm
In some cases, Fedora may skip installing patched libdrm if it detects the same version installed. Run this command to ensure all patched packages are installed.

Code: Select all

rpm -ivp --replacefiles --replacepkgs *.rpm
Gnome desktop can be too heavy for the ps4 to handle. I recommend installing something lighter such as “awesome”. Others may work as well but haven’t tested.

Code: Select all

dnf install awesome
Edit /home/<user>/.xinitrc and add: (Create .xinitrc file if not present)

Code: Select all

exec awesome
Disable gdm at startup:

Code: Select all

ln -sf /usr/lib/systemd/system/multi-user.target /etc/systemd/system/default.target
We should also disable vsync to reduce graphical errors.
Edit /home/<user>/.drirc and add: (Create .drirc file if not present)

Code: Select all

<device screen="0" driver="dri2">
    <application name="Default">
        <option name="vblank_mode" value="0"/>
    </application>
</device>
Enable ssh server at startup if you like.

Code: Select all

systemctl enable sshd
Finally install Steam.

Code: Select all

dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
dnf install --nogpgcheck steam
Exit out of chroot, unmount your drive and power down VirtualBox.

Code: Select all

exit
cd /
umount -R /mnt
poweroff
Copy over bZimage & initramfs.cpio.gz to the fat32 partition of your drive if you haven’t done so already.

Startup your PS4 with your usb drive in and boot up Linux with PS4 Playground. Once you get to the init screen, type:

Code: Select all

fdisk -l
Find your Fedora partition and mount it.

Code: Select all

mount /dev/sda2 /newroot
Start up Fedora

Code: Select all

exec switch_root /newroot /newroot/sbin/init
You should then get a login screen. Login and type

Code: Select all

startx
This will boot up your DM.
Open up a terminal and type:

Code: Select all

glxinfo | grep renderer
You should have a line saying “AMD LIVERPOOL”. This means graphics acceleration is working.
You can also verify through Xorg.0.log file.

Code: Select all

 cat /home/<user>/.local/share/xorg/Xorg.0.log | grep -e Chipset -e Acceleration
You should get something like:

Code: Select all

[    98.745] (--) RADEON(0): Chipset: "LIVERPOOL" (ChipID = 0x9920)
[   100.806] (II) RADEON(0): Acceleration enabled
Finally open up a terminal and start Steam. Because Steam comes shipped with it's own shared objects, we need to add LD_PRELOAD path before calling steam otherwise it will load older libs.

Code: Select all

LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1' steam &
Image
Image
Tips:
To launch apps from remote computer through ssh, we can just add DISPLAY=:0

Code: Select all

DISPLAY=:0 LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1' steam -bigpicture &
To restart UI based login, you can do:

Code: Select all

systemctl restart gdm
And make it permanent by

Code: Select all

systemctl enable gdm
Enabling wifi & bluetooth:
(Note: Wifi module is WIP and you may experience slow connection speeds)
You will need my patched my bZimage & sdhci-pci.ko kernel module. The driver has trouble loading when compiled as a built-in kernel module. Therefore we need to load it manually.

Replace previous bZimage with this one if you were using kernel by kR105. Copy sdhci-pci.ko to your Fedora's partion to /etc/modulefiles/sdhci-pci.ko.

Create the file /etc/sysconfig/sdhci.modules and add this line:

Code: Select all

exec insmod /etc/modulefiles/sdhci-pci.ko
Then make it executable:

Code: Select all

chmod +x /etc/sysconfig/modules/sdhci.modules
At Fedora start up, you should then have a wifi interface named mlan0. You can check by doing:

Code: Select all

ip addr
Use nmcli to search and connect to wifi networks.

Code: Select all

nmcli device wifi list
nmcli device wifi connect <SSID|BSSID> password <password>
Use bluetoothctl to connect to bt devices.

Code: Select all

systemctl start bluetooth
bluetoothctl
power on
agent on
default-agent
scan on
connect <Device BDADDR>
Recommended Software:
Kodi

Code: Select all

dnf install kodi
kodi-standalone
Image
What's not working?
Sound over hdmi (sound over spdif works), wifi is slow, ethernet(only gigabit works)

Workarounds?
Usb sound card, usb wifi, usb bluetooth, etc.

Notes:
Whenever updating packages with dnf, remember to exclude Radeon lib updates as they are unpatched for the PS4.

Code: Select all

dnf upgrade --exclude=libdrm*,mesa*,xorg-x11-drv-ati
Advertising
Last edited by OsirisX on Thu Jun 23, 2016 7:26 am, edited 7 times in total.
wololo
Site Admin
Posts: 3621
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: [Tutorial] Installing Steam on PS4 Linux

Post by wololo »

Posting to say thanks. I still don't have a PS4 1.76 so I cannot help confirm.
Advertising
If you need US PSN Codes, this technique is what I recommend.

Looking for guest bloggers and news hunters here at wololo.net, PM me!
HarmfulMushroom
Posts: 752
Joined: Wed Dec 25, 2013 10:02 pm

Re: [Tutorial] Installing Steam on PS4 Linux

Post by HarmfulMushroom »

I will be happy to try this out, and am very excited to as this is really all I want from the PS4 jailbreak scene, but more than likely won't be able to do anything until either tomorrow or Saturday. Will post results at that time, but I see no reason to believe it won't work perfectly fine as is. Thanks for the tutorial!
ipspx
Posts: 111
Joined: Wed Apr 18, 2012 11:16 pm

Re: [Tutorial] Installing Steam on PS4 Linux

Post by ipspx »

@osirisx what format does the usb hard drive have to before i start this tutorial?
And how do i ssh into fedora usinng firezilla?
OsirisX
Posts: 26
Joined: Fri Apr 22, 2016 11:11 pm

Re: [Tutorial] Installing Steam on PS4 Linux

Post by OsirisX »

ipspx wrote:@osirisx what format does the usb hard drive have to before i start this tutorial?
And how do i ssh into fedora usinng firezilla?
Any format. You'll be crating a new disk label which wipes the drive clean. And you'll need to type in the ip address of your virtual machine to transfer with Filezilla. To login, you can use something like Putty
ipspx
Posts: 111
Joined: Wed Apr 18, 2012 11:16 pm

Re: [Tutorial] Installing Steam on PS4 Linux

Post by ipspx »

Supposing my usb drive is /dev/sda1 should it be
parted /dev/sda1
mklabel msdos
mkpart primary fat32 1MiB 513MiB
mkpart primary ext4 513MiB 100%
quit
mkfs.fat -F32 /dev/sda
mkfs.ext4 /dev/sda2

or

parted /dev/sda
mklabel msdos
mkpart primary fat32 1MiB 513MiB
mkpart primary ext4 513MiB 100%
quit
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2

or
parted /dev/sda1
mklabel msdos
mkpart primary fat32 1MiB 513MiB
mkpart primary ext4 513MiB 100%
quit
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
OsirisX
Posts: 26
Joined: Fri Apr 22, 2016 11:11 pm

Re: [Tutorial] Installing Steam on PS4 Linux

Post by OsirisX »

ipspx wrote:Supposing my usb drive is /dev/sda1 should it be
parted /dev/sda1
mklabel msdos
mkpart primary fat32 1MiB 513MiB
mkpart primary ext4 513MiB 100%
quit
mkfs.fat -F32 /dev/sda
mkfs.ext4 /dev/sda2

or

parted /dev/sda
mklabel msdos
mkpart primary fat32 1MiB 513MiB
mkpart primary ext4 513MiB 100%
quit
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2

or
parted /dev/sda1
mklabel msdos
mkpart primary fat32 1MiB 513MiB
mkpart primary ext4 513MiB 100%
quit
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
The 2nd one.
handy333
Posts: 10
Joined: Sat Sep 19, 2015 2:02 am

Re: [Tutorial] Installing Steam on PS4 Linux

Post by handy333 »

OsirisX wrote:
ipspx wrote:@osirisx what format does the usb hard drive have to before i start this tutorial?
And how do i ssh into fedora usinng firezilla?
Any format. You'll be crating a new disk label which wipes the drive clean. And you'll need to type in the ip address of your virtual machine to transfer with Filezilla. To login, you can use something like Putty
I too am having a problem with the SSH but I found a workaround using a usb which I think is causing this not to work. It keeps saying that I don't have the password or something when I try to connect.

Edit:
Actually, my real problem is with "startx".

When I get to this part of the tutorial. It says that there is an error. Could it be the HDD I'm using?
OsirisX
Posts: 26
Joined: Fri Apr 22, 2016 11:11 pm

Re: [Tutorial] Installing Steam on PS4 Linux

Post by OsirisX »

handy333 wrote: Edit:
Actually, my real problem is with "startx".

When I get to this part of the tutorial. It says that there is an error. Could it be the HDD I'm using?
What error are you getting? Usually startx errors happen when there's a problem with graphics. Were you able to install the patched Radeon drivers?
LoSTUPRA
Posts: 5
Joined: Mon Jun 06, 2016 6:20 pm

Re: [Tutorial] Installing Steam on PS4 Linux

Post by LoSTUPRA »

OsirisX wrote:
Edit /home/<user>/.xinitrc and add

Code: Select all

exec awesome
Disable gdm at startup:

Code: Select all

ln -sf /usr/lib/systemd/system/multi-user.target /etc/systemd/system/default.target
We should also disable vsync to reduce graphical errors.
Edit /home/<user>/.drirc and add

Code: Select all

<device screen="0" driver="dri2">
    <application name="Default">
        <option name="vblank_mode" value="0"/>
    </application>
</device>
stuck here, i'm using gedit to edit thoose 2 file but they don't exist
i'm looking under /mnt/home/<username> am i correct?
Locked

Return to “Tutorials”