GPD Pocket
本文是關於GPD Pocket的說明。
參數[編輯 | 編輯原始碼]
- 顯示屏: 7英寸IPS 1920x1200
- CPU: Intel Atom X7-Z8750
- RAM: 8GB LPDDR3-1600
- 存儲: 128GB eMMC SSD(不可更換)
- 電池: 7000mAh
- WiFi: Broadcom 4356 802.11ac
- 藍牙: Broadcom 2045
- 音頻: Realtek ALC5645
- 接口: 1 x USB 3 type A, 1 x MicroHDMI, 1 x USB 3 type C, 1 x 3.5mm 耳機插孔
安裝[編輯 | 編輯原始碼]
自動[編輯 | 編輯原始碼]
可以從這裏下載預先打好補丁的ISO映像。
手動[編輯 | 編輯原始碼]
由於WiFi在默認配置下無法工作,需要首先解決WiFi問題(見#WiFi),或使用受支持的USB外置以太網/WiFi網卡。
配置[編輯 | 編輯原始碼]
自動[編輯 | 編輯原始碼]
安裝期間請將以下內容加入/etc/pacman.conf:
/etc/pacman.conf
... [gpd-pocket-arch] SigLevel = Never Server = https://github.com/joshskidmore/gpd-pocket-arch/raw/master ...
運行以下命令,安裝GPD Pocket正常運行Arch所需要的更改:
# pacman -Syu gpd-pocket-support
由於alsa-lib的補丁是可選依賴,必須手動安裝它才能讓音頻工作:
# pacman -S gpd-pocket-alsa-lib
手動[編輯 | 編輯原始碼]
WiFi[編輯 | 編輯原始碼]
安裝軟件包gpd-pocket-support-bcm4356-gitAUR並重新加載WiFi內核模塊:
# modprobe -r brcmfmac # modprobe brcmfmac
背光與KMS[編輯 | 編輯原始碼]
修改/etc/mkinitcpio.conf
如下,以通過KMS早啟動來啟用背光控制:
/etc/mkinitcpio.conf
... MODULES=(pwm_lpss pwm_lpss_platform i915) ...
Wayland[編輯 | 編輯原始碼]
基本配置[編輯 | 編輯原始碼]
創建/etc/udev/rules.d/99-goodix-touch.rules
文件,並在其中填入如下內容以旋轉觸摸屏:
ACTION=="add|change", KERNEL=="event[0-9]*", ATTRS{name}=="Goodix Capacitive TouchScreen", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1"
右鍵模擬滾動[編輯 | 編輯原始碼]
與Xorg中可以通過標準Xorg配置文件啟用右鍵模擬滾動不同,在Wayland中此類配置應當是由混成器提供的;但不幸的是,一些混成器(如GNOME Wayland)並沒有正確地提供這些配置接口。不過相應的功能仍然可以通過libinput
實現。由於這些混成器通常加載/etc/profile.d
,可以使用LD_PRELOAD
掛鈎至libinput
從而強制應用這些配置。
該方法的示例實現見此處。
Xorg[編輯 | 編輯原始碼]
基本配置[編輯 | 編輯原始碼]
創建/etc/X11/xorg.conf.d/30-monitor.conf
以旋轉觸摸屏:
DSI-1
(modesetting)或DSI1
(xf86-video-intel))/etc/X11/xorg.conf.d/30-monitor.conf
Section "Monitor" Identifier "DSI-1" Option "Rotate" "right" EndSection
Gnome與GDM[編輯 | 編輯原始碼]
編輯~/.config/monitors.xml
(默認狀態下可能不存在該文件):
~/.config/monitors.xml
<monitors version="2"> <configuration> <logicalmonitor> <x>0</x> <y>0</y> <scale>2</scale> <primary>yes</primary> <transform> <rotation>right</rotation> <flipped>no</flipped> </transform> <monitor> <monitorspec> <connector>DSI-1</connector> <vendor>unknown</vendor> <product>unknown</product> <serial>unknown</serial> </monitorspec> <mode> <width>1200</width> <height>1920</height> <rate>60.384620666503906</rate> </mode> </monitor> </logicalmonitor> </configuration> </monitors>
這樣即可設置正確的旋轉方向(<rotation>right</rotation>
)以及縮放因子2(<scale>2</scale>
)。關於非整數倍縮放,見HiDPI#GNOME。
對於GDM,將以上的~/.config/monitors.xml
文件複製到/var/lib/gdm/.config/monitors.xml
以設置正確的旋轉方向。
KDE[編輯 | 編輯原始碼]
在系統設置 > 顯示和監控中,將方向改為90°順時針,並調整縮放顯示至合適尺寸。
右鍵模擬滾動[編輯 | 編輯原始碼]
創建/etc/X11/xorg.conf.d/50-trackpoint.conf
從而實現按住右鍵來滾動屏幕:
/etc/X11/xorg.conf.d/50-trackpoint.conf
Section "InputClass" Identifier "GPD trackpoint" MatchProduct "SINO WEALTH Gaming Keyboard" MatchIsPointer "on" Driver "libinput" Option "MiddleEmulation" "1" Option "ScrollButton" "3" Option "ScrollMethod" "button" EndSection
SDDM[編輯 | 編輯原始碼]
為了改變DPI使文字可讀,將以下行加入/usr/share/sddm/scripts/Xsetup
:
/usr/share/sddm/scripts/Xsetup
# Set DPI xrandr --dpi 168"
觸摸屏手勢[編輯 | 編輯原始碼]
安裝toucheggAUR,然後編輯/usr/share/touchegg/touchegg.conf
中的下列行:
/usr/share/touchegg/touchegg.conf
... <action type="SCROLL">SPEED=7:INVERTED=true</action> ...
創建/etc/X11/xinit/xinitrc.d/01_touchegg
:
/etc/X11/xinit/xinitrc.d/01_touchegg
... #!/bin/bash # starts touchegg application PREFIX="$HOME/.config/touchegg/.run" mkdir -p "$PREFIX" PIDFILE="$PREFIX/touchegg.$USER$DISPLAY.pid" LOCK="$PREFIX/touchegg.$USER$DISPLAY.lock" start_touchegg() { ( flock -n 9 || exit 1 touchegg 2>/dev/null >/dev/null & PID=$! echo "$!" >"$PIDFILE" wait $PID ) 9>"$LOCK" } start_touchegg &
對/etc/X11/xinit/xinitrc.d/01_touchegg
設置權限:
# chmod 0755 /etc/X11/xinit/xinitrc.d/01_touchegg
利用Pocket 2上的「半/全」鍵[編輯 | 編輯原始碼]
出廠狀態下半/全
被設定為發送`
符號及按鍵碼49,導致其與原本的`/~
鍵形成重複。為了把它映射到更有用的功能,請前往GPD2 Firmware然後下載"GPD Pocket 2 Keyboard Firmware (Japan)"(中國大陸地區下載可能需使用代理工具)。此固件必須在Windows 10作業系統(設備原裝的)下刷入。由於更新期間鍵盤和鼠標無法使用,建議使用USB鼠標。
更新完成後半/全
會發送按鍵碼49及`
符號,而`/~
鍵會發送按鍵碼132。創建~/.Xmodmap
文件以進行修正:
~/.Xmodmap
keycode 132 = grave asciitilde keycode 49 = XF86Launch1 NoSymbol
現在進行測試:
$ xmodmap ~/.Xmodmap
更多信息請參閱Xmodmap
風扇[編輯 | 編輯原始碼]
使用最新內核時風扇應當直接可以工作。
# modprobe -r gpd-pocket-fan # modprobe gpd-pocket-fan temp_limits=40000,40001,40002
當以上操作完成之後——應當能夠在40℃時聽到風扇起轉,如果聽到了咔噠聲——關閉設備電源,卸下後蓋,之後用手輕輕轉幾圈風扇。然後重新裝上後蓋並開機,登錄之後再次運行上面的命令。部分設備似乎存在問題,風扇一段時間沒有通電之後無法正確地啟動。
一旦完成了以上步驟並且風扇工作正常,應當重啟系統或重新加載風扇內核模塊,從而將溫度閾值恢復到默認:
# modprobe -r gpd-pocket-fan # modprobe gpd-pocket-fan
節能[編輯 | 編輯原始碼]
安裝tlp包,然後編輯/etc/default/tlp
中的下列行:
/etc/default/tlp
... # improve disk IO DISK_DEVICES="mmcblk0" DISK_IOSCHED="deadline" ... # disable wifi power saving mode (wifi speed drops MASSIVELY!) WIFI_PWR_ON_AC=off WIFI_PWR_ON_BAT=off ...
PulseAudio[編輯 | 編輯原始碼]
將下列行加入/etc/pulse/default.pa
:
/etc/pulse/default.pa
set-card-profile alsa_card.platform-cht-bsw-rt5645 HiFi set-default-sink alsa_output.platform-cht-bsw-rt5645.HiFi__hw_chtrt5645_0__sink set-sink-port alsa_output.platform-cht-bsw-rt5645.HiFi__hw_chtrt5645_0__sink [Out] Speaker
編輯/etc/pulse/daemon.conf
以關閉實時調度:
/etc/pulse/daemon.conf
realtime-scheduling = no
充電控制[編輯 | 編輯原始碼]
可以控制充電電流、充電終止電壓及一些其他設定。
更多信息及示例腳本見這篇reddit帖子(中國大陸地區訪問可能需使用代理工具)。
已知問題[編輯 | 編輯原始碼]
USB-C電源狀態[編輯 | 編輯原始碼]
USB-C電源狀態在內核版本4.14-15下不工作。Hans的內核有修復此問題的補丁。
systemd-gpt-auto-generator failed to dissect[編輯 | 編輯原始碼]
由於此原因,啟動時會出現報錯信息:
systemd-gpt-auto-generator[199]: Failed to dissect: Input/output error
.
向啟動引導器添加以下啟動參數,可避免該信息出現。
systemd.gpt_auto=0