Re: Running Windows inside vmm/vmd VM.

2019-11-22 Thread Jordan Geoghegan



On 2019-11-22 19:53, Jes wrote:

On Fri Nov 22, 2019 at 9:04 PM Dumitru Moldovan wrote:

  Supported guest operating systems are currently limited to OpenBSD and
  Linux. As there is no VGA support yet, the guest OS must support serial
  console.

Speaking of this, does anyone here have any experience running Linux VMs
on vmm/vmd? I threw Alpine/Debian installs together recently and
they seemed to work well. Looking for anyone with longer-term experience
as I'm interested in setting up a VPS hosting service on vmm/vmd, and
would appreciate any advice or anecdotes.

I have some Alpine and Void Linux installs running on vmm. They work 
well, with some caveats.


You may have issues with your VMs clocks. OpenBSD guests in vmm are now 
able to use the pvclock driver, which has greatly improved time keeping 
on my VMs, although I still do have some erratic clock jumping, but at 
least it's not so bad that ntpd can't keep up with it.


However the timekeeping situation for my Linux VMs is bleak. On both 
Void and Alpine, no clocks are even detected. In the dmesg it complains 
about the TSC clock source being unstable. Ultimately, we're left with 
only jiffies as a clock source option:


void$ cat 
/sys/devices/system/clocksource/clocksource0/available_clocksource

refined-jiffies jiffies

As a result, my clocks run at about one third of real time.

I've tried the Linux VM's on both an old Xeon machine as well as a 
modern Ryzen machine, and the clock situation seems to be equally bad on 
both of them.


...

Clock issues aside, I've found Linux guests to get better networking 
throughput on vmm than OpenBSD guests.


A few results from benchmarking Alpine vs Void vs OBSD, with iperf3:

(vmm host is older xeon rig, iperf3 tester is ryzen desktop)

Alpine got this result:

[ ID] Interval   Transfer Bitrate
[  5]   0.00-10.00  sec   511 MBytes   429 Mbits/sec  sender
[  5]   0.00-8.60   sec   511 MBytes   499 Mbits/sec  
receiver


Void Linux Got this result:

[ ID] Interval   Transfer Bitrate
[  5]   0.00-10.00  sec   611 MBytes   512 Mbits/sec  sender
[  5]   0.00-7.00   sec   610 MBytes   732 Mbits/sec  
receiver


And OpenBSD got this result:

[ ID] Interval   Transfer Bitrate
[  5]   0.00-10.00  sec   299 MBytes   251 Mbits/sec  sender
[  5]   0.00-10.19  sec   299 MBytes   246 Mbits/sec  
receiver


Because folks always freak out when tcpbench is forgotten about, I 
tested tcpbench as well between the two machines running OpenBSD:


Peak Mbps:  231.240 Avg Mbps:  204.423

I know that was some very unscientific testing, but hey, you asked for 
anecdotes.


Cheers,

Jordan



Re: Running Windows inside vmm/vmd VM.

2019-11-22 Thread Jes
On Fri Nov 22, 2019 at 9:04 PM Dumitru Moldovan wrote:
>  Supported guest operating systems are currently limited to OpenBSD and
>  Linux. As there is no VGA support yet, the guest OS must support serial
>  console.

Speaking of this, does anyone here have any experience running Linux VMs
on vmm/vmd? I threw Alpine/Debian installs together recently and
they seemed to work well. Looking for anyone with longer-term experience
as I'm interested in setting up a VPS hosting service on vmm/vmd, and
would appreciate any advice or anecdotes.



Re: Running Windows inside vmm/vmd VM.

2019-11-22 Thread Dumitru Moldovan

On Fri, Nov 22, 2019 at 07:42:39PM +0100, Karel Gardas wrote:


not sure what's current status of vmm/vmd hence asking. Has anybody
succeed with running Windows 10/Server 2019 inside the vmm/vmd VM?



From https://www.openbsd.org/faq/faq16.html#Introduction:


Supported guest operating systems are currently limited to OpenBSD and
Linux. As there is no VGA support yet, the guest OS must support serial
console.



Running Windows inside vmm/vmd VM.

2019-11-22 Thread Karel Gardas



Hello,

not sure what's current status of vmm/vmd hence asking. Has anybody 
succeed with running Windows 10/Server 2019 inside the vmm/vmd VM?


Thanks!
Karel



Re: Turn off Swap on boot disk

2019-11-22 Thread gwes

On 11/21/19 2:47 AM, Sean Kamath wrote:

