Author Topic: Dual DVI screen orientation setup (and remember) problem (Fixed with BIG HAMMER)  (Read 1235 times)

Offline HWDude

  • Full Member
  • ***
  • Posts: 193
  • HWDude
    • N8OBJ's Home Page
I have a problem with the

Configure Your Desktop -> Hardware -> Display and Monitor -> Size & Orientation saving the setup I'm trying to store.

My hardware configuration is an ASUS M4A78LT-M motherboard, Phenom II X2 555 processor @3.2GHz, 8GB RAM and a NVIDIA GEForce GTX 560 SE/PCi/SSE2 video card w/dual DVI outputs and 2 ACER H243H monitors

The primary monitor is on the right and shows up as DVI-I-2 when I identify it using the identify output button in the hardware config screen.  This is the monitor that shows up during boot as the primary monitor.

The secondary monitor is on the left and show up as DVI-I-3 when identified as above.

The problem is I set DVI-I-3 monitor's position to be "left of" DVI-I-2, it configures fine and all is well --- until you reboot.  It ALWAYS puts DVI-I-3 to the right of DVI-I-2.
I've tried to save the configuration, save it as Default, save the session with the correct setting.  Every time I reboot the monitors switch sides.  I've also tried to set the primary monitor as DVI-I-2  and it makes no difference.  You can set it to anything you want as long as it is to the "right of" DVI-I-2.

I am using the proprietary NVIDIA driver - the non-proprietary driver does not recognize the 2nd monitor at all.

Also, I am running kernel 3.2.18-pclos2.a64

Changing to kernel 3.2.18-pclos2.bfs or 3.2.18-pclos2.pae.bfs also made no difference

What am I doing wrong - or what did I miss?

HWDude


« Last Edit: January 12, 2013, 03:47:43 PM by HWDude »
Welcome My Son -- Welcome -- To -- The Machine ; Pink Floyd "Wish You Were Here"


Online Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10625
  • MLUs Forever!
Re: Dual DVI screen orientation setup (and remember) problem
« Reply #1 on: December 30, 2012, 02:06:51 PM »
To avoid frustration have you tried swapping the monitor cables?

Yeah I know that does not address the settings problem .......  but if it solves the problem .....  ?   :D

MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline HWDude

  • Full Member
  • ***
  • Posts: 193
  • HWDude
    • N8OBJ's Home Page
Re: Dual DVI screen orientation setup (and remember) problem
« Reply #2 on: December 30, 2012, 02:35:20 PM »
To avoid frustration have you tried swapping the monitor cables?

Yeah I know that does not address the settings problem .......  but if it solves the problem .....  ?   :D


I could do that except that the boot monitor in now on the wrong side.  It works fine once its set up, it just doesn't seem to want to remember "to left of".

HWdude
Welcome My Son -- Welcome -- To -- The Machine ; Pink Floyd "Wish You Were Here"


Online Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10625
  • MLUs Forever!
Re: Dual DVI screen orientation setup (and remember) problem
« Reply #3 on: December 30, 2012, 02:43:44 PM »
Have you tried using 'absolute' positioning?
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline HWDude

  • Full Member
  • ***
  • Posts: 193
  • HWDude
    • N8OBJ's Home Page
Re: Dual DVI screen orientation setup (and remember) problem
« Reply #4 on: December 31, 2012, 08:52:19 PM »
Have you tried using 'absolute' positioning?

It is already set to absolute, and DVI-I-2 is set to be the primary output.

HWDude

Welcome My Son -- Welcome -- To -- The Machine ; Pink Floyd "Wish You Were Here"


Online Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10625
  • MLUs Forever!
Re: Dual DVI screen orientation setup (and remember) problem
« Reply #5 on: January 01, 2013, 03:56:15 AM »
Have you tried using 'absolute' positioning?

It is already set to absolute, and DVI-I-2 is set to be the primary output.

HWDude



I must have misunderstood this so

Quote
The problem is I set DVI-I-3 monitor's position to be "left of" DVI-I-2

I don't have a dual monitor set up presently, so cannot conduct any tests here.
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline HWDude

  • Full Member
  • ***
  • Posts: 193
  • HWDude
    • N8OBJ's Home Page
