Topics

Raspbian Stretch released

Richard Russell
 

The long-awaited new version of the Raspberry Pi operating system - Raspbian Stretch - has now been released.  This has a couple of implications for BBCSDL running on that platform:

  1. The version of SDL available from the repository is now 2.0.5 (the latest); previously it was 2.0.2.  One improvement is that the sound effects accompanying 'dropperz.bbc' now work.

  2. Whereas, previously, enabling the 'GL Driver' was optional (albeit that BBC BASIC ran slowly without it) it is now essential.  However that driver should be more stable and the bugs associated with its use fixed.
If anybody experiences problems running BBCSDL with Raspbian Stretch please report them here.

Richard.

Richard Russell
 

I've now tried every one of the example programs supplied with BBCSDL on a Raspberry Pi running Raspbian Stretch, and everything works as expected (with the previously mentioned caveat that the 'experimental' GL Driver must be enabled).  With the version of SDL available from the Raspbian repository also having been updated from 2.0.2 to 2.0.5, this is a confidence boost.

I have to keep reminding myself that the Raspberry Pi has an ARM processor; it still feels really strange to be running what looks and feels like BBC BASIC for Windows on a non-x86 computer!  I've been telling anybody who asked, for years, that there was zero chance that 'my' BBC BASIC would ever be ported to ARM, and I firmly believed it.  That it has now happened is hard to get my head around.

Richard.

Paul Irvine
 

Very glad that it's happened though, if it hadn't been you then BBC BASIC wouldn't have made it back to the ARM architecture. Might feel strange to you but it feels somehow normal to me that it's happened. 

On 23 August 2017 at 22:28, Richard Russell <news@...> wrote:
I've now tried every one of the example programs supplied with BBCSDL on a Raspberry Pi running Raspbian Stretch, and everything works as expected (with the previously mentioned caveat that the 'experimental' GL Driver must be enabled).  With the version of SDL available from the Raspbian repository also having been updated from 2.0.2 to 2.0.5, this is a confidence boost.

I have to keep reminding myself that the Raspberry Pi has an ARM processor; it still feels really strange to be running what looks and feels like BBC BASIC for Windows on a non-x86 computer!  I've been telling anybody who asked, for years, that there was zero chance that 'my' BBC BASIC would ever be ported to ARM, and I firmly believed it.  That it has now happened is hard to get my head around.

Richard.

Richard Russell
 

On Thu, Aug 24, 2017 at 08:26 am, Paul Irvine wrote:
BBC BASIC wouldn't have made it back to the ARM architecture
It never 'left' the ARM architecture, in the sense that Sophie's ARM version is still widely used today on RISC OS-based systems (including the Raspberry Pi when running that OS of course).  For a long time I assumed that the only sensible way to port BBC BASIC to ARM Android and ARM Linux was by using Sophie's version, which ought to have been straightforward but turned out not to be because of the poor documentation and the non-portable way it was written.

Had that turned out to be practical, and quite a lot of effort went into it, it would have been considerably faster than what we have now (being written in assembler) but at the same time considerably less compatible with the x86 version of BBCSDL.  On balance I think what we've ended up with is the better of the two options; speed is rarely that critical but having to adapt programs to work without my extensions to the language would be difficult or impossible.

Richard.

Richard Russell
 

The apparent slowness of Raspbian Stretch isn't limited to BBC BASIC, or even to SDL, because the standard 'glxgears' 3D demo program is reporting dramatically different speeds here.  If I enter this command at a terminal prompt:

  glxgears -info

it reports around 180 frames-per-second on Raspbian Jessie but only around 45 fps on Stretch, that's a 4:1 reduction (in both cases with the 'experimental' GL Driver disabled).  Something's definitely not right so I've reported it at the Raspberry Pi forum; it will be interesting to see what they say.

Richard.

Richard Russell
 

On Sat, Aug 26, 2017 at 10:02 am, Richard Russell wrote:
I've reported it at the Raspberry Pi forum; it will be interesting to see what they say.
The initial reaction there is that it might be specific to my RPi hardware. I'm doubtful of that, so can I ask everybody with a Raspberry Pi to please check as follows:

  • Disable (if necessary) the experimental GL Driver and reboot.

  • At a command prompt enter glxgears -info

  • Wait for the FPS value to stabilise