Hello.

Can someone provide me a pointer to how to do this?

I have a bunch of Alix 2d13 boxes.  With 6.6, I’ve found I need more swap than 
the default layout on a 2G compact flash drive has.  So, I got some 1G USB 
thumb drives, and want to use JUST those for swap.  Despite different attempts 
(setting the mount_opts to xx, setting mount_opts to “priority=1”), I can’t 
seem to prevent the swap on the boot disk being added with priority = 0.

Can I do anything to turn it off or change the priority, short of changing the 
filesystem type?

Thanks,
Sean


I think you're trying to solve the wrong problem(s).

First, why is your workload causing swapping? That hasn't been
a good idea since the beginning of computing.

Second, USB sticks are not designed to do frequent writes.
If you need more swap space and have a USB port open, get a cheap 100G
flash drive with a USB interface like a portable drive.

I've never seen an Alix so this may be impossible but
why don't you install a larger boot drive?

Geoff Steckel

































i



Re: Sonos and OpenBSD PF - anyone on-list with experience ?

2019-11-22 Thread Stuart Henderson
On 2019-11-22, Peter N. M. Hansteen  wrote:
> On Fri, Nov 22, 2019 at 12:56:51PM +0100, Rachel Roch wrote:
>  
>> They sent me the following long email, it does mention inbound access but 
>> seems like a bit of a generic answer if all those ports really need to be 
>> opened inbound via PAT ?  I've asked Sonos to clarify exactly what is 
>> required inbound (as opposed to stateful outbound), and am still awaiting a 
>> reply !
>> 
>> "If your firewall needs to be manually configured, refer to the port numbers 
>> below and make sure inbound access is enabled for the Sonos application.
>
> I get the feeling that there is some confusion at the support people's
> end about what needs to be open inbound vs outbound.

Most users will not have a separate firewall device between Sonos and
anything accessing it, only a host firewall on e.g. Windows machines
running their software, and I think that is what their advice refers to.

If it is indeed on a different subnet then there are other things
that might need considering, like whether multicast can make it through.

The other thing to consider if the various devices involved are all
connected via wifi is whether client isolation is enabled.

We really need a sketch/description of the desired setup to give
further advice ..




No WAF detected

2019-11-22 Thread Kihaguru Gathura
Hi,

