You are not logged in.
what packages are needed that my tablet recognizes rotation and adjusts the screen?
in detail I'm looking for thinkpad yoga s1 driver; which includes a digitizer pen.
thanks
Last edited by Head_on_a_Stick (2016-06-12 19:29:09)
Offline
what I have so far:
xserver-xorg-input-multitouch + xserver-xorg-input-wacom
But I'm looking for more advanced options... for example; Palm Rejection for the wacom
Offline
^ These wacom script snippets may be of use...
xsetwacom --list parameters
xsetwacom --list modifiers
PAD=$(xsetwacom list dev | grep -o ".*pad")
STYLUS=$(xsetwacom list dev | grep -o ".*stylus")
TOUCH=$(xsetwacom list dev | grep -o ".*touch")
#Get current settings with:
xsetwacom get "$PAD" all
xsetwacom get "$STYLUS" all
xsetwacom get "$TOUCH" all
Example setting:
xsetwacom set "$TOUCH" Touch off # Disable touch
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
thanks, looking into it... looks very promising!
would you run this as cron script; or better through conky with direct status msg...
I've tried the following without success. Touch still enabled...
xsetwacom --set "Wacom ISDv4 EC Pen stylus" touch off
any clue? ... gotta BBQ going; gonna try later
Offline
thanks, looking into it... looks very promising!
would you run this as cron script; or better through conky with direct status msg...I've tried the following without success. Touch still enabled...
xsetwacom --set "Wacom ISDv4 EC Pen stylus" touch off
any clue? ... gotta BBQ going; gonna try later
First off, what is the output of
xsetwacom get "Wacom ISDv4 EC Pen stylus" all
And should it be "Touch", not "touch" (it is on my Intuos Pro)
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
thanks - here is the output:
$ xsetwacom get "Wacom ISDv4 EC Pen stylus" all
Option "Area" "0 0 27748 15652"
'Button' requires exactly 1 value(s).
Option "ToolDebugLevel" "0"
Option "TabletDebugLevel" "0"
Option "Suppress" "2"
Option "RawSample" "4"
Option "PressureCurve" "0 0 100 100"
Option "Mode" "Absolute"
Option "TabletPCButton" "on"
Option "Touch" "off"
Property 'Wacom Hardware Touch Switch' does not exist on device.
Option "Gesture" "off"
Option "ZoomDistance" "0"
Option "ScrollDistance" "0"
Option "TapTime" "250"
Property 'Wacom Proximity Threshold' does not exist on device.
Option "Rotate" "none"
Property 'Wacom Wheel Buttons' does not exist on device.
Property 'Wacom Wheel Buttons' does not exist on device.
Property 'Wacom Wheel Buttons' does not exist on device.
Property 'Wacom Wheel Buttons' does not exist on device.
Property 'Wacom Wheel Buttons' does not exist on device.
Property 'Wacom Wheel Buttons' does not exist on device.
Property 'Wacom Strip Buttons' does not exist on device.
Property 'Wacom Strip Buttons' does not exist on device.
Property 'Wacom Strip Buttons' does not exist on device.
Property 'Wacom Strip Buttons' does not exist on device.
Option "Threshold" "27"
Option "ToolType" "401"
Option "ToolSerial" "0"
Option "ToolID" "0"
Option "ToolSerialPrevious" "1"
Option "BindToSerial" "0"
Option "TabletID" "236"
Option "PressureRecalibration"
Touch/touch doesn't seem to make any difference.
Further the output also states "Property 'Wacom Hardware Touch Switch' does not exist on device."
*the hunt just started
Additional: The Touch/touch switch does work - it shows on/off on the output. But I don't understand what the difference really is. Touchscreen is still functioning on both options on/off.
Up to now I tried Touch on/off + Gesture on/off without any noticeable effect.
Does anyone has any insides on these? thanks.
Last edited by gree (2016-06-10 20:46:59)
Offline
Have you looked at any of the other settings, eg $PAD and $TOUCH? I doubt that the stylus settings have a Touch parameter.
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
thanks for the note. yeah, I tried that too. but in the end I just pasted the entire output - there are only
"touch" and "gesture" as far i can tell. none of them make any difference; or I'm testing it wrong (painting + touching at the same time)
so, what I'm after: if (paint = true) { disable touchscreen } else { enable touchscreen }
breaking this down to 2 issues:
1 - how to disable touchscreens 'touch' capability
2 - how to recognize any input given by the pencil (not sure how this gonna work with 'xsetwacom')
... i gonna keep on digging thanks for all your great help @damo
update:
$ xinput --list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Laser Mouse id=9 [slave pointer (2)]
⎜ ↳ ELAN Touchscreen id=10 [slave pointer (2)] <---- TOUCHSCREEN
⎜ ↳ Wacom ISDv4 EC Pen stylus id=12 [slave pointer (2)] <---- WACOM
⎜ ↳ SynPS/2 Synaptics TouchPad id=14 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint id=15 [slave pointer (2)]
⎜ ↳ Wacom ISDv4 EC Pen eraser id=17 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Integrated Camera id=11 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=13 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=16 [slave keyboard (3)]
Update:
The following disables the touchscreen. 10 = is my screen id (ELAN Touchscreen id=10 from above)
xinput disable 10
thanks @metalanddevider at reddit
https://www.reddit.com/r/linux/comments … n_to_save/
To re-enable the touchscreen
xinput enable 10
Last edited by gree (2016-06-10 21:45:00)
Offline
Are you wanting an automatic detection of a pen input, which then disables Touch? I assume you would need a daemon which monitors for a dbus event - that is a confusing rabbit-hole I got completely lost in when trying to configure a Wacom tablet. In the end I scripted to detect an 'evdev' event when it was plugged in (usb), which ran the script to disable touch and set the buttons and ring modifiers.
If you don't mind some manual input, then put the necessary commands in a toggle script which is run by a keybind (I use that as well).
Pseudocode:
If $touchscreen on; then
xinput disable 10
else
xinput enable 10
fi
Bear in mind that it could possibly sometimes be a different id, so a test first would be best.
Another thought - can you set a screen area which can respond like a "button"? Maybe a screen corner touch with the stylus could run a toggle script. Just thinking out loud....
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
@damo thanks - great input.
I had conky in mind; it is more or less a daemon - so I can create my own little wacom-conky - in case of pencil input disable touch (execi 1) so it's checking it every second.
I'll let you know if it gonna work
Update: already testing it with evtest
... xev could be also an option; not sure
Last edited by gree (2016-06-10 22:39:13)
Offline
I'm playing around with evtest.
evtest --query /dev/input/event17 EV_KEY 1
Last edited by gree (2016-06-10 23:06:39)
Offline
The following conky isn't working yet...
TEST: ${if_match "${exec sudo evtest /dev/input/event17 EV_KEY 1}"!=""}${alignr}${color3}Online${exec xbacklight -set 10}${else}${alignr}${color9}Offline${exec xbacklight -set 100}${endif}${color}
changing the "!=" to "==" proves that the if/else does somewhat work. But still it doesn't really trigger when using the pen.
but using the snippet within bash does show direct input/output.
Any idea?
Offline
Conky code isn't my forte, but I see you have a "sudo" in there. How do you give permission to the evtest command?
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
good point!
Offline
@damo : maybe you can help me out with a little bash?
The following command gives me the inputs of my wacom.
sudo -u root evtest /dev/input/event16 EV_KEY 1
What I'm trying to do; creating a if ($evtest output = true) then ...; else ...
The following script is a bit "messy" ... still in progress so; don't use if you are not a developer
(i'm not, but I wan't to mess with it )
#!/bin/bash
#Select Touchscreen + Tablet // ELAN = name of my touchscreen; change it to yours (xinput --list)
# Get Touchscreen ID based by ELAN
SCREEN_ID=$(xinput --list | grep -i -m 1 'ELAN' | grep -o 'id=[0-9]\+' | grep -o '[0-9]\+')
echo $SCREEN_ID
# Get WACOM ID based by ELAN
MOUSE_ID=$(xinput --list | grep -i -m 1 'pen' | grep -o 'id=[0-9]\+' | grep -o '[0-9]\+')
echo $MOUSE_ID
STATE1=$(xinput --query-state $MOUSE_ID | grep 'pen\[' | sort)
if [ -z "$STATE1" ];then echo "1"; else echo "2" ; fi
# having troubles to receive true/false if input available
#sudo -u root evtest /dev/input/event16 EV_KEY 1
#STATE=$(sudo -u root evtest /dev/input/event16 EV_KEY 1)
#echo "$STATE";
#[ -z "$STATE1" ] && echo "Empty"
#[ -z "$STATE1" ] && echo "Empty" || echo "Not empty"
#if [ -z "$STATE1" ];then echo ""; else echo "" ; fi
if [ -z "$STATE" ];then echo 'works1' & xinput enable $SCREEN_ID; else echo 'not' & xinput disable $SCREEN_ID; fi
while $STATE; do
if [ -z "$STATE1" ];then echo 'works2' & xinput enable $SCREEN_ID; else echo 'not' & xinput disable $SCREEN_ID; fi
sleep 0.2
STATE2=$(xinput --query-state $MOUSE_ID | grep 'pen\[' | sort)
comm -13 <(echo "$STATE1") <(echo "$STATE2")
STATE1=$STATE2
done
Any hint into the right direction would be awesome!
What the above code should do; check evtest if inputs are made (using the pen) then it should trigger xinput disable; else xinput enable.
thx
Offline
You could try configuring the 'sudo evtest' command to not require a password, by adding it to your sudoers file:
Edit the file with
sudo visudo
Add the following after any other settings:
yourusername ALL = (root) NOPASSWD: /usr/bin/evtest
Log out/in, then 'sudo evtest' will run without having to enter your password.
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
thanks for mentioning this. already did this.
may i ask; there is no difference if I edit this file not via the terminal,right?
what "user" does the bashscript uses for execution?
I'm asking because the sudoers work as long I type the commands directly into the terminal.
But if I use a bash-script which executes it is somewhat different than the direct method.
not sure...
Last edited by gree (2016-06-11 16:46:16)
Offline
PALM reject = done
the following script can be saved as .sh and executed as autostart.
@Bunsenlabs Team; could you ad this to the laptop/touch bl-welcome script (if code is ok)?
#!/bin/bash
#Select Touchscreen + Tablet // (xinput --list)
# Get Touchscreen ID // change 'touchscreen' name according to yours
SCREEN_ID=$(xinput --list | grep -i -m 1 'touchscreen' | grep -o 'id=[0-9]\+' | grep -o '[0-9]\+')
#echo $SCREEN_ID
# Get WACOM ID
MOUSE_ID=$(xinput --list | grep -i -m 1 'pen' | grep -o 'id=[0-9]\+' | grep -o '[0-9]\+')
#echo $MOUSE_ID
#Check if Wacom Proximity is In/Out (xinput query-state 14)
while [ 1 ] ; do
STATE=$(xinput query-state $MOUSE_ID | grep 'Proximity' | grep -o 'Proximity=.*' | cut -f2- -d'=')
sleep .1
#echo $STATE
if [ "$STATE" = "Out" ];
then
xinput enable $SCREEN_ID;
else
xinput disable $SCREEN_ID
fi
done
... now I'm trying to fix the screen rotation thing on ultrabooks
any clue where to start? Need to find the internal accelerator and read it somehow...
Last edited by gree (2016-06-11 18:31:34)
Offline
Well done If you consider it solved, then edit the title of your first post and add [SOLVED].
As it stands, the script requires a user edit for the touchscreen name, so IMO isn't suitable for automatic inclusion in an installation. It would also need testing on a variety of hardware, and some error checking in the code. Also there are many grep pipes, which could probably be made more elegant and efficient. But if it works for you....
However, it could be a good basis for further study
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
@damo yeah; you are right...
tho; I'm not sure if touchscreens are named always "touchscreen" as xinput name.
Thats the main reason why the automation might not work on some devices - with the script above.
I'm sure this can be done much better and in a more elegant way - like you said.
But hey - it works for me
any suggestions are very welcome - I'll close the topic as soon the screenrotation is up running (topic)
https://github.com/pfps/yoga-laptop/issues/4
Last edited by gree (2016-06-11 18:53:56)
Offline