#StackBounty: #xorg #mouse #vmware #logitech Configure scrolling using Logitech Trackball on VMWare

Bounty: 250

Background

A Windows 10 host is running VMWare Workstation Pro 15.1.0. The guest OS is running X11. The pointer hardware is a Logitech Marble Mouse having configuration information on the Ubuntu community site. On Windows, scrolling by holding the small right button works with TrackballScroll. The following image shows how xorg references Logitech’s buttons:

Logitech Marble Mouse Trackball

The VMWare .vmx file has the following configuration settings, which allows more than 3 different buttons to trigger mouse events in the guest OS:

usb.generic.allowHID = "TRUE"
mouse.vusb.enable = "TRUE"
mouse.vusb.useBasicMouse = "FALSE"

With these lines all mouse button events are sent to the guest OS.

The output from xinput list in the guest OS is:

xinput list 
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ VMware VMware Virtual USB Mouse           id=7    [slave  pointer  (2)]
⎜   ↳ VMware VMware Virtual USB Mouse           id=8    [slave  pointer  (2)]
⎜   ↳ VirtualPS/2 VMware VMMouse                id=10   [slave  pointer  (2)]
⎜   ↳ VirtualPS/2 VMware VMMouse                id=11   [slave  pointer  (2)]

Running xinput test-xi2 --root details events for all four buttons 1, 8, 9, and 3 (from the above picture):

EVENT type 5 (ButtonRelease)
    device: 8 (8)
    detail: 1
EVENT type 5 (ButtonRelease)
    device: 8 (8)
    detail: 8
EVENT type 5 (ButtonRelease)
    device: 8 (8)
    detail: 9
EVENT type 5 (ButtonRelease)
    device: 8 (8)
    detail: 3

This shows that the button click events are being passed from the host to the guest successfully using device 8. Of slight concern is that there are two mice assigned the same name, but having different ids:

⎜   ↳ VMware VMware Virtual USB Mouse           id=7    [slave  pointer  (2)]
⎜   ↳ VMware VMware Virtual USB Mouse           id=8    [slave  pointer  (2)]

Problem

Scrolling by holding down the small right button (9) while moving the trackball fails. Running xinput test-xi2 --root shows the failure:

EVENT type 4 (ButtonPress)
    device: 8 (8)
    detail: 9
EVENT type 1 (DeviceChanged)
    device: 2 (7)
    reason: SlaveSwitch
    Reporting 7 classes:
        Class originated from: 7. Type: XIButtonClass
        Buttons supported: 11
X Error of failed request:  BadAtom (invalid Atom parameter)
  Major opcode of failed request:  17 (X_GetAtomName)
  Atom id in failed request:  0x282
  Serial number of failed request:  34
  Current serial number in output stream:  34
        Button labels: "Button Left" "Button Middle" "Button Right"

The file .../xorg.conf.d/50-trackball.conf configures X11 as follows:

Section "InputClass"
  Identifier    "Logitech Marble Mouse"
  MatchIsPointer "true"
  #MatchProduct  "Mouse"
  #MatchVendor   "VMWare"
  Driver        "libinput"
  Option        "ScrollMethod"        "button"
  Option        "ScrollButton"        "9"
  Option        "MiddleEmulation"     "true"
  Option        "HorizontalScrolling" "false"
  Option        "ButtonMapping"       "1 2 3 4 5 6 7 9 8"
EndSection

The output from xinput list-props 7 shows:

Device 'VMware VMware Virtual USB Mouse':
    Device Enabled (124):   1
    Coordinate Transformation Matrix (126): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Calibration Matrix (261):  1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Calibration Matrix Default (262):  1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Natural Scrolling Enabled (263):   0
    libinput Natural Scrolling Enabled Default (264):   0
    libinput Send Events Modes Available (244): 1, 0
    libinput Send Events Mode Enabled (245):    0, 0
    libinput Send Events Mode Enabled Default (246):    0, 0
    libinput Left Handed Enabled (265): 0
    libinput Left Handed Enabled Default (266): 0
    libinput Scroll Methods Available (267):    0, 0, 1
    libinput Scroll Method Enabled (268):   0, 0, 1
    libinput Scroll Method Enabled Default (269):   0, 0, 1
    libinput Button Scrolling Button (270): 9
    libinput Button Scrolling Button Default (271): 2
    libinput Middle Emulation Enabled (272):    0
    libinput Middle Emulation Enabled Default (273):    0
    Device Node (247):  "/dev/input/event5"
    Device Product ID (248):    3599, 3
    libinput Drag Lock Buttons (274):   <no items>
    libinput Horizontal Scroll Enabled (275):   1

