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.
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