Choose style:

Author Topic: Lxrandr not saving settings <SOLVED!>  (Read 225 times)

0 Members and 1 Guest are viewing this topic.

Offline SandmanUT

  • Jr. Member
  • **
  • Posts: 30
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 7
Lxrandr not saving settings <SOLVED!>
« on: March 20, 2017, 02:26:46 pm »
I have a dual monitor setup with one capable of a higher resolution than the other. They are set to mirror, the higher resolution monitor keeps the setting from session to session (1280x720 @60) but the lower resolution monitor keeps defaulting to 1366x768@ 59.81.

This happens regardless of whether it's in position one or two on the machine video outputs and regardless of cable.

1280x720 @60 IS an option and displays properly (mostly..still some overscan) when selected in lxrandr and hitting apply, but even though I hit save, restart reverts right back to where it was before each and every time.  How can I force the resolution match and get it to stick every time it loads? The 1280x720 @ 60 is the resolution I want to aim at. (family room box, viewed at distance and serving up dvd quality movies, games, etc)

« Last Edit: April 03, 2017, 07:26:28 pm by SandmanUT »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 15180
  • Karma: 1816
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 7 Respin (64bit)
Re: Lxrandr not saving settings
« Reply #1 on: March 20, 2017, 02:50:53 pm »
What's the output from:
Code: [Select]
cat ~/.config/autostart/lxrandr-autostart.desktop
?
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
Linux in the UK

Offline SandmanUT

  • Jr. Member
  • **
  • Posts: 30
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 7
Re: Lxrandr not saving settings
« Reply #2 on: March 20, 2017, 05:48:32 pm »
Code: [Select]
[Desktop Entry]
Type=Application
Name=LXRandR autostart
Comment=Start xrandr with settings done in LXRandR
Exec=sh -c 'xrandr --output HDMI2 --mode 1280x720 --rate 60.00 --output HDMI1 --mode 1280x720 --same-as HDMI2'
OnlyShowIn=LXDE

So why isn't it applied? What's overriding it?

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 15180
  • Karma: 1816
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 7 Respin (64bit)
Re: Lxrandr not saving settings
« Reply #3 on: March 20, 2017, 08:13:06 pm »
It may be that it's getting run too early.

When you boot and everything is wrong .. does running:
Code: [Select]
xrandr --output HDMI2 --mode 1280x720 --rate 60.00 --output HDMI1 --mode 1280x720 --same-as HDMI2
fix things ?

Just trying to make sure that's the right command.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
Linux in the UK

Offline SandmanUT

  • Jr. Member
  • **
  • Posts: 30
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 7
Re: Lxrandr not saving settings
« Reply #4 on: March 21, 2017, 01:07:27 pm »
Yes. Running that from the terminal resets the overscanned monitor to the matching resolutions without using the GUI from preferences.  After that command, the monitor settings interface also display the matching settings.


Offline SandmanUT

  • Jr. Member
  • **
  • Posts: 30
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 7
Re: Lxrandr not saving settings
« Reply #5 on: March 22, 2017, 05:19:14 pm »
So how do I delay Xrandr in the startup so that it holds onto the set outputs instead of defaulting to whatever is causing the switch?

Offline SandmanUT

  • Jr. Member
  • **
  • Posts: 30
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 7
Re: Lxrandr not saving settings
« Reply #6 on: March 28, 2017, 02:40:22 pm »
Would the delay be best handled by a script or an edit of one of the files?

I've tested a couple of older scripts that were meant for other OS and while they did work, they added longer delays than what they were set for and some weird behavior (like blanking the screen during startup and shutdown where the progress bars normally would show).

It can't be this difficult! LOL

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 15180
  • Karma: 1816
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 7 Respin (64bit)
Re: Lxrandr not saving settings
« Reply #7 on: March 29, 2017, 02:20:39 pm »
First let's see if this works

run:
Code: [Select]
pluma ~/.config/autostart/lxrandr-autostart.desktop
and make it read:
[Desktop Entry]
Code: [Select]
Type=Application
Name=LXRandR autostart
Comment=Start xrandr with settings done in LXRandR
Exec=bash -c 'sleep 10 ; xrandr --output HDMI2 --mode 1280x720 --rate 60.00 --output HDMI1 --mode 1280x720 --same-as HDMI2'
OnlyShowIn=LXDE
SAVE the file, then log off/on (or reboot to test.

Be aware the resolution change may not occur for 10 seconds after the desktop starts but we can change that later .. I just want to know if it works ?
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
Linux in the UK

Offline SandmanUT

  • Jr. Member
  • **
  • Posts: 30
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 7
Re: Lxrandr not saving settings
« Reply #8 on: March 29, 2017, 06:44:49 pm »
Nice! That does work. I experimented with all the delays from 10-1, it didn't hold one time at 3s, but after going back up then back down again, it did. I settled in with a 2s delay that is matching the autoload of Kodi that I am using (so it changes as Kodi blanks the screen momentarily as it loads its theme) and that is working well.

The Bonus?

I tested changing monitors as I would restart too (as I had a feeling the other issue was related to the two different resolutions) and had no hang at grub! If it holds for a few days, I'll mark BOTH as solved (and detail the fix over on the other thread as this!)

Cool!