Re: Dual DVI screen orientation setup (and remember) problem
« Reply #6 on: January 01, 2013, 12:24:12 PM »
Have you tried using 'absolute' positioning?

It is already set to absolute, and DVI-I-2 is set to be the primary output.

HWDude


I must have misunderstood this so

Quote
The problem is I set DVI-I-3 monitor's position to be "left of" DVI-I-2

I don't have a dual monitor set up presently, so cannot conduct any tests here.

No, I wasn't clear in my description - sorry about that.... ???

I've added more info about the kernels I've tried to the original post if that helps any.

HWDude
Welcome My Son -- Welcome -- To -- The Machine ; Pink Floyd "Wish You Were Here"


Offline ferry_th

  • Full Member
  • ***
  • Posts: 230
  • I don't think, therefore I'm not.
Re: Dual DVI screen orientation setup (and remember) problem
« Reply #7 on: January 01, 2013, 11:11:47 PM »
Hi, HWDude. Your problem is KDE can't remember the setting. Try to do the following (which works for me):
1. Configure the KDE to run multiple monitor (from your description, you already know how to do this):
    -Configure Your Desktop >Hardware > Display and Monitor > Set your preferences (position, primary    output, etc ). In your case: set  DVI-I-2 as primary output, set DVI-I-3 monitor's position to be "left of" DVI-I-2.
    - hit Apply and  Save as default.
2. Make KDE remember your setting because on reboot KDE will not remember your setting ( I'm not sure if it's KDE fault or PCLOS):
    - First, look for information in a file named krandrcc located in ~/.kde4/share/config . You don't need all the information.  Focus on information about xrandr under [Display] . For example (my config):
  
Code: [Select]
  [Display]
      ApplyOnStartup=true
      StartupCommands=xrandr --output LVDS1 --pos 1366x0 --mode 1280x800 --refresh  60.0038\nxrandr --output VGA1 --pos 0x0 --mode 1366x768 --refresh 59.7895\nxrandr --output LVDS1 --primary
  
   - Copy thatxrandr information to a new file. Replace \n with newlines . For example (my config).
  
Code: [Select]
      xrandr --output LVDS1 --pos 1366x0 --mode 1280x800 --refresh 60.0038
       xrandr --output VGA1 --pos 0x0 --mode 1366x768 --refresh 59.7895
       xrandr --output LVDS1 --primary
  

     again don't forget to replace \n with newlines.
   - Save the file.
   - Set the file to be executable
       - Right click to that file > Properties > Permission tab > check the 'Is executable'

    - Make that file to be executed at boot process
      Configure Your Desktop > System Administration > Startup and Shutdown > Autostart > Add Script > point to the script
    - Reboot
   It  might happen that the wallpaper is swapped out between your two monitor after reboot ( if you set different wall for your 2 monitor). Try to change position the line with --primary . Something like:
Code: [Select]
   xrandr --output LVDS1 --primary
    xrandr --output LVDS1 --pos 1366x0 --mode 1280x800 --refresh 60.0038
    xrandr --output VGA1 --pos 0x0 --mode 1366x768 --refresh 59.7895
or
Code: [Select]
   xrandr --output LVDS1 --pos 1366x0 --mode 1280x800 --refresh 60.0038
    xrandr --output LVDS1 --primary
    xrandr --output VGA1 --pos 0x0 --mode 1366x768 --refresh 59.7895
« Last Edit: January 02, 2013, 02:15:42 AM by ferry_th »
To troll or not to troll, that is the question.

Online Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10625
  • MLUs Forever!
Re: Dual DVI screen orientation setup (and remember) problem
« Reply #8 on: January 02, 2013, 03:36:05 AM »
ferry_th  to the rescue!    Thank you for that detailed post  ;)
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline horusfalcon

  • Hero Member
  • *****
  • Posts: 997
  • Wayfarer of The Western Wastes
Re: Dual DVI screen orientation setup (and remember) problem
« Reply #9 on: January 03, 2013, 12:10:30 PM »
+1!  Could we get ferry_th's post stickied?  Good info!

