Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatpak Octave 5.2.0 crashes when plotting on Linux Mint 18.3 #108

Closed
GreyMatter17 opened this issue May 31, 2020 · 9 comments
Closed

Flatpak Octave 5.2.0 crashes when plotting on Linux Mint 18.3 #108

GreyMatter17 opened this issue May 31, 2020 · 9 comments

Comments

@GreyMatter17
Copy link

I use LM18.3 (MATE) and until recently used Octave 4.2.2 without problems. That version was installed from ppa:octave/stable, but as there is no PPA version for Octave 5.2.0, I installed the Flatpak version from Flathub using Mint's Software manager. I can create/edit and run Octave programs, but there are problems whenever I try to issue a plot (or other graphics display) command.

  1. The default graphics toolkit used by Octave on startup is 'qt', and attempting to open a graphics window (for example with a "figure" command) with this default causes an immediate crash of Octave.
  2. If I instead set the Octave graphics toolkit to 'gnuplot', then a "figure" command will open the graphics window, but with the lengthy error message:

Qt: Session management error: None of the authentication protocols specified are supported
QApplication: invalid style override 'gtk' passed, ignoring it.
Available styles: Breeze, Windows, Fusion
qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlagsQSurfaceFormat::FormatOption(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
No XVisualInfo for format QSurfaceFormat(version 2.0, options QFlagsQSurfaceFormat::FormatOption(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1,stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
Falling back to using screens root_visual.

  1. A subsequent "plot" command will produce the required plot in the graphics window, but strangely, the Plot window title also includes the suffix "(as Superuser)".

  2. If I then set the Octave graphics toolkit to 'fltk', a "figure" command will open a graphics window, but with the error message:

Insufficient GL support

  1. A subsequent plot command fails, with the error message

error: unable to plot due to insufficient OpenGL support

Octave itself does not crash in this case.

Is there an openGL, or other graphics, dependency that is not satisfied when Flatpak Octave 5.2.0 is installed, or is there some setting that should be adjusted to allow error-free production of graphics?

Some relevant system information is as follows:

System:    Host: argon Kernel: 4.15.0-101-generic x86_64 (64 bit)
           Desktop: MATE 1.18.0  Distro: Linux Mint 18.3 Sylvia
CPU:       Quad core Intel Core i5-6500 (-MCP-) speed/max: 800/3600 MHz
Graphics:  Card: Intel HD Graphics 530
           Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
           Resolution: [email protected], [email protected]
           GLX Renderer: Mesa DRI Intel HD Graphics 530 (Skylake GT2)
           GLX Version: 3.0 Mesa 18.0.5
Info:      Processes: 206 Uptime: 4:56 Memory: 1597.0/31590.4MB
           Client: Shell (bash) inxi: 2.2.35 
@mtmiller
Copy link
Collaborator

There certainly seems like a problem with OpenGL and Flatpak and your system configuration. The "session management error" also indicates some problem with permissions and your desktop environment. You'll most likely have to investigate further on your system, since Octave graphics work normally on vanilla systems.

@GreyMatter17
Copy link
Author

I would have described my system as "vanilla": a clean installation of Linux Mint 18.1, subsequently upgraded without issues to LM18.2 then LM18.3, which has been behaving completely stably since 2018. The Intel HD Graphics 530 are integrated on the motherboard, not part of some exotic graphics card. I had no problems with the "native" Octave version 4.2.2.
Problems with graphics windows in flatpak Octave 5.2.0 were obvious immediately after installation, only a few days ago. In practice I have very few flatpaks installed. Both of the other graphics-related flatpaks (Inkscape 1.0 and Gimp 2.10.18) seem to behave normally. The complete list of installed flatpaks is:

$ flatpak list
Ref                                               Options       
org.gimp.GIMP/x86_64/stable                       system,current
org.inkscape.Inkscape/x86_64/stable               system,current
org.octave.Octave/x86_64/stable                   system,current
org.freedesktop.Platform.GL.default/x86_64/19.08  system,runtime
org.freedesktop.Platform.VAAPI.Intel/x86_64/19.08 system,runtime
org.freedesktop.Platform.ffmpeg/x86_64/1.6        system,runtime
org.freedesktop.Platform.openh264/x86_64/2.0      system,runtime
org.gnome.Platform/x86_64/3.28                    system,runtime
org.gnome.Platform/x86_64/3.36                    system,runtime
org.kde.Sdk/x86_64/5.14                           system,runtime

I did wonder whether issue #106 is relevant, since I know Linux Mint 18.3 does not natively support Wayland, but I don't have the skills or time to investigate this further.
Linux Mint 20 is due for release quite soon, and will support Octave 5.2.0 natively since it is based on Ubuntu 20.04, so I think the simplest option for me is to wait until I can install LM20, and then hope the graphics problems with Octave will automagically disappear.
Finally, I do find it strange that any graphics window opened by flatpak Octave (with the 'gnuplot' graphics toolkit), and indeed the flatpak Gimp main GUI window, both append the suffix "(as superuser)" to the window titles. What is the reason for this?
In principle, I dislike programmes that use "superuser" privileges unless absolutely necessary. In that respect, I would prefer to use a "native" version of a programme that a I can run as a "normal" user, instead of a flatpak version that requires "superuser" privileges.

@mtmiller
Copy link
Collaborator

mtmiller commented Jun 1, 2020

All good info and questions.

Gimp and Inkscape are likely not affected because they don't use OpenGL graphics. You could try another OpenGL Flatpak, for example Blender or Godot Engine. I don't use either of these, just suggestions to try.

I doubt #106 is relevant, because I can reproduce that one, but not this one.

I agree, the "as superuser" in the title is strange, and I can't reproduce that either. My best guess is that you are running flatpak as root or with sudo, or that flatpak is somehow configured to run as root automatically on your system. That doesn't seem normal, and if true may help explain the graphics problem.

@mtmiller
Copy link
Collaborator

mtmiller commented Jun 1, 2020

After a little light research, the "as superuser" title tag may be a misdirection and not relevant. This may just be a MATE desktop quirk, where your DE is trying to determine if your session owns the program, and since it's in a container, it defaults to thinking it's running as root. See flatpak/flatpak#1557.

@mtmiller
Copy link
Collaborator

mtmiller commented Jun 1, 2020

Here is the upstream MATE issue for the "as superuser" label mate-desktop/marco#301.

@GreyMatter17
Copy link
Author

I'm relieved that the "(as superuser)" suffix is misleading/spurious, although it's still a bit puzzling (to me) why the suffix only appears on the title of graphics windows opened by Octave, and not on the main GUI window for Octave itself.

The only other relevant information I can think of at the moment is that the Start menu launcher for Octave invokes the command
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/octave --file-forwarding org.octave.Octave --gui @@ %f @@
where

$ flatpak --version
Flatpak 1.0.3

I do recall that when the Octave Flatpak was installed using the Mint Software Manager, it did not explicitly ask me for password authentication before beginning the installation. This now strikes me as a bit odd, since installation or update of "native" programs with the Synaptic Package Manager invariably requires password authentication. Nevertheless, the main Flatpak Octave files were installed into sub-folders of
/var/lib/flatpak/app/org.octave.Octave/current
and
/var/lib/flatpak/app/org.octave.Octave/x86_64
These folders are part of the main system folder tree, and their contents all seem to be owned by "root".

@mmurrian
Copy link

mmurrian commented Jul 28, 2020

If relevant, I experienced an immediate crash in Flatpak Octave 5.2.0 on Ubuntu 18.04 when executing "figure". This came after upgrading nvidia drivers from 435 -> 440 (through dpkg). After running "flatpak update", which seemed to also update a flatpak version of nvidia drivers, the crash was resolved.

@vatosarmat
Copy link

@mmurrian solution helped me on Ubuntu 18.04 with Octave 6.1. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@mtmiller @vatosarmat @mmurrian @GreyMatter17 and others