NetBSD Problem Report #53042

From  Tue Feb 20 12:50:35 2018
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id 260157A10E
	for <>; Tue, 20 Feb 2018 12:50:35 +0000 (UTC)
Message-Id: <>
Date: Tue, 20 Feb 2018 12:50:31 +0000 (UTC)
Subject: Raspberry pi GPU programs fails with "* failed to add service - already in use?"
X-Send-Pr-Version: www-1.0

>Number:         53042
>Category:       port-arm
>Synopsis:       Raspberry pi GPU programs fails with "* failed to add service - already in use?"
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-arm-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 20 12:55:01 +0000 2018
>Closed-Date:    Mon Jan 21 19:52:54 +0000 2019
>Last-Modified:  Mon Jan 21 19:52:54 +0000 2019
>Originator:     Michael Blatt
>Release:        NetBSD 8.99.12 pkgsrc 2017_Q4
I can't get any program to run that tries to use GPU acceleration on
my RPI 1b rev2 (earmv6hf).
Tried this with both a self-built image and Jun's latest image (so 8.99.12),

Even hello_triangle.bin under /usr/pkg/src (not /usr/pkgsrc), part of
raspberrypi-userland, returns this error when run:

 * failed to add service - already in use?

With Linux this error message has historically been caused by firmware
issues, or a suboptimal gpu_mem split. I've tried gpu_mem=32, 64, 128
and even 256, to no avail.
I've also swapped the firmware for older versions that I've been using
on my RPI2 with NetBSD (same version).
1. download raspberrypi image

or the build server images (earmv6hf or earmv7hf)

2. copy to microsd

gunzip < 2018-02-11-netbsd-raspi-earmv6hf.img.gz |dd of=/dev/rsd0d bs=4m

3. setup Raspberry PI 0/1/2/3
- microsd card
- connect HDMI
- USB keyboard

4. extract pkgsrc 2017_Q4

5. build misc/raspberrypi-userland

6. build hello_triangle from /usr/pkg/src/hello_pi/ or any other example program that uses 3D acceleration. Note that this needs some paths adjusted and LD_LIBRARY_PATH specified when running.
This also applies to any package that uses 3D acceleration.
not known


From: Rin Okuyama <>
Subject: Re: port-arm/53042 Raspberry pi GPU programs fails with "* failed to
 add service - already in use?"
Date: Sun, 19 Aug 2018 21:29:58 +0900

 This is perhaps the same problem as port-evbarm/52984:

From: "Rin Okuyama" <>
Subject: PR/53042 CVS commit: src/sys/external/gpl2/dts/dist/arch/arm/boot/dts
Date: Wed, 22 Aug 2018 13:16:41 +0000

 Module Name:	src
 Committed By:	rin
 Date:		Wed Aug 22 13:16:41 UTC 2018

 Modified Files:
 	src/sys/external/gpl2/dts/dist/arch/arm/boot/dts: bcm283x.dtsi

 Log Message:
 Explicitly disable v3d, pixelvalve, and hvs for bcm283x at the moment.

 When these devices or hdmi are enabled, firmware turns off GPU functionality of
 VideoCore, expecting OS drivers handle it appropriately:

 This breaks userland applications using /dev/vchiq, such as omxplayer.

 XXX We need enable them back when we import vc4 drm driver.

 Fix PR port-evbarm/52984 and
 PR port-arm/53042.

 OK jmcneill, skrll

 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.5 \

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-When: Wed, 22 Aug 2018 13:33:57 +0000
Now, hello_triangle works fine with new *.dtb files on my Raspberry Pi 3.

Could you please confirm fix?

Note that besides *.dtb, you need kernel newer than 2018-08-19 with this fix:

Otherwise, you cannot open /dev/vchiq.

From: Michael Blatt <>
Subject: Re: port-arm/53042
Date: Mon, 21 Jan 2019 09:13:59 +0000

 Content-Type: text/plain; charset="UTF-8"

 Problem confirmed as resolved , many thanks!

 Content-Type: text/html; charset="UTF-8"

 <div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace">Problem confirmed as resolved , many thanks!</div><div class="gmail_default" style="font-family:courier new,monospace"><br></div></div>


State-Changed-From-To: feedback->closed
State-Changed-When: Mon, 21 Jan 2019 19:52:54 +0000
Confirmed fixed, thanks


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.