Display configuration does not remember setting

I set laptop screen as primary, hdmi screen as extended. Extended screen is arranged to be on top of laptop screen.

Everytime i close laptop lid (suspend to ram), and reopen it, my screen became 1 screen instead of in extended mode that i just set. it happens 3 times continously. Weird thing is, only hdmi screen is on, and it is as primary screen.

Is there any commandline that i can make it save or any files that i can edit or check to make sure what i hit “apply” when do the extend mode and display configuration (make one screen on top of the other, NOT left right) does saved ?

This stupid issue is getting on my nerd.

Isn’t there a *.conf file or some where i can manually check it without using gui ? i think gui is buggy.

Have you tried shutting it down. Disconnect secondary monitor. Boot up and make sure the primary monitor is working and all settings are correct. Then let go into suspend to ram and see if it is working properly. Then shut it down properly. Hook up the external monitor and turn it on. Restart the laptop and go into it and see it’s working properly on laptop screen. Then set up extend settings and get second monitor working. Test it again.

1 Like

I just tried according to your steps into detail.
It is fine , nothing bad happened. All works flawlessly. The extended monitor works just as i wanted. Even after i suspend it to ram by close the lid, when i reopen the lid, the extended monitor works just perfect.

So, what is the deal here ? When this extended monitor issue crops up again… what should i do ? repeat the forum asking ? :face_with_head_bandage: oh boy. These kind of stuff is hard to have a solid solution…

Is there no command for terminal that this can be analyze ? or xrandr config file or something that i can get more solid proof of it… ? it would be superb if hav

depending on the x-system in use (wayland/Xorg) and the DE in use …

arandr can create a xrandr-script to setup displays.

looking like this:

xrandr --output HDMI-0 --primary --mode 1920x1080 --pos 1280x0 --rotate normal --output DVI-0 --off --output VGA-0 --mode 1280x1024 --pos 0x56 --rotate normal


Are you meaning to say that if i save Arandr setting into my /home directory, when the system wake up from “suspend to ram” it will read this saved setting and adjust my display screen setting according to the script ?

What makes the x-system to know to read this script ?
I think it is just a saved script that if i need it to be change to certain display settings (for example in this case, i have made horizontal and vertical (=extend_mode) ), i can load this script and it will auto adjust it as the way of the script without the need to manually adjusting from gui .
I think it has nothing to do with the issue i was having just now , which is when wakeup from “suspend to ram” it reset my display configuration to single screen…

$ cd .screenlayout
$ ls
extend_mode.sh  horizontal_mode.sh
cat extend_mode.sh
xrandr --output eDP1 --primary --mode 1920x1080 --pos 1x1080 --rotate normal --output HDMI1 --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off --output VIRTUAL1 --off

I meant it will be good if we know where the display configuration setting is stored in the system, so i can always double check if it is correctly stored or what is the reason it keeps messing up my display configuration.

exactly that

So, no one know how and where x-system stores it display config file ?


but a DE has mostly its own implementation to set display settings tools like
kscreen on plasma

Inside this directory, there is only keyboard config , nothing else.

$ cd /etc/X11/xorg.conf.d/
$ ls

they are many different ways do configure display settings …

Found this video explained it well, even bonus script

Source: Full Syntax @ https://www.x.org/releases/current/do...

Section "Monitor"
### Monitor Identity - Typically HDMI-0 or DisplayPort-0
    Identifier    "HDMI1" 

### Setting Resolution and Modes
## Modeline is usually not required, but you can force resolution with it    
Modeline "1920x1080" 172.80 1920 2040 2248 2576 1080 1081 1084 1118
    Option "PreferredMode" "1920x1080"
    Option        "TargetRefresh" "60"

### Positioning the Monitor
## Basic
    Option "LeftOf or RightOf or Above or Below" "DisplayPort-0"    
## Advanced
    Option        "Position" "1680 0"

## Disable a Monitor
     Option        "Disable" "true"

You should have screen management software already installed on kde plasma as @joekamprad said each desktop has it’s own implementation.

You meant this Kscreen ?

The problem is that this has some bug that causes my screen configuration to reset to single screen when i “suspend to ram” by closing the lid. It was happening consecutively for 4 times… and in 3 occurances in my endea linux (like in 7 months) experience.
Since this has such bug, i felt it is better if i can get to the config file rather than rely on this gui which (like microsoft) nobody know where the config file of it located or how it setting is saved.

kscreen is saving stuf at its configuration place under your users home but kde configs are not well organized in my opinion, and it will not be possible to setup with them from texteditor:
Screenshot_20201021_113958 Screenshot_20201021_114025
it creates files with cryptic filenemes used by kscreenand may using this filenemes inside other scripts to read the settings on login…

This automaticly created config files are not to set them up manually, if you want to do so you need to use xorg system or something like xrandr script and remove the settings from kscreen:
simple create a xtrandr script with arandr and ad this to autostart on login.