[Hardware] EeePC 1000H, acpi, powersaved, etc

Denis G. Samsonenko =?iso-8859-1?q?d=2Eg=2Esamsonenko_=CE=C1_gmail=2Ecom?=
Ср Ноя 19 07:24:10 MSK 2008


Привет!

18 ноября 2008 г. 3:26 Kharitonov A. Dmitry написал:
> В гите появились исправления

Попробовал новую версию.

Теперь нормально отрабатывает нажатие на верхние 4 кнопки: окошки
показывает, по-русски.

При нажатии на Fn+F2 переключает, картинок не кажет. Вообще картинки
показываются только для переключения яркости.

Монитор так и не гаснет по Fn+F7. Так же не переключает режимы по
Fn+F8 (внешний монитор подключил).

Если же вручную запускать скрипт /etc/acpi/eeepc_900-video.sh, то
переключение происходит, но только до 1024x768, хотя монитор позволяет
1280x1024.

$ xrandr -q
Screen 0: minimum 320 x 200, current 1024 x 600, maximum 1280 x 1280
VGA connected (normal left inverted right x axis y axis)
   1280x1024      60.0 +   75.0     59.9
   1152x864       75.0
   1024x768       74.9     75.1     60.0
   832x624        74.6
   800x600        75.0     74.9     60.3
   640x480        75.0     74.8     60.0
   720x400        70.1
LVDS connected 1024x600+0+0 (normal left inverted right x axis y axis)
220mm x 129mm
   1024x600       60.0*+   65.0
   800x600        60.3
   640x480        59.9


$ sudo -H sh -xv /etc/acpi/eeepc_900-video.sh
#!/bin/sh
#eeepc_900-video.sh
# set -e
# exec > /dev/null 2> /dev/null

# DISPLAY=
who | grep -q ':0' && [ 7 == "$(fgconsole)" ] && export DISPLAY=':0'
+ who
+ grep -q :0
fgconsole
++ fgconsole
+ '[' 7 == 7 ']'
+ export DISPLAY=:0
+ DISPLAY=:0

var="videomode"
+ var=videomode
modes=(
    "1024x600 off"
    "800x600  off"
    "800x600  800x600"
    "1024x600 1024x600"
    "1024x768 1024x768"
    "off      1024x768"
)
+ modes=("1024x600 off" "800x600  off" "800x600  800x600" "1024x600
1024x600" "1024x768 1024x768" "off      1024x768")
mode=$(${0%${0##*/}}eeepc_900-acpidata.sh "$var")
${0%${0##*/}}eeepc_900-acpidata.sh "$var"
++ /etc/acpi/eeepc_900-acpidata.sh videomode
+ mode=0
STATUS=$(/usr/bin/xrandr -q | /bin/sed
'/VGA/!D;s/^[[:space:]]\+//;s/VGA[[:space:]]//;s/[[:space:]].\+//')
/usr/bin/xrandr -q | /bin/sed
'/VGA/!D;s/^[[:space:]]\+//;s/VGA[[:space:]]//;s/[[:space:]].\+//'
++ /usr/bin/xrandr -q
++ /bin/sed '/VGA/!D;s/^[[:space:]]\+//;s/VGA[[:space:]]//;s/[[:space:]].\+//'
+ STATUS=connected
[ -z "$STATUS" ] && exit 1
+ '[' -z connected ']'
modedone=0
+ modedone=0
while [ "$modedone" == 0 ]; do
    [ -z "$mode" ] && mode=0
    (( mode<0 )) && mode=0
    (( mode>${#modes[@]}-2 )) && mode=-1
    (( mode++ ))
    modev=${modes[mode]}
    [ ${modev##*[[:space:]]} != "off" -a "$STATUS" == "disconnected" ]
&& continue;

    if [ ${modev%%[[:space:]]*} == "off" ]; then
        /usr/bin/xrandr --output LVDS --off
    else
        /usr/bin/xrandr --output LVDS --mode ${modev%%[[:space:]]*} || continue
    fi

    if [ ${modev##*[[:space:]]} == "off" ]; then
        /usr/bin/xrandr --output VGA --off
    else
        /usr/bin/xrandr --output VGA --mode ${modev##*[[:space:]]} || continue
    fi
    modedone=1
done
+ '[' 0 == 0 ']'
+ '[' -z 0 ']'
+ ((  mode<0  ))
+ ((  mode>6-2  ))
+ ((  mode++  ))
+ modev='800x600  off'
+ '[' off '!=' off -a connected == disconnected ']'
+ '[' 800x600 == off ']'
+ /usr/bin/xrandr --output LVDS --mode 800x600
+ '[' off == off ']'
+ /usr/bin/xrandr --output VGA --off
+ modedone=1
+ '[' 1 == 0 ']'
${0%${0##*/}}eeepc_900-acpidata.sh "$var" "$mode"
+ /etc/acpi/eeepc_900-acpidata.sh videomode 1


$ sudo -H sh -xv /etc/acpi/eeepc_900-video.sh
#!/bin/sh
#eeepc_900-video.sh
# set -e
# exec > /dev/null 2> /dev/null

# DISPLAY=
who | grep -q ':0' && [ 7 == "$(fgconsole)" ] && export DISPLAY=':0'
+ who
+ grep -q :0
fgconsole
++ fgconsole
+ '[' 7 == 7 ']'
+ export DISPLAY=:0
+ DISPLAY=:0

var="videomode"
+ var=videomode
modes=(
    "1024x600 off"
    "800x600  off"
    "800x600  800x600"
    "1024x600 1024x600"
    "1024x768 1024x768"
    "off      1024x768"
)
+ modes=("1024x600 off" "800x600  off" "800x600  800x600" "1024x600 1024x600" "
1024x768 1024x768" "off      1024x768")
mode=$(${0%${0##*/}}eeepc_900-acpidata.sh "$var")
${0%${0##*/}}eeepc_900-acpidata.sh "$var"
++ /etc/acpi/eeepc_900-acpidata.sh videomode
+ mode=1
STATUS=$(/usr/bin/xrandr -q | /bin/sed '/VGA/!D;s/^[[:space:]]\+//;s/VGA[[:spac
e:]]//;s/[[:space:]].\+//')
/usr/bin/xrandr -q | /bin/sed '/VGA/!D;s/^[[:space:]]\+//;s/VGA[[:space:]]//;s/
[[:space:]].\+//'
++ /usr/bin/xrandr -q
++ /bin/sed '/VGA/!D;s/^[[:space:]]\+//;s/VGA[[:space:]]//;s/[[:space:]].\+//'
+ STATUS=connected
[ -z "$STATUS" ] && exit 1
+ '[' -z connected ']'
modedone=0
+ modedone=0
while [ "$modedone" == 0 ]; do
    [ -z "$mode" ] && mode=0
    (( mode<0 )) && mode=0
    (( mode>${#modes[@]}-2 )) && mode=-1
    (( mode++ ))
    modev=${modes[mode]}
    [ ${modev##*[[:space:]]} != "off" -a "$STATUS" == "disconnected" ] && conti
nue;

    if [ ${modev%%[[:space:]]*} == "off" ]; then
        /usr/bin/xrandr --output LVDS --off
    else
        /usr/bin/xrandr --output LVDS --mode ${modev%%[[:space:]]*} || continue
    fi

    if [ ${modev##*[[:space:]]} == "off" ]; then
        /usr/bin/xrandr --output VGA --off
    else
        /usr/bin/xrandr --output VGA --mode ${modev##*[[:space:]]} || continue
    fi
    modedone=1
done
+ '[' 0 == 0 ']'
+ '[' -z 1 ']'
+ ((  mode<0  ))
+ ((  mode>6-2  ))
+ ((  mode++  ))
+ modev='800x600  800x600'
+ '[' 800x600 '!=' off -a connected == disconnected ']'
+ '[' 800x600 == off ']'
+ /usr/bin/xrandr --output LVDS --mode 800x600
+ '[' 800x600 == off ']'
+ /usr/bin/xrandr --output VGA --mode 800x600
+ modedone=1
+ '[' 1 == 0 ']'
${0%${0##*/}}eeepc_900-acpidata.sh "$var" "$mode"
+ /etc/acpi/eeepc_900-acpidata.sh videomode 2


$ sudo -H sh -xv /etc/acpi/eeepc_900-video.sh
#!/bin/sh
#eeepc_900-video.sh
# set -e
# exec > /dev/null 2> /dev/null

# DISPLAY=
who | grep -q ':0' && [ 7 == "$(fgconsole)" ] && export DISPLAY=':0'
+ who
+ grep -q :0
fgconsole
++ fgconsole
+ '[' 7 == 7 ']'
+ export DISPLAY=:0
+ DISPLAY=:0

var="videomode"
+ var=videomode
modes=(
    "1024x600 off"
    "800x600  off"
    "800x600  800x600"
    "1024x600 1024x600"
    "1024x768 1024x768"
    "off      1024x768"
)
+ modes=("1024x600 off" "800x600  off" "800x600  800x600" "1024x600 1024x600" "
1024x768 1024x768" "off      1024x768")
mode=$(${0%${0##*/}}eeepc_900-acpidata.sh "$var")
${0%${0##*/}}eeepc_900-acpidata.sh "$var"
++ /etc/acpi/eeepc_900-acpidata.sh videomode
+ mode=2
STATUS=$(/usr/bin/xrandr -q | /bin/sed '/VGA/!D;s/^[[:space:]]\+//;s/VGA[[:spac
e:]]//;s/[[:space:]].\+//')
/usr/bin/xrandr -q | /bin/sed '/VGA/!D;s/^[[:space:]]\+//;s/VGA[[:space:]]//;s/
[[:space:]].\+//'
++ /usr/bin/xrandr -q
++ /bin/sed '/VGA/!D;s/^[[:space:]]\+//;s/VGA[[:space:]]//;s/[[:space:]].\+//'
+ STATUS=connected
[ -z "$STATUS" ] && exit 1
+ '[' -z connected ']'
modedone=0
+ modedone=0
while [ "$modedone" == 0 ]; do
    [ -z "$mode" ] && mode=0
    (( mode<0 )) && mode=0
    (( mode>${#modes[@]}-2 )) && mode=-1
    (( mode++ ))
    modev=${modes[mode]}
    [ ${modev##*[[:space:]]} != "off" -a "$STATUS" == "disconnected" ] && conti
nue;

    if [ ${modev%%[[:space:]]*} == "off" ]; then
        /usr/bin/xrandr --output LVDS --off
    else
        /usr/bin/xrandr --output LVDS --mode ${modev%%[[:space:]]*} || continue
    fi

    if [ ${modev##*[[:space:]]} == "off" ]; then
        /usr/bin/xrandr --output VGA --off
    else
        /usr/bin/xrandr --output VGA --mode ${modev##*[[:space:]]} || continue
    fi
    modedone=1
done
+ '[' 0 == 0 ']'
+ '[' -z 2 ']'
+ ((  mode<0  ))
+ ((  mode>6-2  ))
+ ((  mode++  ))
+ modev='1024x600 1024x600'
+ '[' 1024x600 '!=' off -a connected == disconnected ']'
+ '[' 1024x600 == off ']'
+ /usr/bin/xrandr --output LVDS --mode 1024x600
+ '[' 1024x600 == off ']'
+ /usr/bin/xrandr --output VGA --mode 1024x600
/usr/bin/xrandr: cannot find mode 1024x600
+ continue
+ '[' 0 == 0 ']'
+ '[' -z 3 ']'
+ ((  mode<0  ))
+ ((  mode>6-2  ))
+ ((  mode++  ))
+ modev='1024x768 1024x768'
+ '[' 1024x768 '!=' off -a connected == disconnected '
+ '[' 1024x768 == off ']'
+ /usr/bin/xrandr --output LVDS --mode 1024x768
/usr/bin/xrandr: cannot find mode 1024x768
+ continue
+ '[' 0 == 0 ']'
+ '[' -z 4 ']'
+ ((  mode<0  ))
+ ((  mode>6-2  ))
+ ((  mode++  ))
+ modev='off      1024x768'
+ '[' 1024x768 '!=' off -a connected == disconnected '
+ '[' off == off ']'
+ /usr/bin/xrandr --output LVDS --off
+ '[' 1024x768 == off ']'
+ /usr/bin/xrandr --output VGA --mode 1024x768
+ modedone=1
+ '[' 1 == 0 ']'
${0%${0##*/}}eeepc_900-acpidata.sh "$var" "$mode"
+ /etc/acpi/eeepc_900-acpidata.sh videomode 5


$ sudo -H sh -xv /etc/acpi/eeepc_900-video.sh
#!/bin/sh
#eeepc_900-video.sh
# set -e
# exec > /dev/null 2> /dev/null

# DISPLAY=
who | grep -q ':0' && [ 7 == "$(fgconsole)" ] && export DISPLAY=':0'
+ who
+ grep -q :0
fgconsole
++ fgconsole
+ '[' 7 == 7 ']'
+ export DISPLAY=:0
+ DISPLAY=:0

var="videomode"
+ var=videomode
modes=(
    "1024x600 off"
    "800x600  off"
    "800x600  800x600"
    "1024x600 1024x600"
    "1024x768 1024x768"
    "off      1024x768"
)
+ modes=("1024x600 off" "800x600  off" "800x600  800x600" "1024x600
1024x600" "1024x768 1024x768" "off      1024x768")
mode=$(${0%${0##*/}}eeepc_900-acpidata.sh "$var")
${0%${0##*/}}eeepc_900-acpidata.sh "$var"
++ /etc/acpi/eeepc_900-acpidata.sh videomode
+ mode=5
STATUS=$(/usr/bin/xrandr -q | /bin/sed
'/VGA/!D;s/^[[:space:]]\+//;s/VGA[[:space:]]//;s/[[:space:]].\+//')
/usr/bin/xrandr -q | /bin/sed
'/VGA/!D;s/^[[:space:]]\+//;s/VGA[[:space:]]//;s/[[:space:]].\+//'
++ /usr/bin/xrandr -q
++ /bin/sed '/VGA/!D;s/^[[:space:]]\+//;s/VGA[[:space:]]//;s/[[:space:]].\+//'
+ STATUS=connected
[ -z "$STATUS" ] && exit 1
+ '[' -z connected ']'
modedone=0
+ modedone=0
while [ "$modedone" == 0 ]; do
    [ -z "$mode" ] && mode=0
    (( mode<0 )) && mode=0
    (( mode>${#modes[@]}-2 )) && mode=-1
    (( mode++ ))
    modev=${modes[mode]}
    [ ${modev##*[[:space:]]} != "off" -a "$STATUS" == "disconnected" ]
&& continue;

    if [ ${modev%%[[:space:]]*} == "off" ]; then
        /usr/bin/xrandr --output LVDS --off
    else
        /usr/bin/xrandr --output LVDS --mode ${modev%%[[:space:]]*} || continue
    fi

    if [ ${modev##*[[:space:]]} == "off" ]; then
        /usr/bin/xrandr --output VGA --off
    else
        /usr/bin/xrandr --output VGA --mode ${modev##*[[:space:]]} || continue
    fi
    modedone=1
done
+ '[' 0 == 0 ']'
+ '[' -z 5 ']'
+ ((  mode<0  ))
+ ((  mode>6-2  ))
+ mode=-1
+ ((  mode++  ))
+ modev='1024x600 off'
+ '[' off '!=' off -a connected == disconnected ']'
+ '[' 1024x600 == off ']'
+ /usr/bin/xrandr --output LVDS --mode 1024x600
+ '[' off == off ']'
+ /usr/bin/xrandr --output VGA --off
+ modedone=1
+ '[' 1 == 0 ']'
${0%${0##*/}}eeepc_900-acpidata.sh "$var" "$mode"
+ /etc/acpi/eeepc_900-acpidata.sh videomode 0

-- 
Всего доброго,

Денис.


Подробная информация о списке рассылки Hardware