htbridge (https://www.immuniweb.com/websec/) no longer detects WAF on one of my
web servers configured with OpenBSD-httpd and PF on same machine;
sample of pf.conf configuration as follows.





# $OpenBSD: pf.conf,v 1.55 2017/12/03 20:40:04 sthen Exp $
#
# See pf.conf(5) and /etc/examples/pf.conf

# don't filter on the loopback interface
set skip on lo

# scrub incoming packets
match in all scrub (no-df)

# set up a default deny policy
block all

# activate spoofing protection for all interfaces
block in quick from urpf-failed

pass in on bge0 from 192.168.0.0/24 to 192.168.0.254
pass out on bge0 from 192.168.0.254 to 192.168.0.0/24


pass in on egress proto tcp from any to egress port 22 modulate state
pass in on egress proto tcp from any to egress port 80 modulate state
pass in on egress proto tcp from any to egress port 443 modulate state
pass out on egress proto tcp from any to any port smtp modulate state
~
~
~
~
~
~
~
~
~
~
~
/etc/pf.conf: 24 lines, 733 characters.
www# pfctl -nf /etc/pf.conf
www# pfctl -vf /etc/pf.conf
---

Not sure what new criteria they are using to detect WAF.

Which is a better way to implement a WAF on OpenBSD using the base utilities?

Thank you,

Kihaguru.


Re: Disabling laptop display & turning off suspend on lid close

2019-11-22 Thread Jan Stary
On Nov 22 09:05:38, unic...@disroot.org wrote:
> I am currently setting up my ThinkPad X220 as a server

Not a good idea. The laptop parts are not designed
to be running 24/7 years. Why don't you get an actual
server hardware? Depending on your exact needs,
you might foind it dirt cheap.

> and wish to disable the integrated display as it is anyway and will not
> be used.

Unplug the display cable.

> I am not familiar with how the underlying systems work

Why do you want to use such a system for a server then?

Jan



Re: Sonos and OpenBSD PF - anyone on-list with experience ?

2019-11-22 Thread Peter N. M. Hansteen
On Fri, Nov 22, 2019 at 12:56:51PM +0100, Rachel Roch wrote:
 
> They sent me the following long email, it does mention inbound access but 
> seems like a bit of a generic answer if all those ports really need to be 
> opened inbound via PAT ?  I've asked Sonos to clarify exactly what is 
> required inbound (as opposed to stateful outbound), and am still awaiting a 
> reply !
> 
> "If your firewall needs to be manually configured, refer to the port numbers 
> below and make sure inbound access is enabled for the Sonos application.

I get the feeling that there is some confusion at the support people's end 
about what needs to be open inbound vs outbound. 

My guesses are

> Port (TCP)Used for
> 80 and 443Music services, radio, and Sonos account

pass proto tcp from $sonos to any port { http https } # reasonable, web radio 
and such

> 445 and 3445  Music library
> 3400, 3401, and 3500  Sonos app control

Almost certainly only needed to access your (in-house?) media storage. Start 
with those blocked on egress.
That is, assuming that all relevant in-house devices are on the same net (as in 
the Sonos is not
on a separate subnet).

> 4070  Spotify Connect
>   System updates

Sounds odd, I'd say again, start with those blocked on egress, pass only if 
tests reveal they're needed.
(much like the earlier rule, pass only traffic that the sonos box initiates)

> Port (UDP)Used for
> 136 through 139   Music library
> 1900 and 1901 Sonos app control
> 2869, 10243, and 10280 through 10284  Windows Media Sharing

These too sound like only useful for local network access, such as if you have 
media stored on
machines around the house.

> 5353  Spotify Connect
> 6969  Sonos setup"

I'd start with those closed, test the specific functionality that *might* 
require those ports to be open
and again, I struggle to believe any claim that you need to pass those *in*, in 
all likelihood
a simple pass proto udp from $sonos to those ports should do.

Anyway, please do go back to the simple starting point such as a default to 
block, then
add pass rules that allow traffic initiated by the sonos box or others in the 
local net. 
I'm almost certain you do not need to explicitly allow anything initiated from 
the outside.

All the best,
Peter

-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



Re: sysupgrade to 6.6 failed at comp66.tgz

2019-11-22 Thread mabi
‐‐‐ Original Message ‐‐‐
On Friday, November 22, 2019 11:45 AM, Stuart Henderson  
wrote:

> A combination of things:
>
> -   You didn't install the comp set before

Thank you Stuart for your detailed mail. That's exactly it, I did not have 
comp65.tgz set installed as I just recently read on this mailing list that the 
best practice would be to install all sets, including the x* sets even if I 
don't need X on my servers. This is the only way that guarantees that such 
tools like sysupgrade can work properly. Lesson learnt live here ;-)

So thanks to your instructions I managed to upgrade to 6.6 using sysupgrade and 
it all worked well. Great work behind this sysupgrade tool!!



Re: Disabling laptop display & turning off suspend on lid close

2019-11-22 Thread Unicorn
On Fri, 2019-11-22 at 09:53 +0100, Gabriel Kihlman wrote:
> Unicorn  writes:
> > Still would like to know how to turn the display off, have not
> > figured
> > that out yet ;)
> 
> If you are not starting X, this is enough:
> 
> $ cat /etc/wsconsctl.conf 
> display.screen_off=10
> display.vblank=on
> display.kbdact=on
> display.msact=on
> display.outact=off
> 
> See the FAQ (Blanking an Inactive Console):
> https://www.openbsd.org/faq/faq7.html
> 
> Excerpt for your convenience:
> 
> "
> display.screen_off determines the blanking time in milliseconds.
> display.kbdact if set to on, keyboard activity will unblank the
> screen.
> display.msact if set to on, console mouse activity will unblank the
> screen.
> display.outact if set to on, screen output will unblank the screen.
> display.vblank if set to on will disable the vertical sync pulse.
> This will cause many monitors to go into an energy saver mode.
> "
> 
> /gabriel
> 

> Have a look at wsconsctl.conf(5).  Might be relevant.
> 
> -- 
> 
> / Raimo Niskanen, Erlang/OTP, Ericsson AB
> 

Thank you, this is what I was looking for! :)

I am sorry for not mentioning that I am not running X and not intending
to.

I did search online (only finding X related solutions) and stumbled
upon wsdisplay after searching through manpages for a while, but there
was too much terminology and system knowledge that I did not know about
for me to conclude what exactly I need to do. Next time I will try to
include more context to avoid confusion though. :)

Thanks again and all the best,

Unicorn





Re: Sonos and OpenBSD PF - anyone on-list with experience ?

