Re: 'not a valid hostname' error in 'bsd.rd' when using ,htaccess authorization

2022-07-20 Thread Adriaan
On Wed, Jul 20, 2022 at 9:09 AM Alexander Hall  wrote:

>
> > [snip]
> >The password '=ilovefreya=' has a leading and trailing '='. Tomorrow I
> >will eliminate those '='s and see whether that helps.
>
> See
> https://github.com/openbsd/src/blob/636cc85955243f5226db2246a74229481ad6bac2/distrib/miniroot/install.sub#L1838
>
> It seems we do not allow "@" either at the moment...
>
> /Alexander
>
> Thank you,

A pity I did not see your post earlier, In the installer, I had to page
with lousy 'more(1)' to find that location. It is on line 1422 of
'install.sub' of the 7.1 bsd.rd. As reported in my other mail, adding "@"
to the regex, as well as eliminating the "=" from the password solved it
and I was able to install.


Re: 'not a valid hostname' error in 'bsd.rd' when using ,htaccess authorization

2022-07-20 Thread Adriaan
At about line 1422 of the install.sub the hostname is checked with a ksh
specific pattern:
cat -n install.sub | sed -ne '/?(http/p'
  1422  ?(http?(s)://)+([A-Za-z0-9:.\[\]_-]))

With sed(1) I added "@" to the pattern
cat -n install.sub | sed -ne '/?(http/p'
  1422  ?(http?(s)://)+([@A-Za-z0-9:.\[\]_-]))

And now the the server name validates as OK:

Location of sets? (disk http nfs or 'done') [http]
HTTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none]
HTTP Server? (hostname, list#, 'done' or '?') [
wodan:ilovefreya@192.168.222.242]
Server directory? [pub/OpenBSD/7.1/amd64] OpenBSD/7.1/amd64
Unable to connect using HTTPS; using HTTP instead.

Select sets by entering a set name, a file name pattern or 'all'.
De-select
sets by prepending a '-', e.g.: '-game*'. Selected sets are labelled
'[X]'.
[X] bsd [X] man71.tgz   [X] xfont71.tgz
[X] bsd.rd  [X] game71.tgz  [X] xserv71.tgz
[X] base71.tgz  [X] xbase71.tgz [ ] site71.tgz
[X] comp71.tgz  [X] xshare71.tgz[X] site71-df-us.tgz
Set name(s)? (or 'abort' or 'done') [done] -comp* -game* -x* site* done
Get/Verify SHA256.sig   100% |**|  2144
00:00

So with the addition of '@' as well as using an user name and password that
matches the regex pattern it works well.

A happy camper 


On Wed, Jul 20, 2022 at 6:06 AM Adriaan  wrote:

> I am testing autoinstall for a VPS hosted in a datacenter. By using an
> OpenBSD native VM on my desktop
> I got all my issues with 'install.conf'  and 'install.site' solved.
>
> To provide some access control I created an '.htaccess' file for my
> local httpd server at 192.168.222.242 and
> for my external  webserver xyz.nl
>
> The retrieval of 'install.conf' as well as the autopartitioning
> template are successful:
>
> Response file location? [http://192.168.222.10/install.conf]
> https://wodan:=ilovefreya=@xyz.nl/install.conf
> Fetching https://wodan:=ilovefreya=@xyz.nl/install.conf
> Performing non-interactive install...
> Terminal type? [vt220] vt220
> [snip]
>
> URL to autopartitioning template for disklabel? [none]
> https://wodan:=ilovefreya=@xyz.nl/7.1/amd64/df-us-40gb.txt
> Fetching https://wodan:=ilovefreya=@xyz.nl/7.1/amd64/df-us-40gb.txt
>
> So far so good
>
> However the installing of the sets fails with a 'not a valid hostname'
>
> Location of sets? (disk http nfs or 'done') [http] http
> HTTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] none
> HTTP Server? (hostname, list#, 'done' or '?') [192.168.222.242]
> wodan:=ilovefreya=@192.168.222.242
> 'wodan:=ilovefreya=@192.168.222.242' is not a valid hostname.
>
> The same error occurs when I want to install the custom site* sets
> from my non-local xyz.nl server
>
> HTTP Server? (hostname, list#, 'done' or '?') [192.168.222.242]
> wodan:=ilovefreya=@xyz.nl
> 'wodan:=ilovefreya=@xyz.nl' is not a valid hostname.
>
> So using an username and password for .htaccess control is accepted by
> bsd.rd for the 'install.conf' and
> autopartioning template, while it errors out when dealing with the install
> sets.
>
> The password '=ilovefreya=' has a leading and trailing '='. Tomorrow I
> will eliminate those '='s and see whether that helps.
>
> Adriaan van Roosmalen
>


Re: No login prompt on console ttyC0 after boot when using "set tty com0"

2022-07-20 Thread Andrew Daugherity
On Wed, Jun 29, 2022 at 8:53 PM Ted Wynnychenko  wrote:
>
> Hello
> I was wondering if there is anything I could do to help figure this out.
> I do not have the requisite knowledge to even begin to understand why the
> kernel does not configure the vga output when boot.conf redirects to com0.

Look for a "redirection after boot" setting in your BIOS and try
disabling that.  The behavior you've described of both physical and
serial consoles working at the boot prompt _without_ 'set tty com0'
seems to indicate the BIOS is still handling redirection from
keyboard/video to serial, and my guess is that when OpenBSD
initializes the port for a serial console, it causes something in the
BIOS-linked local keyboard/vga to go wonky (wsdisplay at vga1 not
configured).

Note that in UEFI mode, "wsdisplay at vga1 not configured" would be
expected, as efifb takes over:

$ dmesg|egrep 'wsdisplay|fb|vga|com[0-9]'
vga1 at pci7 dev 0 function 0 "Matrox MGA G200eR" rev 0x01
wsdisplay at vga1 not configured
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
com1: console
efifb0 at mainbus0: 1280x1024, 32bpp
wsdisplay0 at efifb0 mux 1
wsdisplay0: screen 0-5 added (std, vt100 emulation)

You might give UEFI mode a try, to see if efifb works better than the
vga console.  Redirection after boot is probably the more important
setting though.

Note that the login prompt appearing on a console (spawning a getty as
configured in /etc/ttys) and the bootloader/kernel console device are
independent settings.


-Andrew



Re: OpenBSD hardware accelerated video? (In X on Intel/AMDGPU/ARM64)

2022-07-20 Thread Mihai Popescu
> With your email now however the original question remains: Does OpenBSD 
> actually support hardware accelerated video decoding today?

General answer: NO.

A more detailed answer is like this: there is a talk on the list about
libvaapi (if i recall correctly) implementation for intel only. It was
suggested, I am not sure if landed into the ports.
Hardware video decoding must be done thru some libs, I think they are
vaapi and vdpau for the moment. Then the used software (vlc, mpv,
chromium, firefox) must be compiled with support for one of these, or
both maybe.

Both ways are praised and hated on the internet, depending of what you
read. As always, there is much marketing involved.

Anyone is welcome to correct some possible mistakes, I am not a video
hardware expert.



Re: Freeze on OpenBSD 7.1

2022-07-20 Thread Nicolas

Le 20/07/2022 à 09:20, Stuart Henderson a écrit :

On 2022-07-20, Stuart Henderson  wrote:

On 2022-07-19, Zé Loff  wrote:

You have a single core machine with 2Gb RAM, and the data you sent seems
to indicate that there is no free RAM left.

Where are you seeing that? systat vm shows ~850MB free. No apparent mbuf leak.
No pool allocation failures.

Also it is a dual core machine but currently running a single-processor kernel
(GENERIC not GENERIC.MP) - see the "cpu: not configured"



Hello,

I didn't notice.

I rebooted on bsd.mp and now get that from sysctl :

hw.model=Intel(R) Celeron(R) CPU 1037U @ 1.80GHz
hw.ncpu=2

Thanks again to all of you for your help ! =)

Nicolas, Paris.



Re: OpenBSD hardware accelerated video? (In X on Intel/AMDGPU/ARM64)

2022-07-20 Thread Nick Holland

On 7/20/22 10:24 AM, Joseph wrote:

Hi,

Is there any hardware accelerated video decoding in OpenBSD today?

E.g. in X on AMDGPU and Intel & ARM64 built-in graphics.

My best understanding is that the X graphics rendering is indeed
accelerated on those, but video decoding is not.

HW accelerated video decoding would be very useful as high-resolution
full-screen playback not really works now because there's too much
lag (or maybe I had unsupported hardware, if so glad to be corrected). It
would contribute to a sense of smoothness in X/web browsing.


well...I have some pretty old hw that I don't seem to have any issue
watching full screen 1920x1200 video from YouTube.  Or 1920x1080 on my
other monitor.  On both Firefox and Chrome.  Zero efforts to optimize
performance, just tweaking login.conf to respect the expectations of
modern browsers so they don't get slapped out of RAM for excess memory
consumption.

OpenBSD 7.1-current (GENERIC.MP) #506: Sun May  8 20:07:46 MDT 2022 <- needs 
updating :-/
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 34340835328 (32749MB)
avail mem = 33282727936 (31740MB)
...
bios0: vendor Dell Inc. version "A16" date 05/28/2013
bios0: Dell Inc. Precision WorkStation T5500
...
cpu0: Intel(R) Xeon(R) CPU X5670 @ 2.93GHz, 3192.41 MHz, 06-2c-02
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,POPCNT,AES,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
[six real cores, hyperthreading off.  Was once a fast processor,
but that was probably ten years ago].
...
radeondrm0 at pci3 dev 0 function 0 "ATI Radeon HD 5450" rev 0x00
drm0 at radeondrm0
...
radeondrm1 at pci4 dev 0 function 0 "ATI Radeon HD 3450" rev 0x00
drm1 at radeondrm1
...
[pretty sure both those video cards were always lame]

Now, I'm not very picky, but I don't see obvious lag.  Kinda sucks,
I was much more productive before youtube and other video sources
became fully functional in OpenBSD. :)

Nick.



Re: Behringer UMC404HD USB soundcard with OpenBSD 7.1.

2022-07-20 Thread Alexandre Ratchov
On Sat, Jul 16, 2022 at 07:08:03PM +0200, Brian Durant wrote:
> 
> On 7/16/22 6:26 PM, Alexandre Ratchov wrote:
> > On Sat, Jul 16, 2022 at 05:37:35PM +0200, Brian Durant wrote:
> > > On 7/16/22 3:54 PM, Alexandre Ratchov wrote:
> > > > On Sat, Jul 16, 2022 at 03:36:18PM +0200, Brian Durant wrote:
> > > > > # mixerctl -f /dev/audioctl1
> > > > > mixerctl: /dev/audioctl1: Device not configured
> > > > > 
> > > > > # dmesg
> > > > forgot to mention: connect and power on the audio interface first ;-)
> > > It was. This time I waited until boot was complete, before connecting the
> > > USB cable...
> > > 
> > ...
> > 
> > > uhub3: port 1, set config 0 at addr 6 failed
> > > uhub3: device problem, disabling port 1
> > > 
> > sorry, I missed these lines, this is when you connected the device,
> > right?
> > 
> > The device doesn't even attach, so not surprising it doesn't work. I
> > don't know what could cause this maybe weak power?
> > 
> > Do you have an external power source, if not could you try with it?
> I think so, I was multitasking at the time... Interesting and even more
> interesting. Yes, the power supply that came with the unit is plugged in and
> functioning on the UMC404HD. I had a UMC202HD lying around the house, that I
> just tried, which is powered through the USB cable and that works fine with
> OpenBSD. Only the powered UMC404HD had issues.
> 

