I installed kali linux OS on my laptop.

The installation went well but when I booted in kali linux the screen was backwards. I signed in as root and the screen flipped back but the mouse is reverse (x & y axis).

When I move my mouse left it moves right when I move it down it moves up. If I want to press a button at the upper right I need to press it at the down left.

The screen is acting backwordes (x & y axis)but I see the graphics straight and the mouse is acting backwordes.

I installed kali linux again with a fresh installation. I have the same problem as before.

I installed kali linux again with a fresh installation. I have the same problem as before.

  • I searched the web And I don't find information on a problem like this
  • 1
    Use xrandr --verbose to check for a "mirroring" transformation of the screen (-1 in matrix), and xinput to find your mouse id followed by xinput --list-props <id> to find a "mirroring" transformation for your mouse. If you find any, we still don't know the reason it activates, but at least you can fix it. – dirkt Dec 11 '16 at 20:30
  • @sara Did you check about transformation matrix? Give some update ... It is an interesting issue. – George Vasiliou Dec 12 '16 at 14:55
  • I will check about transformation matrix. – sara Dec 13 '16 at 15:02

As per @dirkt suggestion you can use transformation matrix to correct up things.

First, to see what is the current settings of transformation matrix you can run:

#locate the device ids that do not work correctly
xinput list-props devid |grep Matrix
#replace devid with your device number.

If everything was working ok Matrix should like this:
1 0 0 0 1 0 0 0 1 #case normal

If you ever wanted to force mouse/screen to be reversed, then you should apply a matrix like this:
-1 0 1 0 -1 1 0 0 1 #case inverted

I suppose your mouse/screen since they work inverted , their xinput list-props |grep Matrix should look like "case inverted" instead of "case normal"

In this case, force those devices to use normal case matrix like this:
xinput set-prop devicename Coordinate Transformation Matrix 1 0 0 0 1 0 0 0 1 #be sure to use the exact device name as it is reported by xinput

Now you should be ok.

I don't know what is the reason that wrong matrix has been applied in your devices, but i think is better to file a bug to Kali people for this behavior.

If the screen display is inverted , then xrandr should be enough :
xrandr --output yourscreen --rotate normal

If your screen is a touchscreen then xrandr rotate is not enough. You need to apply correct transformation matrix in your touchscreen as well in order touches to be sensed in correct position.

  • I will try this. I hope that this solution will work. – sara Dec 13 '16 at 15:01
  • Well...? How did that go? – George Vasiliou Dec 14 '16 at 22:58
  • I tried xrandr --output your screen --rotate normal. it worked. When I move the mouse it moves to the right place. but I see the screen display rotated(180 degrees). Another problem is that when I click the mouse it clicks it in the wrong place.for example if I click the mouse on the right top it will detect the click at the bottom left. xinput is not recognized. – sara Dec 17 '16 at 18:02
  • @sara apt-get install xinput and retry. Screen and mouse should xave the same matrix. – George Vasiliou Dec 17 '16 at 18:19
  • I will work on it. How do I change mouse matrix? – sara Dec 17 '16 at 18:26

Here's exactly how I fixed this problem: Typing xinput, into your console will print out a list of inputs like this:

? Virtual core pointer                          id=2    [master pointer  (3)]
?   ? Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
?   ? USBest Technology SiS HID Touch Controller    id=11   [slave  pointer  (2)]
?   ? ETPS/2 Elantech Touchpad                  id=14   [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)]
    ? Asus Wireless Radio Control               id=7    [slave  keyboard (3)]
    ? Video Bus                                 id=8    [slave  keyboard (3)]
    ? Sleep Button                              id=9    [slave  keyboard (3)]
    ? USB2.0 UVC HD Webcam                      id=10   [slave  keyboard (3)]
    ? Asus WMI hotkeys                          id=12   [slave  keyboard (3)]
    ? AT Translated Set 2 keyboard              id=13   [slave  keyboard (3)]

(Your experience may vary per devices)

Note that the id=# is the device id you're actually looking for.

I wasn't sure which device was being screwy, so I went through each one. Turns out, device 11 was being dumb! To list the properties, type:

xinput list-props 11 (Because device id=11 was the problem device)

Typing that in will show something like...

Device 'USBest Technology SiS HID Touch Controller':
  Device Enabled (139): 1
  Coordinate Transformation Matrix (141):   -1.000000, 0.000000, -1.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, -1.000000
  libinput Calibration Matrix (276):    1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
  libinput Calibration Matrix Default (277):    1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
  libinput Send Events Modes Available (259):   1, 0
  libinput Send Events Mode Enabled (260):  0, 0
  libinput Send Events Mode Enabled Default (261):  0, 0
  Device Node (262):    "/dev/input/event10"
  Device Product ID (263):  1111, 4238

(I'm writing this after having fixed the problem, so the -1.000000 values may have been elsewhere) Those "-1.000000" values are the problem. To set those to the correct values, I typed:

xinput set-prop 11 "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1

Then I rebooted, and all was well!

I don't know why this is still a problem. It's been logged on bugs.kali.org more than once, and each one is marked as closed, with resolution being "won't fix".

  • I was reading about this problem a lot. This is a bug. you can find the problem that caused it. I'm not sure if it's connected but I think that my problem has caused because I was using a PC that's running 64 bit and I messed up with the partition disk settings , that caused that I could only install the 32 bit version of Kali Linux. The solution I found was to reset the partition disk settings and then I reinstalled to the 64 bit version of Kali Linux. – sara Jul 12 '17 at 6:33
  • You could always change the settings of the screen as you did:) – sara Jul 12 '17 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.