2019-11-22 Thread Stuart Henderson
On 2019-11-22, Rachel Roch  wrote:
> Refuse to use Sonos myself, but am helping (or trying to) out a friend who 
> has a Sonos try to get things working wtih OpenBSD PF.
>
> I've simplified their PF rulese to a simple swiss cheese (i.e. stateful NAT'd 
> allow any out to any).

What exactly are you trying to do, where is PF involved? Often
this type of device would be on the same subnet as clients so PF
wouldn't be in the way anyway.

Generally with PF and unknown protocols you want to make sure that
you are logging blocked packets, and then try things and watch
tcpdump -neipflog0 and figure out what changes you need in order
to permit them.




Re: Sonos and OpenBSD PF - anyone on-list with experience ?

2019-11-22 Thread Rachel Roch


Hi Tom,

They sent me the following long email, it does mention inbound access but seems 
like a bit of a generic answer if all those ports really need to be opened 
inbound via PAT ?  I've asked Sonos to clarify exactly what is required inbound 
(as opposed to stateful outbound), and am still awaiting a reply !

"If your firewall needs to be manually configured, refer to the port numbers 
below and make sure inbound access is enabled for the Sonos application.
Port (TCP)  Used for
80 and 443  Music services, radio, and Sonos account
445 and 3445Music library
3400, 3401, and 3500Sonos app control
4070Spotify Connect
System updates
Port (UDP)  Used for
136 through 139 Music library
1900 and 1901   Sonos app control
2869, 10243, and 10280 through 10284Windows Media Sharing
5353Spotify Connect
6969Sonos setup"

22 Nov 2019, 11:32 by tom.sm...@wirelessconnect.eu:

> Hi Rachel,
> I  does Sonos Require uPnP support ?
> (does Sonos require a few  ports to be forwarded from your internet
> interface back into the Sonos
> device on the LAN)
> is there a manual port forwarding that you can do to get around the
> uPNP requirement  ?
>
>
>
>
>
>
>
> On Fri, 22 Nov 2019 at 11:26, Rachel Roch  wrote:
>
>>
>> Hi,
>>
>> Refuse to use Sonos myself, but am helping (or trying to) out a friend who 
>> has a Sonos try to get things working wtih OpenBSD PF.
>>
>> I've simplified their PF rulese to a simple swiss cheese (i.e. stateful 
>> NAT'd allow any out to any).
>>
>> Everything else they care to run on their network is running perfectly.  
>> Apart from their darn Sonos box.
>>
>> Sonos support are about as much use as a fart in spacesuit, so I'm hoping 
>> there's somebody on this list who has already fought and won the Sonos 
>> battle ?
>>
>> Thanks !
>>
>> Rachel
>>
>
>
> -- 
> Kindest regards,
> Tom Smyth.
>



Re: Sonos and OpenBSD PF - anyone on-list with experience ?

2019-11-22 Thread Peter N. M. Hansteen
On Fri, Nov 22, 2019 at 12:16:49PM +0100, Rachel Roch wrote:
 
> Refuse to use Sonos myself, but am helping (or trying to) out a friend who 
> has a Sonos try to get things working wtih OpenBSD PF.
> 
> I've simplified their PF rulese to a simple swiss cheese (i.e. stateful NAT'd 
> allow any out to any).
> 
> Everything else they care to run on their network is running perfectly.  
> Apart from their darn Sonos box.
> 
> Sonos support are about as much use as a fart in spacesuit, so I'm hoping 
> there's somebody on this list who has already fought and won the Sonos battle 
> ?

It does look like the Sonos devices use a number of services out there - 
https://support.sonos.com/s/article/688?language=en_US 

No hands on experience with that one myself (we ended up using a Bluesound 
Vault2 for our home music needs)

Cheers,
Peter

-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



Re: Sonos and OpenBSD PF - anyone on-list with experience ?

2019-11-22 Thread Tom Smyth
Hi Rachel,
I  does Sonos Require uPnP support ?
(does Sonos require a few  ports to be forwarded from your internet
interface back into the Sonos
device on the LAN)
is there a manual port forwarding that you can do to get around the
uPNP requirement  ?