Question

What needs to change in the X Configuration File so that the small right button when held allows vertical scrolling using the trackball in an X11 session that’s running inside VMWare?

Related

Related links include:

Additional Details

Some extra information about attempts to resolve the problem and ways that work but are less than ideal.

Disconnect from Host

Note that it is possible to disconnect the mouse from the host OS by using the Connect option, which then permits scrolling as desired. The downside is that this makes switching between the guest and host systems a bit awkward in that it takes several steps to switch between systems. Ideally, the guest OS would use a single mouse click to give it focus, scrolling would “just work”, then Ctrl+Alt to release control back to the host OS.

Disconnect from Host

Changing Driver

Changing the driver from libinput to evdev does not work, such as:

  Driver        "evdev"

xinput

Even though VMWare lists two entries for the USB Mouse, id=8 does not appear to have any effect; whereas, id=7 can be disabled using:

xinput set-prop 7 124 0

Where 7 is the mouse ID, 124 is the Device Enabled setting, and 0 indicates false. This disables the pointer altogether; changing 0 to 1 re-enables the pointer.


Get this bounty!!!

#StackBounty: #xorg #window-manager #xcursor mwm cursor size

Bounty: 100

I have problems with cursor size on one of my Xorg screens on CentOS 7. I have two screens. One runs xfce4 window manager and desktop, while another runs mwm window manager. This is a custom setup, which allows a fullscreen Motif application to run on screen with mwm, and other apps on xfce4 screen. I also have special kind of monitor for Motif app, which is 2048×2048 resolution.

The problem I have is that all except one cursors are to big on mwm, while on xfce4 they are all normal. Cursor shaped “X” on desktop background is normal size while others are oversized.

Here’s a picture where an one of oversizeds cursor can be seen:
enter image description here

How can I change the size of cursors on mwm screen? I have tried Xcursor.size in Xresources, but with no effect.

Here are some more pictures showing cursor sizes.
enter image description here
enter image description here
enter image description here


Get this bounty!!!

#StackBounty: #18.04 #xorg #screen #vnc #display-manager Ubuntu 18.04 VNC/Vino stops refreshing when turning display off

Bounty: 50

After upgrading from 16.04 to 18.04 I’m having trouble with VNC/Vino.

I can connect via VNC (by enabling the built-in ‘Screen Sharing’ option), but as soon as I turn of the local display (server is connected to a TV, not a regular monitor), the VNC connection stops working for anything but the active windows. In other words: the background and the dock are not refreshed and the connection becomes very difficult to use (see screenshot).

Anyone has any idea where to look for a solution? I saw some posts about adding a dummy monitor, but that does not seem to apply to my case.
screenshot


Get this bounty!!!

#StackBounty: #gnome #18.04 #keyboard #xorg Keyboard repeat/delay is reset occasionally in Ubuntu 18.04

Bounty: 50

My keyboard repeat & delay settings are occasionaly reverted to slow (apparently default) values under Xorg in Ubuntu 18.04.

In this situation, the actual values (as obtained by xset q) are

auto repeat delay:  500    repeat rate:  30

whereas gsettings get org.gnome.desktop.peripherals.keyboard delay returns:

uint32 250

If I afterwards run gsettings set org.gnome.desktop.peripherals.keyboard delay 250, the keyboard delay / repeat settings are correctly set (xset q then returns auto repeat delay: 250).

There seem to be several triggers for the behavior, one reproducibly being a suspend & wakeup cycle; I wasn’t able to reproduce others yet.

My system is a rather freshly installed Ubuntu 18.04 on an A10-5800K with an A78M-E35 board in BIOS (non EFI) mode.

Any hints would be highly appreciated.


Get this bounty!!!

#StackBounty: #drivers #nvidia #xorg NVIDIA: GPU exception occured durint X server init

