Author Topic: LinuxMCE ignores xorg.conf?  (Read 8353 times)

redshark

  • Newbie
  • *
  • Posts: 8
    • View Profile
LinuxMCE ignores xorg.conf?
« on: February 06, 2008, 09:42:21 pm »
Hello,

   I edited xorg.conf and changed the modeline to fit my screen.
I've also changed '/usr/pluto/bin/Xconfigure.sh' so it will do nothing.

I've set LinuxMCE to load on startup. When it loads the resolution is as it was before I've touched
xorg.conf.  Now, If I kill the X session and start it again ('startx') KDE loads in the resolution I've set.

Here is my xorg.conf:
Code: [Select]
Section "ServerLayout"

# Uncomment if you have a wacom tablet
# InputDevice     "stylus" "SendCoreEvents"
# InputDevice     "cursor" "SendCoreEvents"
# InputDevice     "eraser" "SendCoreEvents"
    Identifier     "Default Layout"
    Screen         "Default Screen" 0 0
    InputDevice    "Generic Keyboard"
    InputDevice    "Configured Mouse"
EndSection

Section "Files"
EndSection

Section "Module"
Load "record"
Load "glx"
Load "dbe"
Load "extmod"
Load "xtrap"
Load "speedo"
Load "type1"
Load "int10"
Load "v4l"
EndSection

Section "InputDevice"
    Identifier     "Generic Keyboard"
    Driver         "kbd"
    Option         "CoreKeyboard"
    Option         "XkbRules" "xorg"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "us,il"
    Option         "XkbVariant" ","
    Option         "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
EndSection

Section "InputDevice"
    Identifier     "Configured Mouse"
    Driver         "mouse"
    Option         "CorePointer"
    Option         "Device" "/dev/input/mice"
    Option         "Protocol" "ImPS/2"
    Option         "ZAxisMapping" "4 5"
    Option         "Emulate3Buttons" "true"
EndSection

Section "InputDevice"
    Identifier     "stylus"
    Driver         "wacom"
    Option         "Device" "/dev/input/wacom"
    Option         "Type" "stylus"
    Option         "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
    Identifier     "eraser"
    Driver         "wacom"
    Option         "Device" "/dev/input/wacom"
    Option         "Type" "eraser"
    Option         "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
    Identifier     "cursor"
    Driver         "wacom"
    Option         "Device" "/dev/input/wacom"
    Option         "Type" "cursor"
    Option         "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "Monitor"
    Identifier     "Generic Monitor"
    Option         "DPMS"
Modeline "1280x720" 74.250 1232 1365 1430 1650 688 725 730 765 +hsync +vsync +hsync
HorizSync 20-500
VertRefresh 59-61
EndSection

Section "Device"
    Identifier     "nVidia Corporation GeForce 7100 GS"
    Driver         "nvidia"
Option "XvmcUsesTextures" "true"
Option "renderAccel" "true"
Option "NoDDCValue"
Option "UseEDID" "false"
Option "ExactModeTimingsDVI" "true"
Option "NoLogo" "true"
Option "NoBandWidthTest" "true"
Option "ModeValidation" "NoDFPNativeResolutionCheck, NoEdidMaxPClkCheck, NoMaxPClkCheck, AllowInterlacedModes, AllowNon60HzDFPModes"
Option "DynamicTwinView" "false"
Option "AllowGLXWithComposite" "true"
Option "AddARGBGLXVisuals" "true"
Option "ConnectedMonitor" "DFP"
EndSection

Section "Screen"
    Identifier     "Default Screen"
    Device         "nVidia Corporation GeForce 7100 GS"
    Monitor        "Generic Monitor"
    DefaultDepth    24
SubSection "Display"
Modes "1280x720"
Virtual 1280 720
EndSubSection
    Option         "UseEdid" "False"
    Option         "RenderAccel" "True"
Option "XvmcUsesTextures" "true"
Option "renderAccel" "true"
Option "NoDDCValue"
Option "UseEDID" "false"
Option "ExactModeTimingsDVI" "true"
Option "NoLogo" "true"
Option "NoBandWidthTest" "true"
Option "ModeValidation" "NoDFPNativeResolutionCheck, NoEdidMaxPClkCheck, NoMaxPClkCheck, AllowInterlacedModes, AllowNon60HzDFPModes"
Option "DynamicTwinView" "false"
Option "AllowGLXWithComposite" "true"
Option "AddARGBGLXVisuals" "true"
Option "TVStandard" "720p"
EndSection

Section "Extensions"
Option "Composite" "true"
Option "RENDER" "true"
EndSection

Thanks.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: LinuxMCE ignores xorg.conf?
« Reply #1 on: February 06, 2008, 10:38:53 pm »
It definitely doesn't ignore it - /etc/X11/xorg.conf is the correct file, check in your /var/log/xorg.0.log to confirm what it is doing in there.

But be aware, the Pluto code does much of the smarts, esp the AV Wizard. So occasionally Pluto will overwrite this file. This definitely happens if you go back into the AV Wizard because that is the point of that wizard. But if you are settled and using LMCE normally, and are booting directly into it and not any wizard, then edits you make will effect X correctly.

Its a good idea to save a copy of your config in the same folder! Also, there is another xorg....avwizard (blah) file in there that I think Pluto uses as a template. If you are certain of your config, you can update that as well to maintain more stability. But going into the AV Wizard will reset things still - the template is just that, the code makes additional changes over this template.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: LinuxMCE ignores xorg.conf?
« Reply #2 on: February 06, 2008, 10:54:31 pm »
pluto has a script for the generation of the xorg.conf file ("/usr/pluto/bin/Xconfigure.sh"). If you want to stop it overriding your manually crafted file put a exit on the second line of the script. Be aware, the AVWizard won't work until you enable that script again.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: LinuxMCE ignores xorg.conf?
« Reply #3 on: February 06, 2008, 11:11:44 pm »
Cool! I'll remember that!

redshark

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: LinuxMCE ignores xorg.conf?
« Reply #4 on: February 06, 2008, 11:38:05 pm »
I've already bypassed '/usr/pluto/bin/Xconfigure.sh'.
My problem is that after reboot the resolution is not what I've wanted. If I kill X
and restart it (without touching 'xorg.conf') it appears fine.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: LinuxMCE ignores xorg.conf?
« Reply #5 on: February 07, 2008, 12:17:53 am »
It really shouldn't...

Start up normally into the "wrong" resolution. Let it settle down and finish logging - then make a copy of your /var/log/xorg.0.log file, then kill x and start it again into the "right" resolution. No read through your copy and the new xorg.0.log file. This should detail what is going wrong.

BTW - your TVStandard is wrong, it should be "HD720p", but LMCE doesn't seem to realise this and will try to reset it if you use the AV Wizard again. It won't fix this problem, but just thought you should know. You will see why when yo read the log file.

BTW are you using 0710b3? You should do as this has the latest nvidia drivers, or install them manually - see the wiki

RichardP

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: LinuxMCE ignores xorg.conf?
« Reply #6 on: February 07, 2008, 01:42:49 am »
Hello,

   I edited xorg.conf and changed the modeline to fit my screen.
I've also changed '/usr/pluto/bin/Xconfigure.sh' so it will do nothing.

I've set LinuxMCE to load on startup. When it loads the resolution is as it was before I've touched
xorg.conf.  Now, If I kill the X session and start it again ('startx') KDE loads in the resolution I've set.



Hi,

The nVidia driver does not use modelines - they will be ignored, and only the name of the mode will be used.

Make some changes to your xorg.conf:
In your TVStandard option, change it from 720p to HD720p.
Turn EDID on, as you seem to be using the DVI connector, and the TV will tell the video card all the modes it supports and also which one it prefers.
In you Monitor section, add a DisplaySize option. It won't make any visible difference, but it will help select the correct aspect ratio when you are watching video and TV. See http://www.pillayfamily.com/blogs/index.php/LinuxMCE/2008/02/05/full_screen_tv for more info.

Once you've fully started up with that configuration, read the contents of /var/log/xorg.0.log and see what the TV is reporting back, and you will be able to figure out what other changes you need to make in your xorg.conf.

Finally, once your xorg.conf is set up correctly, copy it over the Pluto version, also in /etc/X11. Whenever you run the AVWizard, the first thing it does is copy this file over xorg.conf, so you will end up losing your changes.


