HOWTO: Enable the FN-F4 key (LCD/VGA switch)

Discussions about Linux installation and configuration on Samsung laptops
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

HOWTO: Enable the FN-F4 key (LCD/VGA switch)

Post by voria »

This howto explains how to enable the Fn-F4 hotkey.

IMPORTANT NOTE before starting: Ubuntu Karmic suffers a bug which prevent the VGA out to work correctly when compiz is enabled. So, make sure it's disabled when you want to use the VGA out (there is a convenient script in the 'samsung-scripts' package, binded to <ctrl><shift><alt>m by default, for switching compiz/metacity windows managers).

We will use the ARandR utility (a graphical interface to xrandr), which will allow us to create custom profiles (layouts) that can be used with the FN-F4 key.

Connect your external display to VGA port, then press Fn-F4.
If this is the first time you press it (in other words, if there are no previously saved screen layouts), ARandR will be launched.

It's easy to use:
in the main window there is a graphical representation of all the connected displays, they can be moved with the mouse to the preferred positions (if you want to use the desktop extension functionality).
In the 'Options' menu you can enable/disable both displays, and select a resolution and an orientation for each one.

What we need to do is to create profiles that will be then activated with the FN-F4 key.

Let's start by creating the first one (the standard one): external display disabled, internal display enabled with a resolution of 1024x600.
Make sure that settings are correct for each display (in the 'Outputs' menu, 'LVDS' must be enabled with a resolution of 1024x600, 'VGA' must be disabled), then click on 'Save as' and save the profile (I recommend to use an appropriate name to distinguish the profiles from each others).
Make sure to save all the profiles in <yourhome>/.screenlayout.

Now create all the profiles you need, giving them different names.
Obviously everyone has his needs (and different external displays...), so all I can do is to describe my configuration and the profiles I created.

My external display is a 19" LCD with a resolution of 1280x1024 and, because I have no interest in using the display extension functionality, I created only two profiles. The first one enables ONLY the external display to its native resolution, the second one clones screens with a resolution of 800x600.

Now that we have all the profiles we need, we can close ARandR.

From now on, the Fn-F4 key will switch to the next saved profile in a cyclic way.

If for any reason you need to start ARandR again (for instance, for creating another layout), launch it through the gnome menu (or kde menu, for kubuntu users).
If you want to delete a layout you don't need anymore, delete it from <yourhome>/.screenlayout/.
If no layouts are found in <yourhome>/.screenlayout, the Fn-F4 key will launch ARandR.

NOTE: when you press the FN-F4 key, the profiles that use external display are ignored when the external display is not connected. Also, to avoid to accidentally trigger the bug I mentioned above, the Fn-F4 key does nothing when compiz is enabled.
Last edited by voria on 02 May 2009, 12:11, edited 1 time in total.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
zinaf
Newbie
Newbie
Posts: 14
Joined: 16 Feb 2009, 22:34

RE: [NC10] How to enable the FN-F4 key (LCD/VGA switch)

Post by zinaf »

voRia, sounds like a good solution to me. when i get a moment these days i will test and post feedback.
you are an amazing enthusiast. thanks a million for the the excellent work.
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

RE: [NC10] How to enable the FN-F4 key (LCD/VGA switch)

Post by voria »

I'm glad that my work is useful to others people besides me :)
I'll wait for your feedback! ;)
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
tkoorn
Newbie
Newbie
Posts: 9
Joined: 23 Apr 2009, 16:35

RE: [NC10] How to enable the FN-F4 key (LCD/VGA switch)

Post by tkoorn »

This is great. I spent hours last night trying to get something like this going but this worked for me in under 5 minutes. Excelent and thank you very much.
godsiem
Newbie
Newbie
Posts: 5
Joined: 11 May 2009, 22:01

RE: [NC10] How to enable the FN-F4 key (LCD/VGA switch)

Post by godsiem »

Another great tip!

Already working on my laptop with my external monitor.

However, do you have any solution for unknown monitors, for example I often give presentations, and the projectors are weird and with different resolutions... this is in my opinion a big issue for people making presentation in linux... on my last presentation I got a terrible resolution and it was not very clear, but still was readable. I use "lxrandr" on my other laptop for these situations, it allows to clone the laptop and use only outside display or both... I think the trick I missed was a manual adjust of the resolution....

What I think we can do with the ARandR is to create right before the presentation a new profile, since the program "senses" the resolution of the external display... Have you have some tip for these situations, please let me/us know.

Cheers,

/godsiem
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

RE: [NC10] How to enable the FN-F4 key (LCD/VGA switch)

Post by voria »

'godsiem' pid='1108' dateline='1242112050' wrote: However, do you have any solution for unknown monitors, for example I often give presentations, and the projectors are weird and with different resolutions... this is in my opinion a big issue for people making presentation in linux... on my last presentation I got a terrible resolution and it was not very clear, but still was readable. I use "lxrandr" on my other laptop for these situations, it allows to clone the laptop and use only outside display or both... I think the trick I missed was a manual adjust of the resolution....

