Sunday 3 April 2022

How to fix Killing Floor (native Linux version) issues due to outdated SDL library

 

Killing Floor has a native Linux version, which is great, but the problem with it is the fact that it uses the very old SDL 1.2, and that has problems when alt+tabbing and has problems with wayland. So we'll fix this by replacing the SDL library.

Why not use the windows version in proton, you might ask? Well, for some people, it works great. However, on the laptop I use (Thinkpad with Intel HD Graphics) the proton version stutters a LOT.

This guide is for Fedora, so if you use another distro you'll have to use the correct package names.

Simply put, the fix is you install sdl12-compat.i686 with dnf or whatever package manager you use. It has to be the 32-bit version of sdl12-compat.

Then you replace "libSDL-1.2.so.0" in the game's "System" directory with the version from the package you just installed.

In my case on Fedora 36, it's:

$ cp /usr/lib/libSDL-1.2.so.1.2.50 steamapps/common/KillingFloor/System/libSDL-1.2.so.0

Done!

Edit: Also, maybe set "SDL_VIDEODRIVER=x11" %command% in launch options if using wayland.

Edit 2: Another option is to use Proton 5.13 with OpenGL instead of DirectX 9 (because OpenGL has messed up gamma on newer Proton versions)

Friday 5 November 2021

How to fix Yakuake window placement in KDE Wayland

 

How to fix Yakuake window placement in KDE Wayland:

Step 1:

Set up a window rule for org.kde.yakuake and add the property "Initial placement" and set the value to "Force" and "In Top-Left Corner" Like in this pic:

https://i.imgur.com/xqcweic.png

https://i.imgur.com/xqcweic.png

Step 2.

Change the width of yakuake to take up the entire width of your screen.

Step 3:

???

Step 4:

Profit!

Tuesday 26 October 2021

How to force an application to run in Xwayland instead of Wayland

I had a problem with the game osu!lazer in Fedora KDE Wayland today. I know how to force a flatpak application to run in Xwayland, but this was an AppImage.

This command fixed the issue:

env -u WAYLAND_DISPLAY ./osu.AppImage

So, to force a non-flatpak application to run in Xwayland, simply type in the terminal (or modify the launcher):

env -u WAYLAND_DISPLAY <insert-name-of-application>

For flatpak applications, it's a bit different.

Download Flatseal from flathub, change permissions of your application or game in Flatseal to remove the "Wayland" socket. In my experience, in versions of KDE lower than 5.23, you might need to disable "fallback-x11" socket as well.

Friday 8 October 2021

How to fix ugly/jagged fonts in flatpak GTK applications in Fedora 35 KDE wayland

The fonts in GTK/Gnome flatpak applications in the Fedora 35 KDE wayland session currently look like garbage (they are not antialiased) unless you run them without the wayland socket. This is due to xdg-desktop-portal-gtk being built incorrectly. You can fix this by installing xdg-desktop-portal-gnome and rebooting.

Step 1. sudo dnf install xdg-desktop-portal-gnome

Step 2. Reboot

Step 3. Verify that xdg-desktop-portal-gnome is running instead of xdg-desktop-portal-gtk

Fonts in flatpak'ed GTK/Gnome applications should look fine now.

See these bug reports for more details:

https://bugzilla.redhat.com/show_bug.cgi?id=2012315

https://github.com/flatpak/xdg-desktop-portal-gtk/issues/355

https://github.com/flatpak/flatpak/issues/4438

Wednesday 22 September 2021

How to stop KDE Plasma and other QT Apps from Spamming your System Log

 I noticed a lot of spam in /var/log/messages on Fedora 34 KDE.

