Running docker containers with podman (on NetBSD!)

2021-09-04 Thread coypu
Hi all,

I added a package to pkgsrc called Podman.
It's a tool for running OCI containers, and it has the same command line
behaviour as the docker command line argument.

There are some selling points for it over docker, but the most important
for us is the fact it has a mode where it spawns a Linux VM to talk to
for you, so it runs on NetBSD!

One caveat is that NetBSD somewhat struggles running virtualized Linux
by default. The virtualized ticks are just too slow, so it panics with:
  Kernel panic - not syncing: IO-APIC + timer doesn't work! Boot with
  apic=debug and send a report. Then try booting with the 'noapic' option.

One way to work around it, convenient for this purpose, is to rebuild
your kernel with "options HZ=1000" added, then you don't need to edit
the command line arguments in the VM.

Usage instructions:
Install pkgsrc/sysutils/podman from pkgsrc-current
Initialize and start a VM with:
podman machine init
podman machine start

And then you can use it much like the docker command:
> podman run -it alpine sh -c "apk add file; file -L /bin/sh"
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch 
https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/2) Installing libmagic (5.40-r1)
(2/2) Installing file (5.40-r1)
Executing busybox-1.33.1-r3.trigger
OK: 13 MiB in 16 packages
/bin/sh: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically 
linked, interpreter /lib/ld-musl-x86_64.so.1, stripped


fnaify for FNA-based games

2021-01-24 Thread coypu
Hi all,

I've imported openbsd gaming's fnaify and some of the related packages,
done by thfr@ and others in OpenBSD.

This is a wrapper to help run games using FNA, an accurate, open source
rewrite of Microsoft XNA Game Studio 4.0: https://fna-xna.github.io/

With FNA, Mono, and the fnaify wrapper, you should be able to run a
non-trivial number of games, worth trying are items in this README
list: https://github.com/rfht/fnaify
(Note: actual list is shorter for pkgsrc since I didn't import steamworks,
and some games may have had a new version that no longer works with this
wrapper)

I imported the package after testing a single game: Celeste.
https://mattmakesgames.itch.io/celeste
running on NetBSD: https://i.imgur.com/ZBHQGTY.png (caveat: no audio)

You should be able to `make install` in games/fnaify and then, given a
FNA-based game, run `fnaify` in the directory of it.

Enjoy.


Recovering from broken userland after removing compat80 package

2020-08-13 Thread coypu
Hi all,

If you are using this package from pkgsrc-current, and running NetBSD
9.0, please unpack a base tarball before removing the compat80 package.

I haven't realized this package replaces base libraries if they already
exist, so my addition of libterminfo.so.1 to the package for the benefit
of netbsd-current meant that removing the package will delete your BASE
libraries.

If you have the bad version of compat80 installed:

su
cd /
ftp 
https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/amd64/binary/sets/base.tar.xz

pkg_delete compat80
env PATH=/rescue tar xzpf base.tar.xz

Should be a safe way of removing it.

If you have removed compat80 and now dynamic programs fail, and don't
have a root shell:
1. Drop to boot prompt at the boot menu
2. Type 'boot -as' and press enter to boot.
3. When asked which shell to run, pick /rescue/sh
4. export PATH=/rescue
5. cd /
6. ftp 
https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/amd64/binary/sets/base.tar.xz
7. tar xzpf base.tar.xz
8. ^D to resume boot normally.

Sorry for the breakage. Hopefully very few people will be affected.


Proposal: removing uyap(4), USB YAP phone firmware loader

2020-04-13 Thread coypu
For some background, I believe this is the device in question:
https://www.ebay.com/itm/Yap-USB-Phone-Software-Yap-Time-Your-Alternative-Phone-/264056870659

It was added in 2001, and I believe it's unlikely to be in use today.

It's pretty easy for a USB device to impersonate another USB device, so
it's one more device to audit and fix. In this case, it's unlikely
anyone will notice breakage to the driver because it's so esoteric.

I will remove this driver and associated code in 2 weeks if nobody
objects to it, that is:
sys/dev/usb/{ezload.c, ezload.h, uyap.c, uyap_firmware.h}


BSDCan meets!

2019-05-14 Thread coypu
Hi netbsd people,

I'm going to be at Ottawa for BSDCan on 15-20 May (that's tomorrow).
If you are coming and want to join, please reply.
(Several other NetBSD'ers are coming, too)


Re: pkgsrc python default version -> 3.7

2019-05-03 Thread coypu
On Fri, May 03, 2019 at 12:48:42PM +0100, Sad Clouds wrote:
> On Fri, 3 May 2019 11:32:32 +
> co...@sdf.org wrote:
> 
> > On Fri, May 03, 2019 at 12:10:30PM +0100, Sad Clouds wrote:
> > > On Fri, 3 May 2019 11:02:49 +
> > > co...@sdf.org wrote:
> > > 
> > > > I'm not sure it's a good idea to apply that patch, though.
> > > > fixing util-linux is probably the right thing.
> > > 
> > > Solaris seems to have its own libuuid, can python use that instead?
> > 
> > The logic for searching for a util-linux style libuuid (as opposed to
> > the DCE standard uuid) isn't OS specific. if it doesn't pick it up it
> > probably doesn't like something about it...
> > 
> > it looks for util_generate in uuid/uuid.
> 
> Solaris man pages list the following, so no util_generate
> 
> INTERFACES
>The shared object libuuid.so.1 provides the public  interfaces
> defined below.  See Intro(3) for additional information on shared
> object inter- faces.
> 
>uuid_clearuuid_compare
>uuid_copy uuid_generate
>uuid_generate_random  uuid_generate_time
>uuid_is_null  uuid_parse
>uuid_time uuid_unparse
> 
> FILES
>/lib/libuuid.so.1   shared object
> 
>/lib/64/libuuid.so.164-bit shared object

Sorry, that's a typo, it looks for uuid_generate


Re: pkgsrc python default version -> 3.7

2019-05-03 Thread coypu
On Fri, May 03, 2019 at 12:10:30PM +0100, Sad Clouds wrote:
> On Fri, 3 May 2019 11:02:49 +
> co...@sdf.org wrote:
> 
> > I'm not sure it's a good idea to apply that patch, though.
> > fixing util-linux is probably the right thing.
> 
> Solaris seems to have its own libuuid, can python use that instead?

The logic for searching for a util-linux style libuuid (as opposed to the
DCE standard uuid) isn't OS specific. if it doesn't pick it up it
probably doesn't like something about it...

it looks for util_generate in uuid/uuid.


Re: pkgsrc python default version -> 3.7

2019-05-03 Thread coypu
I'm not sure it's a good idea to apply that patch, though.
fixing util-linux is probably the right thing.


Re: pkgsrc python default version -> 3.7

2019-05-03 Thread coypu
libuuid is a mess. I can't tell how many different variants of the the
library exists. we apparently know how to pick up the OS X one as a
builtin always, because we will look for uuid_generate on uuid.h.

but in this case, it doesn't need uuid_generate...


Re: pkgsrc python default version -> 3.7

2019-05-03 Thread coypu
On Fri, May 03, 2019 at 07:30:54AM +0100, Sad Clouds wrote:
> This totally fails on SPARC Solaris 11.3, due to util-linux where
> random_get_bytes() conflicts with Solaris own function. Why does Python
> depend on all these Linux packages? Not that I care that much about
> Python, but it seems you can't build anything without installing
> Perl and Python as well.

it can handle non libuuid-uuid implementation, too.
but it will try to link libuuid if it's available.

maybe we want:

Index: Makefile
===
RCS file: /cvsroot/pkgsrc/lang/python37/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- Makefile30 Apr 2019 04:49:38 -  1.8
+++ Makefile3 May 2019 10:15:08 -
@@ -4,6 +4,7 @@
 
 PKGNAME=   python37-${PY_DISTVERSION}
 CATEGORIES=lang python
+PKGREVISION=   1
 
 MAINTAINER=pkgsrc-us...@netbsd.org
 HOMEPAGE=  https://www.python.org/
@@ -170,13 +171,22 @@
${DESTDIR}${PREFIX}/lib/libpython3.7.sl.1.0
 .endif
 
+.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "OpenBSD" ||  \
+   ${OPSYS} == "DragonFly" || ${OPSYS} == "SunOS" ||   \
+   ${OPSYS} == "NetBSD" || ${OPSYS} == "Darwin" || \
+   ${OPSYS} == "AIX"
+# uuid functionality in libc, avoid detecting libuuid if installed
+BUILDLINK_TRANSFORM+=  rm:-luuid
+.else
+.include "../../devel/libuuid/buildlink3.mk"
+.endif
+
 BUILDLINK_DEPMETHOD.readline=  build
 
 .include "../../archivers/bzip2/buildlink3.mk"
 .include "../../archivers/xz/buildlink3.mk"
 .include "../../devel/gettext-lib/buildlink3.mk"
 .include "../../devel/libffi/buildlink3.mk"
-.include "../../devel/libuuid/buildlink3.mk"
 .include "../../devel/readline/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 BUILDLINK_API_DEPENDS.openssl+=openssl>=1.0.2



Re: pkgsrc python default version -> 3.7

2019-04-25 Thread coypu
On Thu, Apr 25, 2019 at 04:43:24PM +0100, Roy Marples wrote:
> On 24/04/2019 23:31, co...@sdf.org wrote:
> > The default Python version in pkgsrc is now 3.7, in preparation for
> > the coming end of life date of Python 2.7 (the previous default) at
> > the end of this year.
> 
> Can we punt 3.4, 3.5 and 3.6 then?
> 3.4 fails at least to build on netbsd-current due to an openssl conflict by
> the looks of it.
> 
> Roy

Adam already mentioned wanting to get rid of 3.4. I think that's
reasonable.

I think we should leave 3.6. I've heard at least one person mentioning
they don't want to rush to 3.7 (on a HPC setup supporting many users
that run their own python scripts).