What I think we can do with the ARandR is to create right before the presentation a new profile, since the program "senses" the resolution of the external display... Have you have some tip for these situations, please let me/us know.
There is no need to create and save profiles for unknown monitors used sometime only.
You can simply connect the external monitor, start arandr, select the resolution you want to use for it from the 'Outputs' menu, then click 'Apply'. The changes will be lost when you will terminate your current session.
Last edited by voria on 12 May 2009, 14:39, edited 1 time in total.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
godsiem
Newbie
Newbie
Posts: 5
Joined: 11 May 2009, 22:01

RE: [NC10] How to enable the FN-F4 key (LCD/VGA switch)

Post by godsiem »

I agree, it is indeed a solution perfectly feasible and reasonable!

Thank you!
godsiem
Newbie
Newbie
Posts: 5
Joined: 11 May 2009, 22:01

RE: [NC10] How to enable the FN-F4 key (LCD/VGA switch)

Post by godsiem »

Hi,

I have just bought a very nice 22 inch monitor, where I connect my NC10! I configure the setup with arandr and it goes very nicely!

Unfortunately I am experiencing a strange behaviour... When I am working on the external monitor, with a lot of windows in different positions, and I want to go back to the NC10 only profile, a lot of the windows "get lost"... I think this happens due to their position in the external screen, which is out of the space that can be mapped to the NC10 screen... I made another test where I maximise all the windows, and in this setting the windows "do not get lost"...

Any ideia concerning this? Maybe this is something normal... but if so, it is a bit annoying...

Cheers,

/godsiem
Last edited by godsiem on 17 May 2009, 14:53, edited 1 time in total.
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

RE: [NC10] How to enable the FN-F4 key (LCD/VGA switch)

Post by voria »

'godsiem' pid='1200' dateline='1242568255' wrote: I think this happens due to their position in the external screen, which is out of the space that can be mapped to the NC10 screen...
You are absolutely right, and unfortunately I think there is not real solution for this...
Last edited by voria on 17 May 2009, 18:49, edited 1 time in total.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
dicker182
Newbie
Newbie
Posts: 2
Joined: 24 May 2009, 22:41

RE: [NC10] How to enable the FN-F4 key (LCD/VGA switch)

Post by dicker182 »

Hi,

I have a litte problem. When I only use the external monitor, the desktop will be frozen after a minute. I can Stop this when I switch to the LVDS.
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

RE: [NC10] How to enable the FN-F4 key (LCD/VGA switch)

Post by voria »

Sorry for the late answer.
I don't know why this happens. Try downgrading 'xserver-xorg-video-intel' to version 2.6.3 from official ubuntu repositories (downgrade libdrm too, if needed).
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

RE: [NC10] How to enable the FN-F4 key (LCD/VGA switch)

Post by voria »

Now there is a solution: update to an intel driver with version >= 2.8.0 ;)
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
jdk_
Newbie
Newbie
Posts: 4
Joined: 03 Aug 2009, 22:00

RE: [NC10] How to enable the FN-F4 key (LCD/VGA switch)

Post by jdk_ »

Hi

I've installed arandr and it works great. But I haven't been able to set up things the way I want. I want to use both the screen of the nc10 and the external one, with the external one showing the top of the virtual desktop and the nc10 showing the bottom (so far so good), but with the nc10 being the main screen, by which I mean the one showing the gnome panels.

It seems that arandr assumes that the screen on top should be the main one. Is there a way to change this? maybe editting the configuration files directly if the gui doesn't give the right options?
Last edited by jdk_ on 03 Sep 2009, 01:06, edited 1 time in total.
dajs
Newbie
Newbie
Posts: 2
Joined: 03 Sep 2009, 17:15

RE: [NC10] How to enable the FN-F4 key (LCD/VGA switch)

Post by dajs »

First of all Thanks for alle the great scripts.

I am using Xubuntu. Anyone know which commands I need to enter in the XFCE keyboard bindings to switch between VGA and the netbook?

ARandR works fine, and I can switch too, but they keyboard binding does not work since its XFCE.

Nothing too important but if someone has an idea plz tell me.

Thanks.
User avatar
voria
Administrator
Administrator
Posts: 1383
Joined: 12 Feb 2009, 18:08
Location: Italy
Contact:

RE: [NC10] How to enable the FN-F4 key (LCD/VGA switch)

Post by voria »

'jdk_' pid='1874' dateline='1251936261' wrote: It seems that arandr assumes that the screen on top should be the main one. Is there a way to change this? maybe editting the configuration files directly if the gui doesn't give the right options?
I don't know if there is a way to set permanently the main screen, but you can just drag and drop the gnome panels on the screen you want them on.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!
Post Reply