ColinJones will probably be able to give you a lot of help with this issue, as he has gone through a fair amount of pain and has probably learnt a few tricks along the way.

Best Regards,
Richard.
Best Regards,
Richard

dopey

  • Guru
  • ****
  • Posts: 223
    • View Profile
Re: LinuxMCE ignores xorg.conf?
« Reply #7 on: February 08, 2008, 06:07:52 am »
That's not true. The NVidia driver definitely does use modelines. I have to use a specific one to work with my TV. It will, however, automatically ignore any modelines that the video card doesn't support. It could also ignore the modeline if the connected display isn't actually connected and turned on as it verifies that the display will actually accept the modeline. Check the log and see what it's doing. It always says if it ignores a modeline that's entered in xorg.conf.

One thing I should note that can be really confusing. If you have an xorg.conf file in /root that will be used instead of /etc/X11. I once made a backup of the xorg.conf to /root and I couldn't figure out why none of my changes to /etc/X11/xorg.conf were being used...

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: LinuxMCE ignores xorg.conf?
« Reply #8 on: February 09, 2008, 07:38:16 am »
Also note that a better way of preventing loosing your xorg settings by the AV wizard overwriting the, - you can put an "exit" on the second line of you Xconfigure file in one of the Pluto directories. This is the script that overwrites your xorg. I'm told that if you want to run your AV wizard again, you will need to remove this exit first.

Col

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: LinuxMCE ignores xorg.conf?
« Reply #9 on: February 09, 2008, 08:08:03 am »
Hello,

   I edited xorg.conf and changed the modeline to fit my screen.
I've also changed '/usr/pluto/bin/Xconfigure.sh' so it will do nothing.

I've set LinuxMCE to load on startup. When it loads the resolution is as it was before I've touched
xorg.conf.  Now, If I kill the X session and start it again ('startx') KDE loads in the resolution I've set.



Hi,

The nVidia driver does not use modelines - they will be ignored, and only the name of the mode will be used.

Make some changes to your xorg.conf:
In your TVStandard option, change it from 720p to HD720p.
Turn EDID on, as you seem to be using the DVI connector, and the TV will tell the video card all the modes it supports and also which one it prefers.
In you Monitor section, add a DisplaySize option. It won't make any visible difference, but it will help select the correct aspect ratio when you are watching video and TV. See http://www.pillayfamily.com/blogs/index.php/LinuxMCE/2008/02/05/full_screen_tv for more info.

Once you've fully started up with that configuration, read the contents of /var/log/xorg.0.log and see what the TV is reporting back, and you will be able to figure out what other changes you need to make in your xorg.conf.

Finally, once your xorg.conf is set up correctly, copy it over the Pluto version, also in /etc/X11. Whenever you run the AVWizard, the first thing it does is copy this file over xorg.conf, so you will end up losing your changes.


ColinJones will probably be able to give you a lot of help with this issue, as he has gone through a fair amount of pain and has probably learnt a few tricks along the way.

Best Regards,
Richard.


Hmmm... look all xorg drivers use modelines... that just fundamental to the way X works.

The AVwizard and its supporting scripts use /usr/pluto/share/Resolutions.conf

From the console open/edit the Resolutions.conf file and add the modeline you'd like in there... beware its a script so look at how the various example modelines/setups for different cards have been added and then add your modeline using a similar structure. Then force the Avwizard to run again at boot (hold the 'Shift' key down as you here the rising beeps... you then hear a 2nd distinct additional Beep) and now if you have added your modeline/setup correctly you will be able to use it from the choose connector/resolutions/frequency screen.

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

RichardP

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: LinuxMCE ignores xorg.conf?
« Reply #10 on: February 11, 2008, 03:27:36 am »

Hmmm... look all xorg drivers use modelines... that just fundamental to the way X works.

The AVwizard and its supporting scripts use /usr/pluto/share/Resolutions.conf


I could have sworn the nVidia driver readme said it ignored the Modelines and used just name. Can't find it now though...

The information on Resolution.conf could turn out to be pretty useful with a problem I'm trying to diagnose right now, with fon't appearing miniscule on the screen.
Best Regards,
Richard

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: LinuxMCE ignores xorg.conf?
« Reply #11 on: February 11, 2008, 08:09:27 pm »
...
The information on Resolution.conf could turn out to be pretty useful with a problem I'm trying to diagnose right now, with fon't appearing miniscule on the screen.

