diff --git a/huion_h1060p_configure.sh b/huion_h1060p_configure.sh index a274ed8e1216259b0f0e87b53219936e8d52992f..9c8b8ba81ee328bf84c6f2d5e1cd1457dc4e36e0 100644 --- a/huion_h1060p_configure.sh +++ b/huion_h1060p_configure.sh @@ -18,6 +18,48 @@ # Abrir o crontab e colocar a linha. # @reboot ~/Projects/linux-config/huion_h1060p_configure.sh +# Documentação do driver. +# 1. https://github.com/DIGImend/digimend-kernel-drivers +# 2. https://digimend.github.io/tablets/ + +# ATTENTION: + +#-- Ter o headers para o kernel linux. +# sudo apt-get install -y "linux-headers-$(uname -r)" + +#-- Instalar o pacote DKMS. +# sudo apt-get install -y dkms + +#-- Baixar o ZIP do repositório +#-- https://github.com/DIGImend/digimend-kernel-drivers, descompactar em +#-- `~/Documents` e rodar os comandos: +# make +# sudo make install. + +#-- Criar o arquivo +# /etc/X11/xorg.conf.d/50-tablet.conf + +#-- Com o conteúdo a seguir: +Section "InputClass" + Identifier "Tablet" + Driver "wacom" + MatchDevicePath "/dev/input/event*" + MatchUSBID "256c:006d" +EndSection + +#-- O valor para MatchUSBID foi obtido rodando: +# lsusb +# xinput list + +#-- Após isso, reiniciar o PC e agora o tablet deve aparecer na lista: +# xsetwacom list + +#-- O resultado é: +# HID 256c:006d stylus id: 21 type: STYLUS +# HID 256c:006d Pad pad id: 22 type: PAD +# HID 256c:006d Touch Strip pad id: 23 type: PAD +# HID 256c:006d Dial pad id: 24 type: PAD + #----------------------------------------------------------------------- # To print the documentation. @@ -50,24 +92,28 @@ set -e # Quando a Huion é espetada, o PC não reconhece. Então resetar as portas # USB. Tomar cuidado com cartões de memória inseridos. -echo "Deseja executar \`sudo restart udev\`? [0/1]" -read -p 'Resposta: ' opcao -if [ "$opcao" -eq 1 ] -then - sudo restart udev -fi +# echo "Deseja executar \`sudo restart udev\`? [0/1]" +# read -p 'Resposta: ' opcao +# if [ "$opcao" -eq 1 ] +# then +# sudo restart udev +# fi + +# sudo service udev restart #----------------------------------------------------------------------- # Mostra se tem Wacom plugada em porta USB. # Dispositivos Wacom conectados. -xsetwacom --list devices -WACOM="HID 256c:006d Pen stylus" +# xsetwacom --list devices +# WACOM="HID 256c:006d Pen stylus" +xinput list +WACOM="HID 256c:006d stylus" -# HID 256c:006d Pad pad id: 24 type: PAD -# HID 256c:006d Touch Strip pad id: 25 type: PAD -# HID 256c:006d Pen stylus id: 26 type: STYLUS -# HID 256c:006d Dial pad id: 27 type: PAD +# HID 256c:006d stylus id: 21 type: STYLUS +# HID 256c:006d Pad pad id: 22 type: PAD +# HID 256c:006d Touch Strip pad id: 23 type: PAD +# HID 256c:006d Dial pad id: 24 type: PAD # Monitores disponíveis. xrandr --listactivemonitors