pkgsrc python default version -> 3.7

2019-04-24 Thread coypu
Hi folks,

The default Python version in pkgsrc is now 3.7, in preparation for
the coming end of life date of Python 2.7 (the previous default) at
the end of this year.

This means any package that can be built with Python 3.7 will be built
with it, rather than Python 2.7.
Packages with no Python 3.x support will continue to be built with
Python 2.7.

Problems are not likely to occur as many developers have been using this
default for a while.
Let me know if there are any problems still.

To undo this change, if you have a need for it, add this line to your
/etc/mk.conf:
PYTHON_VERSION_DEFAULT=27

For binary packages named pyXX-packagename, a python 2.7 will still be
built (py27-packagename), as well as all the other python versions
available.


Re: fpr(1), asa(1)

2019-01-05 Thread coypu
POSIX at least seems to say,

Issue 6

This utility is marked as part of the FORTRAN Runtime Utilities option.

So perhaps that counts as optional now.


fpr(1), asa(1)

2019-01-05 Thread coypu
Hi folks,

these programs are relics intended for running old fortran on old
machines.
fortran carriage-control is no longer a thing as of fortran 2008.
netbsd no longer ships other fortran components.

I'd like to remove them both.
Certainly fpr does not make sense as asa is the more standard one.

Thoughts?


Tip regarding nvidia optimus (dual graphics nvidia/intel) and efiboot

2018-10-07 Thread coypu
(thanks ryoon for a hint)

To boot it with graphical acceleration on uefiboot, I need to disable
genfb specifically.
That is, drop to boot prompt, type
> userconf disable genfb
> boot

you can add this to /boot.cfg too.

Otherwise it tries genfb for the nvidia card, and i915 for intel, which
doesn't work well because they are physically dependent cards, and I get
a blank screen after mode switch.

Another option is to disable i915drmkms, then I am left with the nvidia
genfb.


Re: Bitmap fonts

2018-08-29 Thread coypu
All right. I reverted it.
All the bitmap fonts we ship are really bad still.


Bitmap fonts

2018-08-18 Thread coypu
Hi,

Helvetica is a proprietary font. There is a bitmap-only Helvetica in
base. In an attempt to avoid this font, and under the impression bitmap
fonts are guaranteed to look bad by design, I made fc-match no longer
match bitmap fonts:
https://v4.freshbsd.org/commit/netbsd/src/N7XSt9wHfjaVH75A

This is not very visible because netbsd-8 and older versions use pkgsrc
fontconfig a lot with its own configuration.

I came across a post suggesting that the dislike of bitmap fonts isn't
universal:
"More "modern" Chinese users prefer sans-serif fonts over the bitmap
Chinese font (65% based on a survey at Ubuntu Chinese forum, N>300),
while some other users prefer bitmaps."*

Has this been a problem for anyone, but it was unclear what is the
change causing it?

* https://bugs.freedesktop.org/show_bug.cgi?id=20911


Re: Some problems moving to new hardware with NetBSD-8/i386

2017-11-19 Thread coypu
On Sun, Nov 19, 2017 at 08:03:48AM -0700, Andy Ruhl wrote:
> But now it works fine. Don't know why.

There are some problems with -current people are working on, they
don't always trigger or for everyone. I think you hit one of them.

http://gnats.netbsd.org/52676


Re: NetBSD-8 and graphics cards

2017-11-11 Thread coypu
On Sat, Nov 11, 2017 at 10:07:34AM +, Sad Clouds wrote:
> Xorg is too old and I need to build Xorg from pkgsrc? If yes, then I
> can definitely try that.

No, it should be fine, I wondered if it's an update from 7.0.


Re: package upgrade strategy

2017-09-28 Thread coypu
I suspect this is more fallout from people mis-updating libraries.
try manually deleting and adding midori again. I'm hoping it rebuilt the
package even though there's no indication to the binary package bits
that it changed.


Re: Pulseaudio & browsers - anyone got something ELSE working?

2017-08-14 Thread coypu
On Mon, Aug 14, 2017 at 10:27:34PM +0100, Sad Clouds wrote:
> Just out of interest, what is the significance of in-kernel audio mixer
> and what is it supposed to do?

Without an audio mixer you can only have one output at once to some
hardware. if you let multiple things write audio then they will trample
each other.
if one thread says "the audio is 55" and the other says "audio is 22"
then (at best) you may get 22, or 55, or 25, or 52. neither of which
sound right.

before it only allowed one input, and if something else was inputting,
new things cannot start inputting.
even if you only wanted one output, sometimes something will refuse to
let go of it, and you wouldn't be able to play audio.

an audio mixer puts the 55 and 22 in different places and combines them
to a single meaningful result, say 77.

what netbsd has now is the same daemon in the kernel, if you do:
  top -t |grep audio
you will see the audiomix kernel thread. If you see what is
kthread_create'ing something called "audiomix", you will see the
functionality is just this function:
https://nxr.netbsd.org/xref/src/sys/dev/audio.c#audio_play_thread

it does a few things around, but then does the 'thing' with mix_func,
which is: https://nxr.netbsd.org/xref/src/sys/dev/audio.c#DEF_MIX_FUNC

it literally multiplies the virtual channel the volume and adds in
ways that sound right.

what pulseaudio does is run a userland daemon, so anything that uses
pulseaudio as a library speaks to the daemon (using dbus to pass data, I
think) and this daemon does the mixing, and then tells the kernel the
combined results. this means the kernel can remain dumb but audio will
still be mixed.


Re: Pulseaudio & browsers - anyone got something ELSE working?

2017-08-13 Thread coypu
I use firefox+oss. it's a package option and the default for www/firefox
If you want a better sound experience use netbsd-8 or -current. they
have an audio mixer.

mpv has built-in youtube-dl functionality, so it's a bit more convenient
to use.
streamlink is supposed to be capable of handling some streaming sites
that youtube-dl might not. I used to use it for twitch.tv when it was
Flash.


Re: Nouveau for thinkpad t61?

2017-08-01 Thread coypu
On Tue, Aug 01, 2017 at 09:32:50PM +, Björn Johannesson wrote:
> Dug up my old Thinkpad T61 to try out netbsd-8 on it.
> ...
> It has a nVIDIA Quadro NVS 140M.

drm kern info: nouveau  [ PMC][nouveau0] MSI interrupts enabled
nouveau0: interrupting at msi0 vec 0 (nouveau)

Is that possible? I don't know much about MSI, but it sounds like a
newer thing and this sounds like old hardware.


Re: Permedia 3 and Xorg (on AXP)

2017-07-21 Thread coypu
Does ddb work?

sysctl -w ddb.onpanic=1


Re: Permedia 3 and Xorg (on AXP)

2017-07-21 Thread coypu
On Fri, Jul 21, 2017 at 09:16:24AM +0200, BERTRAND Joël wrote:
>   I have tested with last -8 kernel and now, I obtain a kernel panic. As
> crash isn't supported on alpha, I don't know where system panics. I have
> tested a Matroc G450 instead of this Oxygen with the same result.

By the way, you can save the netbsd.gdb kernel generated during the
build, and open kernel dumps in gdb:

gdb /netbsd.gdb
(gdb) target kvm netbsd.63.core
0x80229535 in cpu_reboot (howto=howto@entry=256, 
bootstr=bootstr@entry=0x0) at /usr/src/sys/arch/amd64/amd64/machdep.c:674
warning: Source file is more recent than executable.