Looked at: http://wiki.linuxmce.org/index.php/Display_Drivers#Microscopic_fonts_in_KDE?
"Change is inevitable. Progress is optional."
-- Anonymous


jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: LinuxMCE ignores xorg.conf?
« Reply #12 on: March 17, 2008, 07:55:46 pm »
I am also having a terrible time trying to get a resolution supported correctly. As suggested, I modified /usr/pluto/share/Resolutions.conf
(I am trying to add support for 1366x768 resolution - I have 4 TV's with this native resolution)
I have the entry right below the 1080p entry. Everything looks correct, however, I do not get the option when I boot into the wizard.  Is there something I'm missing?


Code: [Select]
# vim:ft=sh
resolution
{
name = "640x480"
width = 640
height = 480
aspect_ratio = "4:3"
modeline
{
refresh = 60
builtin = true
workaround
{
driver = {"nvidia"}
x11 = "25.18 640 656 752 800 480 490 492 525"
}
}
modeline
{
refresh = 75
builtin = true
}
visible = true
}

resolution
{
name = "480p"
width = 720
height = 480
aspect_ratio = "16:9"
modeline
{
refresh = 60
x11 = "27.000 720 736 798 858 480 489 495 525 -hsync -vsync"
workaround
{
driver = {"via"}
x11 = "26.7 720 736 808 896 480 481 484 497"
}
}
visible = true
}

resolution
{
name = "800x600"
width = 800
height = 600
aspect_ratio = "4:3"
modeline
{
refresh = 60
builtin = true
workaround
{
driver = {"nvidia"}
}
}
modeline
{
refresh = 75
builtin = true
workaround
{
driver = {"nvidia"}
}
}
visible = true
}

resolution
{
name = "720p"
width = 1280
height = 720
aspect_ratio = "16:9"
modeline
{
refresh = 50
x11 = "74.250 1280 1720 1760 1980 720 741 746 750 +hsync +vsync"
}
modeline
{
refresh = 60
x11 = "74.250 1280 1390 1430 1650 720 725 730 750 +hsync +vsync"
workaround
{
driver = {"via"}
x11 = "74.6 1280 1341 1474 1688 720 721 724 746"
}
}
visible = true
}

resolution
{
name = "1024x768"
width = 1024
height = 768
aspect_ratio = "4:3"
modeline
{
refresh = 60
builtin = true
workaround
{
x11 = "60.80 1024 1056 1128 1272 768 768 770 796"
}
}
modeline
{
refresh = 75
builtin = true
}
visible = true
}

resolution
{
name = "1280x800"
width = 1280
height = 800
aspect_ratio = "custom"
modeline
{
refresh = 60
x11 = ""
workaround
{
driver = {"via"}
x11 = "68.9 1280 1344 1368 1408 800 803 806 816"
}
}
visible = true
}

resolution
{
name = "1280x1024"
width = 1280
height = 1024
aspect_ratio = "5:4"
modeline
{
refresh = 60
builtin = true
}
modeline
{
refresh = 75
builtin = true
}
visible = true
}

resolution
{
name = "1080p"
width = 1920
height = 1080
aspect_ratio = "16:9"
modeline
{
refresh = 60
x11 = "138.5 1920 1968 2000 2080 1080 1082 1087 1111"
workaround
{
driver = {"via"}
x11 = "172.9 1920 2043 2249 2578 1080 1081 1084 1118"
}
}
visible = true
}

resolution
{
name = "1366x768"
width = 1366
height = 768
aspect_ratio = "16:9"
modeline
{
refresh = 60
x11 = ""
workaround
{
driver = {"via"}
x11 = "85.86 1366 1440 1584 1800 768 769 772 795 -HSync +Vsync"
}
}
visible = true
}

resolution
{
name = "1080i"
width = 1920
height = 1080
aspect_ratio = "16:9"
modeline
{
refresh = 50
x11 = "74.250 1920 2448 2492 2640 1080 1148 1158 1124 interlace +hsync +vsync'"
}
modeline
{
refresh = 60
x11 = "77.6 1920 1952 2240 2272 1080 1104 1110 1135 interlace"
}
visible = false
}

resolution
{
name = "1920x540"
width = 1920
height = 540
modeline
{
refresh = 50
x11 = "74.250 1920 2448 2492 2640 540 574 579 562 +hsync +vsync"
}
modeline
{
refresh = 60
x11 = "74.250 1920 2008 2052 2200 540 542 547 562 +hsync +vsync"
}
visible = false
}

resolution
{
name = "720x576"
width = 720
height = 576
modeline
{
refresh = 50
x11 = "27.000 720 732 796 864 576 581 586 625 -hsync -vsync"
}
modeline
{
refresh = 60
x11 = "27.000 720 732 796 864 576 581 586 625 -hsync -vsync"
workaround
{
driver = {"via"}
x11 = "32.7 720 744 816 912 576 577 580 597"
}
}
visible = false
}

resolution
{
name = "1600x1200"
width = 1600
height = 1200
aspect_ratio = "4:3"
modeline
{
refresh = 60
builtin = true
}
modeline
{
refresh = 75
builtin = true
}
visible = false
}

resolution
{
name = "800x480"
width = 800
height = 480
modeline
{
refresh = 60
x11 = ""
workaround
{
driver = {"via"}
x11 = "29.6 800 816 896 992 480 481 484 497"
}
}
visible = false
}

resolution
{
name = "848x480"
width = 848
height = 480
modeline
{
refresh = 60
x11 = ""
workaround
{
driver = {"via"}
x11 = "31.5 848 864 952 1056 480 481 484 497"
}
}
visible = false
}

resolution
{
name = "856x480"
width = 856
height = 480
modeline
{
refresh = 60
x11 = ""
workaround
{
driver = {"via"}
x11 = "31.7 856 872 960 1064 480 481 484 497"
}
}
visible = false
}

resolution
{
name = "1024x512"
width = 1024
height = 512
modeline
{
refresh = 60
x11 = ""
workaround
{
driver = {"via"}
x11 = "41.3 1024 1056 1160 1296 512 513 516 531"
}
}
visible = false
}

resolution
{
name = "1280x768"
width = 1280
height = 768
modeline
{
refresh = 60
x11 = ""
workaround
{
driver = {"via"}
x11 = "87.04 1280 1376 1488 1800 768 771 777 806"
}
}
visible = false
}

resolution
{
name = "1360x768"
width = 1360
height = 768
aspect_ratio = "16:9"
modeline
{
refresh = 60
x11 = ""
workaround
{
driver = {"via"}
x11 = "85.50 1360 1392 1712 1744 768 783 791 807 +HSync +Vsync"
}
}
visible = false
}

resolution
{
name = "1400x1050"
width = 1400
height = 1050
modeline
{
refresh = 60
x11 = ""
workaround
{
driver = {"via"}
x11 = "122.61 1400 1488 1640 1880 1050 1051 1054 1087"
}
}
visible = false
}

resolution
{
name = "1920x1440"
width = 1920
height = 1440
modeline
{
refresh = 60
x11 = ""
workaround
{
driver = {"via"}
x11 = "234.0 1920 2060 2269 2618 1440 1441 1444 1490"
}
}
visible = false
}

resolution
{
name = "1600x900"
width = 1600
height = 900
visible = false
}


RichardP

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: LinuxMCE ignores xorg.conf?
« Reply #13 on: March 18, 2008, 04:52:36 am »
I am also having a terrible time trying to get a resolution supported correctly. As suggested, I modified /usr/pluto/share/Resolutions.conf
(I am trying to add support for 1366x768 resolution - I have 4 TV's with this native resolution)
I have the entry right below the 1080p entry. Everything looks correct, however, I do not get the option when I boot into the wizard.  Is there something I'm missing?


If you are someone comfortable editing Linux config files and the like (and you seem to be), why not just edit the xorg.conf to get it right. The AV Wizard is there just for those who must go through a GUI interface and don't understand what's happening behind the GUI.

Use /var/log/Xorg.0.log to find out what your video card/screen combination supports, then edit the xorg.conf to select the mode that comes closest to your requirements.

Best Regards,
RichardP.
Best Regards,
Richard