Thursday, December 29, 2022

The importance of reading documentation

Linux has a few great tools that allow people to game easier with better performance.

One of these very important tools is a program called gamescope. Gamescope does some very complex things, but to keep it easy for a layman, it runs your game and lies to it about how big your computer screen is. You can run a game in a normal window, instead of in fullscreen, and gamescope will tell the game that your computer is actually only a resolution of 1280x720, but output to a window the size of 1920x1080. This allows for a couple of interesting gaming hacks for better performance.

The main performance boost granted by gamescope is that it allows you to apply AMD FSR upscaling to any game. This is possible because the game thinks it is running in exclusive fullscreen, so FSR is able to treat the window as the screen and apply upscaling to it, so your game can run at a lower resolution but render out at a higher one. It also allows any game no matter how old to apply a framerate limiter as gamescope is able to lie about the refresh rate of the screen as well.

It is important to read the documentation though, as I used to think I was using gamescope on my system to help with performance, but found one very important requirement - you must run your game in fullscreen mode or else nothing will take effect. I run all of my programs in windowed mode so I can multitask easier while I play, and many games nowadays default to fullscreen-windowed instead of exclusive fullscreen, which was preventing gamescope from helping with performance. Only after a quick debugging session last night and some reading this morning did I rediscover this very important requirement. You will know gamescope is working because when you set your game to exclusive-fullscreen, the max offered (or only offered) fullscreen resolution should be your configured virtual nested resolution.

The second useful tool is mangohud, which displays frametimes and system info on top of any game (as long as it uses Vulkan). One very important note I found after reading the documentation is that: if you are using gamescope and mangohud, you must run gamescope first, and then use gamescope to run mangohud, and then use mangohud to run your game, like so:

$ gamescope ${gamescope_options} -- mangohud -- "$@"

If you do not apply things in this order, mangohud will cause gamescope to crash on startup. Also, do not use the gamescope option --steam outside of Steam, or else weird things will happen. You have been warned.

Using both of these tools together helps a system that is performance limited by its hardware use software to side step these constraints and gives a longer lifespan to the system. How fun, thanks Linux (and Valve)!

More code and stuff later next week.

Stay tuned!

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================

Wednesday, December 28, 2022

2022 In Review

What a year it's been!

2022 In pyamsoft apps

2 New Android applications were created this year. Trickle, an automatic power-saving application that uses Android's Low-Power mode automatically, was released on the first week of January 2022. TetherFi, a no-root WiFi tethering hotspot application, was released in May of 2022. Both of these applications are currently supported, run on the latest Android 13, and are available today for your device!

Sadly, I also had to retire some Android applications this year, as there is only so much free time in a day. 2 old Android applications were retired this year. FridgeFriend, a light touch food inventory application, and SplatTrak, a map rotation tracker for Splatoon 2 (3) were both retired this year. They do not support the latest Android 13, and there is sadly no guarantee they will continue to work on new devices. I hope you got the chance to enjoy them while they were around.

On the desktop front, pyamsoft continues to maintain a handful of Linux applications. pstate-frequency is still live and working (though as frequency stepping in the kernel gets more robust it becomes more and more hands off). bubblewrap-wrap gained support for pipewire audio, and is generally less-needed as more applications continue to get official Flatpak versions. bubblewrap-wrap will continue to exist though as there will be many applications that benefit from it's lighter sandboxing and home isolation, while also not being self-isolated enough to be a full Flatpak. dockerize is a new script that was created from a grouping of dotfiles, and helps to set up simple docker containers without docker-compose, that uses extremely strict sandbox security by default, and also dynamically allocates a new container user to run the container as, instead of running the container as the host machine user. It exists as a lighter, script alternative to docker-compose, though it is generally intended for simple setups instead of full service containerized environments. I generally use it on my desktop machines to isolate instances of game servers, adblocking DNS, and media servers. git-ssh was updated to include support for ProxyCommands and still sees active use on all of my personal and work machines.

Two JavaScript Discord bots that I wrote initially in late 2021 got updated in 2022 to use Typescript and run completely self-serving inside of Docker. mousewatch is a simple Discord bot (not on the Bot Marketplace) that checks the Anaheim Disneyland Resort Magic Key Calendar periodically, and pings you when a spot opens up on a given day. stonk-bot is a simple Yahoo Finance bot which gets you company quotes quickly.

