[SOLVED] Display setting resolution persistence

It should be a stupid question, but…
from openbox, i do settup my screen config to be 1920x1080 (works).
When i reboot… i have to do it again, because config is back to 1024x768.
I added xrandr command inside .xinitrc, before case condition test for call wm.
Now screen setting is 1920x1080 after reboot (good).

BUT… conky (who is called from i3 config file for autostart) show his window in the middle (it should not).
It is my conky config file… but if i kill the middle screen one and call it back from termite manually, conky open in good position.
That is why i think that:
it looks like it has been opened on first time with 1024x768 screen config… but, it is not logic because ~/.xinitrc call xrandr BEFORE to call i3wm.

_questions:

1/ is there an other way to get screen config persistent without add xrandr command inside ~/.xinitrc ?

2/ how to fix this problem to call conky in bad position on the screen ?

Hello sir,
Although it’s kinda hard to tell without a config file present, my simplest guess based on a similar problem that I had is that you could try to place your conky call script after your xrandr call script in your autostart file.
Is far as I understand, you conky get called and placed based on your previous resolution, so try to first set your resolution and after that call your conky.

@Jerome0 have you actually edited the conkyrc in question and positioned your conky?

I think that can be set up as a systemd service; there might be an example in the ArchWiki.

What is the conky you are trying to run in i3? If it is just some system information, you might be better off setting it up to run in the i3 status bar.

Otherwise you can use a sleep time so there is a lag between setting the resolution and starting the conky.

Create an Xorg configuration file, this should work for a full HD screen:

mkdir -p /etc/X11/xorg.conf.d
tee /etc/X11/xorg.conf.d/00-resolution.conf <<!
Section "Screen"
    Identifier "Screen0"
    Monitor "VGA1"
    DefaultDepth 24
    SubSection "Display"
        Modes "1920x1080"
    EndSubSection
EndSection
!

You may have to tweak the Monitor line: use xrandr to check the name of the actual output in use and substitute that in place of VGA1.

EDIT: sorry, do we have code tags here?

EDIT2: aaah, markup, nice!

1 Like

@Head_on_a_Stick, yes correct, i made it but my Mode syntax was wrong (Mode “1920x1080_60.00” instead of Mode “1920x1080”) and didn’t check my /var/log/Xorg.org.log file. Your show me my error and i was stupid (like most of the time…).

And add xrandr in .xinitrc file is not the solution, i removed my xrandr and Xorg good config make the job well.

@PackRat, that is a very good idea also… i didn’t know that was possible before Xorg start, so it should work also for tty… i have to look at this other one solution. Goog idea too…

kill conky process and run it again show that it is not the conky file the problem. But ok, for fun i paste you my config file (who is a modification of the original ArchLabs dropbox one): Arch_i3.conkyrc

Thank you very much all of you for helped me on that. I make this as SOLVED

But what i not understand is that openbox doesn’t have a place for screen setting ?
From xfce4 (from archlinux distro) installed, change screen setting is persistent. It should also have an other one way to make it persistent on ArchLabs with OpenBox from xfce4-screen-setting application (maybe). SO this post is SOLVED, but it should have some other way to do it easy without edit file.

1 Like

You can delay the startup of conky or make sure it’s started last like unix121 suggested.

Conky has a an internal delay, so add that to the command you’re using to launch it. Something like:

conky -p 5 <my_conkyrc>

the “-p 5” will delay conky 5 seconds, adjust it to suit.

Good to know that… but now, the usual solution was to configure well the X server (xorg).