• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

c26zwj

Recruit
104 Badges
Jun 27, 2016
9
14
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Jade Dragon
  • Tyranny - Tales from the Tiers
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Crusader Kings II: Rajas of India
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV: Art of War
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Surviving Mars
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • BATTLETECH
  • Tyranny: Archon Edition
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: No Step Back
  • Tyranny - Bastards Wound
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Conclave
  • Europa Universalis IV
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Victoria 2
I see a bunch of posts requesting UI scaling. I had a problem with this too. I use Arch Linux with XFCE desktop. I have an NVIDIA card. I have two screens with a native resolution 2560x1440. I found I prefer to play at 1600x900 but you may prefer something different depending on your setup. After many tries I got something that worked.

In ~/.paradoxinteractive/Crusader Kings II/settings.txt set desired resolution and start as window
...
graphics=
{
size=
{
x=1600
y=900
}

refreshRate=0
fullScreen=no
borderless=no
shadows=no
shadowSize=2048
multi_sampling=0
anisotropic_filtering=0
gamma=50.000000
}
...

I put a shortcut on my panel

#!/usr/bin/env xdg-open

[Desktop Entry]
Name=CK2
Exec=xfce4-terminal --command=/mnt/2.7tb/Arch/scripts/ck2
Type=Application
Icon=/mnt/2.7tb/Icons/crusader_kings_ii.png

The script

#!/bin/bash

function fullscreen {
wmctrl -Gl > /tmp/ck2
while read line
do
if [ "$line" != "" ]; then
if [[ $line =~ "Crusader Kings II" ]]; then # searches for Crusader Kings 2 window
if [[ $line =~ "1600 900" ]]; then # with size 1600x900, otherwise it may select
id=`cut -d' ' -f1 <<< $line` # browser window with that title
wmctrl -i -r $id -b add,fullscreen
fi
fi
fi
done < "/tmp/ck2"
}

function ck2on {
xrandr --output DVI-I-1 --scale-from 1600x900
xrandr --output DVI-D-0 --pos 1600x0
fullscreen

}

function ck2off {
xrandr --output DVI-I-1 --scale 1x1
xrandr --output DVI-D-0 --pos 2560x0
}

# check if CurrentMetaMode contains 1600x900
screen=`nvidia-settings -q CurrentMetaMode | grep 1600x900`

# check if screen is not empty, if screen is scaled to 1600x900, it will not be
if [ -n "$screen" ]; then
ck2off
else
ck2on
fi


I start Crusader Kings 2. The lobby comes up. I press play game. After the game starts running, I hit the shortcut for my script. It scales my screen to 1600x900 and fullscreens the game. After I quit the game, I hit the shortcut for my script again returning it to my native resolution.
 
  • 1
Reactions: