Re: System Hangs with Intel i7 3920XM

2014-06-21 Thread Dimitris Papastamos
On Sat, Jun 21, 2014 at 07:35:22PM +0200, Gustav Fransson Nyvell wrote:
 I want to ask 1) Is there something I can do? 2) Is there some logging I can
 enable that will dump stuff useful for reading after a hang? 3) Is this a
 kernel driver/module/something problem or caused by an application?
 (Applications should be able to do this, right?)

I am no expert but have you tried disabling nvidia from the bios and booting
only with your intel graphics card?

does this happen without X?

have you tried the bsd.sp kernel?



Re: System Hangs with Intel i7 3920XM

2014-06-21 Thread Dimitris Papastamos
If you have any means of hooking up a serial cable (docking station?)
you might be able to see the ddb prompt and go from there.

Does the freeze happen instantly or does it slowly become unresponsive?
For the latter you might have time to switch to a VT and wait for ddb.
You can force a crash dump via 'boot dump' or 'boot crash'.



PATCH: cwm move window to {top,bottom}{left,right} corners

2014-06-22 Thread Dimitris Papastamos
Hi everyone,

This is my first attempt at hacking cwm.  This feature allows one to
move the current window to the corners of the screen.

IIRC, evilwm used to have this feature.  Not sure if it is upstream
material though.

I am also not so sure about the default keybinds, let me know if you
have any ideas.

===
RCS file: /cvs/xenocara/app/cwm/calmwm.h,v
retrieving revision 1.259
diff -u -p -r1.259 calmwm.h
--- calmwm.h8 Feb 2014 02:49:30 -   1.259
+++ calmwm.h22 Jun 2014 14:27:26 -
@@ -60,6 +60,10 @@
 #define CWM_DOWN   0x0020
 #define CWM_LEFT   0x0040
 #define CWM_RIGHT  0x0080
+#define CWM_TOP_LEFT   0x0100
+#define CWM_BOTTOM_LEFT0x0200
+#define CWM_TOP_RIGHT  0x0400
+#define CWM_BOTTOM_RIGHT   0x0800
 
 /* exec */
 #defineCWM_EXEC_PROGRAM0x0001
@@ -478,7 +482,8 @@ void kbfunc_menu_cmd(struct 
client_ct
 voidkbfunc_ssh(struct client_ctx *, union arg *);
 voidkbfunc_term(struct client_ctx *, union arg *);
 voidkbfunc_tile(struct client_ctx *, union arg *);
-
+voidkbfunc_client_move_edge(struct client_ctx *,
+union arg *);
 voidmousefunc_client_grouptoggle(struct client_ctx *,
union arg *);
 voidmousefunc_client_move(struct client_ctx *,
Index: conf.c
===
RCS file: /cvs/xenocara/app/cwm/conf.c,v
retrieving revision 1.173
diff -u -p -r1.173 conf.c
--- conf.c  21 Apr 2014 12:52:14 -  1.173
+++ conf.c  22 Jun 2014 14:27:26 -
@@ -233,6 +233,10 @@ static const struct {
{ CS-Down,bigptrmovedown },
{ CS-Up,  bigptrmoveup },
{ CS-Right,   bigptrmoveright },
+   { CM-t,   movetopleft },
+   { CM-v,   movebottomleft },
+   { CM-y,   movetopright },
+   { CM-b,   movebottomright },
 },
 mouse_binds[] = {
{ 1,  menu_unhide },
@@ -453,6 +457,14 @@ static const struct {
{.i = (CWM_RIGHT|CWM_PTRMOVE|CWM_BIGMOVE)} },
{ htile, kbfunc_tile, CWM_WIN, {.i = CWM_TILE_HORIZ} },
{ vtile, kbfunc_tile, CWM_WIN, {.i = CWM_TILE_VERT} },
+   { movetopleft, kbfunc_client_move_edge, CWM_WIN,
+   {.i = (CWM_TOP_LEFT)} },
+   { movebottomleft, kbfunc_client_move_edge, CWM_WIN,
+   {.i = (CWM_BOTTOM_LEFT)} },
+   { movetopright, kbfunc_client_move_edge, CWM_WIN,
+   {.i = (CWM_TOP_RIGHT)} },
+   { movebottomright, kbfunc_client_move_edge, CWM_WIN,
+   {.i = (CWM_BOTTOM_RIGHT)} },
 };
 
 static const struct {
Index: cwm.1
===
RCS file: /cvs/xenocara/app/cwm/cwm.1,v
retrieving revision 1.50
diff -u -p -r1.50 cwm.1
--- cwm.1   1 Feb 2014 00:25:04 -   1.50
+++ cwm.1   22 Jun 2014 14:27:26 -
@@ -98,6 +98,14 @@ Toggle maximization of current window.
 Toggle vertical maximization of current window.
 .It Ic CMS-=
 Toggle horizontal maximization of current window.
+.It Ic CM-t
+Move window to the top left corner of screen.
+.It Ic CM-y
+Move window to the top right corner of screen.
+.It Ic CM-v
+Move window to the bottom left corner of screen.
+.It Ic CM-b
+Move window to the bottom right corner of screen.
 .It Ic M-?
 Spawn
 .Dq exec program
Index: kbfunc.c
===
RCS file: /cvs/xenocara/app/cwm/kbfunc.c,v
retrieving revision 1.95
diff -u -p -r1.95 kbfunc.c
--- kbfunc.c30 Jan 2014 15:41:11 -  1.95
+++ kbfunc.c22 Jun 2014 14:27:26 -
@@ -480,3 +480,47 @@ kbfunc_tile(struct client_ctx *cc, union
break;
}
 }
+
+void
+kbfunc_client_move_edge(struct client_ctx *cc, union arg *arg)
+{
+   struct screen_ctx   *sc = cc-sc;
+   struct geom  xine;
+   int  flags;
+
+   /*
+* pick screen that the middle of the window is on.
+* that's probably more fair than if just the origin of
+* a window is poking over a boundary
+*/
+   xine = screen_find_xinerama(sc,
+   cc-geom.x + cc-geom.w / 2,
+   cc-geom.y + cc-geom.h / 2, CWM_GAP);
+
+   flags = arg-i;
+
+   switch (flags) {
+   case CWM_TOP_LEFT:
+   cc-geom.x = xine.x;
+   cc-geom.y = xine.y;
+   client_move(cc);
+   break;
+   case CWM_BOTTOM_LEFT:
+   cc-geom.x = xine.x;
+   cc-geom.y = xine.y + xine.h - cc-geom.h - cc-bwidth * 2;
+   client_move(cc);
+   break;
+   case CWM_TOP_RIGHT:
+   cc-geom.x = xine.x + xine.w - cc-geom.w - cc-bwidth * 2;
+   cc-geom.y = xine.y;
+   

Re: system freezes after routing traffic via openvpn

2015-04-14 Thread Dimitris Papastamos
On Tue, Apr 14, 2015 at 07:48:55PM +0100, Pedro Caetano wrote:
 Hi,
 
 After establishing a openvpn tunnel, the system frezzes completely when
 traffic is pushed trough the tunnel.
 Impossible to change x console or interact with the system.
 
 Openvpn 2.3.6 installed from packages.

I am experiencing a system freeze with openvpn as well.

My openvpn config is:

daemon
proto udp
mode p2p
remote 1.2.3.4
port 1210
dev-type tun
dev tun0
comp-lzo
secret /etc/openvpn/foo.key
user _openvpn
group _openvpn
persist-key
persist-tun
keepalive 1 30
mssfix
ifconfig 172.22.252.171 172.23.102.230

OpenBSD 5.7-current (GENERIC) #2: Thu Apr  9 11:02:39 BST 2015
r...@dmt.2f30.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 8558837760 (8162MB)
avail mem = 8295624704 (7911MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0x7f4cc000 (39 entries)
bios0: vendor American Megatrends Inc. version 1.0b date 08/11/2014
bios0: Supermicro A1SA2-2750F
acpi0 at bios0: rev 2
acpi0: sleep states S0 S5
acpi0: tables DSDT FACP FPDT SPMI MCFG WDAT UEFI APIC BDAT HPET SSDT HEST BERT 
ERST EINJ
acpi0: wakeup devices PEX1(S0) PEX2(S0) PEX3(S0) PEX4(S0) EHC1(S0)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Atom(TM) CPU C2750 @ 2.40GHz, 2400.45 MHz
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,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,RDRAND,NXE,LONG,LAHF,3DNOWP,PERF,ITSC,SMEP,ERMS
cpu0: 1MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 100MHz
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PEX1)
acpiprt2 at acpi0: bus -1 (BR18)
acpiprt3 at acpi0: bus 2 (PEX2)
acpiprt4 at acpi0: bus 3 (BR1A)
acpiprt5 at acpi0: bus 4 (PEX3)
acpiprt6 at acpi0: bus -1 (PEX4)
acpicpu0 at acpi0: C2, C1, PSS
ipmi at mainbus0 not configured
cpu0: Enhanced SpeedStep 2400 MHz: speeds: 2401, 2400, 2300, 2200, 2100, 2000, 
1900, 1800, 1700, 1600, 1500, 1400, 1300, 1200 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 vendor Intel, unknown product 0x1f01 rev 0x02
ppb0 at pci0 dev 1 function 0 Intel Atom C2000 PCIE rev 0x02: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 2 function 0 Intel Atom C2000 PCIE rev 0x02: msi
pci2 at ppb1 bus 2
ppb2 at pci2 dev 0 function 0 ASPEED Technology AST1150 PCI rev 0x03
pci3 at ppb2 bus 3
vga1 at pci3 dev 0 function 0 ASPEED Technology AST2000 rev 0x30
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ppb3 at pci0 dev 3 function 0 Intel Atom C2000 PCIE rev 0x02: msi
pci4 at ppb3 bus 4
pchb1 at pci0 dev 14 function 0 Intel Atom C2000 RAS rev 0x02
Intel Atom C2000 RCEC rev 0x02 at pci0 dev 15 function 0 not configured
Intel Atom C2000 SMBus rev 0x02 at pci0 dev 19 function 0 not configured
em0 at pci0 dev 20 function 0 Intel I354 SGMII rev 0x03: msi, address 
0c:c4:7a:0e:9f:f0
em1 at pci0 dev 20 function 1 Intel I354 SGMII rev 0x03: msi, address 
0c:c4:7a:0e:9f:f1
ehci0 at pci0 dev 22 function 0 Intel Atom C2000 USB rev 0x02: apic 2 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
ahci0 at pci0 dev 24 function 0 Intel Atom C2000 AHCI rev 0x02: msi, AHCI 1.3
ahci0: port 0: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: ATA, HGST HTS721010A9, JB0O SCSI3 0/direct 
fixed naa.5000cca6acce1830
sd0: 953869MB, 512 bytes/sector, 1953525168 sectors
pcib0 at pci0 dev 31 function 0 Intel Atom C2000 PCU rev 0x02
ichiic0 at pci0 dev 31 function 3 Intel Atom C2000 PCU SMBus rev 0x02: apic 2 
int 18
iic0 at ichiic0
iic0: addr 0x18 00=00 01=00 02=00 03=00 04=00 05=c1 06=1b 07=0a 08=00 09=00 
0a=00 0b=00 0c=00 0d=00 0e=00 0f=00 words 00=007f 01= 02= 03= 
04= 05=c1df 06=1b09 07=0a01
iic0: addr 0x1a 00=00 01=00 02=00 03=00 04=00 05=c1 06=1b 07=0a 08=00 09=00 
0a=00 0b=00 0c=00 0d=00 0e=00 0f=00 words 00=007f 01= 02= 03= 
04= 05=c1dd 06=1b09 07=0a01
iic0: addr 0x2e 00=42 words 00=4242 01= 02= 03= 04= 05= 
06= 07=
spdmem0 at iic0 addr 0x50: 4GB DDR3 SDRAM ECC PC3-12800 with thermal sensor
spdmem1 at iic0 addr 0x52: 4GB DDR3 SDRAM ECC PC3-12800 with thermal sensor
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo

Re: Sluggish/laggy browser behaviour

2015-07-26 Thread Dimitris Papastamos
On Sun, Jul 26, 2015 at 11:34:04PM +0200, Henrik Friedrichsen wrote:
 Hey,
 
 On Sun, Jul 26, 2015 at 12:56:53PM -0700, Nathan Van Ymeren wrote:
  Unfortunately my problem persists even when tabs are not using sounds.
  Scrolling e.g. the front page of Reddit is choppy and stuttery.  Using
  apmd -A and hw.perfpolicy=auto helps a little with the tabbing issue
  but not scrolling.
 
 I can pretty much confirm this on an X220i, I have sort of come to terms
 with it, but it is definitely noticeable (in chromium and firefox).
 
 Also, when I play clips on YouTube, playback sometimes hangs for half a
 second. That is with a snapshot from today. To be safe, I also
 recompiled sndio from CVS to make sure I didn't miss the previously
 mentioned patch. While it does seem to have improved the situation, it's
 not entirely fixed.

Try viewtube[0] and gecko-mediaplayer instead.  No hangs on my system
at all.

[0] http://isebaro.com/viewtube/?ln=en



Re: OpenBSD <> Commercial VPNs

2015-10-11 Thread Dimitris Papastamos
On Sun, Oct 11, 2015 at 12:47:42PM -0600, Jack J. Woehr wrote:
> Jiri B wrote:
> >c Cisco's AnyConnect SSL VPN and Juniper SSL VPN which is now known as
> >Pulse Connect Secure is supported by openconnect which is in ports.
> 
> I found vpnc in ports/net and that almost works.
> 
> It connects and shows it is adding the correct routes that I would expect.
> 
> And then no traffic comes through. 'route show' looks correct but nothing 
> seems to be going back and forth.

I use vpnc regularly on -current without any special configuration and it
works fine with my network.

My config is as follows:

IPSec gateway vpn.example.net
IPSec ID FOO
IPSec obfuscated secret BAR
Xauth username BAZ
DPD idle timeout (our side) 0



Re: Recommended Industrial PCs?

2015-08-27 Thread Dimitris Papastamos
On Thu, Aug 27, 2015 at 09:42:35AM +0200, Martin Haufschild wrote:
 Am 27.08.2015 um 09:20 schrieb Martin Haufschild:
 Am 27.08.2015 um 08:50 schrieb David Dahlberg:
 Am Mittwoch, den 26.08.2015, 21:11 +0200 schrieb Martin Haufschild:
 
 can someone recommend me an Industrial PC (IPC) to use with OpenBSD? I
 
 would like to have a lot of hardware supported from this IPC by
 OpenBSD.
 
 Could you please explicate a bit? What exactly are you trying to to with
 it, what are your requirements?
 
 In the past, I have made good experiences with various Nexcom devices --
 and Shuttle if you would consider them IPCs, too.
 
 
 
 I would just like to build up an encrypted communication between them.
 
 They only serve as intermediate PCs for encryption. The CPU can be Atom-like
 or better.
 Thanks for the suggestions from all until now. Can you recommend specific
 models (maybe you had good experience with)? Compact models would be
 preferred.

I've been using Shuttle XH81V for some time and it works really well with
OpenBSD.  I've only basically been using it as a router so far.  With
the CPU that I have it is really fast for my purposes and never gets too
warm (about 45C under load).

Let me know if you need more information.

OpenBSD 5.8-current (GENERIC.MP) #46: Tue Aug 25 11:57:57 BST 2015
r...@sun.2f30.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 7450062848 (7104MB)
avail mem = 7220379648 (6885MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xec1e0 (76 entries)
bios0: vendor American Megatrends Inc. version 1.03 date 06/18/2014
bios0: Shuttle Inc. XH81V
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT SLIC SSDT SSDT MCFG HPET SSDT SSDT
acpi0: wakeup devices PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) 
PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) PXSX(S4) RP06(S4) PXSX(S4) RP07(S4) 
PXSX(S4) RP08(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i3-4360 CPU @ 3.70GHz, 3692.02 MHz
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,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i3-4360 CPU @ 3.70GHz, 3691.45 MHz
cpu1: 
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,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Core(TM) i3-4360 CPU @ 3.70GHz, 3691.45 MHz
cpu2: 
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,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 1, core 0, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i3-4360 CPU @ 3.70GHz, 3691.45 MHz
cpu3: 
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,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (RP01)
acpiprt2 at acpi0: bus 2 (RP03)
acpiprt3 at acpi0: bus 3 (RP04)
acpiprt4 at acpi0: bus -1 (PEG0)
acpiec0 at acpi0: not present
acpicpu0 at acpi0: C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: FN00, resource for FAN0
acpipwrres1 at acpi0: FN01, resource for FAN1

Re: Weird graphic problems with intel(4) on a Thinkpad X250

2016-08-11 Thread Dimitris Papastamos
On Thu, Aug 11, 2016 at 09:56:37AM +0200, Lionel Riem wrote:
> Hello,
> 
> I have 5.9 installed on a Thinkpad X250 (Broadwell, Intel HD Graphics
> 5500). On this machine, by default, Xorg uses modesetting(4) and vesa(4)
> instead of intel(4). The performance is not great (stuttering videos,
> for example, or slow mouse movements when Firefox tries to display
> "graphic heavy" pages). I have had better performance on a Thinkpad X230.
> 
> When forcing Xorg to use intel(4) instead, I get really weird problems:
> http://imgur.com/a/KEYzb (this is supposed to be i3 with Firefox open).
> 
> Someone on #OpenBSD (Zelest) reported encountering the same weird
> problems on a Thinkpad X1 (2015, Broadwell, Intel HD Graphics 5500 as
> well) when using intel(4). Here's his screenshot:
> http://imgur.com/a/c3cvJ

I have not tried 5.9 but my x250 works really well with -current and
6.0.  I suppose there have been fixes in broadwell support since 5.9.



Re: How should vmm hosts access the internet?

2016-10-13 Thread Dimitris Papastamos
On Thu, Oct 13, 2016 at 05:16:05PM +0200, Reyk Floeter wrote:
> > Am 13.10.2016 um 16:18 schrieb Dimitris Papastamos <s...@2f30.org>:
> >
> >> On Thu, Oct 13, 2016 at 03:43:54PM +0200, Stefan Sperling wrote:
> >>> On Thu, Oct 13, 2016 at 02:23:20PM +0100, Edd Barrett wrote:
> >>> Hi,
> >>>
> >>> Since vmm is now enabled, I thought I would have a play.
> >>>
> >>> So far so good, but I've not managed to get the host on the internet
> >>> yet.
> >>>
> >>> If I set up a vmm VM on my laptop, we have on the host:
> >>>
> >>> * iwn0 providing internet access to the host
> >>> * tap0 connected to vio0 in the guest.
> >>>
> >>> What is the reccommended way to give the guest internet access via iwn0?
> >>>
> >>> I thought I could bridge the interfaces using bridge(4), but it seems I
> >>> am wrong. (I have a vague recollection that a bridge involving a
> >>> wireless interface doesn't do as one might expect, but I don't recall
> >>> the exact details).
> >>>
> >>> (I also tried routing between the two interfaces, using static addresses
> >>> for tap0 and vio0, then adding a default route in the guest and a static
> >>> route in the host. I was able to ping between the host and guest via
> >>> tap, but I couldn't ping between subnets.)
> >>>
> >>> (Yep, I have net.inet.ip.forwarding=1).
> >>
> >> Use NAT.
> >>
> >> Bridging over wifi does not work (limitation of the ieee802.11 standard).
> >
> > Just hijacking the thread for a moment, I tried vmm yesterday in
> > bridge mode with em(4).  Everything works fine except dhcp.  I cannot use
> > dhclient to get an address from within the vm.  IPv6 SLAAC works though
> > as well as setting IPv4 addresses manually.
> >
> > Any ideas?
> >
> 
> Do you run dhclient on the host as well (on em0)?

Yes I do.

> It is a known problem that dhclient "steals" dhcp packets from the stack with
> its bpf drop filter.
> 
> For laptop or mobile hosts, I suggest to use NAT and dhcpd on a vether0 in the
> same bridge as the taps.

Thanks, will try that!



Re: How should vmm hosts access the internet?

2016-10-13 Thread Dimitris Papastamos
On Thu, Oct 13, 2016 at 03:43:54PM +0200, Stefan Sperling wrote:
> On Thu, Oct 13, 2016 at 02:23:20PM +0100, Edd Barrett wrote:
> > Hi,
> > 
> > Since vmm is now enabled, I thought I would have a play.
> > 
> > So far so good, but I've not managed to get the host on the internet
> > yet.
> > 
> > If I set up a vmm VM on my laptop, we have on the host:
> > 
> >  * iwn0 providing internet access to the host
> >  * tap0 connected to vio0 in the guest.
> > 
> > What is the reccommended way to give the guest internet access via iwn0?
> > 
> > I thought I could bridge the interfaces using bridge(4), but it seems I
> > am wrong. (I have a vague recollection that a bridge involving a
> > wireless interface doesn't do as one might expect, but I don't recall
> > the exact details).
> > 
> > (I also tried routing between the two interfaces, using static addresses
> > for tap0 and vio0, then adding a default route in the guest and a static
> > route in the host. I was able to ping between the host and guest via
> > tap, but I couldn't ping between subnets.)
> > 
> > (Yep, I have net.inet.ip.forwarding=1).
> 
> Use NAT.
> 
> Bridging over wifi does not work (limitation of the ieee802.11 standard).

Just hijacking the thread for a moment, I tried vmm yesterday in
bridge mode with em(4).  Everything works fine except dhcp.  I cannot use
dhclient to get an address from within the vm.  IPv6 SLAAC works though
as well as setting IPv4 addresses manually.

Any ideas?



Re: Adding default IPv6 route fails on 6.1

2017-04-12 Thread Dimitris Papastamos
On Wed, Apr 12, 2017 at 01:20:20AM +0200, Sterling Archer wrote:
> Hello everyone.
> 
> After upgrading to 6.1 about an hour ago, I noticed that I didn't have an
> IPv6 connection
> anymore.
> 
> I use dhcpcd over a pppoe session, which worked fine in 6.0-stable. The
> problem seems to
> be a failure to add a default inet6 route on the pppoe device. I see this
> error in the dmesg
> console log:
> 
> "add net default: gateway fe80::: No route to host"
> 
> Did I miss something in the changelog, or is this a bug?
> 
> 
> Here's the contents of my hostname.pppoe0:
> 
> [sven@puffy ~]$ cat /etc/hostname.pppoe0
> description "pppoe session over vlan6"
> inet 0.0.0.0 255.255.255.255 NONE mtu 1500 \
> pppoedev vlan6 authproto pap \
> authname 'kennyloggins' authkey 'dangerzone!'
> dest 0.0.0.1
> inet6 eui64
> !/sbin/route add default -ifp pppoe 0.0.0.1
> !/sbin/route add -inet6 default -ifp pppoe0 fe80::

Try this instead:

!/sbin/route add -inet6 default -ifp pppoe0 fe80::%pppoe0



Re: howto show IPv6 address lifetime?

2017-04-19 Thread Dimitris Papastamos
On Wed, Apr 19, 2017 at 09:32:56AM -0400, Eike Lantzsch wrote:
> On Wednesday, 19 April 2017 14:22:32 -04 Peter N. M. Hansteen wrote:
> > On Wed, Apr 19, 2017 at 11:16:44AM +0200, Harald Dunkel wrote:
> > > > Give a try to ifconfig as regarde privacy policy lifetime : pltime &
> > > > vltime if i'm still right. You can also preset this two counters using
> > > > the same command.> 
> > > ??? Sorry, but I don't understand this first sentence.
> > > 
> > > I would like to see the address lifetime, which address is preferred,
> > > which is deprecated, etc. On Linux a simple command like "ip a s" shows.
> > As quoted above, ifconfig is your friend:
> > 
> > [Wed Apr 19 14:19:35] peter@elke:~$ ifconfig iwm0
> > iwm0: flags=208943
> > mtu 1500 lladdr a0:a8:cd:63:ab:b9
> > index 1 priority 4 llprio 3
> > groups: wlan egress
> > media: IEEE802.11 autoselect (HT-MCS4 mode 11n)
> > status: active
> > ieee80211: nwid we_collect_all_your_nasty-bits5 chan 36 bssid
> > e0:3f:49:23:bb:2c 29% wpakey  wpaprotos wpa2 wpaakms psk
> > wpaciphers ccmp wpagroupcipher ccmp inet6 fe80::a2a8:cdff:fe63:abb9%iwm0
> > prefixlen 64 scopeid 0x1 inet 192.168.103.126 netmask 0xff00 broadcast
> > 192.168.103.255 inet6 2001:470:28:658:a2a8:cdff:fe63:abb9 prefixlen 64
> > autoconf pltime 604759 vltime 2591959 inet6
> > 2001:470:28:658:54c6:1b6f:ee43:32b9 prefixlen 64 deprecated autoconf
> > autoconfprivacy pltime 0 vltime 43 inet6
> > 2001:470:28:658:9039:71e4:30e2:a37e prefixlen 64 autoconf autoconfprivacy
> > pltime 11955 vltime 530703
> > 
> > That's output from my laptop just now, with autoconfigured inet6 addresses.
> > I believe the pltime and vltime values are given in seconds.
> 
> can it be that ifconfig outputs pltime and vltime only if the values are set 
> but not in the case that they are forever? Or are the values not shown or in 
> case of using virtual interfaces? The man page does not say.
> I'm asking because :
> 
> $ doas ifconfig
> [snip re0 and re1]
> vether0: flags=8943 mtu 1500
> lladdr fe:e1:ba:d0:52:8d
> index 8 priority 0 llprio 3
> groups: vether
> media: Ethernet autoselect
> status: active
> inet 192.168.12.1 netmask 0xff00 broadcast 192.168.12.255
> inet6 fe80::fce1:baff:fed0:528d%vether0 prefixlen 64 scopeid 0x8
> inet6 2001:470:1f0b:ca9::1 prefixlen 64

You don't seem to have any autoconfigured addresses.
Try ifconfig vether0 inet6 autoconf first.



Re: Dell R210 II crashing on boot

2017-07-06 Thread Dimitris Papastamos
On Wed, Jul 05, 2017 at 10:04:54PM +0200, Pierre Emeriaud wrote:
> Hello misc@,
> 
> 
> I'm trying to use a Dell R210 II server, remotely hosted at online.net
> (LT 1701.3 model). Installation was done from a qemu on a live
> "rescue" linux with both 6.1 and current as of 20170705.
> 
> When it boots, it crashes at some point, and when it does the idrac
> (on a port shared with em0) web goes unresponsive. The IP java kvm
> stops with what looks like a connection closed.
> 
> >From what I got in the support ticket the ipmi hangs/crashes, so no
> more remote reboot nor idrac access. A physical reboot is needed to
> get the box in working order again (on linux only so far).
> 
> Here are the last messages logged on the ip kvm before the java client closes:
> http://pix.toile-libre.org/upload/original/1499280007.jpg (6.1)
> http://pix.toile-libre.org/upload/original/1499280059.jpg (current)
> 
> Regarding the R210, here are the versions:
> bios revision 2.4.3
> Firmware Version 1.95 (Build 05)
> Lifecycle Controller Firmware 1.5.5.27
> 
> >From the list archives I saw that some of you are running similar
> hardware, in previous releases though. What are your bios/firmware
> version?
> 
> Also, what can I do to troubleshoot this further?

I think one of the NICs is shared and when OpenBSD boots up and
enumerates them, it also resets the NIC which upsets idrac.  You
can probably figure out which NIC is shared and hack the kernel
to skip enumerating it.

Someone had the same problem some time ago and there was a hacky
patch for it but I can't find the email in the archive now.



Re: Multicast in OSPF with shared interface addresses

2017-12-05 Thread Dimitris Papastamos
On Sun, Dec 03, 2017 at 04:01:35PM -0500, Scott Nicholas wrote:
> I joined a VPN network (dn42) to learn BGP and such and decided to do
> so with OpenBSD, which I'm also learning. Most peers are Linux
> machines and they re-use their address on each VPN tunnel as a /32. I
> have been successful doing the same until I decided I needed ospf for
> my internal routes.
> 
> openospfd sets the interface (identified only by its IP) as the
> multicast source. Since several tunnels have that address, it sets it
> incorrectly. A brief look at Linux headers show that their newer
> ip_mreqn struct includes an interface index since Linux 2.2. Perhaps
> this is a useful inclusion in the OpenBSD kernel so that userland can
> pick the interface correctly?
> 
> For now I've worked around this by assigning /31 aliases in
> 192.168.0.0/16 to the interfaces. But I'm curious what others are
> doing that use OpenBSD as a router, as it's all fairly new to me. I'm
> reading that OSPF could also have unicast neighbors setup, but
> OpenOSPFd doesn't have this feature.

I have also experienced the same thing and worked around it using /30s
but would be nice to know how to approach this properly.



Re: kernel reordering and config -e

2017-11-21 Thread Dimitris Papastamos
On Sun, Nov 19, 2017 at 07:31:20PM -0800, Paul B. Henson wrote:
> I just updated a server to 6.2; unfortunately this box has an oddball
> SOL com2 on irq10 so I need to run 'config -e' on the kernel to update
> it and make the serial console work. I noticed afterwards in the boot
> messages it was complaining about kernel reordering failures, and
> thinking I was fixing it, I updated the file /var/db/kernel.SHA256 with
> the hash of my modified kernel. I quickly discovered that resulted in a
> successfully reordered kernel with a stock com2 irq :(.
> 
> I didn't see anything in the config man page or faq about interaction
> between kernel reordering and config on a binary kernel. In hindsight I
> see that the hash check is to keep from replacing a locally modified
> kernel.  Is there a supported way to both fix hardcoded settings on a
> stock kernel and use reordering? Or do you need to update your settings
> in the config and compile a kernel from scratch? If you do, does
> /usr/share/compile automatically get populated with your new kernel
> objects and reordering just starts working, or do you need to do
> something manually to get it running with a locally compiled kernel?

This is what I do in rc.shutdown to handle this case:

/usr/bin/printf "disable inteldrm*\nquit\n" | /usr/sbin/config -ef /bsd
/bin/sha256 -h /var/db/kernel.SHA256 /bsd



Re: Bad network performance on apu2c4

2017-11-01 Thread Dimitris Papastamos
On Wed, Nov 01, 2017 at 09:14:03AM +0100, Christer Solskogen wrote:
> Hi!
> 
> I have a APU2C4 running OpenBSD-current (or.. .pretty current, from 27th of
> October) - and according to iperf I'm not getting the speed that I was
> expecting.
> 
> Between the APU and the other machines I have I get: 465 Mbits/sec - While
> between two other machines, connected to the same switch I get 939
> Mbits/sec. So I'm pretty sure that APU is to blame.

Do you use the APU as a router?  If so you shouldn't run iperf on the
APU.  Run iperf/tcpbench between two machines connected on different
interfaces on the APU.

see rfc2544 for more details



Re: nsd does not stop

2018-05-06 Thread Dimitris Papastamos
On Thu, May 03, 2018 at 07:57:45PM +0530, Vivek Vinod wrote:
> Dear Misc,
> 
> on stopping nsd from command line, nsd does not stop at all
> 
> Config:
> OpenBSD 6.3
> nsd remote control is disabled

enable remote control



Re: SSH extremely quickly dropped from T-Mobile phone hotspot

2018-09-15 Thread Dimitris Papastamos
On Sat, Sep 15, 2018 at 08:50:36AM -0700, Chris Bennett wrote:
> I cannot maintain an SSH connection unattended long enough to go to the
> bathroom and get a cup of coffee without the connection being dropped
> halfway through reading my email.

Maybe worth lowering ServerAliveInterval in ssh_config and see if that
helps.