You are not logged in.

#1 2008-02-26 17:15:27

niget2002
Member
Registered: 2008-02-26
Posts: 3

What I have working on a Sony VGN-TX750P

Hi all.

I've been using Arch for about 4 years now, but I've never posted to the community.

My primary system is a Sony VGN-TX750P that I bought almost two years ago now. The initial install used random hacks to try and make most of the devices work, but I recently reinstalled linux from scratch (thanks to VirtualBox allowing me to remove my Windows partition).

With the new install, I decided to try and find new ways of getting the hardware working.

Here's what I have working so far:

LCD @ 1366x768
External VGA
Fn keys for brightness and monitor switching.
ieee1394
Sound
screen dims when AC removed, brightens when re-established
external keyboard/mouse
802.11

What's not working/tested
WAN (not tested)
volume up/down buttons on front (not working)
SD (not tested)
microphone (not tested)

I do finally have a SD card at home, so I may try and get that working too.

For the most part. I followed other tutorials to make most of it work. Once I had the basics done, I wrote a few of my own scripts for the brightness, and I modified someone else's script for the external monitor (script was written for a thinkpad).

I'm not very good at writing how-to's but I'll try my best. This will probably mostly just be a bunch of information that I've been gathering and using as I try and get things working.

First, do a base install
Second, use the Wiki to install X

Make sure you grab xf86-video-intel

Here's my xorg.conf:

Section "ServerLayout"
    Identifier     "single"
    Screen         "Screen0"
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection
Section "ServerLayout"
    Identifier     "xinerama"
    Screen         "Screen0"
    Screen        "Screen1" RightOf "Screen0"
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
    RgbPath      "/usr/share/X11/rgb"
    ModulePath   "/usr/lib/xorg/modules"
    FontPath     "/usr/share/fonts/misc"
    FontPath     "/usr/share/fonts/75dpi"
    FontPath     "/usr/share/fonts/100dpi"
    FontPath     "/usr/share/fonts/TTF"
    FontPath     "/usr/share/fonts/Type1"
EndSection

#Section "ServerFlags"
#    Option "Xinerama" "true"
#EndSection

Section "Module"
    Load  "record"
    Load  "xtrap"
    Load  "dbe"
    Load  "glx"
#    Load  "dri"
#    Load  "GLCore"
    Load  "extmod"
    SubSection "extmod"
        Option "omit xfree86-dga"
    EndSubSection
    Load  "freetype"
    Load  "type1"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "kbd"
EndSection

Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
    Option        "Protocol" "auto"
    Option        "Device" "/dev/input/mice"
    Option        "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"
EndSection

Section "Monitor"
    Identifier   "Monitor1"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"
EndSection

Section "Device"
        Option     "DRI"    "false"                    # [<bool>]
    Option        "GLX"
    Identifier  "Card0"
    Driver      "intel"
    VendorName  "Intel Corporation"
    Option "MonitorLayout" "CRT,LFP"
    BusId "PCI:0:2:0"
    BoardName   "Mobile 915GM/GMS/910GML Express Graphics Controller"
    Screen 0
EndSection

Section "Device"
        Option     "DRI"    "false"                # [<bool>]
    Option        "GLX"
    Identifier  "Card1"
    Driver      "i810"
    VendorName  "Intel Corporation"
    Option "MonitorLayout" "CRT,LFP"
    Option "DevicePresence" "yes"
    BusId "PCI:0:2:0"
    BoardName   "Mobile 915GM/GMS/910GML Express Graphics Controller"
    Screen 1
EndSection


Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    DefaultDepth 24
    SubSection "Display"
        Viewport   0 0
        Depth     8
        Modes "1366x768"
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
        Modes "1366x768"
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
        Modes "1366x768"
        Virtual 2390 1024
    EndSubSection
EndSection
Section "Screen"
    Identifier "Screen1"
    Device     "Card1"
    Monitor    "Monitor1"
    DefaultDepth 24
    SubSection "Display"
        Viewport   0 0
        Depth     8
        Modes "1024x768"
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
        Modes "1024x768"
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
        Modes "1024x768"
    EndSubSection
