Don't want to see articles from a certain category? When logged in, go to your User Settings and adjust your feed in the Content Preferences section where you can block tags!
Latest Comments by kokoko3k
How To: An update on fixing screen-tearing on Linux with an NVIDIA GPU
12 January 2017 at 4:21 pm UTC

libstrangle seems really great, thank you!

How To: An update on fixing screen-tearing on Linux with an NVIDIA GPU
12 January 2017 at 12:04 pm UTC

Quoting: [email protected]An important point to note is that if you enable FCP, you might want to disable in game vsync. You'll encounter performance hits that can be pretty massive. In game vsync is no longer necessary.

Not quite right, on contrary, you may waste GPU/CPU cycles trying to render more frames than the monitor would allow; if the game has no vsync logic enabled, it is probably completely unaware of the monitor refresh rate, so it will render as fast as it can, and that could lead to jerkyness because the couple [compositor+monitor refresh] is not synced to game frames.

Indeed, one thing i noticed with compositors that do vsync (*AND* vsync is disabled in games) is that motion is jerky/jumpy in games (it is still smooth in movies because the fps is limited by the movie itself).

The workaround for that is:
Given "C" a compositor that provides a working vsync (nvidia forcefullcompositionpipeline, kwin with tearing prevention on, compton with vsync enabled and so on):

* If the game provides a working vsync, enable it and disable "C"

*If the game provides a non working vsync, enable it and leave "C" enabled; this is needed because even if you got tearing with the Game's non-working vsync option turned on, it will still be useful, because it limits the framerate to the monitor refresh rate; this helps "C" to stay in sync with the frames -> provide a smooth gameplay.

I've tested that on trine 2 and grid autsport.

My current setup is as follows:
Desktop Use:
- KDE/Plasma, compositor enabled but with "tearing prevention" disabled
- ForceFullCompositionPipeline enabled.
- vsync disabled in mpv (framerate is limited anyway by the movie)

Gaming:
- KDE/Plasma compositor completely disabled (to gain some fps)
but with frame limiter set to 75 (because my monitor uses 75hz).
Do that in ~/.config/kwinrc, add MaxFPS=75 in the "[Compositing]" section.
- Vsync option in game enabled
- If the games has a working vsync -> ForceFullCompositionPipeline disabled.
- If the games has a non-working vsync -> ForceFullCompositionPipeline enabled.

All the switches are bound to shortcuts alt-shift-f12 and alt-shift-f11
alt-shift-f12 comes with kdekwin and completely disables the compositor
alt-shift-f11 is bound to the following:
> cat ~/scripts/nvidia.compositionpipeline.switch.sh 
#!/bin/bash
killall aosd_cat
if nvidia-settings -t -q CurrentMetaMode|grep 'ForceCompositionPipeline=On' &>/dev/null ; then
    ~/scripts/nvidia.compositionpipeline.disable.sh &
    echo "FFCP=OFF" | aosd_cat -n "Sans Bold 15"  -x 0 -y 0 -p 0 -t 0 -b 255 -s 255 -d 10 -R yellow  -u 5000 &
    echo "FFCP=OFF" | aosd_cat -n "Sans Bold 15"  -x 0 -y 0 -p 2 -t 0 -b 255 -s 255 -d 10 -R yellow  -u 5000 &
        else
    ~/scripts/nvidia.compositionpipeline.enable.sh &
    echo "FFCP=ON" | aosd_cat -n "Sans Bold 15"   -x 0 -y 0 -p 0 -t 0 -b 255 -s 255 -d 10 -R "#99ccff"  -u 5000 &
    echo "FFCP=ON" | aosd_cat -n "Sans Bold 15"   -x 0 -y 0 -p 2 -t 0 -b 255 -s 255 -d 10 -R "#99ccff"  -u 5000 &
fi
###########
> cat ~/scripts/nvidia.compositionpipeline.disable.sh 
#!/bin/bash
sh -c "nvidia-settings --assign CurrentMetaMode=\"$(nvidia-settings -t -q CurrentMetaMode |tr -d "\n"|sed 's/.*:://'|sed 's/^ *//;s/ *$//'|sed "s/CompositionPipeline=On/CompositionPipeline=Off/g")\""
###########
> cat ~/scripts/nvidia.compositionpipeline.enable.sh 
#/bin/bash
sh -c "nvidia-settings --assign CurrentMetaMode=\"$(nvidia-settings -t -q CurrentMetaMode |tr -d "\n"|sed 's/ViewPortIn=/ForceFullCompositionPipeline=On, ViewPortIn=/g'|sed 's/.*:://'|sed 's/^ *//;s/ *$//')\""

Hitting a shortcut is faster than opening the nvidia's control panel, and the aosd_cat command is useful because it show the current FFCP (ForceFullCompositionPipeline) state.

What game are you truly thankful to have on Linux & SteamOS?
23 December 2016 at 2:19 pm UTC

Grid Autosport.
I really enjoied playing it hours and hours with a thrustmaster steering wheel and pedals, till my knees started to hurt for days, damn.

There is a demo available now for ‘Epistory: Typing Chronicles’, a Bastion-like typing adventure
9 September 2016 at 4:11 pm UTC

What bundle? Humble monthly?

Anyway, i get no music nor sound effects from the demo. just the voice speaking.

Life is Strange released for Linux & SteamOS, some thoughts and a port report included
22 July 2016 at 4:23 pm UTC

I hope they didn't use any runtime translator, since Unreal engine acutally works on linux...

Check out this AMD video talking about Vulkan (and DirectX12)
29 June 2016 at 4:18 pm UTC Likes: 2

On the other hand, playing opengl or vulkan games via wine should give us almost native speeds.

I have finally found a way to sort out screen tearing on Nvidia with Linux
19 May 2016 at 2:19 pm UTC

You did not correctly quoted the strings.
Also, nvidia driver refers to display with other names (in my case is DPY-2), that's why i suggested a general script (see my previous comment).
Anyway, you're already running a compositor; i don't think is a good idea stacking one on top of another. as you will lose twice the performance in the best case.

BTW:
The fact that the performance drop is the same as running a compositor should REALLY be written in the main article; there's no vodoo magic here.

I have finally found a way to sort out screen tearing on Nvidia with Linux
17 May 2016 at 9:16 am UTC

Oneliners that works for me in all of the metamodes:
Enable:
sh -c "nvidia-settings --assign CurrentMetaMode=\"$(nvidia-settings -t -q CurrentMetaMode |tr -d "\n"|sed 's/ViewPortIn=/ForceFullCompositionPipeline=On, ViewPortIn=/g'|sed 's/.*:://'|sed 's/^ *//;s/ *$//')\""
Disable:
sh -c "nvidia-settings --assign CurrentMetaMode=\"$(nvidia-settings -t -q CurrentMetaMode |tr -d "\n"|sed 's/.*:://'|sed 's/^ *//;s/ *$//')\""

However, forcing ForceFullCompositionPipeline is just like running a compositor (IT IS a simple compositor) plus you lose shadows and candies, see those benchamrks running simple "teapot" mesa demo:

FPS | Window manager | compositor
-----------------------------------
978   openbox          NONE
976   kwin             NONE
907   openbox          Compton opengl
905   kwin             kwin opengl 3.1
905   kwin             ForceFullCompositionPipeline=on
902   openbox          ForceFullCompositionPipeline=on



...that is the 7-8% performance hit i'd expect when running a compositor on my GTX470 (it is negligible when overrall fps are low, but more evident on simple demos like teapot, and in newer cards the performance hit should be even less evident).

So, if you managed to have vsync with userspace compositors like kwin,compton,mutter and so on, i think it is better to use them instead of ForceFullCompositionPipeline.

Looking for Linux Gaming communities on your favourite services? Got you covered
28 March 2016 at 9:28 am UTC

i'm unable to join telegram channel linux_gaming, is it locked?