Later On,
D
"The Way is not a matter of knowing or not knowing.  One word to a wise man; one lash to a bright horse."

Dell Latitude D620, PCLinuxOS 2012.08 KDE4/LXDE, 3.2.18.pclos.bfs, specs here.

Offline HWDude

  • Full Member
  • ***
  • Posts: 193
  • HWDude
    • N8OBJ's Home Page
Re: Dual DVI screen orientation setup (and remember) problem
« Reply #10 on: January 07, 2013, 08:05:18 PM »
Hi, HWDude. Your problem is KDE can't remember the setting. Try to do the following (which works for me):
1. Configure the KDE to run multiple monitor (from your description, you already know how to do this):
    -Configure Your Desktop >Hardware > Display and Monitor > Set your preferences (position, primary    output, etc ). In your case: set  DVI-I-2 as primary output, set DVI-I-3 monitor's position to be "left of" DVI-I-2.
    - hit Apply and  Save as default.
2. Make KDE remember your setting because on reboot KDE will not remember your setting ( I'm not sure if it's KDE fault or PCLOS):
    - First, look for information in a file named krandrcc located in ~/.kde4/share/config . You don't need all the information.  Focus on information about xrandr under [Display] . For example (my config):
  
Code: [Select]
  [Display]
      ApplyOnStartup=true
      StartupCommands=xrandr --output LVDS1 --pos 1366x0 --mode 1280x800 --refresh  60.0038\nxrandr --output VGA1 --pos 0x0 --mode 1366x768 --refresh 59.7895\nxrandr --output LVDS1 --primary
  
   - Copy thatxrandr information to a new file. Replace \n with newlines . For example (my config).
  
Code: [Select]
      xrandr --output LVDS1 --pos 1366x0 --mode 1280x800 --refresh 60.0038
       xrandr --output VGA1 --pos 0x0 --mode 1366x768 --refresh 59.7895
       xrandr --output LVDS1 --primary
  

     again don't forget to replace \n with newlines.
   - Save the file.
   - Set the file to be executable
       - Right click to that file > Properties > Permission tab > check the 'Is executable'

    - Make that file to be executed at boot process
      Configure Your Desktop > System Administration > Startup and Shutdown > Autostart > Add Script > point to the script
    - Reboot
   It  might happen that the wallpaper is swapped out between your two monitor after reboot ( if you set different wall for your 2 monitor). Try to change position the line with --primary . Something like:
Code: [Select]
   xrandr --output LVDS1 --primary
    xrandr --output LVDS1 --pos 1366x0 --mode 1280x800 --refresh 60.0038
    xrandr --output VGA1 --pos 0x0 --mode 1366x768 --refresh 59.7895
or
Code: [Select]
   xrandr --output LVDS1 --pos 1366x0 --mode 1280x800 --refresh 60.0038
    xrandr --output LVDS1 --primary
    xrandr --output VGA1 --pos 0x0 --mode 1366x768 --refresh 59.7895

Well, its close but not there yet.... :'(

After the settings are set correctly and saved, the krandrrc file has the following info in it (I edited out the /n's and added newlines here - it's all on 1 line in the file)

xrandr --output DVI-I-2 --pos 1920x0 --mode 1920x1080 --refresh 60  
xrandr --output DVI-I-3 --pos 0x0 --mode 1920x1080 --refresh 60
xrandr --output DVI-I-2 --primary

I then saved it as SetScrnPos.sh and added it to the script at startup (NOT as a symlink)

Rebooting the system yields the normal reversal, then about 1 sec after the 2 desktops show up they both go black, then
I get two screens identical to each other.  Going into the CYD->HW->DAM->S&O it shows DVI-I-3 as a clone of DVI-I-2  ???

If I now start a konsole window,  go to the ~/.kde4/share/config directory, log in as root, and look at the krandrrc file it has
the correct configuration in it.  ???

So, I tried to execute the script file:
>./SetScrnPos.sh

The screens both go black and everything comes up correctly.  ;D :o

Now the setting is set to run the script at startup, so I set it to run before KDE starts.  Now when its in the bootup splash screen
the display goes black and when it comes back I now have both screens the same again (DVI-I-3 is cloned).
Going to the ~/.kde4/share/config directory the file krandrrc is still correct.
Running the script as root fixes the problem as before.