EndSection

#Section "DRI"
#    Mode 0666
#EndSection

One thing to note... I use xrandr for switching the external monitor on and off. Because of this, I have a virtual window that is bigger than 2048. From what I've read the Intel video does not support dri greater than 2048, so I have dri disabled.

If you don't plan on using a "both" type screen and only plan on mirroring to an external display, then you can uncomment all of the dri lines.

Also, my xorg.conf is dirty, so, while it works for me (and technically could/should work for you) you may want to use it more as a guide. From what I've read, xrandr doesn't require two monitor/device/screen entries, but I haven't cleaned it up yet to try.

I had fb working at 1366x768, but I forgot to grab my menu.lst file from the previous install, and I lost the link to the hints I used to make it work.

I use wpa_supplicant to get the wireless working. I also use ifplugd so that the wireless and wired connections get configured when they get turned on.

To do this, I edited /etc/modprobe.conf and added

install ipw2200 modprobe -i ipw2200 associate=0; true

I then edited wpa_supplicant.conf and added the various networks I connect to.

This may not be the best way, but I then added the following to my /etc/rc.local file:

/usr/sbin/wpa_supplicant -B -Dwext -ieth0 -c/etc/wpa_supplicant.conf

Here's my pertinent rc.conf file information:

MODULES=(ipw2200 e100 mii snd-mixer-oss snd-pcm-oss snd-hwdep snd-page-alloc snd-pcm snd-timer snd snd-hda-intel soundcore acpi_cpufreq sony_acpi vboxdrv)

lo="127.0.0.1"
eth0="dhcp"
eth1="dhcp"
INTERFACES=(lo eth0 eth1)

gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

DAEMONS=(syslog-ng ifplugd gdm @netfs @crond dbus hal @cpudyn @acpid @laptop-mode @alsa)

the MODULES was mostly setup for us during the install with the exception of adding ipw2200 to the front after installing it.

Sound was simply a matter of installing alsa-oss and configuring.

To get the brightness working, I had to obtain the old sony_acpi drivers and compile and install them. The sony-laptop driver didn't create the /proc/acpi/sony/brightness file for me. And, unfortuantely, this meant that most of the stock gnome brightness tools don't work with it because they're looking for a different file.

I ended up using laptop_mode to handle the AC on/off for the screen brightness.

To make the Fn keys work for brightness I added two files into /etc/acpi/events :

1) screen_brighter

event=sony/hotkey SPIC 00000001 00000011
action=/etc/acpi/actions/brightness 1

2) screen_dimmer

event=sony/hotkey SPIC 00000001 00000010
action=/etc/acpi/actions/brightness 0

These commands call a script /etc/acpi/actions/brightness:

#!/bin/bash

STATE=$(cat /proc/acpi/sony/brightness)
NEXT=$1

if [ $NEXT == "1" ]
then
    val=$(($STATE+1))
else
    val=$(($STATE-1))
fi

if [ $val -gt "8" ]
then
    val=8
fi

if [ $val -lt "1" ]
then
    val=1
fi

echo $val > /proc/acpi/sony/brightness

Here's how I got the external monitor switching working:

in /etc/acpi/events/monitor_switch :

event=sony/hotkey SPIC 00000001 00000012
action=/etc/acpi/actions/monitor_switcher toggle

and in /etc/acpi/actions/monitor_switcher

#!/bin/bash
 
# External output may be "VGA" or "VGA-0" or "DVI-0"
EXTERNAL_OUTPUT="VGA"
INTERNAL_OUTPUT="LVDS"
EXTERNAL_LOCATION="right"
 
 
case "$EXTERNAL_LOCATION" in
       left|LEFT)
               EXTERNAL_LOCATION="--left-of $INTERNAL_OUTPUT"
               ;;
       right|RIGHT)
               EXTERNAL_LOCATION="--right-of $INTERNAL_OUTPUT"
               ;;
       top|TOP|above|ABOVE)
               EXTERNAL_LOCATION="--above $INTERNAL_OUTPUT"
               ;;
       bottom|BOTTOM|below|BELOW)
               EXTERNAL_LOCATION="--below $INTERNAL_OUTPUT"
               ;;
       *)
               EXTERNAL_LOCATION="--left-of $INTERNAL_OUTPUT"
               ;;
