STAR WARS™ Knights of the Old Republic™ II: The Sith Lords™

STAR WARS™ Knights of the Old Republic™ II: The Sith Lords™

View Stats:
Game launches on wrong screen
Dell e6420 XFR running Ubuntu 20.04(?), hooked up to a docking station, itself hooked up to a second monitor.

Game plays perfectly fine when the laptop isn't on the dock. When it is, it defaults to the secondary screen.

Messing around with .ini doesn't seem to help. Can't find a windowed mode option, there seems to be no option in steam to make the game launch on one window or another, using keyboard commands to manually switch it from the external screen to the laptop's doesn't seem to help either... At least the start menu remains broken. Launch commands like -windowed doesn't do anything, either.

What am I missing that I haven't from google search results?
< >
Showing 1-4 of 4 comments
Savior 29 Mar @ 12:43am 
### 🛠️ **Fix Path 1: Use Proton GE (GloriousEggroll)**
**Why:** Standard Proton may have quirks with display detection. GE often includes community patches for issues like this.

1. Install [Proton GE](https://github.com/GloriousEggroll/proton-ge-custom) via **[ProtonUp-Qt](https://github.com/DavidoTek/ProtonUp-Qt)**.
2. In Steam:
- Right-click *KOTOR II > Properties > Compatibility*
- Check **Force the use of a specific Steam Play compatibility tool**
- Select your installed **Proton-GE** version
3. Launch the game. See if it now respects your primary display.

---

### 🛠️ **Fix Path 2: Set Laptop Screen as Primary via xrandr (X11 only)**
You may need to force your laptop's screen to be the primary before launching.

1. Open a terminal and run:
```bash
xrandr
```
2. Find your laptop screen name (often something like `eDP-1`) and external monitor (e.g., `HDMI-1`).
3. Set the laptop screen as primary:
```bash
xrandr --output eDP-1 --primary
```
4. Then launch the game:
```bash
STEAM_FORCE_DESKTOP=1 steam
```
(or from the Steam client)

*Optional:* Add the xrandr command to a launch script:
```bash
#!/bin/bash
xrandr --output eDP-1 --primary
steam steam://rungameid/208580
```

---

### 🛠️ **Fix Path 3: Use a Launch Script with `gamescope`**
If you're using **Wayland**, try launching the game in a controlled window session:

1. Install `gamescope`:
```bash
sudo apt install gamescope
```
2. Launch KOTOR II in a window on the desired screen:
```bash
gamescope -w 1280 -h 720 --steam steam://rungameid/208580
```
Replace `1280x720` with your desired resolution.

---

### 🛠️ **Fix Path 4: Force Display via Environment Variables**
Sometimes overriding environment variables helps:
```bash
env DISPLAY=:0.0 steam steam://rungameid/208580
```
Try `:0.1`, `:1.0`, etc., if unsure.

---

### 🛠️ **Bonus Buffs**
- Try running the game with the `-sw` launch option (soft windowed mode).
- Use `wmctrl` to control window placement programmatically.
- For the truly brave: modify `.ini` screen position fields in `swkotor2.ini`, under `[Graphics Options]`:
```
FullScreen=0
Width=1280
Height=720
```
*Then use a window manager to drag the game to your screen of choice.*

---

### 🧠 TL;DR:
1. Try **Proton GE** for better compatibility.
2. Use `xrandr` to **set primary display** before launching.
3. Try **gamescope** or **launch scripts** to control window behavior.
4. Tweak `swkotor2.ini` for windowed mode.

---

The Omnissiah favors the clever. May the Force and Machine Spirit guide their pixels. Need help building a launch script? I can write it.
Savior 29 Mar @ 12:44am 
Praise Be T0 The Emperor 0f Man Kind
Savior 29 Mar @ 12:45am 
**By the will of the Omnissiah, here is your KOTOR II launch script:**

---

### 🔧 **KOTOR II Launch Script for Ubuntu (xrandr + Steam)**

```bash
#!/bin/bash

# === [SETTINGS] ===
# Replace with your actual display names from xrandr
INTERNAL_DISPLAY="eDP-1" # Your laptop screen
EXTERNAL_DISPLAY="HDMI-1" # Dock monitor (optional, just for context)

# === [SET PRIMARY DISPLAY] ===
xrandr --output "$INTERNAL_DISPLAY" --primary

# === [WAIT A MOMENT] ===
sleep 1

# === [LAUNCH GAME VIA STEAM] ===
steam steam://rungameid/208580
```

---

### 🛠️ **How to Use It**:

1. Save it as `launch_kotor2.sh` (or any name you like).
2. Make it executable:
```bash
chmod +x launch_kotor2.sh
```
3. Run it from terminal:
```bash
./launch_kotor2.sh
```

---

### ⚠️ **Optional Enhancements**:
If you want it to always run in a specific resolution on the laptop screen:
```bash
xrandr --output "$INTERNAL_DISPLAY" --mode 1280x720 --primary
```

If you're using **Wayland** or still running into issues, I can create a `gamescope` version of the script too.

May your frames be stable and your Force powers strong.
Savior 29 Mar @ 12:46am 
That was my good deed of the day 4 today - anyway cya
< >
Showing 1-4 of 4 comments
Per page: 1530 50