From e4626e0f0d7c667591f39a399e71b0eb289784fd Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Fri, 26 Oct 2007 04:28:01 +0000 Subject: [PATCH] Added some options for manual text insertion into xorg.conf . Removed (commented out) MonitorLayout by default. It was the thing that prevents i915GM on laptops from working. Those who need it can add it back in extraDeviceOptions. svn path=/nixos/trunk/; revision=9527 --- system/options.nix | 50 ++++++++++++++++++++++++++++++++++++++- upstart-jobs/xserver.conf | 8 +++++-- upstart-jobs/xserver.nix | 6 +++++ 3 files changed, 61 insertions(+), 3 deletions(-) diff --git a/system/options.nix b/system/options.nix index aa2c207704e..182653a1e6c 100644 --- a/system/options.nix +++ b/system/options.nix @@ -729,7 +729,55 @@ "; } - + { + name = ["services" "xserver" "extraDeviceConfig"]; + default = ""; + example = "VideoRAM 131072"; + description =" + Just anything to add into Device section. + "; + } + + { + name = ["services" "xserver" "extraMonitorSettings"]; + default = ""; + example = "HorizSync 28-49"; + description =" + Just anything to add into Monitor section. + "; + } + + { + name = ["services" "xserver" "extraModules"]; + default = ""; + example = "SubSection \"extmod\" + EndSubsection"; + description =" + Just anything to add into Modules section. + "; + } + + { + name = ["services" "xserver" "serverLayoutOptions"]; + default = ""; + example = " + Option \"AIGLX\" \"true\" +"; + description =" + Just anything to add into Monitor section. + "; + } + + { + name = ["services" "xserver" "defaultDepth"]; + default = 24; + example = 8; + description =" + Default colour depth. + "; + } + + { name = ["services" "httpd" "enable"]; default = false; diff --git a/upstart-jobs/xserver.conf b/upstart-jobs/xserver.conf index 52b04f38f0f..a7defb98431 100644 --- a/upstart-jobs/xserver.conf +++ b/upstart-jobs/xserver.conf @@ -20,6 +20,7 @@ Section "Module" Load "type1" Load "vbe" @moduleSection@ + @extraModules@ EndSection @@ -47,6 +48,7 @@ Section "Monitor" Option "DPMS" # HorizSync 28-49 # VertRefresh 43-75 + @extraMonitorSettings@ EndSection @@ -54,7 +56,7 @@ Section "Screen" Identifier "Screen[0]" Device "Device[0]" Monitor "Monitor[0]" - DefaultDepth 24 + DefaultDepth @defaultDepth@ SubSection "Display" Depth 16 Modes @resolutions@ @@ -77,9 +79,10 @@ Section "Device" Driver "@videoDriver@" Option "Clone" "@isClone@" #Option "MonitorLayout" "CRT,LFP" - Option "MonitorLayout" "LVDS,CRT" + #Option "MonitorLayout" "LVDS,CRT" @device@ @internalAGPGART@ + @extraDeviceConfig@ EndSection @@ -88,6 +91,7 @@ Section "ServerLayout" InputDevice "Keyboard[0]" "CoreKeyboard" InputDevice "@corePointer@" "CorePointer" Screen "Screen[0]" + @serverLayoutOptions@ EndSection diff --git a/upstart-jobs/xserver.nix b/upstart-jobs/xserver.nix index 87df40ef206..32810b79c5b 100644 --- a/upstart-jobs/xserver.nix +++ b/upstart-jobs/xserver.nix @@ -63,6 +63,7 @@ let xorg.xf86inputmouse ] ++ optional (videoDriver == "vesa") xorg.xf86videovesa + ++ optional (videoDriver == "vga") xorg.xf86videovga ++ optional (videoDriver == "sis") xorg.xf86videosis ++ optional (videoDriver == "i810") xorg.xf86videoi810 ++ optional (videoDriver == "intel") xorg.xf86videointel @@ -111,6 +112,11 @@ let " Option \"UseInternalAGPGART\" \"no\"" else " "); + extraDeviceConfig = getCfg "extraDeviceConfig"; + extraMonitorSettings = getCfg "extraMonitorSettings"; + extraModules = getCfg "extraModules"; + serverLayoutOptions = getCfg "serverLayoutOptions"; + defaultDepth = getCfg "defaultDepth"; buildCommand = " buildCommand= # urgh, don't substitute this