Home Computer related stuff 4
Computer related stuff

Work in progress

September 2, 2024 - Reading time: ~1 minute

New version of my website is in progress. That will also mark the change from nolemretaw.pl domain to krnlexception.dev (probably, I'm still thinking about TLD)

Read more
Computer related stuff

How to boot a PC from a Playstation Vita

August 10, 2024 - Reading time: 6 minutes

Sounds weird, I know. But it's possible and useful as a last resort, when your system can't start its bootloader, due to missing UEFI entry, or to boot an installation medium, and you don't have a USB stick nor another computer.

Requirements

  • Hacked PS Vita with 2 available storage devices (either 2 of them: built-in LCD Vita memory, sd2vita or an official memory card), and VitaDeploy installed.
  • USB cable to connect your Vita.
  • A Wi-Fi network (eg. your home Wi-Fi or hotspot from your phone).
  • Device with internet access and a FTP client (a phone also works great here).
  • Willingness to format a storage device and lose information on it.

Preparing

Formatting a memory card

  1. Open VitaDeploy.
  2. Scroll down and enter "Miscellaneous". (editor note: i don't know why this pic is stretched lol)
  3. Select "Format a storage device".
  4. In "Target: " select device which will serve as mass storage device exposed to UEFI. I selected "External MC" to use my official memory card. "Internal MC" selects internal memory card available on LCD Vita consoles, or one created on OLED consoles, and "SD2Vita" selects sd2vita.
  5. In "Filesystem: " select "FAT32". Note: PS Vita recognizes only exFAT for memory cards, so it won't be able to read it anymore without formatting.
  6. Click "Format target storage" and wait for it to finish. Warning: this deletes every piece of information your target device has.
  7. Wait for it to finish, and reboot your Vita.

Transferring a bootable image

This can be anything that UEFI will boot. Examples include system installation medium to install it or repair, a bootloader, or UEFI Shell. If you decide to use an .iso image, be sure to extract it before continuing.

  1. Download your image or UEFI executable of choice. I used UEFI Shell, and downloaded "shellx64.efi".
  2. Connect both PS Vita and your device with FTP client to the same Wi-Fi network, or turn on a Wi-Fi hotspot on device with FTP client, and connect your Vita to it.
  3. Open VitaDeploy, and select "File Manager".
  4. After it starts, press Start and in "SELECT Button" option, choose "FTP".
  5. Press Start again to exit this menu, and press Select. An FTP server will start with Vita IP address and server port (it should be 1337).
  6. Open FTP client on your other device, and connect it to Vita. When asked for credentials, don't enter any.
  7. There should be a list of partitions. Select the one assigned to device you formatted to FAT32, usually it will be ux0 or uma0. Good way to check it is by used size displayed by VitaShell. Empty partition should display 64.00 KB used, and contain only a directory named SceIoTrash. Enter it.
  8. Copy files extracted from your image to root of that partition, or if using a standalone .efi executable, copy it to  /efi/boot/, and name it bootx64.efi. Note: FAT32 doesn't allow for a single file to be bigger than 4 GiB.
  9. When it finishes, press circle to turn off FTP server.

The process

  1. Connect a USB cable to your Vita, and to your PC.
  2. Open VitaDeploy, enter "File Manager".
  3. Press Start, and this time in "SELECT Button" choose "USB", and in "USB device" choose device which contains your bootable medium, and press Start again to exit.
  4. Turn on your PC, and the moment it turns on, press Select to turn on USB mass storage device in VitaShell.
  5. Enter boot menu on your PC, and boot from "SONY "PS Vita" MC" USB device.
  6. PC should boot from .efi executable on your PS Vita.

That should be it, after booting, make sure to fix your system, so you don't have to boot from PS Vita every time.

Read more
Computer related stuff

Switching to Linux on my main PC - an experience

April 11, 2024 - Reading time: 7 minutes

"...running Windows 11 (I would love to migrate to Linux but compability issues and the pain of having to reformat my secondary drive to ext4)." ~about page

Yeah, I did it. On 10 march I officially installed Arch Linux on my main PC. As of publishing this post, it's been exactly a month since I ditched Windows in favour of Linux. This post will be all about of different (mis)adventures using Linux as my daily driver.

Installation

This part went mostly without problems. I've booted archiso, configured my system drive, installed Linux itself, KDE Plasma, PipeWire, NVIDIA drivers etc. And I was up and running pretty much on first try. "Pretty much" because I didn't put the correct boot partition UUID in rEFInd.

Then, I've wanted to install some Plasma apps, so I ran "pacman -S kde-utilities-meta kde-system-meta". After rebooting, NOTHING worked. Like I wasn't able to boot into Plasma, or even switch tty using CTRL+SHIFT+Fx combination. After some attempts, I was able to find out that D-Bus had some errors and didn't start. Fine, tried fixing, didn't work. I've found a topic about Arch not booting after a crash with a command that showed broken packages. And oh boy, there were a lot of them. Probably reinstalling the whole OS was faster than trying to fix this mess, so I did that, and I was back on Plasma desktop.

I encountered this issue once again recently, but luckily I had a backup of entire system.

Using NVIDIA GPU

I think that there can be a lot of things said about how Nvidia drivers on Linux that warranted Linus Torvalds saying "NVIDIA, fuck you" at a conference in 2012. I can probably consider myself lucky because I don't have that many issues with a NVIDIA GPU. The main issue is that on Wayland, Electron apps (like Spotify and Discord) flicker like crazy each time I try to do something in them.

Playing games

Honestly? Mostly plug and play. Most games I've played recently ran without issues (examples of Proton/Wine games I played in section about Wine compability).

After bad experience I had with games on Linux Mint, I'm actually suprised. But also kinda not because I have Arch on my laptop from November 2023 and I've played multiple games on it, native or not. I even managed to run GTA 5 once on it without any additional fixing.

As a big test for Wine and Proton I've installed Cyberpunk 2077, because this game didn't run AT ALL on Mint, with issues ranging from constant stuttering, to not launching at all.

Attempt 1 - stock

Heavy stuttering on intro, and after quitting Plasma froze.

Attempt 2 - Proton GE

Holy shit, it actually works! I'm not kidding, it works perfectly, except that it's using AMD FSR instead of DLSS, so I've tried other Proton version.

Attempt 3 - Proton 8.0-5

And that was it, game runs exactly like it was on Windows. I had to add 2 parameters to make it work:

--launcher-skip -skipStartScreen

But still, it's kinda random wherever it will work or not. Today after installing it again, it did not run on Proton 8.0-5 properly requiring me to switch to experimental, then to 8.0-5 and it started working again.

The only game that showed any kind of problems that I wasn't been able to fix, is Unreal Tournament '99. Yeah, old as fuck game, but I love it, even though I play on bots lmao. After installing Linux version of OldUnreal path 469d and getting it to run, mouse is kinda stuttering for some reason (video here). It might not be that visible on a recording, but yeah, it's stuttering.

Wine compability

As you may know, Windows has the biggest support in terms of available programs. It can be attributed to Windows immense popularity, which is partially because of... program support. Yeah, enough of that. What I mean by this is that it's somewhat hard to use Linux without Wine. Without it, my Steam library would have not 130 games, but a handful (mostly Valve titles).

Games I've tested and know run great on Proton:

  • Like a Dragon Gaiden: The Man Who Erased His Name
  • Yakuza: Like a Dragon
  • Prey (2017)
  • Geometry Dash
  • Need for Speed: Underground 2
  • Persona 5: Royal
  • Phasmophobia
  • Doom (2016)

For other programs that are not games, I currently use two, without issues. Those being Bulk Rename Utility and OpenMPT. They also run great without any problems, albeit looking ugly because of their Win32 controls.

First time using Plasma

So this was the first time I actually tried using Plasma, and... I love it! It's super fast, does (most) things how I want them, and except for that sleeping issue, I never had a major issue with it. The only minor thing is that built-in file archiver, Ark, can't decompress to my network share, but it's a really minor thing compared to how much I like Plasma. Before I also had an issue where Plasma was crashing or something when it was supposed to dim the screen and waking up to a black screen with cursor, but that issue was fixed in Plasma 6.0.2.

EDIT: I'm adding this after originally posting this, but I felt like this is important to mention, and it actually existed well before I've installed Plasma. The thing is that copying files over to a MTP device, like an Android phone does not work properly, because Dolphin throws an error when trying to merge directories on MTP device, making copying multiple stuff over basically impossible. It has been a bug since June 2023 in Dolphin 23.04.2, is confirmed and has not been fixed since.

Final words

Overall, I'm really happy with the switch I've made. Aside from minor (in relation to how much I like using Linux) stuff, like sound thing, sleep bug. I've switched between Linux and Windows twice before (first to Ubuntu for 2 days (lmao), second to Linux Mint), and this is the first time I actually don't miss Windows. This might not be the longest post ever, because there's not much to talk about, because switching over has been mostly painless, even if some issues took a while to track down and fix (for example output sink going to sleep even though it was supposed to stay idle). I think it's because I had experience using Arch Linux on my laptop and on my server, so I know how to configure it to work for me.

(yeah, I made it to look kinda like macOS. Because why not)

Read more
Computer related stuff

Migrating to a self-hosted server

March 2, 2024 - Reading time: 5 minutes

Welcome to first post on this website! I'll go through entire process of migrating a website, even though it's not that interesting (aka I just want to post something lol).

Part one: why

I've been using a rented VPS for a very long time (since 2020 I think), that was costing me about 25 zł (5,78 €/$6,28) each month to run. In December, I've bought this server, which has been running SMB and media server since then.

The decision to migrate was kinda an impulsive one, because why should I pay for a VPS when (thanks to my ISP being kind enough to allow port forwarding) I can run it at home, with a script to update Cloudflare with my IP.

So in the morning, I've finally made the decision: I'm sending a resignation for my VPS and moving everything to my home.

(screenshot is basically a resignation form)

Part two: how and "Failed to save file"

The first part went smoothly. I've compiled a custom version of nginx (I'm using ngx-fancyindex addon for my downloads section), installed PHP and php-fpm packages, moved my e-mail to a third party provider, and configured everything. At first I chose Grav for this website (ain't no way I'm having another attempt at writing my own flat file CMS, last time it went poorly, and in Javascript), so I went ahead and installed it.

But, there was a problem. It was complaining that it didn't have permission to save.

So, I made http (user who is running nginx and php-fpm) owner of website files. Nope. Then I used a script from Grav documentation to give files proper permissions. Still no. Finally, I've used a foolproof way of allowing anyone to do anything with a file, or, in other words, 777 permission. Nada. I was out of ideas on how to fix this, and I began scouring the web in hope of finding a solution. StackOverflow post one after another, and I was still trying to install.

After this, I've thought maybe there's a bug or something in Grav, so I've tried installing Bludit (which I'm running now).

Guess what error it also had.

I eventually gave up for some time, and took a nap.

I woke up and began searching for the solution again, searching for general "PHP cannot save file", and this time I actually found the solution.

Take a guess at what the issue was.

It turned out that systemd php-fpm service file mounts some directories (/usr, /boot, and /etc) as read-only.

And sure enough, checking php-fpm.service revealed that there is in fact an option which mounts these directories read-only.

So I quickly moved all files to /home/http, and everything was running perfectly.

Then I decided that I don't like Grav and moved to Bludit XD. I chose a dark theme (just looking at this white admin page hurts my eyes enough, I don't need to hurt them more by my webiste having a white theme), wrote about me page, and it's done.

Read more