You are not logged in.

#1 2011-09-11 02:10:16

Tempest
Member
Registered: 2011-08-01
Posts: 22

X Resolution Issues

I'm running two monitors.  The monitor on my left runs at 1920x1080, the one on my right runs at 1280x1024.  I'm using SLiM as a login manager, so it runs at boot.

When SLiM runs, X sets both of my monitors to a terrible 1024x768, and has them mirror each other.  To fix this, I have my .xinitrc file call a script that essentially calls:

xrandr --output DVI-0 --mode 1920x1080 --output VGA-0 --mode 1280x1024 --right-of DVI-0

This works fine, but it takes about a second for the screen to switch resolutions, and my SLiM still looks terrible at 1024x768.

Ideally, I want these changes to be permanent, so X doesn't even load the bad display, and goes straight to the correct two-monitor display, right from the get-go.  I've read that I need to make changes to xorg.conf for this, but I don't know where.  I only have one Monitor section, which I read is how you're supposed to do dual-screens with Xinerama (although all the information I've found on this seems sketchy and inaccurate, and I have yet to find a single, comprehensive guide to it, so this may be incorrect).

If I can't have that, I'd at least want to run that script after X starts but before SLiM.  The problem is that SLiM seems to run X itself (which seems against UNIX philosophy to me), so I don't know if I can even do this.  I've thought about putting something like "&& myscript" as an argument to the X server in SLiM, but haven't tried it yet (if SLiM passes the arguments directly, then this won't work).  (EDIT:  I tried this, it passed the literal "&&" to X, so it doesn't work.)

Any ideas?  This seems to be a rather common case, so I figure there's got to be a good way to go about this...

Last edited by Tempest (2011-09-11 02:16:15)

Offline

#2 2011-09-13 09:05:59

Padfoot
Member
Registered: 2010-09-03
Posts: 382

Re: X Resolution Issues

I'm not sure how you would do it with slim, but may I suggest you give GDM a try?

I have a media centre connected to my TV. The TV is 1680x1050 native, yet the VGA input for connecting a PC is only 1024x768 (odd I know, go figure.....blasted TV manufacturers).

Anyway, unless I set a specific resolution, KMS detects 1680x1050 thus I only get a viewport.

My solution is to place my xrandr line (as you have above) at the top of /etc/gdm/Init/Default. This ensures your resolution is set correctly immediately after boot and before the DM displays.

I understand you may not wish to have gnome packages on your system (hence the use of slim), but really, the only part of gnome gdm pulls in is gnome-session and the dependencies are not huge.

Of course, you will need to install gnome-settings-daemon if you want to set a gdm background (entirely optional).

Cheers.

Offline

#3 2011-09-13 17:22:06

Stebalien
Member
Registered: 2010-04-27
Posts: 1,239
Website

Re: X Resolution Issues

This may help: http://en.gentoo-wiki.com/wiki/X.Org/Dual_Monitors
You will probably need to try a few configurations before getting it right. Before you do anything, back up your /etc/X11/xorg.conf and install a text based web browser such as elinks (in case X crashes).


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C

Offline

#4 2011-09-13 17:41:01

Tempest
Member
Registered: 2011-08-01
Posts: 22

Re: X Resolution Issues

Your gentoo wiki link is very informative, but I don't understand what to do if my monitors have different resolutions.  Do I just put the modes for both monitors in that Display subsection?

Offline

#5 2011-09-13 19:55:25

Stebalien
Member
Registered: 2010-04-27
Posts: 1,239
Website

Re: X Resolution Issues

According to this, probably. However, the best way to answer that question is to try it.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C

Offline

Board footer

Powered by FluxBB