Heureka - Blog

The small success stories are the ones that count.

i3: Disable all shortcuts when gaming

I was playing Biomutant and accidentally made it close several times because of the key bindings the game used in busy fight situations.

The use of Q W A S D E, Alt and Shift made me slip to the super key quite often. Super+Shift+Q in my case kills an application. Not so good while fighting.

Solution: modes.

When in a mode, new key bindings apply, which basically disables all usual bindings for the time being.

So I added a mode "play_game" with no bindings except the one to exit the mode (which is the same as how to enter).

I used the Scroll-Lock key which is very far from any key I might press.

bindsym Scroll_Lock mode "play_game"

mode "play_game" {
        bindsym Scroll_Lock mode "default"

Add NVIDIA statistics to the i3 bar

nvidia-smi can output various monitoring data.

  • nvidia-smi dmon -c 1 -s p fetch temparature and power once
  • tail -1 use only the last line
  • sed -E 's/ *. *?([0-9]*) *?([0-9]*).*/GPU: \1 Watt @ \2°C/' extract the two numbers into the text to show
command=nvidia-smi dmon -c 1 -s p | tail -1 | sed -E 's/ *. *?([0-9]*) *?([0-9]*).*/GPU: \1 Watt @ \2°C/'

I use i3wm and i3blocks here.

sudo apt install i3
sudo apt install i3blocks

Framedrops in games using Ubuntu and Gnome

I experienced frame drops especially in AAA shooter games under Linux even through I have a pretty solid hardware setup.

So I ran the benchmarks of Borderlands 3 and Far Cry 5 with Windows and with Linux. The average values were pretty much the same. However the framedrops (short stops in fluid animation) were noticable under Linux but not under Windows.

I read somewhere, Gnome plays a role in this. So I installed a slimmer window manager and ran the benchmarks again.

With the slimmer window managaer (I used i3wm, maybe even XFCE is slim enough already - there are a lot of options) the games ran without framedrops stutter-free in the higher graphical settings.

An additional performance boost can be achieved when deactivationg anti aliasing in the game settings.

You are here: start » » Heureka - Blog