[Tutorial] Installing Steam on PS4 Linux
Posted: Wed Jun 01, 2016 9:35 pm
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.

Before we actually install Fedora, we need to partition the usb disk. Open up a terminal and type the following the commands.
Find your usb disk location (Ex: /dev/sda) and use parted to partition it.

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.

Select your disk and click on “I will configure partitioning” under storage options. Then click “Done”.

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”

Click on “Done” and then “Accept Changes” when the change summary page comes up.

Finally, click on “Begin Installation” when we’re back at the summary page. At this point, you should configure your root password and user.

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.
Enable ssh server.
Find the ip address of your VM.

We also need to set a password for root to do file transfer with ssh.
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.
Now we can install the patched Radeon drivers.
If you get an error with drm-utils, do
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.
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.
Edit /home/<user>/.xinitrc and add: (Create .xinitrc file if not present)
Disable gdm at startup:
We should also disable vsync to reduce graphical errors.
Edit /home/<user>/.drirc and add: (Create .drirc file if not present)
Enable ssh server at startup if you like.
Finally install Steam.
Exit out of chroot, unmount your drive and power down VirtualBox.
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:
Find your Fedora partition and mount it.
Start up Fedora
You should then get a login screen. Login and type
This will boot up your DM.
Open up a terminal and type:
You should have a line saying “AMD LIVERPOOL”. This means graphics acceleration is working.
You can also verify through Xorg.0.log file.
You should get something like:
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.


Tips:
To launch apps from remote computer through ssh, we can just add DISPLAY=:0
To restart UI based login, you can do:
And make it permanent by
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:
Then make it executable:
At Fedora start up, you should then have a wifi interface named mlan0. You can check by doing:
Use nmcli to search and connect to wifi networks.
Use bluetoothctl to connect to bt devices.
Recommended Software:
Kodi

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

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

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.

Select your disk and click on “I will configure partitioning” under storage options. Then click “Done”.

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”

Click on “Done” and then “Accept Changes” when the change summary page comes up.

Finally, click on “Begin Installation” when we’re back at the summary page. At this point, you should configure your root password and user.

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 /mntCode: Select all
systemctl restart sshdCode: Select all
ifconfig
We also need to set a password for root to do file transfer with ssh.
Code: Select all
passwd 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
Code: Select all
cd /tmp
unzip ps4-radeon-rpms.zip
cd ps4-radeon-rpms
dnf install --nogpgcheck *.rpmCode: Select all
rm -rf drm-utils-2.4.65-1.fc23.i686.rpm
dnf install --nogpgcheck *.rpmCode: Select all
rpm -ivp --replacefiles --replacepkgs *.rpmCode: Select all
dnf install awesomeCode: Select all
exec awesomeCode: Select all
ln -sf /usr/lib/systemd/system/multi-user.target /etc/systemd/system/default.targetEdit /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>Code: Select all
systemctl enable sshdCode: 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 steamCode: Select all
exit
cd /
umount -R /mnt
poweroffStartup 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 -lCode: Select all
mount /dev/sda2 /newrootCode: Select all
exec switch_root /newroot /newroot/sbin/initCode: Select all
startxOpen up a terminal and type:
Code: Select all
glxinfo | grep rendererYou can also verify through Xorg.0.log file.
Code: Select all
cat /home/<user>/.local/share/xorg/Xorg.0.log | grep -e Chipset -e AccelerationCode: Select all
[ 98.745] (--) RADEON(0): Chipset: "LIVERPOOL" (ChipID = 0x9920)
[ 100.806] (II) RADEON(0): Acceleration enabled
Code: Select all
LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1' steam &

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 &Code: Select all
systemctl restart gdmCode: Select all
systemctl enable gdm(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.koCode: Select all
chmod +x /etc/sysconfig/modules/sdhci.modulesCode: Select all
ip addrCode: Select all
nmcli device wifi list
nmcli device wifi connect <SSID|BSSID> password <password>
Code: Select all
systemctl start bluetooth
bluetoothctl
power on
agent on
default-agent
scan on
connect <Device BDADDR>
Kodi
Code: Select all
dnf install kodi
kodi-standalone
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