On Fri, 22 Nov 2019 at 11:26, Rachel Roch  wrote:
>
> Hi,
>
> Refuse to use Sonos myself, but am helping (or trying to) out a friend who 
> has a Sonos try to get things working wtih OpenBSD PF.
>
> I've simplified their PF rulese to a simple swiss cheese (i.e. stateful NAT'd 
> allow any out to any).
>
> Everything else they care to run on their network is running perfectly.  
> Apart from their darn Sonos box.
>
> Sonos support are about as much use as a fart in spacesuit, so I'm hoping 
> there's somebody on this list who has already fought and won the Sonos battle 
> ?
>
> Thanks !
>
> Rachel
>


-- 
Kindest regards,
Tom Smyth.



Sonos and OpenBSD PF - anyone on-list with experience ?

2019-11-22 Thread Rachel Roch
Hi,

Refuse to use Sonos myself, but am helping (or trying to) out a friend who has 
a Sonos try to get things working wtih OpenBSD PF.

I've simplified their PF rulese to a simple swiss cheese (i.e. stateful NAT'd 
allow any out to any).

Everything else they care to run on their network is running perfectly.  Apart 
from their darn Sonos box.

Sonos support are about as much use as a fart in spacesuit, so I'm hoping 
there's somebody on this list who has already fought and won the Sonos battle ?

Thanks !

Rachel



Re: sysupgrade to 6.6 failed at comp66.tgz

2019-11-22 Thread Stuart Henderson
On 2019-11-22, mabi  wrote:
> Hi,
>
> I just tried out sysupgrade on one of my OpenBSD 6.5 servers in order to 
> upgrade automatically to 6.6 but unfortunately it failed at the comp66.tgz 
> and rebooted (upgrade log below).
>
> It looks like I am now running a half-upgraded hybrid OpenBSD 6.5/6.6 system. 
> It also didn't manage to relink the kernel after reboot (log file below).
>
> So I was wondering if anyone had any recommendations or insights to my 
> following points:
>
> - reason why it failed?

A combination of things:

- You didn't install the comp set before

- syspatch65-003_mds.tgz resulted in minor breakage if comp wasn't
installed (the problem was in syspatch generation and has since been
rectified) - /usr/include/machine is meant to be a symlink to the
arch name e.g.

$ ls -l /usr/include/machine
lrwxr-xr-x  1 root  bin  5 Nov 15 18:18 /usr/include/machine -> amd64

$ tar tvzf syspatch65-003_mds.tgz | grep usr/include
-r--r--r--  1 root bin   2933 May 27 15:44 
usr/include/amd64/codepatch.h
-r--r--r--  1 root bin  13210 May 27 15:44 usr/include/amd64/cpu.h
-r--r--r--  1 root bin   2467 May 27 15:44 
usr/include/amd64/cpu_full.h
-r--r--r--  1 root bin  56044 May 27 15:44 
usr/include/amd64/specialreg.h
-r--r--r--  1 root bin  27384 May 27 15:44 
usr/include/amd64/vmmvar.h
-r--r--r--  1 root bin   2933 May 27 15:44 
usr/include/machine/codepatch.h
-r--r--r--  1 root bin  13210 May 27 15:44 usr/include/machine/cpu.h
-r--r--r--  1 root bin   2467 May 27 15:44 
usr/include/machine/cpu_full.h
-r--r--r--  1 root bin  56044 May 27 15:44 
usr/include/machine/specialreg.h
-r--r--r--  1 root bin  27384 May 27 15:44 
usr/include/machine/vmmvar.h

Here is an example in the same dir built with the fixed process:

$ tar tvzf syspatch65-008_swapgs.tgz | grep usr/include
-r--r--r--  1 root bin   3456 Aug  8 14:37 
usr/include/amd64/codepatch.h
-r--r--r--  1 root bin   3859 Aug  8 14:37 
usr/include/amd64/frameasm.h



> - what should I do now? retry to upgrade with sysupgrade?
> - re-install the whole system?

rm -r /usr/include/machine and run the upgrade again.

If you want to use sysupgrade again for this, edit the script and force
NEXT_VERSION=6.6.

Otherwise boot bsd.rd and do it by hand - select "upgrade" and select all sets.

> - maybe sysupgrade needs to be patched to avoid this issue?

It _could_ be patched to do this ..

[ -d /usr/include/machine ] && rm -r /usr/include/machine

Though the problem also affects people who don't use sysupgrade,
modifying the installer is needed to fix things in that case e.g.
this would do the trick

