Change your resolution for one command !
Linux doesn't really like 4k :(
So it's been one week, i'd received my new laptop, the ASUS ZenBook Pro in the 4k configuration after some fight with UEFI and nvidia driver i'm on Fedora 22 and everything work fine except some retarded apps like VirtualBox / Steam / Skype but it's not a problem for me !
But one thing make me bad due to gnome, i explain, my native resolution is 3840x2160 it's perfect but when i launch a game like CS GO i set the 1920x1080 resolution in the game but no better performances because gnome stretch the game in 4k. The only one method is to change your native resolution but it's very annoying when you need to do that everytime you want to play !
So i've made a little script who change the resolution when you run a command and revert the native resolution when you quit the game or the app
You can find it on my git -> https://git.makz.me/makz/resolution-changer
To install it just download resolution-changer script, flag it executable (chmod +x resolution-changer) and put it in a folder located in your path (/usr/bin for example)
Now you can use it, just type in a terminal
resolution-changer 'YOUR_COMMAND' [WANTED_RESOLUTION]
By default the resolution will be set to 1920x1080 or you can edit the script to set a other resolution and the native resolution will be automaticaly detected but if the script failed to find it you can set a manual native resolution in the script ! The argument WANTED_RESOLUTION is optional it's here when you need a specific resolution for a software without modify the script.
You can use it in steam for this modify the launch options and put " resolution-changer '%command' "
I hope this script will be useful for other ppl than me, if you have better/more idea to improve this script feel free to post a comment !