Please post here what frames-per-second it reports, what colours the gears are, and your machine details (RPi model, version of Raspbian etc.)

Richard.

Colin Rose
 
Edited

Richard

A fresh installation of Raspbian Stretch on a new SD card produced the following data on two separate Pi's:

Pi 2B (early version, not the latest Broadcom CPU)

Gear colours - Top is white, Left is Yellow and Right is Cyan

27 fps

 

Pi 3B

Gear colours as above

23 fps

 

Pi 3B with GL Driver enabled (just to see the difference)

Gear colours - Top is Blue, Left is Red and Right is Green

124 fps

 

I'm sorry to report that even with the GL driver enabled BBC Basic is so slow it is unusable. I'm not sure if there is a problem with Mesa but when I start up BBC Basic I get the following error message:

libGL failure: MESA-LOADER: failed to retrieve device information

As I type this I wonder if the latter error is because I am running the Pi's headless on my PC using VNC server on the Pi and VNC Viewer on the PC. When I get a chance I'll try plugging the HDMI into a monitor.

Colin

 

Richard Russell
 

On Sun, Aug 27, 2017 at 10:20 am, Colin Rose wrote:

Gear colours - Top is white, Left is Yellow and Right is Cyan

27 fps 

Yep, that's the fault (wrong colours, ridiculously slow).  I've reported it at the Raspberry Pi forum; no useful responses as yet.

> I'm sorry to report that even with the GL driver enabled BBC Basic is so slow it is unusable.

No need to be sorry: that's not typical at all so is something specific to your setup.  On a RPi 3 with GL Driver enabled the speed is more than adequate (fast, even); the performance exceeds all my expectations given the CPU, and demonstrates the value of GPU acceleration.

> I am running the Pi's headless on my PC using VNC server

I'm amazed it works at all in that configuration, given that reading back the contents of the screen in OpenGL is extremely slow (all the data paths are in the opposite direction from what the GPU is optimised for!).  Perhaps I should state somewhere explicitly, if it isn't obvious, that BBCSDL relies on OpenGL -  everything on the screen is rendered that way by SDL - so is suitable only for use with a directly-connected display device.

Richard.

Richard Russell
 

If anybody needs reassurance that BBC BASIC on the Raspberry Pi really is as fast as I claim, and it isn't just wishful thinking, you need only watch this (unedited, and normal speed!) YouTube video.  It ends up running four copies of BBCSDL simultaneously (the IDE, and three program windows).

Richard.

Colin Rose
 
Edited

I have just re-run my previous tests but this time with an HDMI monitor plugged into the Pi2 B. I am happy to conform that the speed, even on a Pi2 B, is more than adequate and totally acceptable. Thank you, Richard.

I still interacted with the Pi over VNC as I described in my last post. The image on the PC was, to all intents and purposes, identical with that displayed on the monitor. The work that the Foundation and Real VNC have done to ensure this is fully justified.

Unfortunately, for my purposes, it is normally not possible to run my Pi's with a monitor attached.

Colin

 

Richard Russell
 

On Mon, Aug 28, 2017 at 12:55 pm, Colin Rose wrote:
I still interacted with the Pi over VNC as I described in my last post.
BBCSDL is not designed for, and is not suitable for, that usage.  SDL is (or at least was originally) a 'games engine' optimised for interactive applications using a local keyboard/mouse and monitor.

Richard.

P.S. Please trim your replies so as not to include a copy (in fact two copies!) of the message you are responding to.   I presume you're replying by email rather than on the group's web page, but you should try to format your posts to be suitable for both.

Richard Russell
 
Edited

On Mon, Aug 28, 2017 at 01:56 pm, Richard Russell wrote:
BBCSDL is not designed for, and is not suitable for, that usage.
That remains my view, but at the SDL forum there is this suggestion for speeding up X11/OpenGL forwarding to a PC running Xming-Mesa (if that is an acceptable alternative to VNC):

1. upgrade Xming to 7.7.0.21 which has support for AIGLX (-wgl).
2. set the environment variable LIBGL_ALWAYS_INDIRECT to "1"
3. set the environment variable SDL_VIDEO_X11_VISUALID to ""

Richard.

jon@...
 
Edited

Hi,

FYI

I have just got my Pi 3 out and updated to the latest Stretch. I am using VNC to talk to the Pi as I don't have space to physically connect the Pi to my monitor etc. I also downloaded and installed bbcsdl 0.18b.

Following the install instructions, I enabled the GL driver in FULL KMS mode but when the Pi rebooted, I only got a small 640x480 screen so couldn't really run anything. But I tried the gears demo and it still worked, with the correct colours, reporting a 120 fps.

libGL error: MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
636 frames in 5.0 seconds = 126.942 FPS
617 frames in 5.0 seconds = 123.047 FPS
621 frames in 5.0 seconds = 123.823 FPS
609 frames in 5.0 seconds = 121.435 FPS
 
I then tried the GL driver in Fake KMS mode (don't know what the difference is), got back the full 1920x1080, and the gears demo still worked, with the correct gear colours and reported 60 fps.

I then ran bbcsdl and tried the opengl graphic demos and they seem to run fine. The teapot rotated nicely as expected.

The glxgears - info reported :

libGL error: MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
GL_RENDERER   = Gallium 0.4 on VC4 V3D 2.1
GL_VERSION    = 2.1 Mesa 13.0.0
GL_VENDOR     = Broadcom
...
VisualID 390, 0x186
304 frames in 5.0 seconds = 60.617 FPS
300 frames in 5.0 seconds = 59.999 FPS

I'm assuming this is using the latest version of the sdl library. How do I find out ?

Jon

Richard Russell
 

On Sat, Sep 2, 2017 at 02:17 am, <jon@...> wrote:
I then tried the GL driver in Fake KMS mode (don't know what the difference is), got back the full 1920x1080, and the gears demo still worked, with the correct gear colours and reported 60 fps.
When the VC4 GL driver is in use glxgears synchronises to the monitor's vertical refresh rate, but when the Mesa software driver is in use it doesn't (irrespective of any messages to the contrary, which should be ignored).   So the reported frame rate with the GL driver will always be 60 fps (or in my case 50 fps, because I'm using a TV) which doesn't tell you anything about the comparative performance compared with running the Mesa driver (the VC4 driver is of course much faster than the software driver, not slower as the raw FPS figures might suggest).

> I'm assuming this is using the latest version of the sdl library. How do I find out ?

'about.bbc' reports the versions of SDL, SDL_ttf and FreeType.

Richard.

jon@...
 

Looks like my upgrade to Stretch didn't work as about.bbc still reports SDL version 2.0.2.

Will have to give it another go so please disregard my post.

Jon

Richard Russell
 

On Sat, Sep 2, 2017 at 03:41 am, <jon@...> wrote:
Looks like my upgrade to Stretch didn't work
Did you 'upgrade' or did you install a fresh Stretch image as recommended?  When there's a major OS update the advice is not to attempt an upgrade because that will leave you with a mixture of 'new' OS but 'old' utilities, applications, scripts etc. which may well not be compatible with it.  For example here it states "Raspbian Stretch is classed as a major update, so you should consider a clean installation. The distro upgrade should work, however Raspberry Pi Foundation says they can’t guarantee it to work for all of us. It’s possible to lose some data due to this".   This is, after all, Linux we are talking about (which seems to give little priority to backwards compatibility), not Windows!

Richard.

jon@...
 

Yes, I did an upgrade and not a fresh install. I will do a fresh install and try again.

Jon

Richard Russell
 

An 'official' response, of sorts, at https://github.com/RPi-Distro/repo/issues/79 Personally I don't think it's very satisfactory because even if "the change of
behaviour comes from upstream Debian packages" if it affects only the armhf build and not (x86) Debian stable shouldn't the Raspberry Pi people accept some
responsibility?

Richard.

Previous Topic Next Topic