then 'bt' should give you the backtrace as well, if you're lucky.


Re: Printing to networked printers?

2017-07-20 Thread coypu
On Fri, Jul 21, 2017 at 08:18:32AM +0800, Paul Goyette wrote:
> >  # For plain-text files:
> >  printf "\033&k2G" || exit 2
> 
> The magicfilter sends "\033E\033&k2G\033(0N" as a prefix, and "\033E" as
> suffix - I have no idea what any of this means!  :)  I tried to use your
> prefix but still no output on the printer.

I'm learning the fascinating world of PCL. apparently this is:
ESC E   Reset printer
ESC &k2GSet line terminators to CR=CR, LF=CR+LF, FF=CR+FF
ESC (0N Primary Symbol Set: ECMA-94 Latin 1

Also it says:
Printers that support PJL (Laserjet 4 and later) should be told to use
PCL should be entered via the PJL ENTER LANGUAGE command.

That is, without escapes:
@PJL ENTER LANGUAGE = PCL  

Also things talking about PCL6 talk about an additional header after:
Stream Header (Section 7, page 201) which for ASCII would be
' HP PCL-XL;2;0

or for an older printer you might use
' HP PCL-XL;1;1

The first character of that line specifies "Binding Format" which can
be: "'" ASCII, ")" Binary (little endian) or "(" Binary (big endian).
The single quote tells the printer that you want to send ASCII commands
rather than Binary.

Also stating that not all printers do ASCII

Examples: http://www.piclist.com/techref/language/pcl/lj1686.htm
PCL codes: http://stanislavs.org/helppc/laserjet.html
Bit about PCL6: http://www.piclist.com/techref/language/pcl/6.htm


Re: Can I use NetBSD as a desktop system?

2017-07-20 Thread coypu
mrg@ found that it jumps to NULL because it doesn't initialize if_stop.
I've made it build with the power management code, too.

care to try this?
http://coypu.sdf.org/rt2860-3.diff


Re: Can I use NetBSD as a desktop system?

2017-07-20 Thread coypu
On Thu, Jul 20, 2017 at 06:58:05PM +, co...@sdf.org wrote:
> Index: rt2860.c


Oops, forgot to build test this one! it's commented out because it won't
build. I'll try to fix it.


Re: Can I use NetBSD as a desktop system?

2017-07-20 Thread coypu
This diff makes uaudio claim to support suspend, does it work if you
don't drvctl -d uaudio0 with this change?

Index: uaudio.c
===
RCS file: /cvsroot/src/sys/dev/usb/uaudio.c,v
retrieving revision 1.154
diff -u -r1.154 uaudio.c
--- uaudio.c9 Jun 2017 10:11:20 -   1.154
+++ uaudio.c20 Jul 2017 18:50:05 -
@@ -504,6 +504,9 @@
DPRINTF("%s", "doing audio_attach_mi\n");
sc->sc_audiodev = audio_attach_mi(&uaudio_hw_if, sc, sc->sc_dev);
 
+   if (!pmf_device_register(self, NULL, NULL))
+   aprint_error_dev(self, "couldn't establish power handler\n");
+
return;
 }
 
@@ -537,6 +540,8 @@
int rv;
 
rv = 0;
+
+   pmf_device_deregister(self);
/* Wait for outstanding requests to complete. */
usbd_delay_ms(sc->sc_udev, UAUDIO_NCHANBUFS * UAUDIO_NFRAMES);
 







I also wonder where ral(4) suspend code fails, if at all.
What happens if you turn it on, and enabling debug to get as much
information as possible in case it fails?

Index: rt2860.c
===
RCS file: /cvsroot/src/sys/dev/ic/rt2860.c,v
retrieving revision 1.27
diff -u -r1.27 rt2860.c
--- rt2860.c20 Jul 2017 18:17:25 -  1.27
+++ rt2860.c20 Jul 2017 18:55:22 -
@@ -63,10 +63,11 @@
 
 #include 
 
+#define RAL_DEBUG 1
 #ifdef RAL_DEBUG
 #define DPRINTF(x) do { if (rt2860_debug > 0) printf x; } while (0)
 #define DPRINTFN(n, x) do { if (rt2860_debug >= (n)) printf x; } while (0)
-int rt2860_debug = 0;
+int rt2860_debug = 999;
 #else
 #define DPRINTF(x)
 #define DPRINTFN(n, x)

Index: if_ral_pci.c
===
RCS file: /cvsroot/src/sys/dev/pci/if_ral_pci.c,v
retrieving revision 1.23
diff -u -r1.23 if_ral_pci.c
--- if_ral_pci.c6 Jul 2016 14:28:51 -   1.23
+++ if_ral_pci.c20 Jul 2017 18:56:18 -
@@ -56,7 +56,7 @@
 #include 
 #include 
 
-#define RAL_POWER_MANAGEMENT 0 /* Disabled for now */
+#define RAL_POWER_MANAGEMENT 1
 
 static struct ral_opns {
int (*attach)(void *, int);




Summary:
1. Build a kernel with all these changes
2. Try if `drvctl -d ral0` and then suspend works (uaudio isn't causing 
problems)
3. Try without any drvctl -d

If you want to see it succeed  to resume you can apply the first or last diff 
in:
http://gnats.netbsd.org/52409


Re: Can I use NetBSD as a desktop system?

2017-07-20 Thread coypu
On Thu, Jul 20, 2017 at 07:34:12PM +0200, Riccardo Mottola wrote:
> Hi!
> 
> it does help a lot!
> 

Cool! I'll commit it.

> I get a notice (without crash) in dmesg that uaudio doesn't support power 
> management.
> 
> thus I did the trick...
> 
> drvctl -d uaudio0
> 
> it detached properly, so I issued sleep again... and voilà! I see the flush 
> message and indeed the screen turns black and the power led "blinks". So we 
> went to sleep.
> This means we have two problematic drivers?

I think that means it doesn't pmf_register_something, not necessarily
that it is broken.

opposite of ral, which claims support for suspend but then fails.
ral does have some support for suspend, but it's all ifdef'd out, with
RAL_POWER_MANAGEMENT defined to 0 in dev/pci/if_ral_pci.c.

> dr%_`ci_irq_^Hnsta,l() at n%tbs$:drl_pcH_irp_Hn3tAll+0x1aw() at 
> nDtbs`:^__i915GdRm_thaw+0xcf
> i915drikm^Q_Pesume^H) at jeTbSv)ce_`m&_driv%p^S2esume+0x5&
> pmfCdeVIca_resume^Wlgc+ed() at net"qdWDevice^^resumd+ x47
> pmfCsistem_`equMe ) at netbsd:plf^system_pe!te+0x07a

This one is probably:
http://gnats.netbsd.org/52409

It's a recent regression (applies to -8 and -current), and has a known fix
that will probably be committed soon.


Re: Can I use NetBSD as a desktop system?

2017-07-20 Thread coypu
On Tue, Jul 18, 2017 at 08:09:28AM +0530, Mayuresh wrote:
> - This may or may not matter: I use user space file system encryption with
>   incremental backup using cryfs which is not available on NetBSD. (There
>   is a thread on this on this list.) There are alternatives on NetBSD, but
>   they do not meet my requirement as aptly as cryfs does.

I added fuse-cryfs to pkgsrc-wip. it builds, but I might be misusing it.
it doesn't seem to run...

I'll try to ask upstream about it later


Re: Can I use NetBSD as a desktop system?

2017-07-20 Thread coypu
On Wed, Jul 19, 2017 at 03:44:05PM +, Chavdar Ivanov wrote:
> This is with unmodified GENERIC, so INSECURE should be present - as I said,
> the same live USB system works fine with the Quadro 600 card on the
> desktop. I know about userconf, but I chose to place several test and spare
> kernels in / and modify boot.cfg accordingly.

I wonder if you need to tell it that no, you don't have an nvidia card
and it should use whatever is the generic driver.

what does /var/log/Xorg.0.log say?
(Not just the error, what is it trying to load?)

The biggest recent change to drmkms drivers was attempting to use
MSI/MSI-X, with this commit:
https://v4.freshbsd.org/commit/netbsd/src/Df1u1LcClQ0WKVHz


Re: Can I use NetBSD as a desktop system?

2017-07-20 Thread coypu
Thanks,

does this help? (I assume removing the free would work but not be ideal)

I think the difference is that firmware_*'s allocator is kmem_alloc
which should be kmem_free'd, not regular free.

Index: rt2860.c
===
RCS file: /cvsroot/src/sys/dev/ic/rt2860.c,v
retrieving revision 1.26
diff -u -r1.26 rt2860.c
--- rt2860.c23 May 2017 02:19:14 -  1.26
+++ rt2860.c20 Jul 2017 12:42:29 -
@@ -466,7 +466,7 @@
}
 
