This post is more of wiki or a tutorial, than a forum post and I apologize, in advance, if it shouldn't be posted here, but elsewhere, in which case, I would like the administrators and moderators of the forum to point me to the right direction. I am writing this, to help other ROSA users, to express my love for ROSA Linux and to contribute in a way to its further development and increase of its popularity.
If it happened to own a Lenovo ThinkPad X61 Tablet, and installed ROSA Desktop Fresh R5 on it, you have probably came across some issues. Most of the issues seem to be present for most other majors distributions, but I will be specific for ROSA in this text.
The installation process of ROSA Desktop Fresh R5, runs smoothly on Lenovo ThinkPad X61 Tablet and installs without any issues, but not everything works out of the box!
What does not work:
- 1. Middle button of TrackPad/TrackPoint
- 2. ThinkVantage button
- 3. Digital Pen, eraser and right click button
- 4. Screen automatic rotation
- 5. Screen bezel buttons
- 6. Fingerprint
So, let's start!
I use nano editor for text editing in terminal, which is not installed by default. Thus, either install nano by executing the following command, or use your favourite editor.
Код: Выделить всё
sudo urpmi nano
- In order to get the middle button of TrackPad/TrackPoint to work as intended, i.e. for scrolling, all you have to do is instruct Xorg to do it.
Open Konsole and type the following:Most probably the file will not exist or it will be empty, if for some reason it exists, you will have to edit it in order to include all the following settings. Otherwise, create it and simply add them to it.Код: Выделить всё
sudo nano /etc/X11/xorg.conf
The settings are the following:For the changes to take effect, X has to restart. Either reboot your system or execute the following commands. Keep in mind, however, that all open applications will close, without prior notification and any unsaved data will be lost, so save any open data and then execute the commands.Код: Выделить всё
Section "InputClass" Identifier "Trackpoint Wheel Emulation" MatchProduct "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite To$ MatchDevicePath "/dev/input/event*" Option "EmulateWheel" "true" Option "EmulateWheelButton" "2" Option "Emulate3Buttons" "false" Option "XAxisMapping" "6 7" Option "YAxisMapping" "4 5" EndSection
This will drop X and a command line session will start. Login, and type:Код: Выделить всё
sudo init 3
Код: Выделить всё
sudo init 5
2. ThinkVantage button
- The ThinkVantage button is recognized by the system, but nothing is assigned to it.
We are going to use a program to assign an application to it.
We are going to use this program to assign applications to all screen bezel buttons, so please do not skip this step!
Open a Konsole and type:Then, type:Код: Выделить всё
sudo urpmi xbindkeys
This will create the default configuration file for xbindkeys under your home directory.Код: Выделить всё
xbindkeys --defaults > .xbindkeysrc
Now, open the configuration file for editing:and add the following lines to it:Код: Выделить всё
nano ~/.xbindkeysc
I have assigned the ThinkVantage button to system settings application, which in my view it makes sense. If you like you can change that, by changing the configuration file accordingly.Код: Выделить всё
# ThinkVantage Button | Configure Desktop "systemsettings" m:0x0 + c:156
Now, type in Konsole:to run the program and press the ThinkVantage button to see if it works. If it does, everything is cool, if not review the process above and/or write me a reply.Код: Выделить всё
xbindkeys
Now, we need to add xbindkeys to our startup application so that the button assignment will continue to work after your reboot your laptop.
We can do that in many ways, let's use that easiest one:
Press the ThinkVantage button, go to Startup and Shutdown, press the Add Program... at right of the window, type xbindkeys in the textbox, check the Run in terminal checkbox and click OK.
3. Digital Pen, eraser and right click button
- The Digital Pen issue, is probably the easiest to solve of them all!
Open a Konsole and type:Log out and login again, press the ThinkVantage button, go to Input Devices and now you will find there a Graphic Tablet section, under which and at the Stylus tab, you can configure the button to behave as right click.Код: Выделить всё
sudo urpmi kcm_wacomtablet
- To get the screen to automatically rotate together with the orientation of the Digital Pen, follow the steps below:
Open a Konsole and create a hidden directory under your home directory:While you are still in the Konsole, create a file named rotationmode and fill it with a 0:Код: Выделить всё
mkdir ~/.autorotate-thinkpad
Now, still in the Konsole, find the name of your Digital Pen device, using xinput:Код: Выделить всё
echo 0 > ~/.autorotate-thinkpad/rotationmode
You should have three entries with the following or similar names, write them down:Код: Выделить всё
xinput
Wacom Serial Penabled Touchscreen stylus
Wacom Serial Penabled Touchscreen eraser
TPPS/2 IBM TrackPoint
Now, in Konsole, create another file and open it for editing:Enter the following code inside:Код: Выделить всё
nano ~/.autorotate-thinkpad/rotationbutton.sh
Check the names of your xinput entries you wrote down before and change the above code accordingly, if needed.Код: Выделить всё
#!/bin/bash mode=`cat /home/$USER/.autorotate-thinkpad/rotationmode` if [[ 0 = $mode ]]; then echo 1 > /home/$USER/.autorotate-thinkpad/rotationmode xrandr -o right xsetwacom set "Wacom Serial Penabled Touchscreen stylus" rotate cw xsetwacom set "Wacom Serial Penabled Touchscreen eraser" rotate cw xinput set-prop "TPPS/2 IBM TrackPoint" "Device Enabled" 0 xmodmap - <<END keycode 114 = Up NoSymbol Up NoSymbol Up keycode 111 = Left NoSymbol Left NoSymbol Left keycode 116 = Right NoSymbol Right NoSymbol Right keycode 113 = Down NoSymbol Down NoSymbol Down END fi if [[ 1 = $mode ]]; then echo 2 > /home/$USER/.autorotate-thinkpad/rotationmode xrandr -o inverted xsetwacom set "Wacom Serial Penabled Touchscreen stylus" rotate half xsetwacom set "Wacom Serial Penabled Touchscreen eraser" rotate half xinput set-prop "TPPS/2 IBM TrackPoint" "Device Enabled" 0 xmodmap - <<END keycode 111 = Down NoSymbol Down NoSymbol Down keycode 113 = Right NoSymbol Right NoSymbol Right keycode 114 = Left NoSymbol Left NoSymbol Left keycode 116 = Up NoSymbol Up NoSymbol Up END fi if [[ 2 = $mode ]]; then echo 3 > /home/$USER/.autorotate-thinkpad/rotationmode xrandr -o left xsetwacom set "Wacom Serial Penabled Touchscreen stylus" rotate ccw xsetwacom set "Wacom Serial Penabled Touchscreen eraser" rotate ccw xinput set-prop "TPPS/2 IBM TrackPoint" "Device Enabled" 0 xmodmap - <<END keycode 114 = Down NoSymbol Down NoSymbol Down keycode 111 = Right NoSymbol Right NoSymbol Right keycode 116 = Left NoSymbol Left NoSymbol Left keycode 113 = Up NoSymbol Up NoSymbol Up END fi if [[ 3 = $mode ]]; then echo 0 > /home/$USER/.autorotate-thinkpad/rotationmode xrandr -o normal xsetwacom set "Wacom Serial Penabled Touchscreen stylus" rotate none xsetwacom set "Wacom Serial Penabled Touchscreen eraser" rotate none xinput set-prop "TPPS/2 IBM TrackPoint" "Device Enabled" 1 xmodmap - <<END keycode 111 = Up NoSymbol Up NoSymbol Up keycode 113 = Left NoSymbol Left NoSymbol Left keycode 114 = Right NoSymbol Right NoSymbol Right keycode 116 = Down NoSymbol Down NoSymbol Down END fi
Create one more file:Enter the following code inside:Код: Выделить всё
nano ~/.autorotate-thinkpad/autorotate-thinkpad.sh
Again, change the above code with respect with your xinput, if needed.Код: Выделить всё
#!/bin/bash old="0" while true; do if [[ -e /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode ]]; then new=`cat /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode` if [[ $new != $old ]]; then if [[ $new == "0" ]]; then echo "Rotate to landscape." killall cellwriter xrandr -o normal xsetwacom set "Wacom Serial Penabled Touchscreen stylus" rotate none xsetwacom set "Wacom Serial Penabled Touchscreen eraser" rotate none xinput set-prop "TPPS/2 IBM TrackPoint" "Device Enabled" 1 xmodmap - <<END keycode 111 = Up NoSymbol Up NoSymbol Up keycode 113 = Left NoSymbol Left NoSymbol Left keycode 114 = Right NoSymbol Right NoSymbol Right keycode 116 = Down NoSymbol Down NoSymbol Down END elif [[ $new == "1" ]]; then echo "Rotate to portrait." xrandr -o right xsetwacom set "Wacom Serial Penabled Touchscreen stylus" rotate cw xsetwacom set "Wacom Serial Penabled Touchscreen eraser" rotate cw xinput set-prop "TPPS/2 IBM TrackPoint" "Device Enabled" 0 xmodmap - <<END keycode 114 = Up NoSymbol Up NoSymbol Up keycode 111 = Left NoSymbol Left NoSymbol Left keycode 116 = Right NoSymbol Right NoSymbol Right keycode 113 = Down NoSymbol Down NoSymbol Down END fi fi old=$new sleep 1s fi done
Finally, we need make these files executable:and configure the autorotate-thinkpad.sh to start at boot.Код: Выделить всё
sudo chmod +x ~/.autorotate-thinkpad/*
Again, we are going to choose the easiest way:
Press the ThinkVantage button, go to Startup and Shutdown, press the Add Script... at right of the window, type ~/.autorotate-thinkpad/autorotate-thinkpad.sh in the textbox, check the Create as symlink checkbox and click OK.
You can make everything work by either log out and log back in, or by just running the autorotate-thinkpad.sh script:Код: Выделить всё
bash ~/.autorotate-thinkpad/autorotate-thinkpad.sh
5. Screen bezel buttons
- All screen bezel buttons are recognized by the atkbd driver, which unfortunately is not loaded into the kernel by default.
Subsequently, we have to configure GRUB to load the driver into the kernel on boot. To do so, open a Konsole and type the following:Add the atkbd.softraw=0 option in the GRUB_CMDLINE_LINUX_DEFAULT line.Код: Выделить всё
sudo nano /etc/default/grub
This will change the line from:to:Код: Выделить всё
GRUB_CMDLINE_LINUX_DEFAULT='splash=silent logo.nologo'
Now, we have to rebuild GRUB, for the changes in the configuration file to be applied:Код: Выделить всё
GRUB_CMDLINE_LINUX_DEFAULT='splash=silent atkbd.softraw=0 logo.nologo'
Finally, we must reboot our system. Sorry, this is a kernel operation and reboot is required!Код: Выделить всё
sudo update-grub2
We are back, and now the system recognizes the screen bezel buttons but again nothing is assigned to them.
We should then configure them under xbindkeys.... Yes, but not yet!
Modern Linux system like ROSA Desktop Fresh R5, use udev for button mapping and this will conflict with xbindkeys, resulting in abnormal behaviour.
Thus, to correctly get the buttons to work, we have to make changes in the hardware database.
The configuration file for buttons of any system is located under:If you open skim the file, you will find that there are default configurations for the ThinkPad X6* models, but for same reason they are not loaded.Код: Выделить всё
/lib/udev/hwdb.d/60-keyboard.hwdb
The reason is, that, at least in my case, the product name of my laptop was not ThinkPad X6*, but rather it was the actual model of the laptop, i.e. 776295G.
To find yours, open a Konsole and type:This should print LENOVO and:Код: Выделить всё
cat /sys/class/dmi/id/sys_vendor
This should print your model number, write it down somewhere, we are need it!Код: Выделить всё
cat /sys/class/dmi/id/product_name
We are going to create a new hardware database configuration file:And fill it with the following:Код: Выделить всё
sudo nano /lib/udev/hwdb.d/70-keyboard.hwdb
Pay attention at the second line! Change the 776295G, with the number of your model, that you've written down before.Код: Выделить всё
# ThinkPad X61 Tablet keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn776295G:pvr* KEYBOARD_KEY_6c=prog3 # rotate KEYBOARD_KEY_68=prog4 # toolbox KEYBOARD_KEY_6b=esc # escape KEYBOARD_KEY_6d=right # right on d-pad KEYBOARD_KEY_6e=left # left on d-pad KEYBOARD_KEY_71=up # up on d-pad KEYBOARD_KEY_6f=down # down on d-pad KEYBOARD_KEY_69=enter # enter on d-pad KEYBOARD_KEY_67=prog2 # ctrl-alt-del
Now, that we have created our configuration file, we have to compile the hwdb for changes and additions to take effect in the hwdb.bin file:We are going to do it, with the following commands:Код: Выделить всё
/lib/udev/hwdb.bin
Like with GRUB, this is a kernel related operation, thus we need to reboot our system at this point.Код: Выделить всё
sudo udevadm hwdb --update sudo udevadm trigger /dev/input/event*
Now, after the reboot we are ready to deal with our xbindkeys configuration.
But before that, there one last thing we need to do. We need to install a virtual keyboard to use, when in tablet mode.
There are a lot of options here, select one that you prefer. In my opinion, none of them is good!
There is a lack of beautiful and functional virtual keyboards in KDE and in Linux in general.
Debian 8 and from there, Ubuntu and Mint have a nicer solution in their newest versions, but still not good enough virtual keyboards.
In a world of smartphones, where virtual keyboards are so advanced with word prediction, auto-fill, handwriting recognition and much more features, Linux seems to be ages behind. Even Microsoft Windows has much better virtual keyboards.
I ended up selecting, cellwriter. It looks outdated and it is, but still with lots of efforts, it will learn and recognize your handwriting and its on screen keyboard is acceptable. If you choose to go with my solution, write the following command in Konsole to install it:Now, that we have a virtual keyboard installed, you shall proceed with our xbindkeys configuration.Код: Выделить всё
sudo urpmi cellwriter
To edit the configuration file, type in Konsole:and append the following code inside:Код: Выделить всё
nano ~/.xbindkeysrc
You can now, either log out and log back in or simply kill and restart xbindkeys from Konsole:Код: Выделить всё
# Ctrl-Alt-Del | KDE Leave Menu "qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 1 -1 -1" m:0x0 + c:157 # Rotation Button | Custom Rotation Script "bash /home/$USER/.autorotate-thinkpad/rotationbutton.sh" m:0x0 + c:210 # Toolbox Button | "cellwriter" m:0x0 + c:211
Код: Выделить всё
killall xbindkeys xbindkeys
The only thing that is left is to configure the fingerprint reader to store our password and login and root permissions authorization.
6. Fingerprint
Here is the point, where I am going to disappoint you though!
The fingerprint reader, as a device, is recognized by the kernel and if you install fprintd you can actually store your fingerprints and use them to give root permissions, but unfortunately only under Konsole, when in GUI, you are not given the option.
You can also login using your fingerprint, but the process is very ugly! You have to press enter, without entering a password at login screen (without any indication that the system is waiting for your fingerprint), an un-themed window will open, with a message asking you to swipe your finger and after you do that (without an indication on whether you have done it successfully or not), you have to click the OK button, with the mouse pointer, because the focus is not there.
This is an illustration of the above: This is what I managed to do about the fingerprint reader and I didn't like it, so I removed it and I don't use the fingerprint reader apart from the BIOS login at boot.
I don't give detailed instructions, because I didn't like it, but if somebody wants assistance with that, please don't hesitate to post a reply below.
That covers pretty much all my work, installing ROSA Desktop Fresh R5 on a Lenovo ThinkPad X61 Tablet.
I hope that this post will be helpful to somebody!