my entire krandrrc file looks like this:

[Display]
ApplyOnStartup=true
StartupCommands=xrandr --output DVI-I-2 --pos 1920x0 --mode 1920x1080 --refresh 60\nxrandr --output DVI-I-3 --pos 0x0 --mode 1920x1080 --refresh 60\nxrandr --output DVI-I-2 --primary

[Screen_0]
OutputsUnified=false
UnifiedRect=0,0,0,0
UnifiedRotation=1

[Screen_0_Output_DVI-I-2]
Active=true
Rect=1920,0,1920,1080
RefreshRate=60
Rotation=1

[Screen_0_Output_DVI-I-3]
Active=true
Rect=0,0,1920,1080
RefreshRate=60
Rotation=1

[Screen_0_Output_default]
Active=true
Rect=0,0,1920,1080
RefreshRate=60
Rotation=1

And my script file (which runs at KDE startup) looks like:

xrandr --output DVI-I-2 --pos 1920x0 --mode 1920x1080 --refresh 60
xrandr --output DVI-I-3 --pos 0x0 --mode 1920x1080 --refresh 60
xrandr --output DVI-I-2 --primary

I've tried moving the "xrandr --output DVI-I-2 --primary" command to the first line of the script, the second line of the script and the last line (as it's shown here). Still get the same results.

This is sooooooo close to fixing the problem I'm most likely missing something simple...

What am I missing or doing in the wrong sequence?

HWDude
« Last Edit: January 07, 2013, 08:35:13 PM by HWDude »
Welcome My Son -- Welcome -- To -- The Machine ; Pink Floyd "Wish You Were Here"


Offline horusfalcon

  • Hero Member
  • *****
  • Posts: 997
  • Wayfarer of The Western Wastes
Re: Dual DVI screen orientation setup (and remember) problem
« Reply #11 on: January 08, 2013, 02:34:07 AM »
See if you can capture the state of kwinrc before and after your screens switch. 

If, as I suspect, .kwinrc is being overwritten by something (another script somewhere), it may help you troubleshoot to use the chattr command to set the immutable attribute on kwinrc.  From the chattr man page:

Quote
A  file with the `i' attribute cannot be modified: it cannot be deleted
       or renamed, no link can be created to this file  and  no  data  can  be
       written  to  the  file.  Only the superuser or a process possessing the
       CAP_LINUX_IMMUTABLE capability can set or clear this attribute.

This should prevent the file from being overwritten or deleted. Be aware that doing this means even root cannot make changes to this file without first resetting the immutable flag.  This may make setting a particular configuration more hassle-prone after it is set. I would suggest using this only as a troubleshooting tool to figure out why, where, and by what your kwinrc is being overwritten during startup.

The command to set immutability looks something like:

Code: [Select]
chattr +i ~/.kde4/share/config/kwinrc
To reset, change the + above to a -

Code: [Select]
chattr -i ~/.kde4/share/config/kwinrc
To view a file's attributes, use the lsattr command.

Hope this helps you troubleshoot...

Later On,
D
"The Way is not a matter of knowing or not knowing.  One word to a wise man; one lash to a bright horse."

Dell Latitude D620, PCLinuxOS 2012.08 KDE4/LXDE, 3.2.18.pclos.bfs, specs here.

Offline HWDude

  • Full Member
  • ***
  • Posts: 193
  • HWDude
    • N8OBJ's Home Page
Re: Dual DVI screen orientation setup (and remember) problem
« Reply #12 on: January 08, 2013, 08:50:57 PM »
See if you can capture the state of kwinrc before and after your screens switch. 

If, as I suspect, .kwinrc is being overwritten by something (another script somewhere), it may help you troubleshoot to use the chattr command to set the immutable attribute on kwinrc.  From the chattr man page:

Quote
A  file with the `i' attribute cannot be modified: it cannot be deleted
       or renamed, no link can be created to this file  and  no  data  can  be
       written  to  the  file.  Only the superuser or a process possessing the
       CAP_LINUX_IMMUTABLE capability can set or clear this attribute.