if (sc->ucode != NULL)
-   free(sc->ucode, M_DEVBUF);
+   firmware_free(sc->ucode, sc->ucsize);
 
return 0;
 }



Re: Permedia 3 and Xorg (on AXP)

2017-07-20 Thread coypu
On Thu, Jul 20, 2017 at 11:31:48AM +0200, BERTRAND Joël wrote:
>   I build a new kernel with an up to date -8 tree. But I won't reboot this
> workstation remotely as shutdown -r doesn't work. System hangs after
> "rebooting" and keyboard's led are blinking.

Alpha AXP manual says that if we 'call_pal HALT' whether it reboots
depends halt_action/auto_action. I'm trying to see how to set it.


Re: Permedia 3 and Xorg (on AXP)

2017-07-20 Thread coypu
the internet claims alphas have a console and that 'SHOW AUTO_ACTION'
and 'SET AUTO_ACTION RESTART' to change it.


Re: Permedia 3 and Xorg (on AXP)

2017-07-20 Thread coypu
To be completely clear, rebuild a kernel with this diff and try it:

Index: GENERIC
===
RCS file: /cvsroot/src/sys/arch/alpha/conf/GENERIC,v
retrieving revision 1.375
diff -u -r1.375 GENERIC
--- GENERIC 13 Dec 2016 20:42:16 -  1.375
+++ GENERIC 20 Jul 2017 08:19:11 -
@@ -170,7 +170,7 @@
 # Loadable Kernel Modules
 
 # Disable kernel security.
-#options   INSECURE
+optionsINSECURE
 
 # Misc. options
 optionsEISAVERBOSE # recognize "unknown" EISA devices



Re: Permedia 3 and Xorg (on AXP)

2017-07-20 Thread coypu
at least /dev/mem accesses are checked by mm_md_physacc which checks
mem_clusters.


Re: Can I use NetBSD as a desktop system?

2017-07-20 Thread coypu
On Thu, Jul 20, 2017 at 10:37:14AM +0200, Riccardo Mottola wrote:
> Hi,
> 
> co...@sdf.org wrote:
> > Even if there is no information ral(4) looks very suspicious in suspend.
> > I am looking at the code.
> > does drvctl -d ral0 before suspend make it get further?
> 
> Issuing that command, causes a kernel panic and instant reboot.
> 
> panic: kernel diagnostic assertion "requested_size > 0" failed: file
> "/usr/src/sys/kern/subr_kmem.c", line 339
> 
> and then savecore.
> 
> I fear the driver Christos imported for Ralink is still buggy.

After reboot, look at your newest file in /var/crash/netbsd.*.core.gz
If the newest is netbsd.123.core.gz,
# cd /var/crash
# gunzip netbsd.123.core.gz
# gunzip netbsd.123.gz
# crash -M netbsd.123.core -N netbsd.123
> bt


And reply with the output of it, mentioning kernel version or output of:
ident /netbsd |grep -e if_ral_pci -e rt2860


Re: Permedia 3 and Xorg (on AXP)

2017-07-20 Thread coypu
On Thu, Jul 20, 2017 at 09:08:49AM +0200, BERTRAND Joël wrote:
> [   135.853] (WW) checkDevMem: failed to open/mmap /dev/mem (Operation not
> permitted)

You may need 'options INSECURE'
INSECURE allows processes to make raw memory accesses like /dev/mem.


Re: Can I use NetBSD as a desktop system?

2017-07-19 Thread coypu
Try also with this:
# sysctl -w hw.acpi.sleep.vbios=0

I believe it did not get backported. and -8/-current have a separate bug
that will prevent your suspend again still not committed.


Re: Can I use NetBSD as a desktop system?

2017-07-19 Thread coypu
Even if there is no information ral(4) looks very suspicious in suspend.
I am looking at the code.
does drvctl -d ral0 before suspend make it get further?


Re: Can I use NetBSD as a desktop system?

2017-07-19 Thread coypu
On Wed, Jul 19, 2017 at 07:21:51PM +0200, Riccardo Mottola wrote:
> Hi,
> 
> co...@sdf.org wrote:
> > > I have still not got this to work. Can you share your experience or URLs?
> > sysctl -w hw.acpi.sleep.state=3
> 
> this causes a reset on my HP620. FIrst I see the screen getting black with a
> cursor top-left, then a reset.

Does dmesg scrollback say anything? which netbsd version, dmesg?


Re: Can I use NetBSD as a desktop system?

2017-07-19 Thread coypu
Are you building without options INSECURE? (config -x)
You can also add 'userconf disable nouveau*' to boot.cfg to achieve the
same, without needing a custom kernel.


Re: Can I use NetBSD as a desktop system?

2017-07-19 Thread coypu
On Wed, Jul 19, 2017 at 03:22:51PM +, Chavdar Ivanov wrote:
> On my T61p even the suspend key works (-current amd64). Now, only if the
> screen wasn't blank with nouveau...

Black or not backlit?


Re: Can I use NetBSD as a desktop system?

2017-07-19 Thread coypu
On Tue, Jul 18, 2017 at 08:09:28AM +0530, Mayuresh wrote:
> - This is a problem for some, wasn't for me: No chromium browser. I could
>   make do with firefox. I still use firefox though I use Linux now.

There is wip/chromium, it needs a determined person to keep it up to
date and get patches upstream.

Whenever they had to make something specific to windows, they would
split the code by #if OS_WINDOWS or #if OS_LINUX. and not unix == else
case.

So everywhere we need to add OS_BSD, and they haven't been taking in
patches, so there's hundreds of such cases, which shift a little on
updates.


Re: Can I use NetBSD as a desktop system?

2017-07-19 Thread coypu
On Wed, Jul 19, 2017 at 12:39:58PM +0200, Riccardo Mottola wrote:
> I'd also love SD card reader support :)

Mine works... might be just a matter of recognizing your device as a
valid one


Re: Can I use NetBSD as a desktop system?

2017-07-19 Thread coypu
I had a very hard time with suspend working originally, but all the
fixes for my laptop are in -8 at least.
Since my laptop would hard reset on resume, I userconf disabled drivers
until I found the offending one, and it was fixed.
Things were easier to identify on my desktop - drvctl -d hdaudio0 gets
it further, but still fails with nouveau on resume.


Re: Can I use NetBSD as a desktop system?

2017-07-19 Thread coypu
On Wed, Jul 19, 2017 at 04:04:02PM +0530, Mayuresh wrote:
> I have still not got this to work. Can you share your experience or URLs?

sysctl -w hw.acpi.sleep.state=3


Re: Can I use NetBSD as a desktop system?

2017-07-19 Thread coypu
Sure.
Except for my phone, I don't use anything but NetBSD. I've got it on my
laptop and desktop.

my desktop is an i7-5280k which I use with an nvidia gtx 770, and the
(outdated) laptop is a dell inspiron n4030 with many parts replaced.

I usually run firefox listening to youtube for music or watching twitch
streams, a couple of terminal emulators for email/irc, read PDFs with
evince3, type homework with LyX, and do numerical analysis with Octave
(like MATLAB).

Sometimes I need to open things made with Microsoft Office so there's
LibreOffice for those, or (rarely) google docs.

Small things are worse.
- worse access to closed source software. I've been a linux user before
  so I am already accustomed to using the open variants.
  NetBSD has some linux compat / wine on i386, but it's worse.
  Linux has some good Steam games which I miss, but I'm told that we're
  good on the console emulators front, so I should try those sometime.

- hardware support is more hit and miss. for working wifi on my laptop,
  I switched the internal card for a supported intel 7260 card. I heard
  changing cards isn't possible on all laptops, but it was on mine.
  Previously I used a USB one (Edimax EW-78211Un, I believe) - it was
  worse, but works.
  Before that, I used my phone via USB tether (urndis), and I heard it's
  possible to bluetooth tether, but I haven't got around to try it.
  My laptop works almost perfectly (bluetooth, graphical acceleration,
  suspend...) but it's an older one, newer ones are worse.

- netbsd, to put it lightly, is less user friendly. I only accidentally
  discovered how to suspend. it reminds me of Gentoo.


Re: NetBSD 7.1 i386 on Virtualbox (fatal breakpoint trap in supervisor mode)

2017-07-16 Thread coypu
On Sun, Jul 16, 2017 at 06:48:46PM +, Valery Ushakov wrote:
> Finally found my old mail on the topic:
> 
>   http://mail-index.netbsd.org/netbsd-users/2013/06/21/msg013010.html

there's vm_guest you can add the hypervisor to to add a quirk in x86_patch