Overall, 2022 was a productive and interesting year for me on the side of code and creation. I am excited to see what new creations and advances 2023 brings for me in the world of product and application development.


2022 In Gaming

Personally, I think this year was a bit rough for gaming. At the start of the year I was generally glued on the Nintendo Switch, though as the year went on I moved off the Switch and more towards the PS4 and Steam gaming on Linux. I think the big winner of the year for me as far as new gaming advancements is Heroic which kept me connected to the Epic Games store and all of it's various freebies throughout the year. The easy integration with Wine is almost as seamless as Valve's Proton project is, and its always good to keep healthy competitors in the ecosystem. I may have a larger gaming focused posting later on, but suffice to say the games that kept my interest this year are largely the games that did last year too: Super Smash Bros Ultimate, Tetris Effect, Bloons TD6, Slay the Spire, Mario Tennis. Some newcomers to my generally rotating catalog were: OpenRCT2, Trombone Champ, and Orcs Must Die 3. Mario Kart 8 made a resurgence given the release of it's Booster Course pack, and I see myself continuing to pick it up in 2023. I've started playing Orcs Must Die 3 on Steam and its a fun co-op time. I look forward to Disney Speedstorm, whenever it ends up releasing in 2023.

You may notice that many of these games did not release in 2022. I think that summarizes my general thoughts on new releases in 2022. There were some releases I did pick up that I think are enjoyable however.

Elden Ring was a smash hit in February, and though I am awful at it and have fallen off of it since it released (because I am just not good enough), I do not deny that I had a ton of fun with it for the couple of months that I was able to keep up. Modern Warfare II released, and it is fun, but extremely buggy and I generally find myself lacking a reason to keep coming back to it. I have yet to play God of War, but its on my radar - and I've heard only good about it. I enjoyed Cult of the Lamb on Nintendo Switch when it released, and beat it within a week, but it was a buggy slow mess and I have not touched it at all since the first completion. 

So many Nintendo Switch games were disappointing this year. Nintendo Switch Sports was a huge disappointment, even if I only really purchased it to bowl - it was still a sorry excuse for a follow up to Wii Sports. Lego Skywalker Saga was a good game and a solid Star Wars entry, but as with many games this year, once you take a small break, you fall off forever and never come back. Same with Disney Dreamlight Valley. Same with Splatoon 3. Same with Pokemon (both Arceus and Violet). The best games that came to the system this year, aside from Kirby, were remakes. Persona 5, 13 Sentinels, Skyrim (again, again (again)), Stanley Parable, Nier Automata. The Switch this year was rough. The console is showing it's age. Or maybe I am.

2022 In Health

Not the best, not the worst. Mentally I feel still motivated to do new things and see new places. I'm generally comfortable where I am. Physically I don't find myself any unhealthier after the holidays than before - which I suppose is a win in my book. I've fallen into a bit of a rut and have found that forcing myself outside to break up the monotony of being at home in a single room apartment helps. The market continues to tank, but honestly I've learned to ignore it. There is other wealth in life besides money, and as the year ends I generally find myself rich in these other measures. I am still very active in trading though, as I continue to find it intellectually stimulating and very enjoyable.


Happy Holidays from pyamsoft, and here's to a Happy New Year!

Stay tuned!

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================

Tuesday, December 20, 2022

Tailscale and Your Traveling Setup

Let me set the stage for you.

I've got 2 computers. One which has a ton of media on it, the other which is my main (development) machine. Both of my computers are small form-factor, though the media machine is 10L (about the size of a backpack) and my main machine which is 4L in a K39v2 (it fits in the backpack).

As I joked, my entire main machine, along with keyboard, mouse, and portable monitor fits inside of one (heavy) backpack. I'm pretty proud of this completely portable setup, since I work from home and thus - I work from anywhere.

One thing that I can't always do though, is connect my main machine to my media machine when I'm away from home. Or, at least, I couldn't until recently. Let's chat briefly about networking solutions that bring two remote PCs together for LAN like communication.