This should prevent the file from being overwritten or deleted. Be aware that doing this means even root cannot make changes to this file without first resetting the immutable flag.  This may make setting a particular configuration more hassle-prone after it is set. I would suggest using this only as a troubleshooting tool to figure out why, where, and by what your kwinrc is being overwritten during startup.

The command to set immutability looks something like:

Code: [Select]
chattr +i ~/.kde4/share/config/kwinrc
To reset, change the + above to a -

Code: [Select]
chattr -i ~/.kde4/share/config/kwinrc
To view a file's attributes, use the lsattr command.

Hope this helps you troubleshoot...

Later On,
D

OK, When I boot and I have 2 identical screens looking at me the kwinrc file contains:

[$Version]
update_info=kwin_remove_effects.upd:kwin4.7_effects

[Compositing]
OpenGLIsUnsafe=false

[Desktops]
Name_1=
Number=1

[Effect-BoxSwitch]
TabBox=false
TabBoxAlternative=false

[Effect-Zoom]
InitialZoom=1

[TabBox]
DesktopMode=1
ShowTabBox=true

After I run my "fix" script and I have the 2 windows side by side correctly, kwinrc contains:

[$Version]
update_info=kwin_remove_effects.upd:kwin4.7_effects

[Compositing]
OpenGLIsUnsafe=false

[Desktops]
Name_1=
Number=1

[Effect-BoxSwitch]
TabBox=false
TabBoxAlternative=false

[Effect-Zoom]
InitialZoom=1

[TabBox]
DesktopMode=1
ShowTabBox=true

Doesn't appear to be any changes to me...  ???

HWDude

Welcome My Son -- Welcome -- To -- The Machine ; Pink Floyd "Wish You Were Here"


Offline horusfalcon

  • Hero Member
  • *****
  • Posts: 997
  • Wayfarer of The Western Wastes
Re: Dual DVI screen orientation setup (and remember) problem
« Reply #13 on: January 09, 2013, 02:51:22 AM »

{snipped:  my previous}

OK, When I boot and I have 2 identical screens looking at me the kwinrc file contains:

[$Version]
update_info=kwin_remove_effects.upd:kwin4.7_effects

[Compositing]
OpenGLIsUnsafe=false

[Desktops]
Name_1=
Number=1

[Effect-BoxSwitch]
TabBox=false
TabBoxAlternative=false

[Effect-Zoom]
InitialZoom=1

[TabBox]
DesktopMode=1
ShowTabBox=true

After I run my "fix" script and I have the 2 windows side by side correctly, kwinrc contains:

[$Version]
update_info=kwin_remove_effects.upd:kwin4.7_effects

[Compositing]
OpenGLIsUnsafe=false

[Desktops]
Name_1=
Number=1

[Effect-BoxSwitch]
TabBox=false
TabBoxAlternative=false

[Effect-Zoom]
InitialZoom=1

[TabBox]
DesktopMode=1
ShowTabBox=true

Doesn't appear to be any changes to me...  ???

HWDude



Yeah... I see what you mean.  Looks like I'm barkin' up the wrong tree?  Looks like what might be changing is krandrrc (not sure of spelling here) not kwinrc?  The suggestion about setting immutability on the file once everything is set still has applicability.  That way you should see (in your dmesg output) what's trying to write to it during the next startup and failing.  That's all I was trying to accomplish.

Later On,
D
"The Way is not a matter of knowing or not knowing.  One word to a wise man; one lash to a bright horse."

Dell Latitude D620, PCLinuxOS 2012.08 KDE4/LXDE, 3.2.18.pclos.bfs, specs here.

Offline ferry_th

  • Full Member
  • ***
  • Posts: 230
  • I don't think, therefore I'm not.
Re: Dual DVI screen orientation setup (and remember) problem
« Reply #14 on: January 09, 2013, 05:51:52 AM »
HWDude, have you set your script file (SetScrnPos.sh) to be executable ?
Right click file > Properties > Permission > Checkmark the 'Is executable'

or

chmod 755 SetScrnPos.sh
« Last Edit: January 09, 2013, 06:18:18 AM by ferry_th »
To troll or not to troll, that is the question.