[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problems running XFree86 (Debian 4.2.1-6) at 1024x768 on Indy

Hash: SHA1

Guido Guenther wrote:

> The server doesn't set the video mode itself but relies on the PROM to
> do so. Since lots of people got confused by that (selecting 1024x768
> while the PROM set the mode to 1280x1024 and vice versa) I decided to
> hardcode 1280x1024 since this seems what most people wanted anyway. To
> get this fixed "properly" we just need a small piece of code that checks
> which video mode the Indy is in and select the proper resolution for the
> X server - I meant to add this since ages.
> I'll try to find time for this next weekend (please remind me in case I
> should forget this again).
>  -- Guido

Well, before updating the system I hacked the startup script for GDM.  I
found that in amongst the output from dmesg, there were a couple of
lines that could tell me what resolution was selected by the PROM:

NG1: Revision 6, 8 bitplanes, REX3 revision B, VC2 revision A, xmap9
revision A,
 cmap revision C, bt445 revision D
NG1: Screensize 1024x768
                ^^^^^^^^ -- Current Resolution

I did this little script in Perl which edits my /etc/X11/XF86Config-4 to
reflect this resolution.  Where abouts is the hard coded resolution and
how do I go about changing it?

- --
| Stuart Longland           stuartl at longlandclan.hopto.org |
| Brisbane Mesh Node: 719             http://stuartl.cjb.net/ |
| I haven't lost my mind - it's backed up on a tape somewhere |
| Griffith Student No:           Course: Bachelor/IT @ Nathan |
Version: GnuPG v1.2.1-nr1 (Windows 2000)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

#!/usr/bin/perl -w

$raw_res = `dmesg | grep 'NG1: Screensize'`; chomp $raw_res;
$raw_res =~ /size (\d{3,4}x\d{3,4})/i;
$res 	 = $1;

print "Setting X11 resolution to $1\n";

open XCONFIG, "</etc/X11/XF86Config-4" or die "Can't open /etc/X11/XF86Config-4: $!\n";
close XCONFIG;

open XCONFIG, ">/etc/X11/XF86Config-4" or die "Can't open /etc/X11/XF86Config-4: $!\n";
foreach $line (@XCONFIG) {
	$line =~ s/^\s*Modes.*$/\t\tModes\t\t"$res"/;

	print XCONFIG $line;
close XCONFIG;

Reply to: