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)


Friday 9 February 2018

How to allow VLC 3.0 to cast to Chromecast if you have a firewall enabled on Linux

VLC 3.0 recently came out, with the ability to cast to a Chromecast device. However, if you are behind a firewall, such as UFW, a front-end for "iptables", you need to whitelist a certain port.

That port is 8010.

Here is an image on what exactly to type in to allow this port from only your Chromecast, in GUFW (GUI for UFW):

Note: Replace 192.168.1.8 with the IP address of the Chromecast on your network that you want to cast to.


I hope you found this useful.

Thursday 20 April 2017

Fixing the Non-Working Thinkpad T510i Mic Mute Button on Ubuntu MATE 17.04

So, apparently, the mic mute button stopped working in Ubuntu. I remember it working in Ubuntu 16.04 but not 17.04. Anyways, I fixed it with this simple instruction from a user on AskUbuntu.

https://askubuntu.com/questions/125367/enabling-mic-mute-button-and-light-on-lenovo-thinkpads

This is what I did to fix the mic mute button on the Thinkpad T510i. The LED on it works now too. If you have a different Thinkpad, I suggest following the full tutorial on the AskUbuntu link above.

Anyways, this is what I did:

Created the file /etc/acpi/events/lenovo-mutemic

with the contents:

event=button/f20 F20 00000080 00000000 K
action=/etc/acpi/lenovo-mutemic.sh

Created the file /etc/acpi/lenovo-mutemic.sh

with the contents:

#!/bin/bash
INPUT_DEVICE="'Capture'"
YOUR_USERNAME="username"
if amixer sget $INPUT_DEVICE,0 | grep '\[on\]' ; then
    amixer sset $INPUT_DEVICE,0 toggle
    #echo "0 blink" > /proc/acpi/ibm/led
    su $YOUR_USERNAME -c 'DISPLAY=":0.0" notify-send -t 50 \
            -i microphone-sensitivity-muted-symbolic "Mic MUTED"'
else
    amixer sset $INPUT_DEVICE,0 toggle                       
    su $YOUR_USERNAME -c 'DISPLAY=":0.0" notify-send -t 50 \
            -i microphone-sensitivity-high-symbolic "Mic ON"'
    echo "0 on" > /proc/acpi/ibm/led 
fi

Important: Replace username with your Linux username.

Find your Linux username by typing "whoami" in the terminal.

Finally, I did this:

sudo chmod +x /etc/acpi/lenovo-mutemic.sh
sudo service acpid restart

Thank you random user on AskUbuntu!

How To Fix Graphical Glitches in Serious Sam Classic TFE & TSE under Wine

I wanted to play Serious Sam Classic: The First Encounter on my Thinkpad running Linux. (Ubuntu 17.04)

Unfortunately, the native Linux version doesn't run for me, for some reason. Maybe it's to due to the Intel graphics drivers. I also tried compiling the open source release of the Serious Engine but that failed to compile.

So, I decided to run it in Wine. Which "worked", but had severe graphical glitches making the game unplayable.

Apparently this is due to a "non-existant Z-buffer". To fix this, in Serious Sam The First Encounter or The Second Encounter, open the in-game console, either F1 or ~ . Then, type these 2 lines and press enter after each one:

/gap_iDepthBits=24
/ApplyVideoMode()

That should fix the issue.

Source: https://appdb.winehq.org/objectManager.php?sClass=version&iId=2288

Tuesday 31 January 2017

[Quick Linux Tip] Stuttering/Lagging in Games or Emulators on the Cinnamon desktop? If you have a System Monitor Applet, Remove it. [Updated]

What the title said.

[Updated, see below.]

I noticed for about a year that my emulators (Gens, Kega Fusion, Fceux, Nestopia) etc would stutter while playing and that was incredibly annoying. It made me want to use my Android device (Moto G 2014) for emulation more than my laptop because of how smooth it was.

Then, I remembered listening to a certain Linux podcast where the host had the same issue, I believe he was using the Gnome desktop, but it applies to Cinnamon as well as they are based on the same technology. The solution is to remove the System Monitor applet if you have one. Of course, if you don't have a System Monitor applet, this won't help. My only other solution for you then, is to play your emulators in fullscreen mode. That's not ideal, though.

I like being able to monitor CPU and network usage, because "OCD", but performance is more important to me. Besides, who wants to play Sonic the Hedgehog with microstutter? Gotta go fast!

Update: I found a System Monitor applet which does not cause any (noticeable) stutter. Here's the link to it:

https://cinnamon-spices.linuxmint.com/applets/view/88

Also, here's the link to the applet that does cause stutter:

https://cinnamon-spices.linuxmint.com/applets/view/79