Page 1 of 2

Mathematica start-up crashing RDP session

Posted: Sat Jan 02, 2016 7:05 pm
by pistronaut
Hi all,

First of all, I'm a Pi noob, so please let me know if I'm doing things wrong :)

My problem is very similar to the one described here: viewtopic.php?f=94&t=122306

In my case I am running the xrdp service on my Pi 2 and connecting to it using Microsoft Remote Desktop; i.e. I'm running my Pi headless.

Everything works fine using this set-up apart from Mathematica, which crashes the RDP session EVERY time that the application is started. Basically, the RDP session stays open long enough for me to see that Mathematica is starting, even getting as far as the 'Opening Welcome Screen' message and a brief of glimpse of the Mathematica GUI window, before my RDP session is closed.

When I re-log back in using RDP, the Pi is working fine but it's as if Mathematica was never started; e.g. no error messages indicating it has crashed.

I believe that Mathematica and the underlying Wolfram Language have a client/server relationship with each other, and wonder if that might somehow be the cause of this problem? Unfortunately, the solution posted at the above URL will not work for me as I already have the 2 mentioned lines in my /etc/network/interfaces file.

I really do need to run in headless mode so any help and/or solution would be greatly appreciated.

Many thanks
Will

Re: Mathematica start-up crashing RDP session

Posted: Sat Jan 02, 2016 9:43 pm
by pistronaut
Solved (at least for me): I've changed over to using vncserver on the Pi and connect to it using VNC Viewer - Mathematica now works splendidly...!

But... now I'm getting an annoying "GDBus" error message that seems to be widely associated with VNC... Is Linux frustrating or what!

Will

Re: Mathematica start-up crashing RDP session

Posted: Sat Jan 02, 2016 10:28 pm
by QuietZone
But... now I'm getting an annoying "GDBus" error message...
There's a fix for that - you go into one of the "preferences" menus in LXDE (or pcmanfm, whatever) and unclick something (something that says something like "Try to do GDBus polling").

I did it long ago one one of the machines that I VNC into - I don't remember the details (obviously), but it is very obvious once you get to the right menu.

Re: Mathematica start-up crashing RDP session

Posted: Sat Jan 02, 2016 11:52 pm
by pistronaut
hi QuietZone, I think you're probably referring to the details that I found at the following 2 links, but there are many more where these came from.

http://raspberrypi.stackexchange.com/qu ... n-start-up

http://helloraspberrypi.blogspot.co.uk/ ... kit1e.html

In summary, go into the terminal, type in 'lxsession-edit', un-tick the LXPolKit option, reboot. Only this doesn't work, because on my version of raspbian there is no LXPolKit option. I can't go to Preferences->Desktop Session Settings, because there is no such option in Preferences.

I went into 'add/remove software', searched for 'LXPolKit', and lo and behold found it, but it's not installed. Clicking the tick to install it, un-ticks a load of other already ticked options. I persevered and tried to install LXPolKit anyway, but the installation process says 'authenticating' and goes nowhere. (NB - my thinking here was to install it so that I would, hopefully, have something to un-tick from having entered 'lxsession-edit' as above.

None of this has worked and I'm at a complete loss as to how to proceed...

Will

Re: Mathematica start-up crashing RDP session

Posted: Wed Feb 10, 2016 1:20 pm
by geev03
The problem continues even after the recent upgrades, wolfram-engine_10.3.1 in "RASPBIAN JESSIE,Full desktop image based on Debian Jessie,Version:February 2016,Release date:2016-02-09,Kernel version:4.1"
Enabled the experimental GL driver for desktop but there is no change to crashing of xrdp session...

Re: Mathematica start-up crashing RDP session

Posted: Fri Mar 04, 2016 7:37 pm
by jpsa
This happens for me too, on my brand new shiny RPi 3. Clean install of raspbian from NOOBS, then install xrdp. Remote desktop in from a Windows 10 machine and try to start Mathematica. The remote session disconnects, and after reconnecting there's no sign of Mathematica running. :(

Any suggestions would be welcome!

Re: Mathematica start-up crashing RDP session

Posted: Thu Mar 17, 2016 10:37 am
by Sandros94
I'm starting to think that they did this on porpose, so you can not rdp in and use mathematica, instead you have to buy one of their service for using it on another machine :S

I hope really not to be like this...

Re: Mathematica start-up crashing RDP session

Posted: Thu Mar 17, 2016 4:26 pm
by abigpancake
Hi

I also have this problem with RPi 3 with RDP and the latest release. I would like to use a remote desktop client to connect to my RPi 3 and run Mathematica rather than having to hard wire my RPi.

Re: Mathematica start-up crashing RDP session

Posted: Thu Mar 17, 2016 7:37 pm
by dgordon42
I have Mathematica running on a Pi B+ with MS RDP on a Windows 10 Computer. I did not do anything special to get it running.
I have a Pi 3 on the way, due Monday 21 Mar, and I will try again with the same SD card in the Pi 3, and report back then.
Software versions:

