Skip to content

Instantly share code, notes, and snippets.

@tvidal-net
Last active November 29, 2023 14:22
Show Gist options
  • Save tvidal-net/dda93291eb5898d43ae268e063c928be to your computer and use it in GitHub Desktop.
Save tvidal-net/dda93291eb5898d43ae268e063c928be to your computer and use it in GitHub Desktop.
Chiaki4Deck PKGBUILD
# based on https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=chiaki-git
pkgname=chiaki4deck-git
_gitname=chiaki4deck
pkgver=1.3.0
pkgrel=1
pkgdesc="Unofficial PlayStation 4 remote play client"
arch=(x86_64)
url="https://github.com/streetpea/chiaki4deck"
license=('AGPL3')
depends=('qt5-base' 'qt5-multimedia' 'qt5-svg' 'sdl2' 'opus' 'ffmpeg' 'openssl' 'gcc-libs' 'fftw')
makedepends=('git' 'cmake' 'python-protobuf' 'libva' 'python-setuptools')
optdepends=(
'intel-media-driver: vaapi backend for Intel GPUs [>= Broadwell]'
'libva-intel-driver: vaapi backend for Intel GPUs [<= Haswell]'
'libva-vdpau-driver: vaapi backend for Nvidia and AMD GPUs'
'libva-mesa-driver: alternative vaapi backend for AMD GPUs'
)
provides=('chiaki')
conflicts=('chiaki')
source=(git+"${url}")
md5sums=("SKIP")
pkgver() {
cd ${_gitname}
git describe --long --tags | sed 's:^v::;s:\([^-]*-g\):r\1:;s:-:.:g'
}
prepare() {
cd ${_gitname}
mkdir build
git submodule update --init
}
build() {
cd ${_gitname}/build
cmake .. -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_BUILD_TYPE="Release"
make -j
}
package() {
cd ${_gitname}/build
make -j DESTDIR="${pkgdir}" install
install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}/"
for lic in ../LICENSES/*; do
install -m644 ${lic} "${pkgdir}/usr/share/licenses/${pkgname}/${lic##*/}"
done
}
@Mcrowley87
Copy link

Hi could you break this down into easy step by step guide?
Thanks

@tvidal-net
Copy link
Author

tvidal-net commented Jan 29, 2023

@Mcrowley87 there's a README.md following the PKGBUILD in the gist here. Thank you for testing it, please let me know if this helps you.

@Sasd92
Copy link

Sasd92 commented Jan 30, 2023

IMG_20230129_223249
Hi. Fantastic job!! Thank you. I followed all your steps and everything seems alright. No problems at all. But when try to install the PKGBuild it pop out an error. I will attach an image. Hope you can help me.

@mikeneverland
Copy link

Hello same error for me ... something wrong with compiler settings?

@lgallard
Copy link

lgallard commented May 24, 2023

@tvidal-net I had some issues when compiling it due to 1) missing dependencies and 2) existing files and directories, probably because I already had chiaki4deck

To sort it out I had to

  1. Install those dependencies (cmake, python-protobuf, python-protobuf and python-setuptool) and use the overwrite option:
 sudo pacman -S --noconfirm  --overwrite "*" \
 base-devel glibc linux-api-headers systemd mesa hidapi libevdev libglvnd qt5-base qt5-multimedia \
 qt5-svg sdl2 opus ffmpeg openssl gcc-libs fftw libva-mesa-driver cmake python-protobuf python-protobuf \
 python-setuptools
  1. Remove any reference or file from my previous chiaki4deck instalation:
sudo rm -rf  /usr/share/metainfo/re.chiaki.Chiaki4deck.appdata.xml
sudo rm -rf /usr/share/licenses/chiaki-git/
sudo rm -rf /usr/share/icons/hicolor/512x512/apps/chiaki.png
sudo rm -rf /usr/share/applications/chiaki.desktop

After these two steps, I follow your instructions an now chiaki4deck works flawlessly. Thanks for sharing your gist!

@lgallard
Copy link

After some SteamOS updates there's an issue with python-setuptools:

(130)(deck@steamdeck chiaki4deck)$  sudo pacman -S --noconfirm  --overwrite "*"  python-setuptools 
resolving dependencies...
looking for conflicting packages...

Packages (16) cython-0.29.32-2  python-appdirs-1.4.4-7  python-autocommand-2.2.1-1  python-inflect-6.0.0-1
              python-jaraco.context-4.1.2-1  python-jaraco.functools-3.5.2-1  python-jaraco.text-3.9.1-1
              python-more-itertools-8.14.0-1  python-ordered-set-4.1.0-1  python-packaging-21.3-1
              python-pydantic-1.10.2-1  python-pyparsing-3.0.9-1  python-tomli-2.0.1-1
              python-trove-classifiers-2022.9.26-1  python-validate-pyproject-0.10.1-1
              python-setuptools-1:63.4.2-1

Total Download Size:    0.02 MiB
Total Installed Size:  21.41 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 python-jaraco.text-3.9.1-1-any         17.4 KiB  10.9 KiB/s 00:02 [####################################] 100%
(16/16) checking keys in keyring                                   [####################################] 100%
(16/16) checking package integrity                                 [####################################] 100%
error: python-jaraco.text: signature from "Chih-Hsuan Yen <yan12125@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/python-jaraco.text-3.9.1-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature))
Do you want to delete it? [Y/n] 
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.

👎

@elbisbe
Copy link

elbisbe commented Jun 24, 2023

Hey! I fixed the signature problem the dirty way: Making pacman ignore signatures. You can probably revert this after you got it installed:

sudo sed -i "s/SigLevel    = Required DatabaseOptional/SigLevel = Never/g" /etc/pacman.conf
sudo sed -i "s/LocalFileSigLevel = Optional/#LocalFileSigLevel = Optional/g" /etc/pacman.conf

@tvidal-net
Copy link
Author

Hi guys, thank you for your contributions. I am testing the instructions on the latest version of SteamOS and will update them accordingly!

@IgnacioBerm
Copy link

I tried your tutorial, but chiaki keeps freezing after a few minutes on steam deck. Could you help me?
Thanks.

@tvidal-net
Copy link
Author

@IgnacioBerm if the defaults are not really working, I would recommend you try setting 30000 for video bitrate and 19200 audio buffer size, hardware acceleration as NVAPI is the most important change. I am going to try again with the most recent steamdeck version and check if anything has changed.

@IgnacioBerm
Copy link

Thanks for the reply. Yes, my configuration is as you mention. But my decoding setting is "vaapi", I can't find NVAPI like you said.

Best regards

@IgnacioBerm
Copy link

Yesterday i installed chiaki4deck in normal mode (searching it for install in desktop mode). And now works perfect.
Thanks.

@tvidal-net
Copy link
Author

It looks like recent steam deck upgrade broke this yet again. I'll try to get a more permanent solution for this issue.

@ccatx2323
Copy link

ive tried to follow the readme but i have no idea how to set this up. Can you please explain

@tvidal-net
Copy link
Author

ive tried to follow the readme but i have no idea how to set this up. Can you please explain

No problem, how far were you able to get? Were you able to download and extract the files?

@ccatx2323
Copy link

ccatx2323 commented Nov 29, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment