mameau%CWD%:> █
OFFLINE
$ cat article_0x13.txt
Testing a RPI as daily driver desktop (2021-08)       version 0x13 -- @sairukau

===============================================================================
Changelog
===============================================================================
v0x13  Compiled chocolate-doom (and others)
       Dropped scummvm on there again
       Compiled vkQuake2, BrogueCE, among-sus, Vulkan Examples
v0x12  Had a crack at compiling vkQuake, ran into issues, missing libmad
       Compiled vkQuake3, need to run both
       Added some info on Neverwinter Nights
       Added some additional links
v0x11  Setup a new rpi4 with twisteros for a lan the other day.
       Intended to run 0ad, Neverwinter Nights and minetest
       Added chaiki (now with sound), steamlink client
       Upgraded to MESA 20.3 (Vulkan option) from PiKISS (don't do this)
       This broke rendering in NWN, black textures
       SM64PCEX from PiKISS, black screen after upgrade of MESA
       Patched twister with the 20.3 patch from the twisteros faq page, fixed 
       NWN textures and SM64PCEX black screen
       Disabled ipv6 was causing routing errors with openwrt replayd
v0x10  <= has been removed, as the use case was different, refer to article 
       v0x10 use case see archive/


===============================================================================
Expected Use cases
===============================================================================
- General PC Use
- Gaming


===============================================================================
Hardware
===============================================================================
RPI4 
- 4G Model

Display
- 1920x1080 32" TV through HDMI

Keyboard/Mouse
- Wireless USB

Networking
- 5GHz wifi

32GB SD Card (shipped with RPi)
 - don't know what class when I remove the sd card next I'll make a note

Distro/OS
 - TwisterOS
   nb: lots of stuff is hardcoded to the pi user, strange design decision


===============================================================================
Changes
===============================================================================
OS Changes
- Upgrade to MESA 20.3


===============================================================================
Migration
===============================================================================
Not Appliciable, this is a completely new setup


===============================================================================
Usage
===============================================================================
Keyboard/Mouse
 Nothing of note, crappy wireless Rapoo keyboard

Applications 
 Chromium
 - Preinstalled

 Video Playback
 - Not Tested

 Storage performance
 - Not Tested, just running of SD atm

Network Performance
 Have some wifi dumb ap network issues atm and the dumb ap is routed over eop
 so speed isn't the greatest atm

  $ speedtest-cli --simple
  Ping: 38.756 ms
  Download: 36.01 Mbit/s
  Upload: 24.65 Mbit/s


===============================================================================
Customisations
===============================================================================
HDMI
 None, considering dropping the default res to 720p for performance reasons

Window Manager
 Nothing done here (yet), XFCE is default
 Comes with 4.12, will consider upgrading to 4.16 to get vblanking control

Audio
 None

GPU Accelation
 # cat /proc/device-tree/soc/firmwarekms@7e600000/status
 # cat /proc/device-tree/v3dbus/v3d@7ec04000/status

 both should return "okay"

Compile SDL2 enable x11/vulkan/kmsdrm, disabled rpi driver
 https://gist.github.com/sairuk/ebc85726f3e4418434fc0ef3572b5c2f

===============================================================================
(fake kms) Acceleration Performance
===============================================================================
Chromium
 TBA

Gaming
 See dedicated section 

xpresent (xfce 4.16)
              : glxgears : 
 glx (default) |    ??    | 
 xpresent      |    ??    | 
 off           |    ??    | 

sdl2 comparison
               :  vkquake  : vkquake2 : vkquake3 : vkoa :
 sdl2 (apt)    |               all failed               |
 sdl2 (vulk)   |     30    |    ??    |  80-100  |  ??  |

vulkan examples 
                 : fkms :
 vulkanscene     |  33  |

vk(g) vs ogl(g)
              :  ogl  :  vk :
 openarena    |   5   |     |
 quake(spasm) |   ?   |  ?  |

===============================================================================
(kms) Acceleration Performance
===============================================================================
To be redone on new setup

              : glxgears : 
glx (default) |    ??    | 
xpresent      |    ??    | 
off           |    ??    | 


===============================================================================
Overclock
===============================================================================
Overclocked values as applied from PiKISS

[all]
arm_freq=2000
gpu_freq=750
over_voltage=6

ref: v0x10 article


===============================================================================
Configuration
===============================================================================
TBA


===============================================================================
Applications (non-gaming)
===============================================================================
Discord webapp
 A discord webapp is packaged

X2GO DesktopSharing
 wont complete the connection

Vulkan Examples
 git clone --recursive https://github.com/SaschaWillems/Vulkan.git
 cd Vulkan/
 python3 download_assets.py
 mkdir build
 cmake -DCMAKE_BUILD_TYPE=Debug ..
 make -j$(nproc)
 cd bin
 ./gears

===============================================================================
Gaming
===============================================================================
Not expecting anything much in regards to this, most games will not run on arm
and Steam is not available for arm but Steamlink is so that may be a possiblity

Box86
 Great program, works well. Updater script included in twisteros settings

Steamlink
 Works well, no issues of note

Emulation
 MAME
  Unofficial up to date builds are available from https://stickfreaks.com/mame/

Neverwinter Nights (Box86)
 Get around ~25fps @ 1920x1080 Good settings
 Sound works with 32bit pulse libs installed and padsp32 mod
 - https://mameau.com/linux/32bfixes/

Minetest
 Compiled 5.4.1 from source, cloned and compiled

 Use as an fps benchmark maybe? (from v0x10 article)
 - 800x600   windowed   ~25fps  (default)
 - 1280x720  windowed   ~23fps
 - 1920x1080 Fullscreen ~17fps

Chiaki (PS4 Remote play)
 Works extremely well, install libqt5multimedia5-plugin for sound support, 
 compile from main repo

 https://sr.ht/~thestr4ng3r/chiaki/

 Compile notes
 https://gist.github.com/sairuk/96072fe2aef08464496d2255a31caf93

 Runs fine, set it to 720p

Steam (Box86 wrapped)
 Have no real interest in this but its preinstalled so may take a look

Lutris (Box86 wrapped)
 This is a decent general purpose game launcher, be nice to see if with custom
 rpi4 runners, maybe it does this already. I need to dig a bit deeper

SM64PC Ex Linux port
 Available through PiKISS, runs well on standard twisteros
 - avoid upgrading vulkan through PiKISS it is breaking

vkQuake
 https://github.com/Novum/vkQuake

 build
  apt-get install libmad0-dev
  git clone https://github.com/Novum/vkQuake
  cd vKQuake/Quake
  make CFLAGS="-mcpu=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard"  -j$(nproc) 
  ./vkquake

 wouldn't run without recompiling SDL2 with x11/vulkan support

vkQuake2
 https://github.com/kondrak/vkQuake2
 See README.md for requirements

 build
  git clone https://github.com/kondrak/vkQuake2
  cd vkQuake2/linux
  make release

 doesn't run, errors out even with SDL2 vulkan support
 rpi4 vulkan driver doesn't support atomics

vkQuake3
 https://github.com/suijingfeng/vkQuake3
 Required manual patches
 GLSL issues
  - https://github.com/suijingfeng/vkQuake3/issues/13
  file: code/renderergl2/tr_glsl.c ln: 270
 imminitrin support for SDL
  - https://github.com/suijingfeng/vkQuake3/issues/14
  use: -DSDL_DISABLE_IMMINTRIN_H

 build
  git clone https://github.com/suijingfeng/vkQuake3
  cd vkQuake3
  make CFLAGS="-mcpu=cortex-a72 -mfpu=neon-fp-armv8 -DSDL_DISABLE_IMMINTRIN_H"  -j$(nproc)
  cd build/release-linux-arm
  ./ioquake3.arm

 wouldn't run without recompiling SDL2 with x11/vulkan support

Openarena
 Packaged build runs like a dogs breaksfast, don't use it

vkOpenarena
 https://github.com/suijingfeng/vkOpenArena

 build
  git clone https://github.com/suijingfeng/vkOpenArena
  cd vkOpenArena
  make -j$(nproc)
  cd release-linux-arm/
  ### grab the assets from openarena.ws and extract to baseoa
  ./openarena.arm

DOOM
 Runs well, the chocolate project retaining as much vanilla DOOM as possible,
 it also supports/builds heretic, hexen, strife binaries
 needed libsdl2-mixer-dev and libsdl2-net-dev

 build
  git clone https://github.com/chocolate-doom/chocolate-doom.git
  cd chocolate-doom
  mkdir build && cd build
  cmake ..
  make -j$(nproc)
  mkdir -p $HOME/games/chocolate
  cp src/chocolate-* $HOME/games/chocolate

devolutionX
 Need the diablo.mpq and hellfile.mpq files, engine is available through
 pikiss built it though
  https://github.com/diasurgical/devilutionX/blob/master/docs/building.md
 
 build
  git clone https://github.com/diasurgical/devilutionX.git
  cd build
  cmake .. -DCMAKE_BUILD_TYPE=Release
  make -j$(nproc)
  # copy mpqs into dir
  ./devolutionx

ScummVM
 Packaged build installed

PPSSPP
 https://github.com/hrydgard/ppsspp.git

 build
  git clone --recurse-submodules https://github.com/hrydgard/ppsspp.git
  mkdir build && cd build
  cmake .. -DARMV7=ON -DUSING_EGL=OF
  make -j $(nproc)

BrogueCE
 https://github.com/tmewett/BrogueCE

 if using the custom sdl2 config installed in /usr/local/bin apply patch
 https://gist.github.com/sairuk/b9e1ec0d0878477f8a1290e6e7a6a9c1

 make -j$(proc)

amoung-sus
 text based telnetable among-us clone

 git clone https://git.sr.ht/~martijnbraam/among-sus
 make -j$(nproc)


Need to revisit (as per v0x10 article)
- ezQuake
- Aliens vs Predator
   PiKISS version?

 
===============================================================================
Wine Applications
===============================================================================
TBA


===============================================================================
Extra Credit
===============================================================================
TBA


===============================================================================
rpi-update
===============================================================================
I know audio hard locks i raised previously were addressed, this section is as
per v0x10 currently

ships with kernel:
Linux raspberrypi 5.10.52-v7l+ #1440 SMP Tue Jul 27 09:55:21 BST 2021 armv7l GNU/Linux

updated to:
Linux raspberrypi 5.10.52-v7l+ #1441 SMP Tue Aug 3 18:11:56 BST 2021 armv7l GNU/Linux

===============================================================================
Issues
===============================================================================
TBA