Code: Select all

[email protected] ~ $ mathematica --version
10.3
[email protected] ~ $ xrdp --version

xrdp: A Remote Desktop Protocol server.
Copyright (C) Jay Sorg 2004-2011
See http://xrdp.sourceforge.net for more information.
Version 0.6.1

[email protected] ~ $ uname -a
Linux RaspberryPlus 4.1.19+ #853 Wed Mar 9 18:04:48 GMT 2016 armv6l GNU/Linux
[email protected] ~ $ vcgencmd version
Mar  9 2016 18:15:17
Copyright (c) 2012 Broadcom
version 3a754304b032a5298ee7889b179c667bbc75dec5 (clean) (release)
Dave.

Re: Mathematica start-up crashing RDP session

Posted: Fri Mar 18, 2016 12:57 am
by jpsa
Yes, it works on my B+ too, but not on my 3 :(

Re: Mathematica start-up crashing RDP session

Posted: Sun Mar 20, 2016 2:30 pm
by drupol
I've found the fix here: http://ha5kfu.sch.bme.hu/node/193

Problem solved by running: sudo apt-get install libgl1-mesa-swx11

Re: Mathematica start-up crashing RDP session

Posted: Sun Mar 20, 2016 2:45 pm
by jpsa
Oooo... worked for me too :)

Re: Mathematica start-up crashing RDP session

Posted: Sun Mar 20, 2016 3:02 pm
by jpsa
OK... if I've understood this properly, the effect of that installation is to replace the Pi's hardware-assisted 3D rendering library with a pure software version. This will presumably adversely affect performance (though, poor performance is better than a crash!).

Presumably this suggests that the underlying problem is a bug in the hardware-assisted 3D library? Does anyone know how to report this so that it can be fixed?

Re: Mathematica start-up crashing RDP session

Posted: Wed Mar 23, 2016 11:46 am
by drupol
Indeed that would be great to fix this properly.

What can we do ?

Re: Mathematica start-up crashing RDP session

Posted: Wed Mar 23, 2016 12:39 pm
by dgordon42
Reference my post above

New Pi 3 B arrived :D
Updated my SD card firmware in my Pi B+ to:

Code: Select all

[email protected] ~ $ uname -a
Linux RaspberryThree 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux
[email protected] ~ $ vcgencmd version
Mar 15 2016 14:51:23
Copyright (c) 2012 Broadcom
version 1bf9a9a77026af9128a339c82d72e331d3532ee4 (clean) (release)
I have Mathematica running using RDP from Windows 10 & Windows XP Computers.
drupol wrote:I've found the fix here: http://ha5kfu.sch.bme.hu/node/193
Problem solved by running: sudo apt-get install libgl1-mesa-swx11
My Pi 3 B does not have libgl1-mesa-swx11 installed, but it does have libgl1-mesa-glx installed. I don't know if this is relevant or not.

Dave.

Re: Mathematica start-up crashing RDP session

Posted: Wed Mar 23, 2016 1:08 pm
by jpsa
Curious!

