にほんブログ村 IT技術ブログへ
にほんブログ村

Linux ブログランキングへ

2017年01月31日

キーボード付きBay-Tailタブレット ASUS Transbook #T100TA #Debian Testing 各種ドライバ&初期設定編 その5

Debian Stretch testingの続きで
今回はドライバテスト編です。
書いてある事はDebian HP T100TAの通りで
追跡試験した内容なのでそのままです。
ただ、出展元に書いていない分かりづらい所を
テストした際に気付いた操作方法を追記します。
ダウンロードファイルは個人フォルダの「ダウンロード」に落ちてきますが、
そこの変更は説明を割愛します。

●Debian Testing on T100TA
詳しい事は前回と参考HPを参照下さい。
インストールまで大変でしたけど、分かれば修正は難しくないはずです。
USB HUB+USBメモリに焼いたISOファイルを認識できる様に
aptソースを追加するだけです。WIFIは最初からは諦めるしか。

 InstallingDebianOnAsusT100TA
 キーボード付きBay-Tailタブレット ASUS Transbook #T100TA #Debian Testingインストール&初期設定編 その4
 
ただ、T100TAに限ればUSBが二つあり、キーボードとマウスがドッグにあるので
操作関係はなんとかなります。
他の純粋なタブレットでは無理でしょう。
操作できないですよね・・・
USB HUBが使えないってそんだけ致命的。

●液晶バックライトの明るさ設定
バックライトは電池の持ちに直結するので重要です。
通常はフルパワーになっていますが、xrandrで設定可能です。
端末から、0.8の数字が輝度です。

 xrandr --output DSI-1 --brightness 0.8

で設定できます。
DebianのHPにスクリプトがあるので試してみましょう。

 t100ta_touchscreen_brightness_ctl-debian-stretch.sh

端末から、

 chmod +x t100ta_touchscreen_brightness_ctl-debian-stretch.sh

と実行形式に変換して、cinnamonの自動実行に登録しておきます。
中味はこんな感じです。

#!/bin/bash
#
# t100ta_touchscreen_brightness_ctl-debian_stretch.sh
#
# This script is intended to be used with the ASUS T100TA. This script
# uses xrandr to progressively reduce the brightness of the screen each
# time it is invoked. Once a minimum value is reached the brightness is
# resetted to the original value.
#
# Copyright 2016 Francesco De Vita
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.


# Xrandr output for the screen.
# If there is no external screen attached, the following command returns
# the correct value to use:
#
# xrandr | grep -w connected | cut -d" " -f1
#
XRANDROUT=DSI-1

BRIGHTNESS=`xrandr --current --verbose | grep Bright | cut -d" " -f2`

if [ $(echo "$BRIGHTNESS<=1" | bc) == 1 ] && \
[ $(echo "$BRIGHTNESS>0.2" | bc) == 1 ]
then
BRIGHTNESS=$(echo "scale=2; $BRIGHTNESS-0.2" | bc)
xrandr --output $XRANDROUT --brightness $BRIGHTNESS
else
xrandr --output $XRANDROUT --brightness 1
fi


●画面の自動回転
タブレット内部に加速度センサーがありまして、
それが反応するとxrandrで回転するスクリプトが出ています。
まずダウンロード
 
 https://wiki.debian.org/InstallingDebianOn/Asus/T100TA?action=AttachFile&do=get&target=t100ta_touchscreen_rotation_auto-debian-stretch.sh

ダウンロードしたら実行形式に

 chmod +x t100ta_touchscreen_rotation_auto-debian-stretch.sh

後はcinnamonの自動実行に追加
shとかbashで実行させると落ちるんで注意。
中味はこんな感じ

#!/bin/bash
#
# t100ta_touchscreen_rotation_auto-debian_stretch.sh
#
# This script is intended to be used with the ASUS T100TA. This script
# checks the accelerometers every three seconds and it accordingly
# rotates the screen, adjusting the touchscreen and the touchpad inputs.
#
# Copyright 2016 Francesco De Vita
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.


# Xrandr output for the screen.
XRANDROUT=`xrandr | grep -w connected | head -1 | cut -d" " -f1`

# IDs of the input devices that have to be rotated.
# The correct input devices are those listed by the command
# "xinput --list" under the "Virtual core pointer" section as in the
# following example:
#
# 竡。 Virtual core pointer id=2
# 竡・ 竊ウ Virtual core XTEST pointer id=4
# 竡・ 竊ウ ASUSTek COMPUTER INC. ASUS Base Station(T100) id=10
# 竡・ 竊ウ ASUSTek COMPUTER INC. ASUS Base Station(T100) id=11 <--
# 竡・ 竊ウ ATML1000:00 03EB:8C0E id=12 <--
#
# Note that the "ASUS Base Station" entry appears two times but only
# the last one is required.
INDEVS=`xinput --list | grep ATML1000 | \
sed 's/.*id=\([0-9]*\).*/\1/'; \
xinput --list | grep SIS | \
sed 's/.*id=\([0-9]*\).*/\1/'; \
xinput --list | grep "ASUS.*Base.*pointer" |
tail -1 | sed 's/.*id=\([0-9]*\).*/\1/'`


# Absolute value function.
abs(){
[ $1 -lt 0 ] && echo $((-$1)) || echo $1
}

# Check the accelerometers and adjust screen and inputs.
while true
do

CUR_ROT=`xrandr -q --verbose | grep $XRANDROUT | cut -d" " -f6`
NEW_ROT="normal"

ACC_X=$(cat /sys/bus/iio/devices/iio\:device0/in_accel_x_raw)
ACC_Y=$(cat /sys/bus/iio/devices/iio\:device0/in_accel_y_raw)