Bounty: 100

My GPU is the GTX870M. I did a fresh install of Ubuntu 18.04. All I did was:

sudo apt-get update
sudo apt-get upgrade
sudo ubuntu-drivers autoinstall
nvidia-xconfig
reboot

It installed the nvidia-390 driver. Now whenever I try to start the X server with startx it fails. I can still use Wayland. Here is what I tried (in recovery mode):

startx

Output:

X.Org X Server 1.20.1
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-140-generic x86_64 Ubuntu
Current Operating System: Linux <censored>-PC 4.18.0-22-generic #23~18.04.1-Ubuntu SMP Thu Jun 6 08:37:25 UTC 2019 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.18.0-22-generic root=UUID=0d1d9304-4cd6-41f6-80b2-3562578a252e ro recovery nomodeset
Build Date: 27 November 2018  05:27:12PM
xorg-server-hwe-18.04 2:1.20.1-3ubuntu2.1~18.04.1 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.34.0
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat Jun 22 13:47:29 2019
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE) 
Fatal server error:
(EE) NVIDIA: A GPU exception occurred during X server initialization(EE) 
(EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

/var/log/Xorg.0.log: https://pastebin.com/ygxRKPpg

In these logs, 2 things caught my eyes:

[   119.994] (II) NVIDIA(0): Virtual screen size determined to be 640 x 480
[   119.994] (WW) NVIDIA(0): Unable to get display device for DPI computation.

and

[   119.994] (--) NVIDIA(0): Memory: 3145728 kBytes
[   119.994] (II) NVIDIA: Using 6144.00 MB of virtual memory for indirect memory

It seems like my display device is not correctly detected and/or that X server is trying to use too much memory?

dmesg output: https://pastebin.com/fcYMPrUB

Relevant parts:

[  120.275346] NVRM: GPU at PCI:0000:01:00: GPU-c588f20e-6b26-3352-5b81-666db3c970a2
[  120.275348] NVRM: Xid (PCI:0000:01:00): 44, Ch 00000000, engmask 00000101, intr 10000000
[  120.793329] NVRM: Xid (PCI:0000:01:00): 31, Ch 00000008, engmask 00000111, intr 10000000

I checked what the Xid meant: https://docs.nvidia.com/deploy/xid-errors/index.html

31 GPU memory page fault

44 Graphics Engine fault during context switch

nvidia-smi output:

Sat Jun 22 14:23:52 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.116                Driver Version: 390.116                   |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 870M    Off  | 00000000:01:00.0 N/A |                  N/A |
| N/A   83C    P0    N/A /  N/A |      0MiB /  3018MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0                    Not Supported                                       |
+-----------------------------------------------------------------------------+

Any help is appreciated, thanks.


Get this bounty!!!

#StackBounty: #xorg #resolution #scrolling #virtual-desktop How to disable fullscreen mouse scrolling?

Bounty: 50

On programs that run in “fullscreen” mode, when I change the “fullscreen” resolution to something that is lower than what my desktop resolution is, I can scroll past the edges of the program by moving my mouse to the edge of the screen and see my desktop. This is really buggy and actually crashed my system, on top of being incredibly annoying.

How do you disable this? I don’t even know what it is called, and I can’t find ANYTHING except for this, really, unanswered question from 2003: https://www.linuxquestions.org/questions/linux-software-2/disabling-virtual-screen-mouse-scrolling-in-x-111237/

If anybody wants to see an example, then you can probably do it yourself by installing SuperTux 2, changing the fullscreen resolution to something like 640×480, then checking the fullscreen box, and moving your mouse to the edge of the screen.


Get this bounty!!!

#StackBounty: #drivers #nvidia #graphics #xorg #gpu Using P104-100 GPU on Ubuntu (as single or second GPU)

Bounty: 50

What I have:

GA-B250-Fintech motherboard

Ubuntu 18.04 (but I’m ready to reinstall to any version if it will work)

$ uname -r
4.18.0-18-generic

And P104-100 video card.

$ lspci | grep NVIDIA
01:00.0 3D controller: NVIDIA Corporation GP104 [P104-100] (rev a1)

gcc --version
gcc (Ubuntu 7.4.0-9ubuntu1~18.04.york0) 7.4.0

The problem:
every time I install nvidia drivers, Ubuntu stop loading. Usually with message:

started user manager uid 121.

I plug out P104-100 and plug in GTX 1060, this works correctly:

~$ nvidia-smi
Mon May 13 22:56:17 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.74       Driver Version: 418.74       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 106...  Off  | 00000000:01:00.0 Off |                  N/A |
|  0%   42C    P8     6W / 120W |      0MiB /  6078MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

Then I tried plug in P104-100 as second card using another slot, and Ubuntu stops loading: freeze with message

Started GNOME Display Manager.

P.S. Using lshw -C display I found both cards have
physical id: 0
Can it be a reason?


Question:
How to install both cards on Ubuntu?
I think if I successfully install P104-100 as single card the same solution could be for installing both of them.


P.S. I found some solution about editing xconf for using on multiple GPUs: for example.
But it did not help.


Get this bounty!!!

#StackBounty: #ubuntu #xorg #nvidia #troubleshooting xrandr doesn't list display port

Bounty: 100

My laptop (Thinkpad W530) has a VGA and a mini DP port (OR a DP port via docking station). Ubuntu 18.04, xrandr in particular doesn’t seem to recognize the DP. For example if I run xrandr gives me

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
LVDS-1-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080     60.00*+  59.97    59.96    59.93    50.00  
   1680x1050     59.95    59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      60.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   800x512       60.17  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   720x450       59.89  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   680x384       59.80    59.96  
   640x400       59.88    59.98  
   576x432       60.06  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
VGA-1-1 disconnected (normal left inverted right x axis y axis)

So not only the external monitor on DP isn’t recognized but even the port itself doesn’t seem to be recognized (it doesn’t show something like “DP… disconnected”).

If I check prime-select query I get nvidia. I am using nvidia driver 430.

I should add that the external monitor works with a live usb stick and that it worked in the past. However I didn’t use it for several month, so it might be that I screwed something up in the meantime. Thus I don’t think that there is not a bug but a misconfiguration somewhere.

What can I do to identify the source of the problem and how can I fix it (but I don’t want to reinstall the entire system)?

If I ask nvidia-settings to detect external screens it also finds nothing.

I also tried to change in BIOS settings from optimus to discrete graphics. But then I wasn’t even able to login to my graphical interface (I am using xmonad as WM without display manager, just using startx).

Here is my /var/log/Xorg.0.log.

Output of lspci -nnk | grep -iA2 vga:

lspci -nnk | grep -iA2 vga 
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09)
    Subsystem: Lenovo 3rd Gen Core processor Graphics Controller [17aa:21f5]
    Kernel driver in use: i915
--
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107GLM [Quadro K2000M] [10de:0ffb] (rev a1)
    Subsystem: Lenovo GK107GLM [Quadro K2000M] [17aa:21f5]
    Kernel driver in use: nvidia

output of inxi -Gx:

Graphics:  Card-1: Intel 3rd Gen Core processor Graphics Controller bus-ID: 00:02.0
           Card-2: NVIDIA GK107GLM [Quadro K2000M] bus-ID: 01:00.0
           Display Server: X.Org 1.19.6 drivers: modesetting,nvidia (unloaded: fbdev,vesa,nouveau)
           Resolution: 1920x1080@60.00hz
           OpenGL: renderer: Quadro K2000M/PCIe/SSE2 version: 4.6.0 NVIDIA 430.09 Direct Render: Yes

and sudo lshw -class video | grep driver= gives:

   configuration: driver=nvidia latency=0
   configuration: driver=i915 latency=0

lsmod | grep nvidia gives

lsmod | grep nvidia
nvidia_uvm            815104  0
nvidia_drm             45056  4
nvidia_modeset       1101824  1 nvidia_drm
nvidia              18448384  98 nvidia_uvm,nvidia_modeset
drm_kms_helper        167936  2 nvidia_drm,i915
ipmi_msghandler        53248  2 ipmi_devintf,nvidia
drm                   401408  7 drm_kms_helper,nvidia_drm,i915

I also checked lsmod vesa and lsmod nouveau to see if there was a fallback to vesa or nouveau. But this results in no output.


Get this bounty!!!