My pi3 also had libgl1-mesa-glx (I think it's the hardware accelerated version of the library) installed to start with, i.e. when Mathematica was failing, but it was uninstalled automatically when I installed libgl1-mesa-swx11.

I had also done an "apt-get dist-upgrade" before posting in the first place, which left my pi3 in this state:

Code: Select all

[email protected]:~ $ mathematica --version
10.3
[email protected]:~ $ xrdp --version

xrdp: A Remote Desktop Protocol server.
Copyright (C) Jay Sorg 2004-2011
See http://xrdp.sourceforge.net for more information.
Version 0.6.1

[email protected]:~ $ uname -a
Linux pi3 4.1.18-v7+ #846 SMP Thu Feb 25 14:22:53 GMT 2016 armv7l GNU/Linux
[email protected]:~ $ vcgencmd version
Feb 25 2016 14:25:47 
Copyright (c) 2012 Broadcom
version dea971b793dd6cf89133ede5a8362eb77e4f4ade (clean) (release)
[email protected]:~ $ 
I.e. slightly older than yours, so presumably there've been more updates since which may be relevant. Does dist-upgrade do the Broadcom firmware as well, or do I need to do that separately somehow?

I guess I should try re-instating libgl1-mesa-glx and then see if a new dist-upgrade fixes Mathematica.

Re: Mathematica start-up crashing RDP session

Posted: Wed Mar 23, 2016 1:17 pm
by drupol
Still crashing after reinstalling libgl1-mesa-glx and doing a dist-upgrade.

Code: Select all

[email protected]:~ $ Mathematica --version
10.3
[email protected]:~ $ uname -a
Linux rpi8gb 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux
[email protected]:~ $ xrdp --version

xrdp: A Remote Desktop Protocol server.
Copyright (C) Jay Sorg 2004-2011
See http://xrdp.sourceforge.net for more information.
Version 0.6.1

[email protected]:~ $ vcgencmd version
Mar 15 2016 14:47:28 
Copyright (c) 2012 Broadcom
version 1bf9a9a77026af9128a339c82d72e331d3532ee4 (clean) (release)
[email protected]:~ $

Re: Mathematica start-up crashing RDP session

Posted: Wed Mar 23, 2016 1:24 pm
by jpsa
OK, I've done that. Now at versions

Code: Select all

[email protected]:~ $ mathematica --version
10.3
[email protected]:~ $ xrdp --version

xrdp: A Remote Desktop Protocol server.
Copyright (C) Jay Sorg 2004-2011
See http://xrdp.sourceforge.net for more information.
Version 0.6.1

[email protected]:~ $ uname -a
Linux pi3 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux
[email protected]:~ $ vcgencmd version
Mar 15 2016 14:47:28 
Copyright (c) 2012 Broadcom
version 1bf9a9a77026af9128a339c82d72e331d3532ee4 (clean) (release)
[email protected]:~ $ 
and Mathematica is back to crashing the session at startup again :(

Re: Mathematica start-up crashing RDP session

Posted: Wed Mar 23, 2016 6:16 pm
by dgordon42
By any chance, do you guys have the new experimental graphic drivers enabled, that is have you got

Code: Select all

dtoverlay=vc4-kms-v3d
in /boot/config.txt? It could cause problems if you do.

Dave.

Re: Mathematica start-up crashing RDP session

Posted: Wed Mar 23, 2016 8:54 pm
by drupol
dgordon42 wrote:By any chance, do you guys have the new experimental graphic drivers enabled, that is have you got

Code: Select all

dtoverlay=vc4-kms-v3d
in /boot/config.txt? It could cause problems if you do.

Dave.
My Pi doesn't boot when I add this line. I will check tomorrow.

Re: Mathematica start-up crashing RDP session

Posted: Wed Mar 23, 2016 11:17 pm
by jpsa
There's no line like that in my config.txt either.

By the way, what RDP client are you using? I'm using the built-in Remote Desktop Connection client on Windows 10.

Re: Mathematica start-up crashing RDP session

Posted: Thu Mar 24, 2016 12:35 am
by dgordon42
I'm using the built in RDP Client from both Windows 10 Pro and Windows XP Home.

Maybe it's worth trying

Code: Select all

sudo apt-get reinstall wolfram-engine
It's a big package, might take a little time.

Dave.

Re: Mathematica start-up crashing RDP session

Posted: Thu Mar 24, 2016 9:51 am
by jpsa
How do I do that? On my machine apt-get doesn't have a reinstall operation...

Code: Select all

[email protected]:~ $ sudo apt-get reinstall wolfram-engine
E: Invalid operation reinstall
...and a quick check through its help options doesn't suggest anything similar.

So all I did to my pi3 after unpacking it was
  1. Connect it to HDMI screen, mouse, keyboard & ethernet, and install & boot Raspbian from NOOBS.
  2. Use Menu>Preferences>Raspberry Pi Configuration to change Hostname to pi3, then reboot.
  3. Code: Select all

    sudo apt-get update
    sudo apt-get install xrdp
    sudo apt-get dist-upgrade
  4. Shutdown, disconnect everything except the ethernet cable and restart.
  5. Use Remote Desktop Connection from Windows 10 Pro to start a session on the pi3, and try to start Mathematica. This shows some of the normal Mathematica startup splash screen feedback, but then dumps me back to the Remote Desktop Connection start screen.
Did you reconfigure or install anything else which might conceivably have altered the behaviour? Thanks for helping to try to track this down!

Re: Mathematica start-up crashing RDP session

Posted: Thu Mar 24, 2016 9:55 am
by drupol
dgordon42 wrote:I'm using the built in RDP Client from both Windows 10 Pro and Windows XP Home.

Maybe it's worth trying

Code: Select all

sudo apt-get reinstall wolfram-engine
It's a big package, might take a little time.

Dave.
A Linux is not a Windows. Reinstalling won't change anything.

Re: Mathematica start-up crashing RDP session

Posted: Thu Mar 24, 2016 12:51 pm
by dgordon42
dgordon42 wrote:sudo apt-get reinstall wolfram-engine
Sorry guys, finger trouble, should be:

Code: Select all

sudo apt-get install --reinstall wolfram-engine
However, I notice that you are using NOOBS as an installer, where as I am using plane Raspbian.
Instead of starting Mathematica from the Start Menu or an icon, try starting it by opening an LXTerminal, and typing:

Code: Select all

mathematica
If that works, have a look at the

Code: Select all

/usr/share/raspi-ui-overrides/applications/wolfram-mathematica.desktop
file. It should look like this:

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Type=Application
Version=1.0
Name=Mathematica
Comment=Technical Computing System
Icon=wolfram-mathematica
Exec=mathematica %F
TryExec=mathematica
Terminal=False
MimeType=application/mathematica;application/vnd.wolfram.cdf;application/mathematicaplayer
Categories=Application;Development;
StartupNotify=true
The important parameters are "Exec" and "TryExec".

This is based on this post.

Dave.