Table of Contents

TL;DR
- Generate a modeline with
cvt, add it withxrandr --newmode/--addmode, then enable it on your output. - Session-only changes vanish on reboot and never fix the login screen.
- On KDE/Kubuntu with SDDM, put the same commands in
Xsetupso they run before the greeter.
After I switched from GNOME/Unity to KDE, SDDM would not pick up my ultrawide panel. It stuck at Full HD instead of 2560×1080. I had hit the same class of problem earlier on Ubuntu with an older monitor whose native mode never showed up in the display settings.
The fix is the same in both cases: create a custom mode with xrandr, then make it permanent — including on the login screen — with Xsetup.
1. Find your output name
Modes are attached to a specific connector. List them:
| |
Look for a line with connected — for example HDMI-2, DP-1, or eDP-1. Everything below uses HDMI-2; replace that with yours.
2. Generate a modeline with cvt
For 2560×1080 @ 50 Hz:
| |
That prints a Modeline line. Drop the Modeline keyword when you pass it to xrandr. In my case the numbers were:
| |
If the screen blanks or flickers, try a lower refresh rate (cvt 2560 1080 45) or cvt -r for reduced blanking on some LCDs. You can also wrap a test in a fallback:
| |
3. Make it permanent (including the login screen)
xrandr changes last only for the current X session. They also do not run before the display manager, so SDDM can still greet you at the wrong resolution.
SDDM runs Xsetup as root before the greeter appears. Put the same three commands there.
KDE 5 / SDDM (Kubuntu 18.04 and later):
/usr/share/sddm/scripts/Xsetup
Example file contents (keep any existing shebang or comments):
| |
Edit with sudo, then reboot and check both the greeter and the desktop.
Older KDE / KDM paths:
| |
Alternatives when you only need the desktop session
If fixing the login screen is optional:
| Approach | Persists for | Notes |
|---|---|---|
~/.xprofile or autostart script | Your X session | Easy; greeter unchanged |
/etc/X11/xorg.conf.d/10-monitor.conf | Whole X server | Modeline in a Monitor section; more durable but fiddlier |
| SDDM Apply Plasma Settings | Greeter (Plasma 5/6) | Best first try for layout/scaling when the mode already exists |
Troubleshooting
xrandr: cannot find mode— Create the mode with--newmodebefore--addmode, and use the exact mode name string.BadMatchon--addmode— Wrong timing for that panel/cable, or a bad EDID. Try another refresh rate, or a modeline from the Xorg log / the monitor’s EDID.- Wrong connector name — Names differ between GPU drivers and can change under Wayland vs X11. Always read them from
xrandrin an X11 session. - Works after login but greeter is wrong — Your session script ran; Xsetup did not. Confirm the greeter is X11-based SDDM and that
DisplayCommandstill points at your script.
Once the mode sticks through reboot and on the login screen, you are done — ultrawide (or that stubborn old panel) at the resolution it should have had all along.