if [ "$ACC_Y" -gt $(abs $ACC_X) ]
then
NEW_ROT="normal"
CTM="1 0 0 0 1 0 0 0 1"
elif [ "$ACC_X" -gt $(abs $ACC_Y) ]
then
NEW_ROT="left"
CTM="0 -1 1 1 0 0 0 0 1"
elif [ "$ACC_Y" -lt 0 ] && [ $(abs $ACC_Y) -gt "$ACC_X" ]
then
NEW_ROT="inverted"
CTM="-1 0 1 0 -1 1 0 0 1"
else
NEW_ROT="right"
CTM="0 1 0 -1 0 1 0 0 1"
fi

if [ "$NEW_ROT" != "$CUR_ROT" ]
then
xrandr --output $XRANDROUT --rotate $NEW_ROT
for input in ${INDEVS[@]}; do
xinput set-prop $input 'Coordinate Transformation Matrix' \
$CTM
done
fi

sleep 3

done

●タッチスクリーンと右クリックボタンエミュレート
タッチスクリーンは標準で対応しています。
Intelドライバは不要です。AMTL1000がドライバです。
動作しているかどうかは、xinputコマンドで確認できます。
ちなみにKernel4.8では動作していましたが、
1/28にアップデートされたKernel4.9では何故か動作しません。
そのうちFixされますかね?

で、AMTL1000がある事をxinput確認して
右クリックボタンエミュレートはWindowsボタン3の扱いです。
まず端末からインストール

 su
 apt install xbindkeys xdotool
 exit
 
まず一旦Rootから抜けて一般ユーザーに戻します。

 xbindkeys --defaults > ~/.xbindkeysrc

 gedit ~/.xbindkeysrc

下記の文章を最後に追加して保存

# emulate right mouse button with the Windows button
"xdotool click 3"
m:0x0 + c:248

●サウンド
これも同じ様に。
端末から
 
 su
 apt install firmware-intel-sound

こちらのgitからドライバをダウンロード

 https://github.com/plbossart/UCM

したら展開して

 su
 cd UCM-master
 cp -r -f bytcr-rt5640/ /usr/share/alsa/ucm/

で、設定ファイルのasound.stateを別で拾ってきます。

 https://wiki.debian.org/InstallingDebianOn/Asus/T100TA?action=AttachFile&do=get&target=kernel4.5.xand4.4.x.asound.state

でコピー

 cp kernel4.5.xand4.4.x.asound.state /var/lib/alsa/asound.state

でalsactl

 alsactl store && alsactl restore
 pulseaudio -k

でサウンドが追加されるはずです。ダメなら一回再起動。

●日本語入力
端末から

 su
 apt install ibus-anthy ibus-mozc ibus-kkc libqt5gui5
 im-config -n ibus

Cinnamonの自動起動に一個追加

 ibus-daemon -rdx

設定ファイルに追加

 su
 gedit /etc/profile

下記を最後の行に入れて保存

export GDM_LANG=ja
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus

ログインし直せば日本語入力出来るはずです。
右下のアイコンでまずひらがなを選択して、
IM切り替えキーを追加しましょう。

●Flashplayerのインストール
端末から

 su
 apt install flashplugin-nonfree
 update-flashplugin-nonfree --install
 
firefoxで艦これも遊べます。

●Kernel4.8の残った課題
後はカメラとハイバネ位ですかね?すごく驚きです。

With Linux kernel 4.8:

battery status information is available
shutdown correctly works
reboot correctly works
suspend to RAM doesn't work
hibernation doesn't work
screen power management doesn't work


●まとめ
このやや旧式のT100TAですが、
とてもLinuxの完成度が高くてお気に入りです。
2台目を買ってしまいました。じゃんぱらで11,800円です。マジ安。
たぶん3台目も買いますw
Kernel4.9だとタッチスクリーンが今の段階では動作しません。
ブート時にKernelを切り替える事は出来るのですが、4.8のパッケージが必要。
Kernel4.8は画面の回転まで出来るんですね・・・
後は電源管理とカメラだけです。
Blackscreen対策がKernel4.10に入りそうなので他のタブもいけるか?
このT100TAはブラックスクリーン問題は無いはずです。
完全移殖までもう少しです。
これなら、Linuxディストリを乗せても実用上問題ありません。
凄いですね、DebianとUbuntu。
是非一度触ってみて、Linuxの移殖完成度の高さに驚いてください。
posted by kapper at 21:06 | Comment(3) | ASUS Transbook T100TA
この記事へのコメント
記事を参考にさせていただき、ASUS-T100TAにdebian11.1をインストールしたところ、うまくインストールできました。ありがとうございます。ただ、内蔵カメラがどうしても認識してくれません。記事を書かれてから時間が立ちますが、もしカメラの認識のさせ方がわかれば、教えていただけると幸いです。
Posted by HS at 2021年11月29日 23:55
Debian wikiを読んでみました。
残念ですが、内蔵Cameraは動かないそうです。
動作報告は上がっていません

https://wiki.debian.org/InstallingDebianOn/Asus/T100TA

http://www.jfwhome.com/2016/01/04/latest-steps-to-install-ubuntu-on-the-asus-t100ta/
Posted by Kapper at 2021年11月30日 03:08
確認くださり、ありがとうございました。残念ですが、仕方ないですね。
Posted by HS at 2021年11月30日 10:05
コメントを書く
お名前:

メールアドレス:

ホームページアドレス:

コメント:

にほんブログ村 IT技術ブログへ
にほんブログ村

Linux ブログランキングへ