31. October 2022

openSUSE Rust Bevy application failed with “Unable to find a GPU”

Bevy is data-driven engine written in Rust. The repository of Bevy contains several examples which can be started by a command like:

git clone --depth 1 https://github.com/bevyengine/bevy.git
cd bevy
cargo run --example alien_cake_addict

Users of openSUSe might experience following error:

hread 'main' panicked at 'Unable to find a GPU! Make sure you have installed required drivers! For extra information, see: https://github.com/bevyengine/bevy/blob/latest/docs/linux_dependencies.md', crates/bevy_render/src/renderer/mod.rs:121:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The problem is caused by missing Vulkan libraries in the system. This can be confirmed by running vkcube which may result in the following error:

vkEnumerateInstanceExtensionProperties failed to find the VK_KHR_surface extension.

Do you have a compatible Vulkan installable client driver (ICD) installed?
Please look at the Getting Started guide for additional information.

Check which graphic card is installed in the system:

sudo lspci -nnk | grep -A3 VGA

Which might result in a message like this:

00:02.0 VGA compatible controller [0300]: Intel Corporation CometLake-U GT2

With this knowledge, it’s clear that library Vulkan Intel is missing and can be installed simply by:

sudo zupper install libvulkan_intel

Application vkcube should work after this change.

7. May 2021

How to speed up Linux on WSL2? Common mistake when upgrading from WSL1

According to Microsoft WSL2 is way faster than WSL1 for running Linux images. So, why even after upgrade to WSL2 is Linux running slow and with the same IO inefficiency like it was on WSL1?

The reason is simple. Even though the WSL2 was added to the operating system, the old images are running on WSL1. You can verify it by command:

wsl -l -v

Output:

  NAME                   STATE           VERSION
* openSUSE-Leap-15.2     Stopped         1
  Ubuntu                 Stopped         1
  docker-desktop-data    Stopped         2

As you can see both Ubuntu and openSUSE has set version to 1 which means that these images runs on WSL1. It’s necessary to explicitly change the version by following commands:

wsl --shutdown
wsl --set-version "Ubuntu" 2
wsl --set-version "openSUSE-Leap-15.2" 2 

The conversion will take some time. Output:

Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion complete.

Now you can verify the version of WSL for the image:

wsl -l -v
  NAME                   STATE           VERSION
* openSUSE-Leap-15.2     Stopped         2
  Ubuntu                 Stopped         2
  docker-desktop-data    Stopped         2

Simply start the shell of the distribution and you’ll experience better performance.

It’s also possible to set version for future images by command:

wsl --set-default-version 2

21. February 2019

How to run openSUSE for PowerPC64LE on CPU x86_64

First of all install required package for running ppc:

sudo zypper install qemu-ppc

Download the ISO built for PowerPC architecture (ppc64le). E.g. openSUSE-Leap-42.3-NET-ppc64le-Build0130-Media.iso.

Create file which will contain disk image:

qemu-img create suse.img 10G

Now, start the ppc64le virtual and boot from cdrom:

qemu-system-ppc64 -boot d -cdrom openSUSE-Leap-42.3-NET-ppc64le-Build0130-Media.iso -m 1024 -hda suse.img

After the installation you can simply run the installed system:

qemu-system-ppc64 -m 1024 -hda suse.img

Note: -m 1024 stands for “memory 1 GB”

20. February 2019

openSUSE firewall – YaST cannot continue the configuration

When you want to configure the firewall on openSUSE you can just type yast into the terminal.

Select Security and Users and from options select Firewall.

On fresh installation of openSUSE you might encounter following error:

Error
YaST cannot continue the configuration
without installing the required packages.

The fix is simple, just install yast2-firewall:

sudo zypper install yast2-firewall

Now you can start YaST and the firewall configuration will work.

23. December 2017

How to start all SAP services on openSUSE

The default installation of SAP Netweaver AS ABAP Developer Edition on openSUSE might not start all services after a reboot.

An indication of the problem: port 3300 is not open. After an attempt to connect from SAP Logon you’ll get following error:

WSAECONNREFUSED: Connection refused

When you logon to the system with SAP you may see that some of SAP processes are running, but not all of them:

root      1471  0.0  0.1 172524 10772 ?        Sl   09:01   0:00 /usr/sap/hostctrl/exe/saphostexec pf=/usr/sap/hostctrl/exe/host_profile
sapadm    1521  0.0  0.0  36892  4700 ?        Ss   09:01   0:00 /usr/lib/systemd/systemd --user
sapadm    1526  0.0  0.0  86200  1716 ?        S    09:01   0:00 (sd-pam)
sapadm    1536  0.1  0.3 348208 32260 ?        Ssl  09:01   0:00 /usr/sap/hostctrl/exe/sapstartsrv pf=/usr/sap/hostctrl/exe/host_profile -D
root      1625  0.0  0.0  25568  5316 ?        Ss   09:01   0:00 /usr/sap/hostctrl/exe/saposcol -l -w60 pf=/usr/sap/hostctrl/exe/host_profile
npladm    1889  0.2  1.1 661916 92220 ?        Ssl  09:01   0:00 /usr/sap/NPL/D00/exe/sapstartsrv pf=/usr/sap/NPL/SYS/profile/NPL_D00_georgik -D -u npladm
npladm    2069  0.0  1.1 661304 89420 ?        Ssl  09:01   0:00 /usr/sap/NPL/ASCS01/exe/sapstartsrv pf=/usr/sap/NPL/SYS/profile/NPL_ASCS01_georgik -D -u npladm

As you can see there are two system accounts running on the system: sapadm, npladm. NPL is in my case System ID. The start command should be executed under npladm identity.

Launch following command as root of the system (change npladm to you own System ID):

su -c "startsap all" -l npladm

The system will start with following messages displayed in the console:

Checking syb Database
-------------------------------------------
starting database NPL ...
Log file: /sybase/NPL/startdb.log
parse level 0: identified message 'Database 'master' is now online.'
parse level 1: identified message 'Database 'tempdb' is now online.'
parse level 2: identified message 'Database 'sybsystemprocs' is now online.'
parse level 3: identified message 'Recovery complete.'
Recovery Complete
startdb completed successfully
Starting Startup Agent sapstartsrv
OK
Instance Service on host georgik started
-------------------------------------------
starting SAP Instance ASCS01
Startup-Log is written to /home/npladm/startsap_ASCS01.log
-------------------------------------------
/usr/sap/NPL/ASCS01/exe/sapcontrol -prot NI_HTTP -nr 01 -function Start
Instance on host rihy started
Starting Startup Agent sapstartsrv
OK
Instance Service on host rihy started
-------------------------------------------
starting SAP Instance D00
Startup-Log is written to /home/npladm/startsap_D00.log
-------------------------------------------
/usr/sap/NPL/D00/exe/sapcontrol -prot NI_HTTP -nr 00 -function Start
Instance on host georgik started

You can check whether port 3300 is open:

netstat -anp | grep 3300
tcp        0      0 0.0.0.0:3300            0.0.0.0:*               LISTEN      20212/gwrd

You should be able logon to the SAP on openSUSE without a problem.

If you’re still not able to access the machine from remote then it’s necessary to check the firewall configuration. openSUSE has a strict firewall when using default installation.

You can change firewall configuration by the command:

yast2 firewall