Re: NetBSD 7.1 i386 on Virtualbox (fatal breakpoint trap in supervisor mode)

2017-07-16 Thread coypu
On Sun, Jul 16, 2017 at 08:40:00AM +, co...@sdf.org wrote:
> https://www.virtualbox.org/ticket/3947

Never mind, I misread it...


Re: NetBSD 7.1 i386 on Virtualbox (fatal breakpoint trap in supervisor mode)

2017-07-16 Thread coypu
I see an old bug report relating to it:
https://www.virtualbox.org/ticket/3947

saying it would work with VT-x, but not without.


Re: creating a netbsd router

2017-07-15 Thread coypu
I don't know my way around networking, but I suspect agr(4) is the equivalent.


Re: 8.0 BETA: touchpad taps occur while typing

2017-06-14 Thread coypu
On Wed, Jun 14, 2017 at 10:35:17PM +0530, Mayuresh wrote:
> On Wed, Jun 14, 2017 at 04:55:09PM +, co...@sdf.org wrote:
> > It might be good to mention which driver is used for the mouse.
> 
> Oops, I filed already. Can I add this information to already filed PR?
> 

I saw that you did :-)
reply to gnats-b...@netbsd.org with Re: xsrc/52300: Laptop touchpad
sensitivity makes it nearly impossible to use NetBSD 8.0 BETA as the
title

(Only Re: category/12345 is important)


Re: 8.0 BETA: touchpad taps occur while typing

2017-06-14 Thread coypu
It might be good to mention which driver is used for the mouse.


Re: 8.0 BETA: touchpad taps occur while typing

2017-06-14 Thread coypu
Hi,

You probably want to use X11_TYPE=modular (after cleaning and deleting
packages) to get pkgsrc Xorg. Then, run the startx you get from pkgsrc.

We have some old versions of drivers but I see that the check to using
the new ones is for NetBSD==7. It should be extended to ==8 (NetBSD 6
did not have a new enough DRM), assuming you use the meta-pkg.

We don't have xf86-input-synaptic in pkgsrc, it must not be hard to add,
but I'm not sure how Xorg works too much (I don't know how to tell which
input driver I am using). Could raise it as an xsrc bug.


Re: 8.0 BETA i386: mplayer: text relocations error

2017-06-11 Thread coypu
On Sun, Jun 11, 2017 at 02:40:39PM +0530, Mayuresh wrote:
> On Sun, Jun 11, 2017 at 08:55:14AM +, co...@sdf.org wrote:
> > Could this be the cause of firefox issues on i386?
> 
> So far I have found audio/video working in firefox 52 on i386, compiled
> with oss.
> 
> What sort of issues firefox i386 is known to have?
> 

Some people mentioned it's unusable and crashes, but it's good to know
it isn't so bad, or got better.


Re: 8.0 BETA i386: mplayer: text relocations error

2017-06-11 Thread coypu
On Sun, Jun 11, 2017 at 10:41:51AM +0200, Martin Husemann wrote:
> On Sat, Jun 10, 2017 at 03:00:06PM +, co...@sdf.org wrote:
> > I seem to recall the mplayer failure is something in ffmpeg that is
> > i386 specific. I will try to reproduce.
> 
> Yes, text relocations are arch specific (usually non-PIC code used in
> PIC builds, maybe some of the mplayer asm stuff).
> 
> Mplayer works fine on amd64 and sparc64.
> 
Could this be the cause of firefox issues on i386?

(I remeber it was libavcodec from ffmpeg3, and firefox also uses
ffmpeg3)


Re: 8.0 BETA i386: mplayer: text relocations error

2017-06-10 Thread coypu
Hi,


on mpv it might nto pick the best audio output method by default.
you can choose which to use with e.g. --vo=xv

If you have intel graphics, getting vaapi may be good (hardware
decoding).

I seem to recall the mplayer failure is something in ffmpeg that is
i386 specific. I will try to reproduce.


Re: 8.0 BETA Freezes when configuring run0

2017-06-10 Thread coypu
It's fixed by the opencrypto changes but they were not pulled up to -8.
I have seen it too.


Re: NetBSD 7.1 amd64 boot failure on KVM