Enter Tailscale, an open-source solution that lets you create a mesh VPN between multiple devices on the same tailscale account. I have it running on my Android phone, and both of my machines. This allows me to ping my media machine running on my home internet when I am outside (or on mobile data), without exposing any ports or my IP address to the outside world.

Because Tailscale lets me treat my machines as if they were on a local network together, I can open my SSH port on my media machine to LAN connections, and SSH into my media machine from anywhere in the world - as long as the SSH client is from my Tailscale account.

Since I can access my media machine from anywhere, I've also started running Gnome Remote Desktop on my media machine. I can connect via a fast RDP client, like Remmina to my media machine, to graphically manage it, from anywhere in the world.

I've been enjoying this setup so much, that I also enabled it on my Android phone! I have the Tailscale client on my phone, which allows it to connect remotely to my main machine and my media machine. I have the Remote Desktop Manager app which allows me to use RDP to connect to both of my desktop machines. All it takes is a USB hub for peripherals, and a TetherFi proxy for the devices around me, and I've got a completely mobile setup that uses my main or media machines compute power for builds and even things like video games.

One note about Android Tailscale: By default, something is wrong with the interaction between the Private-DNS setting and the VPN service. You can see more information about this issue here. This matters to me because my Android device uses a custom ad-blocking DNS setup via NextDNS - out of the box the Tailscale settings would not allow it to connect Private-DNS while the VPN was running. To resolve this, I followed a workaround in that issue above - Disable MagicDNS, and remove all other nameservers (you may also have to reboot your phone). Once done, even though Private-DNS in Android still displays the annoying "Couldn't Connect", it actually does connect just fine and my NextDNS dashboard confirms the connection. Odd.

In summary:
Use Tailscale to connect your devices together from anywhere.
Use SSH and RDP to remotely use and manage your devices.
Dongle a USB hub to your Android phone to plug peripherals in.
TetherFi proxy any other devices to your phone to share the Internet.
Remote work, remote play.

How neat. While I usually can just pack my main machine into a bag, in the rare instances where I don't have it with me but still want to get work done, I can use this remote setup. Does this make me any more productive though, or make updates come out faster? No!

Stay tuned...

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================

Monday, December 19, 2022

Old and New Again

PYDroid 26.1.0 will come with some new features when it releases sometime later next year.

First is that I am re-enabling the Version Update flow in app - so when a new pyamsoft Android application is uploaded to the store, you will receive a notification in the app to download and apply the new update.

Second is the changelog for updates will become optionally viewable upon upgrading. You will be able to click an easy button to view the changelog.

Finally you may notice non intrusive in-app rating prompts appearing after you have used each app for a while. Good reviews really help me out and motivate me to continue updating and creating new and interesting Android applications.

In speaking of new and interesting applications, I also bring some sad news. I have decided to drop support for SplatTrak, the unofficial Android frontend to Splatoon3.ink. The project is archived on GitHub, and unpublished from the Play Store. I no longer have time to maintain the application, it always lagged behind Splatoon3.ink because that was where it sourced data from, and I believe that Splatoon3.ink is just a better service to use. If you were using the application you can continue to do so, as it should still work, but it will not receive any more bugfixes or updates.

New applications should be coming soon though, so keep an eye out here for more exciting updates!

Stay tuned...

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================

Friday, December 9, 2022

PYDroid 26

PYDroid 26 is being published which brings some significant API changes.

First, the hard requirement of having to extend an Application class to install PYDroid, and use the PYDroidActivity base class is gone. Now instead, you can install PYDroid into your application using the Application.installPYDroid extension function, and you can extend your own BaseActivity and use AppCompatActivity.installPYDroid() to initialize it's UI bits.

This should help developers implement PYDroid into their own applications more easily, as we no longer have a hard dependency on PYDroid existing as a BaseActivity.

Future work in 26.1.0 will refactor pydroid-inject to use an explicit object graph instead of overriding getSystemService in a very hacky way. This will help reduce crashes from bad system graph initializations, and should further remove our dependency on very specifically structured Android code.

PYDroid 26 will be present in all pyamsoft application updates, which will be hitting a Play Store near you hopefully in the next week or so.

Happy Holidays!

Stay tuned...

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================