Showing posts with label Debian. Show all posts
Showing posts with label Debian. Show all posts

Saturday, May 30, 2009

Configuring external monitor on Debian laptop

Here I'll try to describe how external monitor can be used on laptop in mirroring mode.

Hardware details



Laptop supports maximum resolution 1280x800.
Monitor SCALEOVIEW D22W-1 maximum resolution is 1680x1050.

X configuration



Here is /etc/X11/xorg.conf configuration adopted for HP6730b internal
display and external monitor:
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
EndSection

Section "Device"
Identifier "Primary Video Device"
# Intel driver
Driver "intel"
Option "MergedFB" "true"
# These modes specify mapping of internal monitor resolution to external
# monitor resolution, as list of two pairs (X by Y) separated with -
Option "MetaModes" "1024x768-1680x1050 1024x768-1280x1024 1024x768-1024x768 1024x768-800x600"
Option "MergedDPI" "100 100"
EndSection

Section "Device"
Identifier "Secondary Video Device"
Screen 1
EndSection

Section "Monitor"
Identifier "Laptop Monitor"
EndSection

Section "Monitor"
Identifier "External Monitor"
EndSection

Section "Screen"
Identifier "Internal Screen"
Device "Primary Video Device"
Monitor "Laptop Monitor"
DefaultDepth 24
SubSection "Display"
Depth 24
# Resolutions supported by laptop display
Modes "1024x768" "800x600"
EndSubSection
EndSection

Section "Screen"
Identifier "External Screen"
Device "Secondary Video Device"
Monitor "External Monitor"
DefaultDepth 24
SubSection "Display"
Depth 24
# Resolutions supported by external display
Modes "1680x1050" "1600x1200" "1280x1024" "1024x768" "800x600"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Internal Screen"
InputDevice "Generic Keyboard"
EndSection


Please notice that driver set to "intel" - generic driver does not work with VGA output.

Switching resolution



To switch to external monitor with (probably) higher
resolution, create desktop.sh script in /usr/local/bin with following content:

xrandr --output LVDS --mode 1024x768 --set BACKLIGHT_CONTROL legacy --output VGA --mode 1680x1050
# This will completely turn laptop display off, commented out since we control backlight instead
# xrandr --output LVDS --off
# This will set backlight to 10%
xbacklight -set 10


To switch to smaller resolution (that laptop display supports), create
laptop.sh script with content:

xrandr --output LVDS --mode 1024x768 --set BACKLIGHT_CONTROL legacy --output VGA --mode 1024x768
# This will restore backlight to 100%
xbacklight -set 100


I found it much safer/useful to control laptop display backlight,
instead of switching LVDS output off, because it is easier to switch
resolution back, to smaller (something is still visible on display) when
the external monitor is taken away by crazy administrator guy :)

References


Xorg RandR 1.2 Wiki

mergefb - dual monitor setup on a linux laptop

Friday, March 20, 2009

Installing Debian 5 (Lenny) on HP6730B laptop (model GB988EA#ECB)

Audio support


Following information published on Wiki and Issue page, I was able to configure audio module so it is recognized properly and sound is available both on speakers and microphone audio output. In short, following was done:
  1. In file /etc/modprobe.d/options added one more
    line:
    options snd-hda-intel model=mobile
  2. In file /etc/modprobe.d/als-base added the same (not sure whether it was necessary):
    options snd-hda-intel model=mobile

Then just reboot.

Keyboard


To configure multimedia buttons need to create /etc/X11/Xmodmap file and add following lines:
keycode 129 = XF86Music
keycode 162 = XF86Video
keycode 160 = XF86AudioMute
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 178 = XF86WWW

This file is read by xmodmap utility, launched by display manager on X session startup. Key codes were taken from xev command output, and mapping from /usr/include/X11/XF86keysym.h and
/usr/include/X11/keysymdef.h files of the linux kernel source tree. The laptop supports only audio control keys (which are software keys), e.g. mute and volume +/- control. Other keys I keep because my external keyboard Logitech UltraX supports them. I wonder why these are still not set by the Debian installer automatically (are codes are non-standard?). Binding to KDE events can be changed in KDE
Control Center->Regional settings->Keyboard layout.
For example, for Opera application I set combination XF86WWW.

Touchpad


Works well.

Wi-FI


Reported it works, but I have not checked it out. Recognized as Hewlett-Packard Wireless (Bluetooth + WLAN) Interface.

Camera


Upgrade Linux kernel to 2.6.28, which has support for HP WebCam. Cheese, XawTV and Skype work well.

Power management


While compiling kernel, enabled power management and ACPI extensions, so when either the lid is closed or on Fn+F3, laptop goes to suspend mode. Here are some issues I watch from time to time:
  1. laptop sometimes does not switch into suspend mode. Still have no idea what is wrong with it (some kind of resources are busy?).
  2. On wake up fan starts turning with 100% speed. This seems to be a bug. This happens every 4th time or so, suspending and wakening up helps, but is really annoying.

USB


Flash drives, keyboards and mices work well.

Display


Works well, backlight can be configured with xrandr. My following entry will touch this, describing external monitors attachment.

Video


Recognized Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller, by default X configuration uses some default driver. To change to Intel one, add line in /etc/X11/xorg.conf:
Section "Device"
Identifier "Primary Video Device"
Driver "intel"
# options may go here ...
EndSection

Fingerprint


Does not work due to absence of appropriate driver. Maybe there is, I do not care so much about it.

DVD


Works just fine. Recognized as CDDVDW TS-L633L.

Card reader


Recognized as HP Flash Media Reader. Works - tested on SD card.

Network adapter


Installed adapter is recognized as NetLink BCM5787M Gigabit Ethernet PCI Express, and works well.

Firewire


Recognized as Agere Systems FW323, have no idea whether it works or not.

Laptop user opinion


Pros


  1. Price. I beleive it corresponds to performance, which is quite enough to develop enterprise applications for Java platform. It simultaneously runs Web browser (Opera), mail client (Icedove), IDE (IntelliJ IDEA) and JBoss on deployment, and some other staff, with sufficient performance.
  2. Key board layout is really good one, though that's my first notebook. Also Fn key is not the most left one, and that's great.
  3. Not to heavy to carry in business trips.

Cons


  1. Absance of Caps Lock indicator. Well, there could not be one because there is no such key, but it would be great to have some indicator I could watch keyboard layout indicator state (except English I have Russian one). Sounds really funny, but that's what I am accustomed to.
  2. Keys next to Power button seem to be hardware ones and are not recognized by xev, what makes them useless.
  3. There is no DVI output, but VGA and HDMI instead. Is DVI dead yet?

Thanks for reading.
TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones