Help with running SFOS emulator in SDK

Hey! I’m interested in creating an app for SFOS. I’ve installed the Sailfish SDK (for Ubuntu, version 3.11.1) on Linux Mint 21.3 following Sailfish documentation and using VirtualBox 7.0.22

When trying to take a look at an example app on the Qt Creator emulator (Camera Gallery), the virtual machine started a loop which I couldn’t end within the program. It would open a small window (the Sailfish emulator I assume) only to close it half a second later. Then two seconds later it would start the window, then close it again (and so on).
One time trying to start the emulator I got the following message instead of the endless loop:
sdk error

Don’t know if I did something differently to get this error message but I couldn’t reproduce it.

Any help for this situation? How do I install the correct emulator? Would it be more straight-forward to use SDK on Windows 11?
I’d appreciate a ‘for dummies’ explanation since I’m a beginner with programming and Linux. Just pointing me in the correct direction in terms of documentation would be helpful as well!

  1. The Sailfish emulator is installed? Check this in the maintance tool.
  2. Start SDK, open your project
  3. Outside left down you can choose the kit. Choose the emulator kit (with -486 in name). There must be 3 kits. When not: Click left on the “project” icon to configure your project right.
  4. Now 2 little Sailfish icons must be under the kit icon. One for the engine, one for the emulator. Click on both to start.

Hope this will help.

[edit: typo -386 → -486]

3 Likes

Managed to get past my initial problem of the emulator startup loop by looking at the Virtualbox application. It had an error: “VT-x is disabled in the BIOS for all CPU modes” so enabling the Virtualization feature in BIOS/UEFI settings fixed that. So I can now use the two Sailfish buttons on the bottom left of QT Creator without issues. Now it seems my problems are

  1. I can’t find (or don’t know how to add) the emulator kit with -386 in the name. This is what I have:

  2. The kit with -i486 works, but instead of booting Sailfish OS the emulator window says: “Spectre mitigation kernel not compiled”. This also seems to prevent from the Qt Creator from deploying my project:

I tested, that Virtualbox is able to run another ISO image just fine, but the Sailfish emulators get this Spectre error both in QT Creator and Oracle VM Virtualbox Manager.

I found a forum post that has the same Spectre mitigation error. They didn’t find a solution for this as far as I can tell. They had some other variables in the mix though:
[SDK 3.10.4] SDK installation fails with both virtualbox (VM startup) and docker (cancelled download)

In this forum post they fixed a RPM deployment error by opening a firewall port: SDK Deploy error on Xperia 10

But how would I find out, which port to open? Virtualbox does currently have access through the firewall at least in some capacity, as Virtualbox shows up as processes using ports in my Firewall Configuration.

1 Like

I have a few questions:

  1. Are you perhaps running Linux on a virtual machine?
  2. Is your build engine docker or virtualbox based?

Your issue is not related to firewall, as it seems the emulator does not start properly.

2 Likes
  1. No. Linux is installed on a partition of my hard disk.
  2. When setting up for installing the SDK/Qt Creator, I chose to download and use Virtualbox instead of Docker. I would hope that means that the build engine is virtualbox based automatically (since that’s what I chose during confirurations of SDK installation). Not sure though, how I would check that.

Yes, that means that your buildengine is virtualbox based. And it looks like it’s working fine. It’s a bit weird that it works and the emulator doesn’t. I can’t really think of any reason which might cause that.

1 Like

My Oracle Virtual Box setting for the emulation machine:
Tab “System”:
PAE/NX: yes
Nested VT/-x: no
Nested Paging: yes

Tab “Display” or what it is called in english (german: Anzeige)
graphic memory: 100% (for me 128 MB)
try proper graphic controller
3D: no

Spectre: This has nothing to do with the SDK emulator but with your Virtual Box installation. When I start the SDK emulator I can see a message about Spectre for some seconds. Same as when I start my notebook linux. So take this message as greeting to you :slight_smile:

-386: sorry for typo but fixed now to -486.

1 Like

I have the same settings enabled in Oracle Virtual Box. As for graphic controllers, none of them make the emulator run, but VMSVGA is the only one that doesn’t give an error message: “Invalid settings detected”

I just keep getting stuck on the Spectre text screen when starting emulation. It looks like next I’ll try to reinstall everything with Docker… Whenever I get around to that

Thanks for the help/effort so far though!