Sep 22 23:28:11 fedora-t580 plasmashell[82570]: kf.config.core: "\"NaturalSize_1\" - conversion of \"-1,-1\" to QSizeF failed"
Sep 22 23:28:11 fedora-t580 plasmashell[82570]: kf.config.core: "\"NaturalSize_1\" - conversion of \"-1,-1\" to QSizeF failed"
Sep 22 23:28:11 fedora-t580 plasmashell[82570]: kf.config.core: "\"NaturalSize_1\" - conversion of \"-1,-1\" to QSizeF failed"
Sep 22 23:28:26 fedora-t580 plasmashell[82570]: kf.config.core: "\"NaturalSize_1\" - conversion of \"-1,-1\" to QSizeF failed"
Sep 22 23:28:26 fedora-t580 plasmashell[82570]: kf.config.core: "\"NaturalSize_1\" - conversion of \"-1,-1\" to QSizeF failed"

Those lines were repeated over and over again.

I finally found a workaround for it.

Add this line to /etc/environment

QT_LOGGING_RULES='*=false'

And reboot.

No more log spam.

Monday 27 January 2020

Geometry Dash - A Cheap Windows Game on Steam that Works Perfectly in Proton / Wine

Today I'd like to make a quick recommendation to a very addictive (and possibly - frustratingly hard!) windows game on Steam (also on Android and CrapplePhone) called Geometry Dash.

But how am I playing this on Linux? With Proton / Wine / Steamplay. (However you call it) And the game works perfectly in it. 0 issues.



I owned the Android version of this game since forever on Google Play, but I noticed it was on sale for only $1 on Steam so I decided to pick up that version of it.

The game is simple, and there's only one button to worry about. The jump button. You're a square and you have to avoid obstacles and jump at the exact moment. The gameplay is in sync with the music, and I'd like to mention that the music is very good! All / most of the music is from the site Newgrounds, which is nostalgic for me as I used to make terrible flash animations on that site.

The game runs on literally every PC out there, hopefully they don't update the system requirements because I enjoy playing this game on my old Thinkpad laptop which has the worst integrated graphics you could ever find, but for now it works great!

Just make sure you have Steamplay enabled in the Steam settings and you're good to go! It would be cool if the developers released a native version but I don't think that matters at this point given how good the game works in Steamplay.

I just have to warn you. You will die. A lot. It took me 160 tries to beat the 3rd level. But that's the fun of it. We need more games like this, that are challenging. Not some easy mode garbage.

Thanks for reading another Linux Surge article. Stay tuned for more!

Thursday 22 August 2019

How to install Anbox in Fedora 30

Update Nov 21 2020: I fixed the SELinux commands in this article as they were incomplete and caused some confusion. Sorry about that.

How to install Anbox in Fedora 30 as quick as possible.


Open a terminal and type the following commands:

sudo dnf install dkms
sudo dnf install kernel-devel

cd ~
git clone https://github.com/anbox/anbox-modules
cd anbox-modules
sudo cp anbox.conf /etc/modules-load.d/
sudo cp 99-anbox.rules /lib/udev/rules.d/
sudo cp -rT ashmem /usr/src/anbox-ashmem-1
sudo cp -rT binder /usr/src/anbox-binder-1
sudo dkms install anbox-ashmem/1
sudo dkms install anbox-binder/1
sudo modprobe ashmem_linux
sudo modprobe binder_linux


sudo dnf install snapd
sudo ln -s /var/lib/snapd/snap /snap
reboot

snap install --devmode --beta anbox
to update do this: snap refresh --beta --devmode anbox

But wait...Anbox doesn't launch!
because SELinux.
Don't disable SELinux, that's a bad idea.
Instead use SELinux Troubleshooter to find out the cause. To fix it I did this, it might be different for you:

sudo ausearch -c servicemanager --raw | audit2allow -M my-servicemanager
sudo semodule -X 300 -i my-servicemanager.pp
sudo ausearch -c anboxd --raw | audit2allow -M my-anboxd
sudo semodule -X 300 -i my-anboxd.pp
sudo ausearch -c gatekeeperd --raw | audit2allow -M my-gatekeeperd
sudo semodule -X 300 -i my-gatekeeperd.pp

Then launch Anbox. You might need to reboot first though.

Also, install adb so you can do:
adb install filename.apk <--- to install apks into anbox (assuming you don't have your real android device plugged in)