pistronaut
Posts: 3
Joined: Fri Jan 01, 2016 7:19 pm

Mathematica start-up crashing RDP session

Sat Jan 02, 2016 7:05 pm

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

pistronaut
Posts: 3
Joined: Fri Jan 01, 2016 7:19 pm

Re: Mathematica start-up crashing RDP session

Sat Jan 02, 2016 9:43 pm

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

QuietZone
Posts: 89
Joined: Sat Dec 05, 2015 7:13 pm

Re: Mathematica start-up crashing RDP session

Sat Jan 02, 2016 10:28 pm

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.
"If you haven't got anything nice to say about anybody come sit next to me." — Alice Roosevelt Longworth

pistronaut
Posts: 3
Joined: Fri Jan 01, 2016 7:19 pm

Re: Mathematica start-up crashing RDP session

Sat Jan 02, 2016 11:52 pm

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

geev03
Posts: 396
Joined: Thu Jun 07, 2012 12:40 pm
Location: London, UK

Re: Mathematica start-up crashing RDP session

Wed Feb 10, 2016 1:20 pm

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...

jpsa
Posts: 18
Joined: Wed Feb 04, 2015 8:22 am

Re: Mathematica start-up crashing RDP session

Fri Mar 04, 2016 7:37 pm

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!

Sandros94
Posts: 5
Joined: Thu Mar 17, 2016 10:32 am

Re: Mathematica start-up crashing RDP session

Thu Mar 17, 2016 10:37 am

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...

abigpancake
Posts: 1
Joined: Thu Mar 17, 2016 4:15 pm

Re: Mathematica start-up crashing RDP session

Thu Mar 17, 2016 4:26 pm

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.

dgordon42
Posts: 805
Joined: Tue Aug 13, 2013 6:55 pm
Location: Dublin, Ireland

Re: Mathematica start-up crashing RDP session

Thu Mar 17, 2016 7:37 pm

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

flash@RaspberryPlus ~ $ mathematica --version
10.3
flash@RaspberryPlus ~ $ 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

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

jpsa
Posts: 18
Joined: Wed Feb 04, 2015 8:22 am

Re: Mathematica start-up crashing RDP session

Fri Mar 18, 2016 12:57 am

Yes, it works on my B+ too, but not on my 3 :(

drupol
Posts: 11
Joined: Sun Mar 20, 2016 10:45 am

Re: Mathematica start-up crashing RDP session

Sun Mar 20, 2016 2:30 pm

I've found the fix here: http://ha5kfu.sch.bme.hu/node/193

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

jpsa
Posts: 18
Joined: Wed Feb 04, 2015 8:22 am

Re: Mathematica start-up crashing RDP session

Sun Mar 20, 2016 2:45 pm

Oooo... worked for me too :)

jpsa
Posts: 18
Joined: Wed Feb 04, 2015 8:22 am

Re: Mathematica start-up crashing RDP session

Sun Mar 20, 2016 3:02 pm

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?

drupol
Posts: 11
Joined: Sun Mar 20, 2016 10:45 am

Re: Mathematica start-up crashing RDP session

Wed Mar 23, 2016 11:46 am

Indeed that would be great to fix this properly.

What can we do ?

dgordon42
Posts: 805
Joined: Tue Aug 13, 2013 6:55 pm
Location: Dublin, Ireland

Re: Mathematica start-up crashing RDP session

Wed Mar 23, 2016 12:39 pm

Reference my post above

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

Code: Select all

flash@RaspberryThree ~ $ uname -a
Linux RaspberryThree 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux
flash@RaspberryThree ~ $ 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.

jpsa
Posts: 18
Joined: Wed Feb 04, 2015 8:22 am

Re: Mathematica start-up crashing RDP session

Wed Mar 23, 2016 1:08 pm

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

pi@pi3:~ $ mathematica --version
10.3
pi@pi3:~ $ 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

pi@pi3:~ $ uname -a
Linux pi3 4.1.18-v7+ #846 SMP Thu Feb 25 14:22:53 GMT 2016 armv7l GNU/Linux
pi@pi3:~ $ vcgencmd version
Feb 25 2016 14:25:47 
Copyright (c) 2012 Broadcom
version dea971b793dd6cf89133ede5a8362eb77e4f4ade (clean) (release)
pi@pi3:~ $ 
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.

drupol
Posts: 11
Joined: Sun Mar 20, 2016 10:45 am

Re: Mathematica start-up crashing RDP session

Wed Mar 23, 2016 1:17 pm

Still crashing after reinstalling libgl1-mesa-glx and doing a dist-upgrade.

Code: Select all

pi@rpi8gb:~ $ Mathematica --version
10.3
pi@rpi8gb:~ $ uname -a
Linux rpi8gb 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux
pi@rpi8gb:~ $ 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

pi@rpi8gb:~ $ vcgencmd version
Mar 15 2016 14:47:28 
Copyright (c) 2012 Broadcom
version 1bf9a9a77026af9128a339c82d72e331d3532ee4 (clean) (release)
pi@rpi8gb:~ $
Last edited by drupol on Thu Mar 24, 2016 1:06 pm, edited 1 time in total.

jpsa
Posts: 18
Joined: Wed Feb 04, 2015 8:22 am

Re: Mathematica start-up crashing RDP session

Wed Mar 23, 2016 1:24 pm

OK, I've done that. Now at versions

Code: Select all

pi@pi3:~ $ mathematica --version
10.3
pi@pi3:~ $ 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

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

dgordon42
Posts: 805
Joined: Tue Aug 13, 2013 6:55 pm
Location: Dublin, Ireland

Re: Mathematica start-up crashing RDP session

Wed Mar 23, 2016 6:16 pm

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.

drupol
Posts: 11
Joined: Sun Mar 20, 2016 10:45 am

Re: Mathematica start-up crashing RDP session

Wed Mar 23, 2016 8:54 pm

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.

jpsa
Posts: 18
Joined: Wed Feb 04, 2015 8:22 am

Re: Mathematica start-up crashing RDP session

Wed Mar 23, 2016 11:17 pm

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.

dgordon42
Posts: 805
Joined: Tue Aug 13, 2013 6:55 pm
Location: Dublin, Ireland

Re: Mathematica start-up crashing RDP session

Thu Mar 24, 2016 12:35 am

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.

jpsa
Posts: 18
Joined: Wed Feb 04, 2015 8:22 am

Re: Mathematica start-up crashing RDP session

Thu Mar 24, 2016 9:51 am

How do I do that? On my machine apt-get doesn't have a reinstall operation...

Code: Select all

pi@pi3:~ $ 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!

drupol
Posts: 11
Joined: Sun Mar 20, 2016 10:45 am

Re: Mathematica start-up crashing RDP session

Thu Mar 24, 2016 9:55 am

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.

dgordon42
Posts: 805
Joined: Tue Aug 13, 2013 6:55 pm
Location: Dublin, Ireland

Re: Mathematica start-up crashing RDP session

Thu Mar 24, 2016 12:51 pm

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.

Return to “Mathematica”