2017-05-20 Thread coypu
On Sat, May 20, 2017 at 06:06:06PM +0300, Andrei M. wrote:
> Hello all,
> 
> I've encountered a problem with running NetBSD 7.1 as guest on
> KVM/qemu as experienced previously with 7.0:
> 
> https://mail-index.netbsd.org/netbsd-users/2015/12/31/msg017550.html
> 
> The output is practically the same, even the same values for registers:
> 
> vmt0 at cpu0: Unknown
> vmware: open failed, eax=564d5868, ecx=001e, edx=5658
> vmt0: failed to open backdoor RPC channel (TCLO protocol)
> 
> Host machine - Linux Ubuntu 64 bit, qemu-kvm 1:2.5+dfsg-5ubunbtu10.14,
> the guest machine (NetBSD 7.1) run through Virtual Machine Manager.
> I've tried different memory values, between 512 MB and 1.5 GB (I
> wasn't allowed to set more, even though my PC has 4GB), with the same
> result.
> 
> The output refers to the following lines in NetBSD/sys/arch/x86/x86/vmt.c:
> 
> 306 vmt_attach (device_t parent, device_t self, void *aux):
> ...
> 336 if (vm_rpc_open(&sc->sc_tclo_rpc, VM_RPC_OPEN_TCLO) != 0) {
> 337aprint_error_dev(self, "failed to open backdoor RPC channel
> (TCLO protocol)\n");
> 338goto free;
> 339}
> 
> http://bxr.su/NetBSD/sys/arch/x86/x86/vmt.c
> 
> Andrei

You could sync with openbsd vmt. it will fix the 'backdoor RPC channel',
but userconf disable vmt will achieve the same - qemu claims to support
enough to pass this but does not.


Re: flash24 on 7.1(amd64)

2017-05-20 Thread coypu
On Sat, May 20, 2017 at 11:51:01AM +0200, r0ller wrote:
> Hi Coypu,
> 
> Thanks, that'd be great! However, when I tried it yesterday, the flash 
> package appeared that in the list of pkgin was not found in the 7.1 repo when 
> trying to install it:( Where shall I indicate it?

It looks like the flash player package is marked as 'redistribution not
permitted', so there won't be a binary package for it.

You can fetch it yourself if you grab pkgsrc:
cvs -danon...@anoncvs.netbsd.org:/cvsroot co pkgsrc
cd pkgsrc/*/adobe-flash-player
make install


Re: flash24 on 7.1(amd64)

2017-05-19 Thread coypu
On Fri, May 19, 2017 at 04:14:47PM +0200, r0ller wrote:
> Hi All,
> 
> Has anyone managed to get flash24 up and running on 7.1? The previous npapi 
> version of flash (which was flash10 or 11, can't recall) worked for me in 
> midori which I dared to update to the new flash24 npapi plugin after 
> upgrading to 7.1 but it doesn't work. Although, 
> the?http://netbsd.org/releases/formal-7/NetBSD-7.1.html page mentions among 
> the highlights "Linux compatibility improvements, allowing, e.g., the use 
> of Adobe Flash Player 24."

This is the thread where it was discussed and made to work:
http://mail-index.netbsd.org/pkgsrc-users/2017/02/thread1.html#024432

I'm not sure of the exact details and whether it all made it before 7.1.


Re: NetBSD-7.1 build.sh failure

2017-05-18 Thread coypu
On Thu, May 18, 2017 at 09:05:24PM +0100, Sad Clouds wrote:
> Somebody managed to build NetBSD-7.1, I can see it on ftp server.

I guess you have a newer texinfo it is pickingup from PATH.
also -7-1 is probably the branch, not the release.


Re: NetBSD-7.1 build.sh failure

2017-05-18 Thread coypu
On Thu, May 18, 2017 at 08:46:45PM +0100, Sad Clouds wrote:
> Hi, I'm trying to build 7.1 release, but I'm getting a failure in 
> tools/gcc/build/gcc
> 
> Any ideas? CVS netbsd-7-1 is the correct tag for NetBSD-7.1 release isn't it?
> 

Similar in pkgsrc
https://github.com/NetBSD/pkgsrc/blob/trunk/lang/gcc48/patches/patch-gcc_doc_gcc.texi


Re: Problems with wsconsole

2017-04-25 Thread coypu
Hi,

The higher resolution is from the new graphical acceleration drivers.
An immediate quick fix would be to disable them.

on x86, you can disable it by dropping to boot prompt and typing
userconf disable i915drm*
userconf disable radeon*
boot

and then it would hopefully go back to being a 80x25 console.

(depending on your hardware, plus I might be wrong with the exact name)
If you like this you can add it to /boot.cfg

it's a hack, but it'll work right away.


Re: blacklistd and bpfjit

2017-03-27 Thread coypu
npf attempts to auto load bpfjit, if it receives an error (such as
'permission denied because securelevel=1'), it will report that bpfjit
is not loaded and this is a performance problem, even if bpfjit is
already loaded.

in -8 it will no longer do this.


Re: List of supported chipsets?

2017-03-22 Thread coypu
some hardware advice for stuff currently supported:

If wifi, anything supported by iwm is a good choice (desktops come with
wifi now). It works really well. Alternatively, ensure it's possible to
swap wifi cards for an iwm. I've done this for my laptop and it's
fantastic.

If you want nvme root, USB3, etc. - current will be necessary. will
likely need efiboot.

I have USB3 and "some non-USB3 ports", but they don't work without an
xhci driver. nhusb-7 exists as a branch that will likely be merged to -7
now that 7.1 is released, enabling xhci on it.
I think people are still waiting for I219 support in wm(4), it seems close.

We don't handle dual graphics (some laptops have onboard graphics for
battery life and a GPU for performance and will switch between them in
runtime), but it seems for those you can pick one and it will work.

our graphics acceleration support is from linux 3.15, to give you an idea
of where it ends. that means some of nvidia GTX 700 series (I have a
working 770), none of the fancy AMDGPU cards, and I believe we stop
short of Skylake graphics support (possibly sooner). However, no
graphical acceleration isn't that bad for my personal use-case.

I'm going to recommend against anything nvidia because even when nouveau
exists, it's not the same as having a vendor-supported driver. intel/radeon
are vendor-supported.




Re: old i386 3.1 packages or upgrading with KVM

2017-03-14 Thread coypu
I think the only really scary part is updating the kernel. you can
(and should) make a copy of your current kernel and switching to a -7
kernel. everything else is much less risky and can be done
independently.

I haven't used that kind of setup, can you access the bootloader (and
select the newer kernel to try it out)?


Re: Installing FF 52 from pkgsrc: "stable" version instead of nightly

2017-03-13 Thread coypu
On Mon, Mar 13, 2017 at 05:08:37PM +0100, Marco Beishuizen wrote:
> On Mon, 13 Mar 2017, the wise Martin Husemann wrote:
> 
> > If anyone has receipes to easily make it crash, please send-pr!
> > Debugging often is simple, if you can reproduce it.
> > 
> > I'll fire off an i386 build with debug info tonight...
> 
> I'm unable to pinpoint the problem because FF crashes on every site it opens
> and after a few seconds of use, even on the preferences and add-ons windows.
> 

I occasionally have it crash on every tab on startup, but after a while
of trying it works normally. I imagine you've tried this already...


Re: Installing FF 52 from pkgsrc: "stable" version instead of nightly

2017-03-13 Thread coypu
On Mon, Mar 13, 2017 at 10:24:44AM -0500, J. Lewis Muir wrote:
> On 03/11, scole_mail wrote:
> > Marco Beishuizen  writes:
> > >
> > > It's on NetBSD/i386 7.0.2.
> > 
> > I guess I've also been having that same issue on i386 for awhile.  The
> > last stable version that worked for me was firefox-47.0.1 which was in
> > pkgsrc-2016Q2 I believe.  So I've been using that version.
> 
> Do you actually use that version for everyday use?  According to [1],
> there are many security vulnerabilities that have been fixed since
> Firefox 47, and I would bet many of those vulnerabilities exist in
> Firefox 47.  That's OK to you?

Mozilla maintains an 'Extended Support Release' which has security
fixes backported to it, so it will be a better choice for such cases.
Currently, it is www/firefox45 - it is updated whenever www/firefox is,
containing fixes for the same vulnerabilities.
Soon firefox52 (current non-ESR version) will become ESR.


Re: Installing FF 52 from pkgsrc: "stable" version instead of nightly

2017-03-12 Thread coypu
On Sat, Mar 11, 2017 at 06:19:55PM -0800, scole_mail wrote:
> Marco Beishuizen  writes:
> >
> > It's on NetBSD/i386 7.0.2.
> 
> I guess I've also been having that same issue on i386 for awhile.  The
> last stable version that worked for me was firefox-47.0.1 which was in
> pkgsrc-2016Q2 I believe.  So I've been using that version.

Possibly unrelated but was the cause of similar issues in the past:
things having stack unaligned on i386 only and needing -mstackrealign
(especially things with human-written asm, and a lot of video decoding
stuff like ffmpeg3 is like that).

I'm not sure if it's kind enough to let you know it's dying with SIGBUS.

I'd blindly apply -mstackrealign to everything to see if it helps (via
/etc/mk.conf)


Re: Installing FF 52 from pkgsrc: "stable" version instead of nightly

2017-03-11 Thread coypu
To add to what jak said, it is the stable version. It just lacks the
trademarked Mozilla stuff like their logo.

There was some drama in the past which resulted in this being a build
option, you can read about it here:
https://en.wikipedia.org/wiki/Mozilla_software_rebranded_by_Debian#Firefox_issue_resolution


Re: boot fails without VGA connected

2017-03-06 Thread coypu
On Thu, Mar 02, 2017 at 02:15:17PM +0100, Manuel Bouyer wrote:
> On Thu, Mar 02, 2017 at 01:19:28PM +0100, Jan Stary wrote:
> > On Mar 02 12:02:18, co...@sdf.org wrote:
> > > On Thu, Mar 02, 2017 at 10:08:38AM +0100, Niels Dettenbach wrote:
> > > > http://daemonforums.org/showthread.php?p=59007
> > > > 
> > > 
> > > I've made a request to put the change that likely fixes the
> > > problem mentioned in that forum post in -7 too.
> > > 
> > > It is:
> > > http://mail-index.netbsd.org/source-changes/2017/01/20/msg081204.html
> > 
> > I am confused now. The log message of in that commit says
> > "increase max io mem on amd64. some devices need it."
> > Is my problem somehow related to limited io memory?
> 
> I don't think so. It looks more like a driver hanging when querying ddc
> and nothing responds. 

I mean the problem in the forum post


Re: X11 libs linking

2017-03-06 Thread coypu
Build with X11_TYPE=modular or get base Xorg to match your
X11_TYPE=native (default value).


Re: hdaudio jack detection

2017-03-06 Thread coypu
When jack detection works, it just works.
It works out of the box on my laptop and shows up in dmesg as
hdafg:...unsol (which is also referenced in the hdaudio code).
So when I plug in my headphones it will play to them and not speakers.

Some hardware is worse supported.


Re: boot fails without VGA connected

2017-03-02 Thread coypu
On Thu, Mar 02, 2017 at 10:08:38AM +0100, Niels Dettenbach wrote:
> http://daemonforums.org/showthread.php?p=59007
> 

I've made a request to put the change that likely fixes the
problem mentioned in that forum post in -7 too.

It is:
http://mail-index.netbsd.org/source-changes/2017/01/20/msg081204.html


Re: Need Raspberry PI Repo back ASAP

2017-03-01 Thread coypu
Just to explain what the exact issue is:

raspberrypi-userland installs EGL stuff. So does MesaLib, and
apparently this is new. They install files with the same names to
the same locations, so they conflict.

As for pkgsrc Xorg, it's not necessary to install Xorg as a package.
NetBSD comes with a non-package Xorg already. raspberrypi-userland
adds EGL and some other things for it.

If you must have pkgsrc Xorg (which is also extra compile time), then
it's possible to fix this conflict, but not trivial.

On Wed, Mar 01, 2017 at 09:03:16AM +0100, Luescher Claude wrote:
> Last night I started building X11 from source.
> By this morning files are gone from the ftp:
>
> ...
> pkg_add: Conflicting PLIST with raspberrypi-userland-20161101:
> include/EGL/egl.h
> pkg_add: 1 package addition failed
> ...
> Stop.
> make[6]: stopped in /usr/pkgsrc/graphics/MesaLib
> *** Error code 1



Re: NetBSD 7.1RC1 panic

2017-01-20 Thread coypu
Hi,

I've seen this too, but it was hard to tell the cause.

There was a commit made to attempt a fix to the problem, which
was not pull up by accident - I've requested to pull it to -7
and -7-0.

I'm not sure if it fixes the problem, because it is hard to
reproduce and the backtrace gave no indication of the cause,
and it's not immediately clear that the code does what we suspect
it might -- zero sized allocations (as with the previous panic,
but without hitting an assert).

It will provide a warning in dmesg instead with the new change.
http://freshbsd.org/commit/netbsd/c02dc097d7c140630046c7b3accbb26dc9684e0c

Hope it helps.



Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?

2016-12-28 Thread coypu
On Wed, Dec 28, 2016 at 07:04:20PM +, Taylor R Campbell wrote:
> Likewise DRM/KMS.  We should disable options INSECURE by default on
> x86 and make Xorg not be suid root.  Obscure systems that still need
> it -- e.g., VIA, perhaps, which has no KMS driver -- can use custom
> kernel configs.

A non-issue for amd64, for which via is disabled by default :-)
Go for it!!



Re: Xorg vs Wayland (and MIR?) - future for NetBSD X ?

2016-12-27 Thread coypu
On Wed, Dec 28, 2016 at 02:49:54AM +, David Holland wrote:
> Except they apparently don't have it right yet, because the drmkms2
> Xorg binary is still setuid root.
> 

NetBSD is just about the only OS still using xorg as setuid root.
Pretty much everyone else did away with it.


Re: APU2 routing speed NetBSD

2016-12-21 Thread coypu
wm(4) had a bunch of work done on it since 7.0, so it's worth
trying a newer kernel. I believe most of it will be in 7.1 too.

NPF is not used unless you edit some config files, but it
shouldn't make a difference on a small workload.


Re: NetBSD 7.02 on APU2 PcEngines

2016-12-12 Thread coypu
On Mon, Dec 12, 2016 at 07:44:17PM +0100, 76nem...@gmx.ch wrote:
> XHCI init on dev 00:10.0: regs @ 0xfeb22000, 4 ports, 32 slots, 32 byte 
> contexts
> XHCIextcap 0x1 @ feb22500
> XHCIprotocol USB  3.00, 2 ports (offset 1), def 0
> XHCIprotocol USB  2.00, 2 ports (offset 3), def 10
> XHCIextcap 0xa @ feb22540
...

> boot device: 
> root device: 

I've had the same from a lack of support for xhci on netbsd-7. current should 
work..
there are workarounds, but I'm not they'd be available on coreboot. I believe 
what I used was disabling EHCI handoff and ACPI. undesirable, but it is a 
desktop and I was using USB for input.
Since this is not a desktop, I imagine you don't need USB to work super well 
(it might work a little) after the install, so you can use a netbsd-current 
installer and unpack just netbsd-7 stuff. you acn also mix: current kernel & 
older userland, etc. if you wish.


Re: A single-board computer for NetBSD

2016-12-06 Thread coypu
On Tue, Dec 06, 2016 at 08:38:17PM +0100, Martin Cermak wrote:
> That works for me, the kernel boots; how about the root
> partition?  Did you reuse the existing ext2 partition?
> Or did you do something else?
> 

NFS -- I was hesitant to wipe the disk, and don't have a
screwdriver tiny enough to open it.


Re: A single-board computer for NetBSD

2016-12-06 Thread coypu
I have the same. I did not replace the USB stick, and in the original msdos
partition I placed a netbsd.elf32 file in the same name as the linux kernel
was (it was 'vmlinux.64' or so).

I imagine replicating the partitions will work, but I haven't tried.


Re: Suspend to RAM failes

2016-11-29 Thread coypu
On Tue, Nov 29, 2016 at 04:10:49PM +0100, Carsten Kunze wrote:
> acpi0: entering state S3
> Flushing disk caches: 8 done
> sd0(umass0:0:0:0): generic HBA error
> sd0: cache synchronization failed
> fatal page fault in supervisor mode
> trap type 6 code 10 rip 0 cs 8 rflags 10282 cr2 0 ilevel 5 rsp 
> fe810e66ce68
> curlwp 0xfe822e531440 pid 0.6 lowest kstack 0xfe810e6692c0
> panic: trap
> cpu0: Begin traceback...
> vpanic() at netbsd:vpanic+0x140
> snprintf() at netbsd:snprintf
> trap() at netbsd:trap+0xc4b
> --- trap (number 6) ---
> ?() at 0
> ehci_softintr() at netbsd:ehci_softintr+0x19c
> usb_soft_intr() at netbsd:usb_soft_intr+0x1f
> softint_dispatch() at netbsd:softint_dispatch+0xd3
> DDB lost frame for netbsd:Xsoftintr+0x4f, trying 0xfe810e66cff0
> Xsoftintr() at netbsd:Xsoftintr+0x4f
> --- interrupt ---
> /home: replaying log to disk

I've seen this too, it was with USB wifi. I think it was attempting to use
USB-attached devices before the rest of the USB system is ready.
I have PR kern/51341 open for my issue.

... as a really horrible and otherwise transparent hack, you could probably
detach USB before & reattach (drvctl -r) after.

I'm not sure whether this is the right fix (if done within the kernel), but
it sounds somewhat correct...


Re: Suspend to RAM failes

2016-11-29 Thread coypu
Hi carsten,

In boot menu, you can select prompt and type:
  userconf disable hdaudio
  boot

To try without hdaudio.

I believe it's also possible to try with "drvctl -d hdaudio0", but unsure.

I'd guess some of your issues (whether they are this one or not) are from
radeon not attaching properly and hdaudio might be radeon's HDMI port...?
...And maybe we're not handling multiple graphics cards correctly.


Re: how to build 32-bit pkgsrc on amd64

2016-11-28 Thread coypu
On Sun, Nov 27, 2016 at 09:36:11PM +0100, r0ller wrote:
> Hi All,
> 
> There's a guide on how to build 32-bit pkgsrc on amd64 ( 
> https://mail-index.netbsd.org/pkgsrc-users/2008/12/16/msg008887.html ) which 
> I tried yesterday but with no success. During building bootstrap, I get an 
> error:
> 
> "ld: Relocatable linking with relocations from format elf32-i386 to 
> format elf64-x86-64 is not supported"
> 
> I googled a bit but the only advice I found was to pass the -m32 option to 
> the compiler. The only way to do that was to modify the bootstrap script so 
> that it puts all the lines into mk.conf already in step 2, that were 
> described in?the guide a step later (step 3). However, that didn't help 
> either. Actually, what I'd like to achieve is to have the 32-bit libs for 
> wine so that my wine64 installation can run both 32 and 64 bit programs. Is 
> this the right way to do it? By the way, do I need to install then one of the 
> netbsd32_compat libs for the 32bit libs? If so, then the latest one 
> (netbsd32_compat40) seems to be targeting NetBSD4.0 compatibility -where do I 
> find netbsd32_compat for 6.0 or 7.0? I feel a bit confused about the wine 
> multilib setup and there isn't much info about how to do it on NetBSD. 
> Any help is welcome:)
> 
> Thanks & regards,
> r0ller

Since II've attempted to do t he same, I'll try to close you in on the details:

Generally, there is no need for netbsd32_compat itself now, as the compat 
libraries 
already exist. You will however find that some stuff is still missing, and 
that's
fontconfig from 32bit Xorg.

An alternative I've used is unpacking a full NetBSD i386 install into a 
directory
(say "/emul/netbsd32") and then using:
cd /emul/netbsd32
mkdir usr/pkgsrc; cp /etc/resolv.conf etc/; cp /etc/mk.conf etc/
mount -t null /dev dev/; mount -t null /dev/pts  dev/pts; mount -t null 
/usr/pkgsrc usr/pkgsrc
chroot . /bin/sh

This is sufficient fo rbuilding 32bit wine on a 64bit machine.

It's probably possible to just create a package that does this for us. 
However...

You will now run into the real problem of real wine* on netbsd/amd64, USER_LDT.
Programs you will attempt to run will all fail (all 32bit wine uses LDT stuff),
because a syscall returns an error message.

>From my best understanding (and I am not very familiar with x86):
LDT is 'User-settable local descriptor table', some way of storing data within
a process that is different. It is only used by 32bit Windows (and no unixes).

NetBSD/i386 has some code that allows using it, but NetBSD/amd64 disables it,
There are some differences between i386 and amd64, which mean in its current
state it will not even build (a kernel that supports this).

The differences are not particularly great, but personally I found it 
challenging
because I'm not familiar with x86.

* I call it real wine because most Windows is 32bit, and even most 64bit stuff
is hidden by a 32bit launcher, I imagine in order to give a friendly warning
instead of outright crashing.

Some people are using i386 + PAE to continue taking advantage of their amounts
of RAM purely for wine.


Re: A single-board computer for NetBSD

2016-11-19 Thread coypu
On Sat, Nov 19, 2016 at 11:56:14AM -0800, Hal Murray wrote:
> 
> co...@sdf.org said:
> > There is some bug with rpi's USB causing hangs, so I wouldn't recommend
> > heavy use of it right now. 
> 
> Is that specific to the rpi?  The chip on the rpi?  ...
> 
> If it's specific to the chip on the rpi, it might be easier to debug on a PC. 
>  Also a rpi might work if you use 2 extra USB Ethernet chips that don't have 
> that quirk.
> 
> 
> -- 
> These are my opinions.  I hate spam.
> 
> 

It is port-arm/51453: mutex_vector_enter: locking against myself on RPi
It's a dwc2 bug.

Without using USB, it has been rock solid - I've compiled for days on
it. With - it would occasionally hang but is still usable.


Re: A single-board computer for NetBSD

2016-11-19 Thread coypu
On Fri, Nov 18, 2016 at 10:28:44PM -0800, Hal Murray wrote:
> 
> The low cost approach is to plug a USB Ethernet adapter into something like a 
> Raspberry Pi.  That may not be good enough if you are after high throughput 
> but it's probably good enough since you only asked for 100 megabit.
> 

There is some bug with rpi's USB causing hangs, so I wouldn't recommend
heavy use of it right now.


Re: hack fix for firefox & OSS audio noise

2016-11-09 Thread coypu
I've opted to use fmaxf(-1,fminf(1,f_buffer... instead.
it will stay in the valid range and not overflow.
I guess I was misusing fmaxf/fminf before.


hack fix for firefox & OSS audio noise

2016-11-07 Thread coypu
Hi,

I've had an issue for a long time with firefox & OSS audio
(PKG_DEFAULT_OPTIONS="-pulseaudio oss") where it would play some noise
in bass-heavy music.

other programs using oss did not have this issue - even playing the same
sounds.

the following fix works for me, although I'm not sure why any
combination of fmax/fmin/int mask/casting doesn't seem to do it.

(I've only tested it on firefox 45, 49 does not feel like running for me
now)

note: f_buffer can be and often is negative.

any suggestions for a less hacky patch?
? firefox.core
? plugin-container.core
? work
? workold
Index: distinfo
===
RCS file: /cvsroot/pkgsrc/www/firefox/distinfo,v
retrieving revision 1.258
diff -u -p -u -r1.258 distinfo
--- distinfo3 Nov 2016 22:46:43 -   1.258
+++ distinfo7 Nov 2016 14:32:33 -
@@ -54,7 +54,7 @@ SHA1 (patch-js_xpconnect_src_XPCConvert.
 SHA1 (patch-js_xpconnect_src_xpcprivate.h) = 
8a15ff542c9d3fce448d9ec63706f7dfb411d926
 SHA1 (patch-media_libcubeb_src_cubeb.c) = 
91eb24595c423b7e086670bb67e73cfd0bfb5559
 SHA1 (patch-media_libcubeb_src_cubeb__alsa.c) = 
17ec400709d3e448751ba1283e1b2c5f04bb4dc1
-SHA1 (patch-media_libcubeb_src_cubeb__oss.c) = 
f3617f38ad98f2eb7ebbd8f5904b361dde4bcc15
+SHA1 (patch-media_libcubeb_src_cubeb__oss.c) = 
5c1bf3aec8e7993704bab27dfec51874d39550ed
 SHA1 (patch-media_libcubeb_src_moz.build) = 
ffa7cf809f20c9e07e64fc885a06146f41634b03
 SHA1 (patch-media_libsoundtouch_src_cpu__detect__x86.cpp) = 
db61737afa7773e8cbd82976de3a02c917174696
 SHA1 
(patch-media_libstagefright_frameworks_av_include_media_stagefright_foundation_AString.h)
 = b280f691dbe67b6de592dcd04baf33c6cf480cc8
Index: patches/patch-media_libcubeb_src_cubeb__oss.c
===
RCS file: 
/cvsroot/pkgsrc/www/firefox/patches/patch-media_libcubeb_src_cubeb__oss.c,v
retrieving revision 1.5
diff -u -p -u -r1.5 patch-media_libcubeb_src_cubeb__oss.c
--- patches/patch-media_libcubeb_src_cubeb__oss.c   16 Jun 2016 12:08:21 
-  1.5
+++ patches/patch-media_libcubeb_src_cubeb__oss.c   7 Nov 2016 14:32:33 
-
@@ -175,7 +175,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb_
 +  got = run_data_callback(stream, f_buffer,
 +  OSS_BUFFER_SIZE/stream->params.channels);
 +  for (i=0; i<((unsigned long)got)*stream->params.channels; i++) {
-+  buffer[i] = f_buffer[i]*32767.0;
++  buffer[i] = f_buffer[i]*32767.0*0.7; /* XXX overflow? */
 +  }
 +} else {
 +  got = run_data_callback(stream, buffer,


Re: Firefox segfaults on NetBSD part #53 (now with reproduction steps)

2016-11-06 Thread coypu
On Mon, Nov 07, 2016 at 06:51:58AM +, co...@sdf.org wrote:
> I can reproduce this behaviour fairly reliably now: kill firefox,
> restart dbus. start firefox again, try to load anything.
> 

Now I'm sad because I've been trying this repeatedly to confirm it
really is reproducible and firefox just works :-)


Firefox segfaults on NetBSD part #53 (now with reproduction steps)

2016-11-06 Thread coypu
It really may be a dbus issue.

I've noticed that when I first start my machine, firefox will be
in a loop where opening a link will cause the tab to crash. 

I can reproduce this behaviour fairly reliably now: kill firefox,
restart dbus. start firefox again, try to load anything.

opening from terminal it says whenever I try to load a new tab
and it crashes:

###!!! [Parent][MessageChannel] Error: 
(msgtype=0x2C007A,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv

too much recursion

I seem to recall seeing these messages on fifrefox crashes on
previous versions, so maybe they've changed this code path not
to segfault now.


Some stuff to keep in mind:
- your typical netbsd user's only program using dbus is firefox.
- as usual, netbsd isn't a tier one platform for dbus, and I
  think we might be using 'weird code'
- linux typically uses epoll, so whenever there's code that has
  both, we're "exercising a less tested code path"
  .. and netbsd's poll violates POSIX (knowingly).


Re: pkg_add not working

2016-10-27 Thread coypu
On Thu, Oct 27, 2016 at 08:51:12PM +0530, Saurav Sachidanand wrote:
> I've set my $PKG_PATH to
> ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/7.0.1/All
> 
> Every time I run pkg_add git, I get,
> 
>   pkg_add: Can't process
> ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/7.0.1/All/git*:
>   pkg_add: no pkg found for 'git', sorry.
>   pkg_add: 1 package addition failed
> 
> How do I fix this?
> Thanks.

A workaround should be not using ftp (it's a server issue with the number
of packages), https should work.

(I thought this problem was resolved...)


Re: pf -> npf

2016-10-23 Thread coypu
Did you remember
sysctl net.inet.ip.forwarding=1 (Also inet6.ip6)?


Re: What are the codes that are responsible for velocity of operation of NetBSD?

2016-10-17 Thread coypu
Do you mean sysctl machdep.est.frequency.target?
You can adjust it to operate at a lower clock frequency.


Re: NetBSD on nuc6i5syk

2016-09-19 Thread coypu
Hi,
I heard someone has a diff for this already, and might commit it soon.


Re: Phoronix 8-way-BSD-install - NetBSD bombed

2016-09-14 Thread coypu
I feel that for home users, -current may be a good choice.

netbsd 7.0 is entirely unusable on much of my hardware. desktop was
extra bad. no USB3 means USB keyboard interrupts are lost or something,
need to boot with ACPI disabled (disables hyperthreading), cannot install
from USB, lack of graphical acceleration for nvidia cards means when
running old Xorg it took 1 minute to run a command like 'su', new Xorg
can handle until X is shut down once (all fixed in -current).

on linux drivers are written before a release, or right after. so
a typical user which has 2-3 year old hardware can afford to use LTS
kernel.
in netbsd, drivers only end up written after 2-3 developers get the
hardware, and they don't get it on release day. so this is a 2 year
delay in itself.

after this many users end up picking netbsd 7.0 release, not knowing it
is effectively like picking old ubuntu LTS, except with the additional
delay until developers (which are normal people and not companies)
obtain the hardware and get around to adding support.

it's USB3 now, tomorrow it will bbe that legacy boot can't boot NVMe
root and we have no UEFI bootloader yet (PR 51279), or no skylake
ethernet, etc.

the only thing a user with recent can do to bridge this gap is to use
-current. it may rarely be broken, thoguh.
If your hardware is unsupported, it's worth a try.



Re: Phoronix 8-way-BSD-install - NetBSD bombed

2016-09-13 Thread coypu
No USB3 support on NetBSD-7.0. I had the same. Requires twiddling with
BIOS options to even boot the installer.
Hopefully 7.1 will have merged by release (planned), -current already
does, and it works well.



  1   2   >