Setting and keeping resolution settings for a display that’s not autodetected on KDE/Fedora 20

I have a non standard 1280×800 screen which isn’t detected correctly by my linux system

The screen is a 1280×800 native, 10.1 inch tablet display with an external controller board. I’ve got it connected to a brix with a N2807 Celeron via HDMI. I run Fedora 20 KDE spin with official intel i915 drivers.

The screen resolution is not detected and it defaults to a horrible 1024×786, and the closest supported resolution is 1200 x768 and I have a script that adds the correct resolution, enables it for the device and sets it (so, xrandr newmode, then addmode, then output – but you knew that).

While this is a single user system, I’d like to either add this set this resolution before login (which would be utterly ace) or to have this script preloaded before any user logs in.

Failing which where would I put this script for KDE?

Solution:

Ended up finding the answer myself – credit here since that let me automate the process somewhat.

I created a script as mentioned previously that handled creating a new screen mode. I saved this as xrandr.sh and made sure it was executable. I used gtf to generate the modeline (gtf 1280 800 60.0 – horizontal resolution, vertical resolution and frequency – most folk seem to do it to one decimal point so I did so) and used that to generate the script and a bare xrandr command to work out the output name.

That spits out something like

[geek@phoebe ~]$ gtf 1280 800 60  # 1280x800 @ 60.00 Hz (GTF) hsync: 49.68 kHz; pclk: 83.46 MHz  Modeline "1280x800_60.00"   83.50  1280 1352 1480 1680  800 803 809 831   -HSync +Vsync

The stuff after modeline is what’s interesting – you use that to set the mode.

I saved this as xrandr.sh

xrandr --newmode  "1280x800_60.00"   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync xrandr --addmode HDMI1 "1280x800_60.00"xrandr --output HDMI1 --mode 1280x800_60.00

This generates a new mode you can use anywhere, then tells your system to allow you to use that mode for the output HDMI1, and tells you to change the resolution settings to that mode.

I then set it to get started by ‘autostart’. Logically I should be able to start this pre-kde, but run on startup works (I suspect the screen res is being changed post login- it looks sharp until I log on – I guess that’s another problem though).

enter image description here

This runs the script after I login, and the screen is entirely usable at the proper resolution for the rest of the session. It’s not perfect (It would probably need to be disabled for another screen, for example) but it works well enough for now.