External Monitor different aspect ratio problems... use multiple xorg.conf files?
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to use my laptop at home plugged into an External Monitor, with the laptop screen off, but I also want to be able to use my laptop away from home just using it's own screen. The FN button to do this on the laptop doesn't do anything.
I just used to use xrandr. I would set the resolution to 1280x1024, and it would turn the laptop screen off because that resolution wasn't supported and fill the external monitor. I can't do that anymore because I have a different external monitor, and Fedora doesn't detect the monitor's modes - so I have to create an xorg.conf file to set a resolution higher than 1024x768.
By creating an xorg.conf file it seems I can't use two screens with different aspect ratios, unless I am doing it wrong? Either I set the Virtual size as 1280x1024, and can't see everything on the laptop screen - the bottom 224 pixels can't be seen. Or I set the Virtual size as 1280x800, and the desktop doesn't fill the whole 1280x1024 resolution of the external monitor.
Is it possible to use multiple xorg.conf files, and switch between them easily? Preferably at boot, or login, or by running a script, or entering commands in the terminal?
The only solution I can think of is to create two xorg.conf files, [xorg.conf.home & xorg.conf.away] and when I want to switch between them I boot into runlevel 3, overwrite xorg.conf with the appropriate file, then reboot.
Surely there has to be a more convenient way of doing that?
Or a way of configuring xorg.conf so that I can use either of the two screens with different aspect ratios?
I don't want to set it up where the desktop is shared between the monitors, I just want the external monitor to show the same as the laptop screen would - but at a higher resolution. I don't mind if the laptop screen is turned off to accomodate this.
I know it was possible with another monitor I used with Fedora 10, but that monitor was at the place I used to work, and now I work from home. The other monitor used a VGA cable, but my monitor has a DVI cable hard wired into it - so I have to use a DVI to VGA adapter, which is probably why Fedora can't detect the monitor's resolutions.
Look at the manpage for the xorg.conf file. You can have different layouts inside the same xorg.conf file and use the -layout option to determine which one to use when starting xorg. Wanting only one of two displays to be active and the other disabled may complicate matters compared to a multihead setup where both displays are used, and the same one is the active display. The "ServerLayout Section" paragraph of the xorg.conf man page explains this.
You may want two [Monitor] sections, one for the laptop and the other for the external display. The Monitor section can contain a modeline entry. This can be handy for LCD monitors of non-standard dimensions (such as some wide screen laptop monitors). For LCD monitors, you get best results using it's native resolution. In the past, a custom modeline entry for widescreen monitors was needed.
Look at these entries for the [Device] section:
Quote:
BusID "bus-id"
This specifies the bus location of the graphics card. For PCI/AGP cards, the bus-id string has the form PCI:bus:device:function (e.g., "PCI:1:0:0" might be appropriate for an AGP card). This field is usually optional in single-head configurations when using the primary graphics card. In multi-head configurations, or when using a secondary graphics card in a single-head configuration, this entry is mandatory. Its main purpose is to make an unambiguous connection between the device section and the hardware it is representing. This information can usually be found by running the Xorg server with the -scanpci command line option.
Screen number
This option is mandatory for cards where a single PCI entity can drive more than one display (i.e., multiple CRTCs sharing a single graphics accelerator and video memory). One Device section is required for each head, and this parameter determines which head each of the Device sections applies to. The legal values of number range from 0 to one less than the total number of heads per entity. Most drivers require that the primary screen (0) be present.
The [Screen] section contains the Monitor ID reference.
---
You could also try a program such as xrandr or krandrtray to be able to switch resolutions on the fly. If you have a cloned display setup, and don't mind that the other display happens to be on, being able to switch resolutions on the fly may be enough. The [CTRL][Alt]+ or [CTRL][ALT]- key combination will cycle through possible resolutions as well.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.