Skip to content

Post installation things ​

Once you've installed Linux and are on the desktop, before rushing to do things, you may want to do a couple of additional steps.

To change some config files (don't worry, it won't hurt), I'll recommend nano because it just works. To save a file, use CTRL+S and to exit CTRL+X.

Update your system caution ​

Updating your system can be a bit of a pain in the ass, as some of the packages can't be updated because they contain modifications to make them work on the PS4.

CAUTION

Arch-based distros have repositories for drivers, other distros might not.

Arch based distros (with driver updates)

To update the drivers, you need to open the pacman config:

bash
sudo nano /etc/pacman.conf

If you installed an older distro, pacman might refuse to run, citing the following error: restricting filesystem access failed because Landlock is not supported by the kernel. If you run into this problem, search for the line containing DisableSandbox, and uncomment it by deleting the # character from the beginning.

If you installed a distro from the forums, you may have go to the [Options] section and delete the lines IgnorePkg and IgnoreGroup.

Then, under the REPOSITORIES section, add this (GitHub):

bash
[ps4-video]
SigLevel = Optional 
Server = https://dionkill.github.io/ps4-video-archlinux/repo/

NOTE

This repo will only work as long as the developer is updating it and keeping it online. It may be changed in the future.

Then, CTRL+S to save and CTRL+X to exit.

Finally, install the driver packages:

bash
sudo pacman -Syu lib32-mesa-ps4 mesa-ps4 lib32-libdrm-ps4 libdrm-ps4 xf86-video-amdgpu-ps4

The lib32-* packages need the [multilib] repository enabled in pacman.conf.

You should now have up-to-date drivers. If you want to, you can also go to the DIY section and make them from the AUR or from scratch!

Debian/Ubuntu based distros (WITH Mesa updates, WIP)

Use uar's script updater:

bash
wget https://uar.no/ps4/scripts/mesa-25.sh && sudo sh mesa-25.sh
Debian/Ubuntu based distros (disabled Mesa updates)

To make sure that the PS4 packages don't get updated run the command below:

bash
sudo apt-mark hold libgl1-mesa-dri libglx-mesa0 libegl-mesa0 libgbm1 mesa-vulkan-drivers libdrm2 libdrm-amdgpu1 xserver-xorg-video-amdgpu

Then, you should be free to update your system with:

bash
sudo apt update
sudo apt upgrade
Fedora based distros (untested)

To make sure that the PS4 packages don't get updated, you need to modify the dnf config:

bash
sudo nano /etc/dnf/dnf.conf

Then, at the line next to the [main] section:

bash
exclude=mesa-* libdrm* xorg-x11-drv-amdgpu

Then, you should be free to update your system with:

bash
sudo dnf update

Otherwise, you can always update everything but not the driver packages.

Fix language ​

Some pre-packaged distros you can download are in foreign languages. Unfortunately changing it from your DE (KDE, Gnome...) doesn't apply system wide. So here's a cheap rundown of all of the commands:

Debian/Ubuntu based distros
bash
sudo dpkg-reconfigure locales
Fedora based distros (to-do)

No idea, sorry

Arch based distros

You first need to edit your locale.gen, to generate your locale settings.

Comment out any language you don't want and uncomment yours:

bash
sudo nano /etc/locale.gen

Now, you can generate your locale with:

bash
sudo locale-gen

And last but not least, to change it system wide, add your language in this file:

bash
sudo nano /etc/locale.conf

If needed, change your language in your DE (KDE, Gnome...)

Reboot to apply these changes.

Change username and password ​

Honestly? Create a new user. It's faster. Or just keep it.

You can however change your password, by doing:

bash
passwd

To change the root password instead, use sudo passwd root. And setting a new password.

Download more RAM?! ​

No, seriously, we can do such a thing. To do that, we must use Swap and ZRAM.

Enabling Swap

CAUTION

It's ABSOLUTELY NOT recommended to use the internal HDD as swap, you'd just add fuel to the dumpsterfire of slowness that it already is. Disable it and move on.

Swap is storage that you are taking from your drive and allocating as "extra RAM": it works by moving unused software over there if extra main memory needs to be reserved for another program or game. This means we can improve the memory situation a little bit.

We will be using a swap file instead of a swap partition, as it's easier to change in size. First of all, we need to remove any existing swap:

bash
sudo swapoff -v /swapfile  
sudo rm /swapfile

Then, we need to enable new swap (8GB for this tutorial, you may change it).

NOTE

If your root filesystem is Btrfs, the fallocate method below makes a swapfile that won't work. Check with findmnt -no FSTYPE /. On Btrfs, run these two commands instead of the four below:

bash
sudo btrfs filesystem mkswapfile --size 8g /swapfile
sudo swapon /swapfile
bash
sudo fallocate -l 8G /swapfile # Allocates 8GBs
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

Finally, go to the fstab file, and check if the line /swapfile none swap sw 0 0 exists. If it doesn't, add it by going here and pasting it at the end of the file:

bash
sudo nano /etc/fstab
Enabling ZRAM

ZRAM on the other hand, is a part of your memory that you are compressing and allocating as swap. A kernel that supports it is necessary.

This means that we trade some CPU cycles for compressing and decompressing a part of your system memory. If it is enabled by default on Android you can guess how little performance impact there is.

To enable ZRAM, we need to install the zram-generator package. On Arch, we installing using:

bash
sudo pacman -Syu zram-generator

We then create the config file:

bash
sudo nano /etc/systemd/zram-generator.conf

And we paste this inside of it:

bash
[zram0]
zram-size=ram
compression-algorithm=zstd
swap-priority=60

zram-size is how much RAM we are allocating for the ZRAM device. Possible values are, for example, 50%, 2G (i.e. 2 GB), ram or max for maximum allocation (all RAM is ZRAM). Don't change the other values unless you really know what you're doing.

It is also recommended to disable ZSWAP. Many PS4 kernels disable it by default, so check first:

bash
cat /sys/module/zswap/parameters/enabled

N, or "No such file" (your kernel doesn't have zswap at all), means you're done. If it prints Y, you'll need to add an entry to your bootargs.txt (next to your bzImage, create the file if it doesn't exist).

bash
zswap.enabled=0

Remember that all entries in bootargs.txt must be separated by a space and stay on a single line.

Disabling ZRAM (if you need to)

To disable ZRAM, in case of swapping out kernels often for instance, you can simply remove the config file:

bash
sudo rm /etc/systemd/zram-generator.conf

However, if you wish to completely remove it, turn off the ZRAM swap first, then remove the package:

bash
sudo swapoff /dev/zram0
sudo zramctl --reset /dev/zram0
sudo pacman -Rns zram-generator

Then reboot the system. It should be gone.

Oh, and don't worry if you see that your installation is using a lot of memory. It's normal and is meant to happen in order to improve performance. Check this link to learn more.

Get more CPU performance ​

You may have realized that the PS4's CPU is pretty lacking and is most likely it's biggest disadvantage. But apart from a really optimized kernel (which we already have), what else can you do?

In computing you are always going to gain something and lose something else. Either your time, money, or in this case...

Disengage safety protocols, and run program

Yes, you can disable some security patches for attacks like Meltdown and Spectre, to gain some CPU performance. It does work and should have a noticeable improvement.

Obviously this is usually not recommended, but if all you want to do is game from your Steam library and occasionally browse the web (which is most of us), you are probably going to be fine. Also remember the console is already jailbroken... Not really going for security with that one.

To do that it's surprisingly simple. Open the bootargs.txt file next to your kernel, add this to the end of its single line (separated by a space), save and reboot:

bash
mitigations=off

And there you go! You can change it back anytime of course.

In the past there were overclocked kernels, but alas they don't make them anymore. This is because overclocked kernels... didn't actually overclock the CPU.

Do not go and download an older kernel to try as they don't work anymore either!

Hardware video (decode, encode, streaming) ​

The next Strawberry kernel (not released yet) turns on the PS4 video engines: UVD for decode and VCE for encode. This works on Aeolia, Belize and Baikal consoles. It isn't available on the PS4 Pro yet.

This means video playback, screen recording and game streaming can use the hardware instead of the weak CPU.

What the hardware can do (checked with vainfo on a Baikal slim):

  • Decode: MPEG-2, VC-1 and H.264
  • Encode: H.264 (Baseline, Main and High), up to 1920x1080
  • Encode only works with constant QP (CQP) rate control. The kernel rejects CBR and VBR.

To check that it works on your console, install libva-utils and run:

bash
vainfo

You should see VAEntrypointEncSlice lines for H.264.

Video playback (mpv)
bash
mpv --hwdec=vaapi video.mkv
Screen recording (OBS)

In OBS, go to Settings, Output, set the Output Mode to Advanced, and in the Recording tab pick the FFmpeg VAAPI H.264 encoder with CQP rate control.

Streaming to your phone or PC (Sunshine and Moonlight)

Install Sunshine (on CachyOS and other Arch based distros):

bash
sudo pacman -S sunshine

Create ~/.config/sunshine/sunshine.conf with this inside:

ini
encoder = vaapi
adapter_name = /dev/dri/renderD128
vaapi_rc = cqp
capture = wlr
  • vaapi_rc = cqp is required. Without it, Sunshine asks for CBR, the kernel rejects it and Sunshine crashes.
  • capture = wlr is for Wayland desktops based on wlroots. capture = kms also works, but the mouse cursor isn't shown in the stream.
  • On X11, capture = kms with the amdgpu SWcursor option shows the mouse (thanks GattoDev). Create /etc/X11/xorg.conf.d/20-amdgpu-cursor.conf with this inside, then log out and back in:
Section "Device"
    Identifier "AMD GPU"
    Driver "amdgpu"
    Option "SWcursor" "true"
EndSection

Start Sunshine and make it start with your desktop:

bash
systemctl --user enable --now app-dev.lizardbyte.app.Sunshine.service

If you use a firewall like ufw, open the Sunshine ports for your home network (change the network to yours):

bash
sudo ufw allow from 192.168.1.0/24 to any port 47984,47989,47990,48010 proto tcp
sudo ufw allow from 192.168.1.0/24 to any port 47998:48010 proto udp

Then open https://<your-ps4-ip>:47990 in a browser, create a login, and add your phone or PC in Moonlight with the PIN it shows. In Moonlight, use H.264, the PS4 can't encode HEVC or AV1.

Install more applications ​

To play games, these are the recommended softwares:

  • Steam
  • Heroic Games Launcher (for Epic, GOG and Amazon)
  • Lutris (for other PC games not in those launchers)
  • Prism Launcher instead of those other shitty Minecraft launchers
  • And a bunch of emulators!

To do that, if using anything other than Arch based distros, use your Store app from the Start menu and install as a Flatpak. It works well.

If you chose an Arch based distro however, use pacman or yay to install your packages. All packages you can even think of and more are available.