esac
 
# Figure out current state
INTERNAL_STATE=$(xrandr | grep ^$INTERNAL_OUTPUT | grep con | sed "s/.*connected //" | sed "s/(.*//")
EXTERNAL_STATE=$(xrandr | grep ^$EXTERNAL_OUTPUT | grep con | sed "s/.*connected //" | sed "s/(.*//")
 
if [ -z "$INTERNAL_STATE" ]; then
       STATE="external"
elif [ -z "$EXTERNAL_STATE" ]; then
       STATE="internal"
else
       INTERNAL_STATE=$(echo $INTERNAL_STATE | sed "s/[0-9]*x[0-9]*//")
       EXTERNAL_STATE=$(echo $EXTERNAL_STATE | sed "s/[0-9]*x[0-9]*//")
       if [ "$INTERNAL_STATE" = "$EXTERNAL_STATE" ]; then
               STATE="mirror"
       else
               STATE="both"
       fi
fi
 
function screen_external(){
       xrandr --output $INTERNAL_OUTPUT --off
       xrandr --output $EXTERNAL_OUTPUT --auto
}
 
function screen_internal(){
       xrandr --output $EXTERNAL_OUTPUT --off
       xrandr --output $INTERNAL_OUTPUT --auto
}
 
function screen_mirror(){
       xrandr --output $INTERNAL_OUTPUT --auto
       xrandr --output $EXTERNAL_OUTPUT --auto --same-as $INTERNAL_OUTPUT
}
 
function screen_both(){
       xrandr --output $INTERNAL_OUTPUT --auto
       xrandr --output $EXTERNAL_OUTPUT --auto $EXTERNAL_LOCATION
}
 
function screen_toggle(){
       case "$STATE" in
               internal)
                       screen_mirror
                       ;;
               mirror)
                       screen_both
                       ;;
               both)
                       screen_internal
                       ;;
               *)
                       screen_internal
                       ;;
       esac
}
 
# What should we do?
DO="$1"
if [ -z "$DO" ]; then
       if [ $(basename $0) = "monitor_switcher" ]; then
               DO="toggle"
       fi
fi
 
case "$DO" in
       toggle)
               screen_toggle
               ;;
       internal)
               screen_internal
               ;;
       external)
               screen_external
               ;;
       mirror)
               screen_mirror
               ;;
       both)
               screen_both
               ;;
       status)
               echo "Current Fn-F7 state is: $STATE"
               echo
               echo "Attached monitors:"
               $SU xrandr | grep "\Wconnected" | sed "s/^/ /"
               ;;
       *)
               echo "usage: $0 <command>" >&2
               echo >&2
               echo "  commands:" >&2
               echo "          status" >&2
               echo "          internal" >&2
               echo "          external" >&2
               echo "          mirror" >&2
               echo "          both" >&2
               echo "          toggle" >&2
               echo >&2
               ;;
esac

Please NOTE... the montor_switcher app is not mine. It was from a how-to for a Thinkpad, but I have since forgotten the link and can't seem to find it. I did make a few modifications to the script to remove the "external only" from the toggle mode as I never use just an external monitor.

Also, with the external monitor turned on in the "mirror" state, gnome taskbar can look a little funny on the LVDS.

I know this isn't a very good how-to, but I hope it at least has a little bit of information. Google worked pretty good for me on some of this. I'm at work and things are getting busier, but if you have questions, I can try and answer.

if you want to see a particular .conf file that I left off, let me know and I'll post it.

Offline

Board footer

Powered by FluxBB