Mouse issues with timeseries plots and windows screensize in Ubuntu

When viewing a multichannel time series (say EEG), the mouse pointer and time selection (the red vertical line that appears when you click) only seem to work if you never resize the window. As soon as the time series window is resized (say maximized) then clicking in the time series plot results in the time marker appearing elsewhere (usually to the left). It looks as if some strange miscalibration occurs.

I was going to attach three screenshots:

  1. Initial shot when time series first opens. Note that the mouse pointer and redline are coincident.

  2. Resized the window. Clicked where pointer is. Redline appears far to the left.

  3. Restored window to original size. Clicked where pointer is. Redline is still miscalibrated.

However, as a new user apparently I can only submit one. So I have submitted one where the pointer is visible and the red line clearly is offset to the left.

In our testing, any change in window size (larger or smaller) results in pointer/redline mismatch.

OS: Ubuntu 18.04

MatLAB ver:
ver
----------------------------------------------------------------------------------------------------
MATLAB Version: 8.5.0.197613 (R2015a)
MATLAB License Number: 841059
Operating System: Linux 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
----------------------------------------------------------------------------------------------------
MATLAB                                                Version 8.5        (R2015a)
Simulink                                              Version 8.5        (R2015a)
Bioinformatics Toolbox                                Version 4.5.1      (R2015a)
Communications System Toolbox                         Version 6.0        (R2015a)
Computer Vision System Toolbox                        Version 6.2        (R2015a)
Control System Toolbox                                Version 9.9        (R2015a)
Curve Fitting Toolbox                                 Version 3.5.1      (R2015a)
DSP System Toolbox                                    Version 9.0        (R2015a)
Embedded Coder                                        Version 6.8        (R2015a)
Global Optimization Toolbox                           Version 3.3.1      (R2015a)
Image Acquisition Toolbox                             Version 4.9        (R2015a)
Image Processing Toolbox                              Version 9.2        (R2015a)
Instrument Control Toolbox                            Version 3.7        (R2015a)
MATLAB Coder                                          Version 2.8        (R2015a)
MATLAB Compiler                                       Version 6.0        (R2015a)
Mapping Toolbox                                       Version 4.1        (R2015a)
Neural Network Toolbox                                Version 8.3        (R2015a)
Optimization Toolbox                                  Version 7.2        (R2015a)
Parallel Computing Toolbox                            Version 6.6        (R2015a)
Partial Differential Equation Toolbox                 Version 2.0        (R2015a)
Phased Array System Toolbox                           Version 3.0        (R2015a)
Signal Processing Toolbox                             Version 7.0        (R2015a)
SimMechanics                                          Version 4.6        (R2015a)
Simscape                                              Version 3.13       (R2015a)
Simulink Control Design                               Version 4.2        (R2015a)
Statistics and Machine Learning Toolbox               Version 10.0       (R2015a)
Symbolic Math Toolbox                                 Version 6.2        (R2015a)
Wavelet Toolbox                                       Version 4.14.1     (R2015a)


brainstorm
 
BST> Starting Brainstorm:
BST> =================================
BST> Version: 27-May-2017
BST> Compiling main interface files...
BST> Emptying temporary directory...
BST> Deleting old process reports...
BST> Loading configuration file...
BST> Checking internet connectivity... failed
BST> Could not check for Brainstorm updates.
BST> Initializing user interface...
BST> Starting OpenGL engine... hardware
BST> Reading plugins folder...
BST> Loading current protocol...
BST> =================================

Any help much appreciated.

Best

Rudolph
rudolph.pienaar@childrens.harvard.edu
rudolph.pienaar@gmail.com

Hi Rudolph,

This could be related to this issue as well:

We've had other users complaining about errors in cursor positions with Ubuntu desktops.
I wonder if the window manager could be responsible for this. In my experience, Unity was terribly not standard, and was causing many issues with the Java environments on which Matlab interface is built.
@MartinC @jeremym: What do you think?

Which window manager are you using?
Could you try with other WM, simpler or more stable ones, such as "Gnome classic", XFCE or LXDE?

Thanks
Francois

Doesn’t sound like exactly the same issue, but might be related. Mine is triggered by opening a second figure, which always resets the position of the cursor to the leftmost of the first figure on click. It also only occurs in dual monitor setups on Linux.

One thing to note is that @deblo is on 18.04, which uses GNOME Shell by default (Unity has been discontinued). GNOME Shell also does funny things with window management though. All of us here are running Ubuntu 16.04 with the MATE desktop (which is a fork of GNOME 2.x). Window manager (I use Mutter) and display server protocol (all of us still use X, I don’t know if anyone has tested Brainstorm on Wayland) could also matter. That being said, I tested all the common desktop environment/window manager setups, and that didn’t resolve my issue. @MartinC was pretty close to a solution though.

Thank you for the suggestions. Problem is now “fixed” – or at least there seems to be a workaround.

It seems definitely related to recent versions of GNOME (or GNOME/gtk-related) window managers/libraries (GNOME desktop, Unity, possibly budgie (but I didn’t test)). For example, the mouse pointer/timeline issue didn’t exist on older versions of the gtk-libs on older Ubuntu (15.10 and 16.04) running Unity. We had a couple of old Ubuntu boxes around that I was able to try.

I installed KDE/plasma as a test on several machines and the issue was resolved in KDE. Mouse pointer and redline were always matched no matter how I resized time series windows etc. So this is confirmation that the problem does not occur in KDE.

I have often bemoaned the use of Java for the MatLAB interface and this is another nail in that coffin for me, alas. Right now my pet peeve is running MatLAB on HiDPI displays on Linux… unreadable and small fonts, tiny icons…

Nonetheless, many many thanks for the suggestions. I think this fixes it.

Indeed, using Matlab on new systems, or changing Matlab versions is often complicated.
The issue is most of time related with the fact that Matlab relies on outdated JVMs bundled with its distribution. The bugs are fixed and support for new graphic systems are included in newer Java versions, but it takes a few years to the Mathworks to start using them, and Matlab never uses by default the JVM installed on the system.

If you feel geeky enough and really want to use the last trendy WM, you could try installing the latest Java version and force Matlab using it. At some point this was possible on Linux. Maybe that would solve the issue…