[Nix-dev] xserver ignores custom vesa modes
Lluís Batlle
viriketo at gmail.com
Wed Jan 28 12:04:08 CET 2009
The screen sizes usable in an X server should be defined as Monitor Modes.
Usually the monitor modes are taken from the monitor you are using
through an i2c link in the VGA cable or something similar.
On vesa, there are "monitor modes" built-in. Out of the built-in
modes, you should define the new in your monitor section, through
Modelines which describe the timing of the vga signals.
I'm not sure how this can work in vesa (Giving timing of signals in
vesa? Is that possible?).
I also don't know what happens in digital cable configurations.
Regards,
Lluís
2009/1/28 Marco Maggesi <maggesi at math.unifi.it>:
> Hi,
>
> I use NixOS as guest os in VirtualBox.
> I would like to set up the xserver to match the resolution of the physical
> screen of my laptop: 1440x900.
> But all my attempts were unsuccessful so far.
>
> Here is what I tried.
>
> Following the instruction in the virtual box manual, I added a custom vesa
> mode to the virtual machine
> with command
>
> $ VBoxManage setextradata nixbox "CustomVideoMode1" "1440x900x24"
>
> (the virtualbox user manual also recites (sec 9.5):
> ``
> The VESA mode IDs for custom video modes start at 0x160. In order to use
> the
> above defined custom video mode, the following command line has be supplied
> to Linux:
> vga = 0x200 | 0x160
> vga = 864
> ``
> which is a pretty cryptic explanation for me.)
>
>
> Then, I modified /etc/nixos/configuration.nix in the guest machine as
> follows:
>
> [...]
> xserver = {
> enable = true;
> videoDriver = "vesa";
> sessionType = "";
> windowManager = "none";
> sessionStarter = "";
> resolutions = [ { x=1440; y=900; } { x=1152; y=864; } ];
> };
> [...]
>
> With the above setup the server ignores the resolution 1440x900 and starts
> with resolution 1152x864.
>
> The generated xserver.conf looks good.
> The log file /var/log/X.0.log (see below an extract) reveals that the custom
> vesa
> mode 1440x900 is recognized but is ignored anyway ("no mode of this name").
>
> I tried some clever google search.
> But they were not clever enough :(
>
> Any idea?
> Thanks,
> M.
>
> ----
>
> $ cat /var/log/X.0.log
>
> [...]
>
> (II) VESA(0): initializing int10
> (II) VESA(0): Primary V_BIOS segment is: 0xc000
> (II) VESA(0): VESA BIOS detected
> (II) VESA(0): VbeVersion is 512, OemStringPtr is 0xc0007c3c,
> OemVendorNamePtr is 0xc0007c6b, OemProductNamePtr is 0xc0007c82,
> OemProductRevPtr is 0xc0007c99
> (II) VESA(0): VESA VBE Version 2.0
> (II) VESA(0): VESA VBE Total Mem: 8192 kB
> (II) VESA(0): VESA VBE OEM: VirtualBox VBE BIOS http://www.virtualbox.org/
> (II) VESA(0): VESA VBE OEM Software Rev: 0.2
> (II) VESA(0): VESA VBE OEM Vendor: Sun Microsystems, Inc.
> (II) VESA(0): VESA VBE OEM Product: VirtualBox VBE Adapter
> (II) VESA(0): VESA VBE OEM Product Rev: Sun xVM VirtualBox Version 2.1.2
> (**) VESA(0): Depth 24, (--) framebuffer bpp 24
> (==) VESA(0): RGB weight 888
> (==) VESA(0): Default visual is TrueColor
> (==) VESA(0): Using gamma correction (1.0, 1.0, 1.0)
> (II) Loading sub module "ddc"
> (II) LoadModule: "ddc"(II) Module "ddc" already built-in
> (II) VESA(0): VESA VBE DDC not supported
> (II) VESA(0): Searching for matching VESA mode(s):
>
> [...]
>
> *Mode: 160 (1440x900)
> ModeAttributes: 0x9b
> WinAAttributes: 0x7
> WinBAttributes: 0x0
> WinGranularity: 64
> WinSize: 64
> WinASegment: 0xa000
> WinBSegment: 0x0
> WinFuncPtr: 0xc0007f77
> BytesPerScanline: 4320
> XResolution: 1440
> YResolution: 900
> XCharSize: 8
> YCharSize: 16
> NumberOfPlanes: 1
> BitsPerPixel: 24
> NumberOfBanks: 1
> MemoryModel: 6
> BankSize: 0
> NumberOfImages: 2
> RedMaskSize: 8
> RedFieldPosition: 16
> GreenMaskSize: 8
> GreenFieldPosition: 8
> BlueMaskSize: 8
> BlueFieldPosition: 0
> RsvdMaskSize: 0
> RsvdFieldPosition: 0
> DirectColorModeInfo: 0
> PhysBasePtr: 0xe0000000
>
> (II) VESA(0): Total Memory: 128 64KB banks (8192kB)
> (II) VESA(0): Monitor[0]: Using default hsync range of 31.50-37.90 kHz
> (II) VESA(0): Monitor[0]: Using default vrefresh range of 50.00-70.00 Hz
> (II) VESA(0): Not using mode "1440x900" (no mode of this name)
> (II) VESA(0): Not using built-in mode "1280x1024" (width too large for
> virtual size)
> (--) VESA(0): Virtual size is 1152x864 (pitch 1152)
> (**) VESA(0): *Built-in mode "1152x864"
> _______________________________________________
> nix-dev mailing list
> nix-dev at cs.uu.nl
> https://mail.cs.uu.nl/mailman/listinfo/nix-dev
>
More information about the nix-dev
mailing list