Add custom resolutions

Hello and Merry Christmas to whoever happens to read my topic. It’s been half a year since I started using NixOS as my main operating system and so far it’s been great, with just the right amount of hurdles.

I need some help with adding custom system-wide resolutions to my install. I have a 1080p display, but when I have the performance headroom I want to run some games at 1440p or 4k because it results in a better image.

I got gamescope to work, but have a few (very minor and admittedly nitpicky) bones to pick with this solution. My mouse cursor changes when I launch a game with gamescope and I have to add the launch option to each game I want the higher resolution options in.

On my old windows setup, with an geforce 2060, I could select resolutions higher than my monitor’s everywhere, without needing to do anything. I would like to achieve a similar situation with my current setup. I saw a post discussing this but it was exclusive to X and I have wayland.

My setup:
Operating System: NixOS 24.11
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.6.67 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 30,5 GiB of RAM
Graphics Processor: AMD Radeon RX 7900 XTX
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7E12
System Version: 1.0

Any help is appreciated :slight_smile:

SSAA is effectively the same thing as superresolution, consider using that

That’s a good point, and for games that support it I always use it. Not all games do though.

Perhaps look into whether it is possible to spoof the EDID of your monitor to support higher resolutions

That’s way out of my ballpark, but I’ll keep the option in mind

It should be noted that Wayland has a variation called xWayland, which blends parts of xorg server in with Wayland, and ive personally made custom resolutions through the xorg server that will apply with Wayland.
Heres that aforementioned variation: nixpkgs/pkgs/servers/x11/xorg/xwayland.nix at 31ac92f9628682b294026f0860e14587a09ffb4b · NixOS/nixpkgs · GitHub
Heres my nixos config, running an RTX 3080:

################################################
###                                          ###
### WINDOW MANAGER SETTINGS/WAYLAND/X11      ###
###                                          ###
################################################
  services.xserver.enable = true;
  services.displayManager.sddm.autoNumlock = true;
  services.displayManager.sddm.enable = true;
  services.displayManager.sddm.wayland.enable = true;
  services.desktopManager.plasma6.enable = true;
  services.displayManager.defaultSession = "plasma";
  services.displayManager.autoLogin.user = "jason";
  hardware.opengl = {
	enable = true;
    extraPackages = with pkgs; [libvdpau-va-gl];


};

  services.xserver.videoDrivers = ["nvidia"];

It may be worth giving it a whirl to see if this solves your problem. I also dont like gamescope as it really messes with my muscle memory.

I didn’t know about xWayland, I’ll be looking into it. It seems viable.
Thank you very much

1 Like

Anytime, let us know how it goes bruh

1 Like