From 31db968be471f8fcec844f2127530bd0435ed57b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 9 Aug 2010 20:10:16 +0000 Subject: [PATCH] * In QEMU, set a higher refresh rate in xorg.conf so that resolutions higher than 800x600 work. * Add a "Monitor" statement to the "Screen" section, because otherwise the Monitor section is ignored. svn path=/nixos/trunk/; revision=23068 --- modules/services/x11/xserver.nix | 12 +++++++++--- modules/virtualisation/qemu-vm.nix | 7 ++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/modules/services/x11/xserver.nix b/modules/services/x11/xserver.nix index ddb6047df215..38822b2627ab 100644 --- a/modules/services/x11/xserver.nix +++ b/modules/services/x11/xserver.nix @@ -137,6 +137,7 @@ in resolutions = mkOption { default = []; + example = [ { x = 1600; y = 1200; } { x = 1024; y = 786; } ]; description = '' The screen resolutions for the X server. The first element is the default resolution. If this list is empty, the X @@ -496,6 +497,9 @@ in Section "Screen" Identifier "Screen-${driver.name}[0]" Device "Device-${driver.name}[0]" + ${optionalString (cfg.monitorSection != "") '' + Monitor "Monitor[0]" + ''} ${cfg.screenSection} @@ -508,9 +512,11 @@ in ''} ${optionalString - (driver.name != "virtualbox" && (cfg.resolutions != [] - || cfg.extraDisplaySettings != "" || cfg.virtualScreen != null)) ( - let + (driver.name != "virtualbox" && + (cfg.resolutions != [] || + cfg.extraDisplaySettings != "" || + cfg.virtualScreen != null)) + (let f = depth: '' SubSection "Display" diff --git a/modules/virtualisation/qemu-vm.nix b/modules/virtualisation/qemu-vm.nix index e054b537d438..73d527a91caa 100644 --- a/modules/virtualisation/qemu-vm.nix +++ b/modules/virtualisation/qemu-vm.nix @@ -265,7 +265,12 @@ in services.xserver.videoDriver = mkOverride 50 {} null; services.xserver.videoDrivers = mkOverride 50 {} [ "cirrus" "vesa" ]; services.xserver.defaultDepth = mkOverride 50 {} 0; - services.xserver.resolutions = mkOverride 50 {} []; + services.xserver.monitorSection = + '' + # Set a higher refresh rate so that resolutions > 800x600 work. + HorizSync 30-140 + VertRefresh 50-160 + ''; services.mingetty.ttys = ttys ++ optional (!cfg.graphics) "ttyS0";