Sddm and /usr/share

The last time I used KDE, according to my notes, I set sddm’s resolution and refresh rate by putting kscreen-doctor output.HDMI-A-1.mode.3840x2160@120 in /usr/share/sddm/scripts/Xsetup.

How can I do the same in NixOS where this path doesn’t exist?

So far I’ve tried the following in my configuration.nix (which I stumbled upon here):

services.xserver.displayManager.setupCommands = "kscreen-doctor output.HDMI-A-1.mode.3840x2160@120";

and

services.displayManager.sddm.setupScript = ''
kscreen-doctor output.HDMI-A-1.mode.3840x2160@120
'';

But so far no luck.

Playing around some more I have tried putting the path of kscreen-doctor to /run/current-system/sw/bin/kscreen-doctor and also /usr/bin/env kscreen-doctor.

I have also played around with quotation marks for services.xserver.displayManager.setupCommands and have confirmed that it runs the commands.

I’ve tried some xrandr stuff in ~/.xprofile that also didn’t work.

Still no luck

Running out of ideas now. I tried setting the following, but that just boots me to the terminal :frowning:

 services.displayManager.sddm.settings = {
   General = {
     DisplayServer = "wayland";
   };
 };

I’m starting to think this has all been a big wild goose chase.
I logged into KDE with X11 instead of Wayland and setting the refresh rate with either xrandr, display settings, og nvidia settings - it SAYS the refresh rate is 120hz, but moving the mouse I can tell right away that it’s 60hz or below.

I wonder why…

Anyway, if anyone wants to chime in I’d be very interested, but I’ll mark this as solved for now.

Are you using an nvidia chip, and perhaps the stable driver?
I’m doing that and ATM suspend/resume is kind of broken in that the latency after resume is measured in 10s (!) of seconds, so unlocking is… Let’s call it a hassle. It’s not, but let’s call it that.

So for now I just make sure the system doesn’t suspend.