This reminds me a very basic MIDI keyboard (single usb1.1 bulk pipe)
that caused the same "port disabled" problem on all of my machines. It
managed to attach once every ~20 times though.

IIRC, the host didn't manage to reload the the device descriptor. I
tried to add delays at various places, tweak descriptor size, retry
many times but this didn't help. It seems that the host did something
that locks the device before the initial request to reload the
descriptor.

The device had a "programming mode" (hold a switch during attach), in
which it always attached; this mode the keyboard was not usable, so
probably not initialized.

Interestingly, all the "port disabled" problems I encountered the last
decade were caused by audio/MIDI equipment. The only specificity of
the audio equipment is that it has big analog circuits that may
consume more power and may take more time to settle. Cranking the
relevant delay in usbd_new_device() didn't help.

Cc'ing mpi@, just in case this rings a bell.



Re: Freeze on OpenBSD 7.1

2022-07-20 Thread Zé Loff
On Wed, Jul 20, 2022 at 07:20:15AM -, Stuart Henderson wrote:
> On 2022-07-20, Stuart Henderson  wrote:
> > On 2022-07-19, Zé Loff  wrote:
> >> You have a single core machine with 2Gb RAM, and the data you sent seems
> >> to indicate that there is no free RAM left.
> >
> > Where are you seeing that? systat vm shows ~850MB free. No apparent mbuf 
> > leak.
> > No pool allocation failures.