Index: install.sub
===
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.1145
diff -u -p -r1.1145 install.sub
--- install.sub 19 Oct 2019 13:14:23 -  1.1145
+++ install.sub 22 Nov 2019 10:44:29 -
@@ -1660,7 +1660,7 @@ install_files() {
fi
if isin comp$VERSION.tgz $_get_sets; then
rm -rf /mnt/usr/lib/{gcc-lib,clang}
-   rm -rf /mnt/usr/include/g++
+   rm -rf /mnt/usr/include/*
fi
rm -rf /mnt/var/syspatch/*
fi




Re: Disabling laptop display & turning off suspend on lid close

2019-11-22 Thread chohag
Mathijs Hengst writes:
>
> You can turn off the screen via X:
>
> xset dpms force off
>
> (I found this on google in 2/3 minutes, so you might want to improve 
> your google-foo.)

It looks to me like his google-foo is working just fine. Question asked
and answered, no?

Matthew



Re: sysupgrade to 6.6 failed at comp66.tgz

2019-11-22 Thread chohag
mabi writes:
> Hi,
>
> - reason why it failed?

It cannot remove /usr/include/machine because it is not empty.

> - what should I do now? retry to upgrade with sysupgrade?

Empty /usr/include/machine.

> - re-install the whole system?

If you like. It will certainly empty out /usr/include/machine.

> - maybe sysupgrade needs to be patched to avoid this issue?

Probably not. sysupgrade has assumptions baked in to it which have
evidently been rendered invalid either by another tool or by the
person using them. That tool is where the patch most likely ought
to be directed.

Matthew



Re: Disabling laptop display & turning off suspend on lid close

2019-11-22 Thread Mathijs Hengst




On Fri, 2019-11-22 at 09:05 +0100, Unicorn wrote:

Hello,

I am currently setting up my ThinkPad X220 as a server running
OpenBSD
and wish to disable the integrated display as it is anyway and will
not
be used.

Equally, I wish for the ThinkPad to not suspend when I close the lid,
as the lid will be closed practically all the time. :)

I am not familiar with how the underlying systems work so I had
trouble
figuring out a solution myself, and searching online sadly did not
give
me working results. Any help is thus greatly appreciated!

Best,

Unicorn

Okay, by trial and error I found the sysctl setting machdep.lidaction=0
turns off suspend on closing lid, and I figured out I need to add it to
/etc/sysctl.conf to make it permanent, so I'm sorry for the early
question about that :)

Still would like to know how to turn the display off, have not figured
that out yet ;)

Best,

Unicorn


You can turn off the screen via X:

xset dpms force off

(I found this on google in 2/3 minutes, so you might want to improve 
your google-foo.)





Re: Disabling laptop display & turning off suspend on lid close

2019-11-22 Thread Gabriel Kihlman
Unicorn  writes:
>
> Still would like to know how to turn the display off, have not figured
> that out yet ;)

If you are not starting X, this is enough:

$ cat /etc/wsconsctl.conf 
display.screen_off=10
display.vblank=on
display.kbdact=on
display.msact=on
display.outact=off

See the FAQ (Blanking an Inactive Console):
https://www.openbsd.org/faq/faq7.html

Excerpt for your convenience:

"
display.screen_off determines the blanking time in milliseconds.
display.kbdact if set to on, keyboard activity will unblank the screen.
display.msact if set to on, console mouse activity will unblank the screen.
display.outact if set to on, screen output will unblank the screen.
display.vblank if set to on will disable the vertical sync pulse. This will 
cause many monitors to go into an energy saver mode.
"

/gabriel



sysupgrade to 6.6 failed at comp66.tgz

2019-11-22 Thread mabi
Hi,

I just tried out sysupgrade on one of my OpenBSD 6.5 servers in order to 
upgrade automatically to 6.6 but unfortunately it failed at the comp66.tgz and 
rebooted (upgrade log below).

It looks like I am now running a half-upgraded hybrid OpenBSD 6.5/6.6 system. 
It also didn't manage to relink the kernel after reboot (log file below).

So I was wondering if anyone had any recommendations or insights to my 
following points:

- reason why it failed?
- what should I do now? retry to upgrade with sysupgrade?
- re-install the whole system?
- maybe sysupgrade needs to be patched to avoid this issue?

Best regards,
Mabi


*** output of upgrade log ***

Terminal type? [vt220] vt220
Available disks are: sd0.
Which disk is the root disk? ('?' for details) [sd0] sd0
Checking root filesystem (fsck -fp /dev/sd0a)... OK.
Mounting root filesystem (mount -o ro /dev/sd0a /mnt)... OK.
Force checking of clean non-root filesystems? [no] no
fsck -p f8bd514855ccf1e5.f... OK.
fsck -p f8bd514855ccf1e5.d... OK.
fsck -p f8bd514855ccf1e5.e... OK.
fsck -p f8bd514855ccf1e5.g... OK.
/dev/sd0a (f8bd514855ccf1e5.a) on /mnt type ffs (rw, local)
/dev/sd0f (f8bd514855ccf1e5.f) on /mnt/home type ffs (rw, local, nodev, nosuid)
/dev/sd0d (f8bd514855ccf1e5.d) on /mnt/tmp type ffs (rw, local, nodev, nosuid)
/dev/sd0e (f8bd514855ccf1e5.e) on /mnt/usr type ffs (rw, local, nodev, 
wxallowed)
/dev/sd0g (f8bd514855ccf1e5.g) on /mnt/var type ffs (rw, local, nodev, nosuid)

Let's upgrade the sets!
Location of sets? (cd0 disk http nfs or 'done') [http] disk
Is the disk partition already mounted? [yes] yes
Pathname to the sets? (or 'done') [6.6/amd64] /home/_sysupgrade/

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] base66.tgz[X] game66.tgz[X] xfont66.tgz
[X] bsd.mp[X] comp66.tgz[X] xbase66.tgz   [X] xserv66.tgz
[X] bsd.rd[X] man66.tgz [X] xshare66.tgz
Set name(s)? (or 'abort' or 'done') [done] done
Directory does not contain SHA256.sig. Continue without verification? [no] yes
Installing bsd  100% |**| 18250 KB00:00
Installing bsd.mp   100% |**| 18336 KB00:00
Installing bsd.rd   100% |**| 10058 KB00:00
Installing base66.tgz   100% |**|   236 MB00:36
Installing comp66.tgz81% |* | 58880 KB00:02 
ETAtar: Unable to remove directory ./usr/include/machine: Directory not empty
Installing comp66.tgz   100% |**| 72109 KB00:14
Installation of comp66.tgz failed. Continue anyway? [no] no


*** output of /usr/share/relink/kernel/GENERIC/relink.log ***

(SHA256) /bsd: FAILED

Failed to verify /bsd's checksum, therefore a randomly linked kernel (KARL)
is not being built. KARL can be re-enabled for next boot by issuing as root:

sha256 -h /var/db/kernel.SHA256 /bsd



Re: Disabling laptop display & turning off suspend on lid close

2019-11-22 Thread Raimo Niskanen
On Fri, Nov 22, 2019 at 09:45:44AM +0100, Unicorn wrote:
> On Fri, 2019-11-22 at 09:28 +0100, Claus Assmann wrote:
> > On Fri, Nov 22, 2019, Unicorn wrote:
> > 
> > > Still would like to know how to turn the display off, have not
> > > figured
> > > that out yet ;)
> > 
> > man xset
> > 
> > Not sure if this is what you want (yes, it's ugly):
> > 
> > #!/bin/sh
> > if test $# -ge 1
> > then
> >   TO=$1
> > else
> >   TO=300
> > fi
> > xset s $TO
> > xset s blank
> > if test $# -lt 1
> > then
> > xset dpms 500 660 900
> > fi
> > 
> 
> Thank you for the suggestion!
> 
> Will using xset work without running X? I intended to not use X as I am
> just trying to set up a simple mailserver. :)
> 
> Best,
> 
> Unicorn

Have a look at wsconsctl.conf(5).  Might be relevant.

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



Re: Disabling laptop display & turning off suspend on lid close

2019-11-22 Thread Unicorn
On Fri, 2019-11-22 at 09:28 +0100, Claus Assmann wrote:
> On Fri, Nov 22, 2019, Unicorn wrote:
> 
> > Still would like to know how to turn the display off, have not
> > figured
> > that out yet ;)
> 
> man xset
> 
> Not sure if this is what you want (yes, it's ugly):
> 
> #!/bin/sh
> if test $# -ge 1
> then
>   TO=$1
> else
>   TO=300
> fi
> xset s $TO
> xset s blank
> if test $# -lt 1
> then
> xset dpms 500 660 900
> fi
> 

Thank you for the suggestion!

Will using xset work without running X? I intended to not use X as I am
just trying to set up a simple mailserver. :)

Best,

Unicorn



Re: Disabling laptop display & turning off suspend on lid close

2019-11-22 Thread Claus Assmann
On Fri, Nov 22, 2019, Unicorn wrote:

> Still would like to know how to turn the display off, have not figured
> that out yet ;)

man xset

Not sure if this is what you want (yes, it's ugly):

#!/bin/sh
if test $# -ge 1
then
  TO=$1
else
  TO=300
fi
xset s $TO
xset s blank
if test $# -lt 1
then
xset dpms 500 660 900
fi

-- 
Address is valid for this mailing list only.



Re: Disabling laptop display & turning off suspend on lid close

2019-11-22 Thread Unicorn
On Fri, 2019-11-22 at 09:05 +0100, Unicorn wrote:
> Hello,
> 
> I am currently setting up my ThinkPad X220 as a server running
> OpenBSD
> and wish to disable the integrated display as it is anyway and will
> not
> be used.
> 
> Equally, I wish for the ThinkPad to not suspend when I close the lid,
> as the lid will be closed practically all the time. :)
> 
> I am not familiar with how the underlying systems work so I had
> trouble
> figuring out a solution myself, and searching online sadly did not
> give
> me working results. Any help is thus greatly appreciated!
> 
> Best,
> 
> Unicorn

Okay, by trial and error I found the sysctl setting machdep.lidaction=0
turns off suspend on closing lid, and I figured out I need to add it to
/etc/sysctl.conf to make it permanent, so I'm sorry for the early
question about that :)

Still would like to know how to turn the display off, have not figured
that out yet ;)

Best,

Unicorn



Re: Disabling laptop display & turning off suspend on lid close

2019-11-22 Thread Theo de Raadt
Unicorn  wrote:

> Hello,
> 
> I am currently setting up my ThinkPad X220 as a server running OpenBSD
> and wish to disable the integrated display as it is anyway and will not
> be used.
> 
> Equally, I wish for the ThinkPad to not suspend when I close the lid,
> as the lid will be closed practically all the time. :)
> 
> I am not familiar with how the underlying systems work so I had trouble
> figuring out a solution myself, and searching online sadly did not give
> me working results. Any help is thus greatly appreciated!

Interesting.  I searched on google and found the openbsd source code,
so you can probably succeed if you try hard enough.



Disabling laptop display & turning off suspend on lid close

2019-11-22 Thread Unicorn
Hello,

I am currently setting up my ThinkPad X220 as a server running OpenBSD
and wish to disable the integrated display as it is anyway and will not
be used.

Equally, I wish for the ThinkPad to not suspend when I close the lid,
as the lid will be closed practically all the time. :)

I am not familiar with how the underlying systems work so I had trouble
figuring out a solution myself, and searching online sadly did not give
me working results. Any help is thus greatly appreciated!

Best,

Unicorn



Re: Turn off Swap on boot disk

2019-11-22 Thread Theo de Raadt
Sebastien Marie  wrote:

> On Wed, Nov 20, 2019 at 11:47:39PM -0800, Sean Kamath wrote:
> > Hello.
> > 
> > Can someone provide me a pointer to how to do this?
> > 
> > I have a bunch of Alix 2d13 boxes.  With 6.6, I’ve found I need more swap 
> > than the default layout on a 2G compact flash drive has.  So, I got some 1G 
> > USB thumb drives, and want to use JUST those for swap.  Despite different 
> > attempts (setting the mount_opts to xx, setting mount_opts to 
> > “priority=1”), I can’t seem to prevent the swap on the boot disk being 
> > added with priority = 0.  
> > 
> > Can I do anything to turn it off or change the priority, short of changing 
> > the filesystem type?
> 
> If I recall correctly, the swap on the boot disk is directly added by the
> kernel, and not by rc(8). It is why priority in fstab(5) is ignored.

config  bsd swap generic

It is part of the "swap generic" logic.

> But you could change the priority of an already added swap with swapctl(8):
> 
> # swapctl -c -p 1 myduid.b
> 
> And you could automatically run it at boot-time by adding the command line in
> /etc/rc.local file, which is sourced by rc(8).
> 
> # echo 'swapctl -c -p 1 myduid.b' >> /etc/rc.local
> 
> This way, at boot time:
> - kernel adds the boot disk swap with priority 0
> - rc(8) adds the second swap with priority 0 (as configured in fstab(5))
> - rc(8) via rc.local changes the boot disk swap with priority 1
> - system will run with two swaps:
>   - second swap, priority 0, so used first
>   - boot disk swap, priority 1, used if second swap is full or by kernel for 
> dumping kernel core
> 
> I hope it helps.

It could help.  Or, leave it alone.

If you hit swap, you've learned something:  Your machine is too small.