title = "Fixing 4:3 Resolution in CS2 on Linux with NVIDIA GPU"
date = 2024-10-17
description = "How I fixed the 4:3 resolution in CS2 with an NVIDIA graphics card and Linux"
+++
I don't consider myself a gamer, but I've been playing the Counter-Strike series since CS 1.6. Every now and then, I enjoy staying up all night playing this broken game.
Ever since I started playing Counter-Strike, I’ve preferred using a 4:3 stretched resolution on my 16:9 monitor. When I switched to Linux as my daily driver, the only game I really cared about was CS:GO.
CS:GO ran perfectly without any tweaks on my [Void Linux](https://voidlinux.org) system with a 1050ti laptop graphics card. I could play with the stretched resolution, and I even got more FPS than I did on Windows.
My problems started with the release of CS2. The 4:3 resolution didn’t work at all, some resolutions were missing, and there didn’t seem to be a solution (except for some Wayland fixes). There’s a [GitHub issue](https://github.com/ValveSoftware/csgo-osx-linux/issues/3264) about it.
My first idea was to set a custom resolution through `xrandr`. I followed [guides like this one](https://unix.stackexchange.com/questions/227876/how-to-set-custom-resolution-using-xrandr-when-the-resolution-is-not-available-i), but that didn’t work for me.
For a while, I just stuck with the standard 16:9 `1920x1080` resolution. But today, I opened the `nvidia-settings` GUI. After tinkering with some advanced settings in the resolution section, I think I finally fixed my issue.
In the `X Server Display Configuration` section under advanced options, I adjusted the ViewPortIn and Panning settings. I’m currently using a `2560x1440` resolution, so for 4:3 stretched, I set the resolution to `1440x1080`.
Here are the settings that worked for me:
- **ViewPortIn**: `1440x1080`
- **ViewPortOut**: `2560x1440+0+0`
- **Panning**: `1440x1080`
That fixed the issue, but I didn’t want to manually open `nvidia-settings` every time I wanted to play CS2. After reading the [Arch Wiki article](https://wiki.archlinux.org/title/NVIDIA#Using_nvidia-settings) on `nvidia-settings`, I found that I could use this command to get the current resolution information:
```sh
$ nvidia-settings -q CurrentMetaMode
```
So ~I wrote~ ChatGPT wrote a small bash script to switch between my regular resolution and the CS2 resolution.
title = "Host Jellyfin with Docker and Docker Compose"
date = 2024-10-03
description = "Hosting a Jellyfin Instance with Docker and Docker Compose"
description = "Set up a Jellyfin media server with Docker, including hardware transcoding, media management, and companion services like Jellyseerr and Jellystat."
+++
# Hosting a Jellyfin Instance with Docker and Docker Compose
Running your own media server is a great way to have complete control over your media library, and Jellyfin is one of the best open-source media server solutions available today. With Docker and Docker Compose, you can efficiently manage and scale your Jellyfin instance, along with useful companion services like Jellyseerr and Jellystat for enhanced functionality.
In this article, I’ll walk through my setup of a Jellyfin media server, hosted in Docker using Docker Compose. This assumes you already have Docker and Docker Compose installed and are comfortable with Linux environments. I’ll cover the configuration of Jellyfin, hardware transcoding, and the integration of supporting services like Jellyseerr and Jellystat to manage requests and track server statistics.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.