You are absolutely right, my apologies.  I read it all too fast and
misinterpreted the "Free 83K" on netstat -m, and didn't do the math to
see that the "In use 20334K" actually aren't close to 2Gb.

> Also it is a dual core machine but currently running a single-processor kernel
> (GENERIC not GENERIC.MP) - see the "cpu: not configured"

Also missed that, although in practice it acts as a single core machine,
so it will be less responsive when overworked, which was what I was
thinking about.  Again, reading the load average would have saved me
from the embarrassment.

Sorry for the noise, and thanks for setting me straight.

> 
> 
> -- 
> Please keep replies on the mailing list.
> 

-- 
 



Re: Freeze on OpenBSD 7.1

2022-07-20 Thread Stuart Henderson
On 2022-07-20, Stuart Henderson  wrote:
> On 2022-07-19, Zé Loff  wrote:
>> You have a single core machine with 2Gb RAM, and the data you sent seems
>> to indicate that there is no free RAM left.
>
> Where are you seeing that? systat vm shows ~850MB free. No apparent mbuf leak.
> No pool allocation failures.

Also it is a dual core machine but currently running a single-processor kernel
(GENERIC not GENERIC.MP) - see the "cpu: not configured"


-- 
Please keep replies on the mailing list.



Re: 'not a valid hostname' error in 'bsd.rd' when using ,htaccess authorization

2022-07-20 Thread Alexander Hall



On July 20, 2022 6:06:45 AM GMT+02:00, Adriaan  wrote:
>I am testing autoinstall for a VPS hosted in a datacenter. By using an
>OpenBSD native VM on my desktop
>I got all my issues with 'install.conf'  and 'install.site' solved.
>
>To provide some access control I created an '.htaccess' file for my
>local httpd server at 192.168.222.242 and
>for my external  webserver xyz.nl
>
>The retrieval of 'install.conf' as well as the autopartitioning
>template are successful:
>
>Response file location? [http://192.168.222.10/install.conf]
>https://wodan:=ilovefreya=@xyz.nl/install.conf
>Fetching https://wodan:=ilovefreya=@xyz.nl/install.conf
>Performing non-interactive install...
>Terminal type? [vt220] vt220
>[snip]
>
>URL to autopartitioning template for disklabel? [none]
>https://wodan:=ilovefreya=@xyz.nl/7.1/amd64/df-us-40gb.txt
>Fetching https://wodan:=ilovefreya=@xyz.nl/7.1/amd64/df-us-40gb.txt
>
>So far so good
>
>However the installing of the sets fails with a 'not a valid hostname'
>
>Location of sets? (disk http nfs or 'done') [http] http
>HTTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] none
>HTTP Server? (hostname, list#, 'done' or '?') [192.168.222.242]
>wodan:=ilovefreya=@192.168.222.242
>'wodan:=ilovefreya=@192.168.222.242' is not a valid hostname.
>
>The same error occurs when I want to install the custom site* sets
>from my non-local xyz.nl server
>
>HTTP Server? (hostname, list#, 'done' or '?') [192.168.222.242]
>wodan:=ilovefreya=@xyz.nl
>'wodan:=ilovefreya=@xyz.nl' is not a valid hostname.
>
>So using an username and password for .htaccess control is accepted by
>bsd.rd for the 'install.conf' and
>autopartioning template, while it errors out when dealing with the install 
>sets.
>
>The password '=ilovefreya=' has a leading and trailing '='. Tomorrow I
>will eliminate those '='s and see whether that helps.

See 
https://github.com/openbsd/src/blob/636cc85955243f5226db2246a74229481ad6bac2/distrib/miniroot/install.sub#L1838

It seems we do not allow "@" either at the moment...

/Alexander

>
>Adriaan van Roosmalen
>



Re: Freeze on OpenBSD 7.1

2022-07-20 Thread Stuart Henderson
On 2022-07-19, Zé Loff  wrote:
> You have a single core machine with 2Gb RAM, and the data you sent seems
> to indicate that there is no free RAM left.

Where are you seeing that? systat vm shows ~850MB free. No apparent mbuf leak.
No pool allocation failures.

-- 
Please keep replies on the mailing list.