USB ethernet adapter: ure0: usb errors on rx: IOERROR

2018-08-04 Thread Maximilian Pichler
On my machine the Rankie USB ethernet adapter sometimes stops working,
usually after a period of inactivity. The following messages appear in
the log:

ure0: usb errors on rx: IOERROR
uhid0 detached
uhidev0 detached
ugen0 detached
sd1 detached
scsibus2 detached
umass0 detached
sd2 detached
scsibus3 detached
umass1 detached
wskbd1: disconnecting from wsdisplay0
wskbd1 detached
ukbd0 detached
uhidev1 detached
wsmouse1 detached
ums0 detached
uhid1 detached
uhid2 detached
uhid3 detached
uhid4 detached
uhidev2 detached
wskbd2: disconnecting from wsdisplay0
wskbd2 detached
ukbd1 detached
uhidev3 detached
wsmouse2 detached
ums1 detached
uhid5 detached
uhid6 detached
uhid7 detached
uhidev4 detached
uhid8 detached
uhid9 detached
uhid10 detached
uhid11 detached
uhidev5 detached
uhub2 detached
rgephy0 detached
ure0 detached
ucom0 detached
uticom0 detached
uhub1 detached
uhub1 at uhub0 port 1 configuration 1 interface 0 "Texas Instruments
product 0x8142" rev 2.10/1.00 addr 2
uhidev0 at uhub1 port 1 configuration 1 interface 1 "Texas Instruments
Inc. Texas Instruments USB Billboard Device" rev 2.01/1.00 addr 3
uhidev0: iclass 3/0
uhid0 at uhidev0: input=64, output=64, feature=2
ugen0 at uhub1 port 1 configuration 1 "Texas Instruments Inc. Texas
Instruments USB Billboard Device" rev 2.01/1.00 addr 3
uhub2 at uhub1 port 2 configuration 1 interface 0 "Generic 4-Port USB
2.0 Hub" rev 2.10/1.21 addr 4
umass0 at uhub2 port 1 configuration 1 interface 0 "Sony MRW-S1" rev
2.10/0.04 addr 5
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0:  SCSI4 0/direct
removable serial.054c0c5d0004
sd1: 29520MB, 512 bytes/sector, 60456960 sectors
umass1 at uhub2 port 2 configuration 1 interface 0 "Seagate Expansion"
rev 2.10/0.00 addr 6
umass1: using SCSI over Bulk-Only
scsibus3 at umass1: 2 targets, initiator 0
xhci0: wrong trb index (-51337728) max is 255
xhci0: wrong trb index (-51337728) max is 255
xhci0: wrong trb index (-51337728) max is 255
xhci0: wrong trb index (-51337728) max is 255
xhci0: wrong trb index (-51337728) max is 255
xhci0: wrong trb index (-51337728) max is 255
WARNING !wm_changed failed at /usr/src/sys/dev/pci/drm/i915/intel_pm.c:3609
WARNING !wm_changed failed at /usr/src/sys/dev/pci/drm/i915/intel_pm.c:3609

This is the adapter:
(https://www.amazon.com/Rankie-Network-Adapter-Gigabit-White/dp/B01N3K0N43
It is attached to the monitor, which serves as a USB hub. There is
another USB hub with a hard disk, an SD card, reader, keyboard and
mouse attached to it.

What might cause this? Is there a way to get more details than just "IOERROR"?

Thanks


Full dmesg:

OpenBSD 6.3 (GENERIC.MP) #107: Sat Mar 24 14:21:59 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17037766656 (16248MB)
avail mem = 16514322432 (15749MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xeb350 (31 entries)
bios0: vendor American Megatrends Inc. version "UX390UAK.312" date 04/25/2017
bios0: ASUSTeK COMPUTER INC. UX390UAK
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT ECDT MCFG FIDT SSDT MSDM SSDT HPET
UEFI SSDT LPIT WSMT SSDT SSDT DBGP DBG2 BGRT DMAR TPM2
acpi0: wakeup devices GLAN(S4) XHC_(S3) XDCI(S4) HDAS(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) i7-7500U CPU @ 2.70GHz, 2594.97 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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,SENSOR,ARAT,MELTDOWN
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 23MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz, 2593.92 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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,SENSOR,ARAT,MELTDOWN
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) i7-7500U CPU @ 2.70GHz, 2593.92 MHz
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLU

Re: Resume fails with connected USB hub

2018-07-11 Thread Maximilian Pichler
On Mon, Jan 29, 2018 at 6:43 PM, Maximilian Pichler
 wrote:
> Resume after suspend fails on a Zenbook UX390UA if (and only if) the
> USB hub/adapter that comes with it is connected.

This issue no longer occurs with current from Jun 21st. I don't know
which change (since Jan 24) is responsible.



xbacklight on second monitor

2018-07-11 Thread Maximilian Pichler
Is it possible to change the backlight of a second monitor?

It seems that xbacklight can only change the backlight of the first
monitor, i.e. in my case the laptop's integrated display. I'd like to
change the backlight of an external monitor.

Here it is suggested to use a tool called ddcutil. Unfortunately this
doesn't compile under OpenBSD because it depends on libudev.
https://unix.stackexchange.com/questions/421307/how-can-i-change-the-backlight-of-an-external-monitor

I'm aware of 'xrandr --brightness', but of course brightness isn't the
same as the backlight (see xrandr's man page).

Thanks for any hints

Max



Re: 4k display on integrated Intel graphics?

2018-07-10 Thread Maximilian Pichler
So I went ahead and it works! At first it did 3840x2160 only at 30 Hz,
but after rebooting it now runs at 60 Hz, at least according to xrandr
(see below).

Is there a way to independently verify the refresh rate? Unfortunately
the monitor doesn't display it.

For the record, this is an Asus Zenbook 3 (UX390UA) with integrated
Intel HD Graphics 620 connected to a LG 27UD88 4k display via the
included USB-C-to-C cable.

$ xrandr
Screen 0: minimum 320 x 200, current 5760 x 2160, maximum 8192 x 8192
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x
axis y axis) 276mm x 155mm
   1920x1080 60.05*+  48.04
   1400x1050 59.98
   1280x1024 60.02
   1280x960  60.00
   1024x768  60.0460.00
   960x720   60.00
   928x696   60.05
   896x672   60.01
   800x600   60.0060.3256.25
   700x525   59.98
   640x512   60.02
   640x480   60.0059.94
   512x384   60.00
   400x300   60.3256.34
   320x240   60.05
DP-1 connected 3840x2160+1920+0 (normal left inverted right x axis y
axis) 600mm x 340mm
   3840x2160 60.00*+  30.00
   2560x1440 59.95
   1920x1080 60.0059.94
   1600x900  60.00
   1280x1024 60.02
   1280x800  59.81
   1152x864  59.97
   1280x720  60.0059.94
   1024x768  60.00
   800x600   60.32
   720x480   60.0059.94
   640x480   60.0059.94
HDMI-1 disconnected (normal left inverted right x axis y axis)


On Mon, Jul 2, 2018 at 4:17 AM, Bryan Vyhmeister  wrote:
> On Fri, Jun 29, 2018 at 11:04:12PM +0200, Maximilian Pichler wrote:
>> Thanks for explaining. Some shaking could be lived with...
>
> I went ahead and bought a Plugable USB-C to DisplayPort cable to confirm
> that there are no issues. I unplugged my mDP to DP cable from the
> NUC6i7KYK and the HP Z27s 3840x2160 monitor and replaced it with the
> USB-C to DP cable and everything works exactly as before. Running xrandr
> reports that I am running on DP-2 at 3840x2160 at 60Hz.
>
>> I just realized that some monitors (e.g. LG 27UD88) can connect via
>> USB-C directly, whilest serving as a USB hub and power source. Would
>> this be expected to work as well?
>
> This type of thing should work fine as the other poster said also. This
> charging functionality is not OS-dependent and should work because of
> device firmware. USB-C can carry different types of signals that have
> been around a while and can be quite convenient as a result.
>
> Bryan



Re: clearing the disk cache

2018-07-04 Thread Maximilian Pichler
Thanks. :)

But isn't "bufcachepercent < 5" there for a reason? Will my machine
now catch fire?


On Wed, Jul 4, 2018 at 10:23 AM, Boudewijn Dijkstra
 wrote:
> Op Tue, 03 Jul 2018 16:06:37 +0200 schreef Maximilian Pichler
> :
>>
>> Now I'm resorting to "sysctl kern.bufcachepercent=5; sysctl
>> kern.bufcachepercent=90" to "almost" clear the cache. If only setting
>> it to 0 were allowed...
>
>
> --- sys/kern/kern_sysctl.c.orig Mon Feb 19 09:59:52 2018
> +++ sys/kern/kern_sysctl.c  Wed Jul  4 10:20:53 2018
> @@ -602,7 +602,7 @@
> &bufcachepercent);
> if (error)
> return(error);
> -   if (bufcachepercent > 90 || bufcachepercent < 5) {
> +   if (bufcachepercent > 90) {
> bufcachepercent = opct;
> return (EINVAL);
> }
>
>
> --
> Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/
>



Re: clearing the disk cache

2018-07-03 Thread Maximilian Pichler
Thanks for explaining! Looks like this is too complex to be reliably
tricked by a few dd commands.

Now I'm resorting to "sysctl kern.bufcachepercent=5; sysctl
kern.bufcachepercent=90" to "almost" clear the cache. If only setting
it to 0 were allowed...


On Tue, Jul 3, 2018 at 3:06 PM, Claudio Jeker  wrote:
> On Tue, Jul 03, 2018 at 01:30:20PM +0200, Maximilian Pichler wrote:
>> On Tue, Jul 3, 2018 at 11:47 AM, Janne Johansson  wrote:
>> > https://www.tedunangst.com/flak/post/2Q-buffer-cache-algorithm
>>
>> Thanks. If I'm reading this correctly upon access (read or write), an
>> action is performed depending on what queue a buffer is in:
>> - none: Take a buffer from the tail of the cold queue and insert it at
>> the front of the hot queue.
>> - hot: Keep it there, but move to the front.
>> - cold: Move it to the front of the warm queue.
>> - warm: Keep it there, but move to the front.
>>
>> If a buffer reaches the tail of a queue it moves on like this:
>> hot -> cold
>> cold -> (delete)
>> warm -> cold
>>
>> Based on this understanding, let me describe my (failed) attempt to
>> remove a file from cache.
>>
>> First, let's use 90%:
>> $ doas sysctl kern.bufcachepercent
>> kern.bufcachepercent=90
>>
>> My machine has 16GB of RAM, but the end of the blog post says
>> something about himem, so maybe this means only 0.9*4GB=3.6GB are
>> used.
>>
>> Now let's create a new file t1, of size 512MB:
>> $ dd bs=1m count=512 if=/dev/zero of=t1
>> 536870912 bytes transferred in 3.458 secs (155210354 bytes/sec)
>>
>> t1 should be in the hot queue now. It can be read at 2GB/s (way faster
>> than disk), so at least we can be sure it is in *some* queue:
>> $ dd bs=1m if=t1 of=/dev/null
>> 536870912 bytes transferred in 0.263 secs (2036532935 bytes/sec)
>>
>> Now let's fill the hot and cold queues with something else:
>> $ dd bs=1m count=16384 if=/dev/zero of=t2
>> 17179869184 bytes transferred in 57.210 secs (300290968 bytes/sec)
>>
>> This should have moved t1 first from the warm to the cold queue and
>> then removed it from the cold queue. But strangely it can still be
>> read at 2GB/s:
>> $ dd bs=1m if=t1 of=/dev/null
>> 536870912 bytes transferred in 0.251 secs (2135681199 bytes/sec)
>>
>> Why is this? How come t1 is still in the cache?
>>
>
> Because it is more complicated. Because buffers are flipped from DMA mem
> high mem in some situations. IIRC if the DMA hot queue is full the tail
> buffers are flipped. Also just doing one dd is not enough to move buffers
> between queues. For that they need to be read multiple times. Also write
> buffers are never put in high mem or actually flipped down when written.
>
> In short the buffer cache is a complex beast and the few statistic numbers
> systat are not enough to correctly understand the various states buffers
> can be in.
>
> --
> :wq Claudio
>



Re: clearing the disk cache

2018-07-03 Thread Maximilian Pichler
On Tue, Jul 3, 2018 at 11:47 AM, Janne Johansson  wrote:
> https://www.tedunangst.com/flak/post/2Q-buffer-cache-algorithm

Thanks. If I'm reading this correctly upon access (read or write), an
action is performed depending on what queue a buffer is in:
- none: Take a buffer from the tail of the cold queue and insert it at
the front of the hot queue.
- hot: Keep it there, but move to the front.
- cold: Move it to the front of the warm queue.
- warm: Keep it there, but move to the front.

If a buffer reaches the tail of a queue it moves on like this:
hot -> cold
cold -> (delete)
warm -> cold

Based on this understanding, let me describe my (failed) attempt to
remove a file from cache.

First, let's use 90%:
$ doas sysctl kern.bufcachepercent
kern.bufcachepercent=90

My machine has 16GB of RAM, but the end of the blog post says
something about himem, so maybe this means only 0.9*4GB=3.6GB are
used.

Now let's create a new file t1, of size 512MB:
$ dd bs=1m count=512 if=/dev/zero of=t1
536870912 bytes transferred in 3.458 secs (155210354 bytes/sec)

t1 should be in the hot queue now. It can be read at 2GB/s (way faster
than disk), so at least we can be sure it is in *some* queue:
$ dd bs=1m if=t1 of=/dev/null
536870912 bytes transferred in 0.263 secs (2036532935 bytes/sec)

Now let's fill the hot and cold queues with something else:
$ dd bs=1m count=16384 if=/dev/zero of=t2
17179869184 bytes transferred in 57.210 secs (300290968 bytes/sec)

This should have moved t1 first from the warm to the cold queue and
then removed it from the cold queue. But strangely it can still be
read at 2GB/s:
$ dd bs=1m if=t1 of=/dev/null
536870912 bytes transferred in 0.251 secs (2135681199 bytes/sec)

Why is this? How come t1 is still in the cache?

(Disclaimer: I've omitted the boring 'records' stats output by dd everywhere.)



Re: clearing the disk cache

2018-07-03 Thread Maximilian Pichler
On Tue, Jul 3, 2018 at 9:48 AM, Claudio Jeker  wrote:
> or reboot the system after every run.

Would unmounting and remounting not be good enough? (At least for a
FAT-formatted SD card this appears to work, though it could be caused
by something else). In fact, at what level does caching happen? Is it
chunks of the disk that are cached, or chunks of files?

> The buffer cache is implemented as two 2-queue and therefor a simple cat
> bigfile will not fill the cache.

What sort of data structure or algorithm is this? Any reference would
be much appreciated.

Thanks!



clearing the disk cache

2018-07-03 Thread Maximilian Pichler
I'm doing some performance tests that include reading files from disk
and want to make sure that each test takes place under similar
conditions.

In particular, how can one clear the disk cache? (I want to make sure
that the second test isn't faster than the first one, just because
some files they both use are still in cache.)

Right now I'm doing:
$ cat some_file_the_size_of_RAM > /dev/null

Does this indeed clear the cache? Is there a better way?

Also, are there several level of file/disk caches or just one?

As always, thanks for your advice!



Re: 4k display on integrated Intel graphics?

2018-06-29 Thread Maximilian Pichler
On Fri, Jun 29, 2018 at 9:49 PM, Bryan Vyhmeister  wrote:
> It should work fine because the USB-C ports have DisplayPort signaling
> built-in and I would not expect any issues.
>
> https://www.displayport.org/displayport-over-usb-c/
>
> HDMI 1.4 does not support 4k at 60Hz like HDMI 2.0 does but HDMI 2.0 is
> not supported as you found out. I have not tested USB-C to DP
> specifically with my NUC6i7KYK but it does drive 4k over DisplayPort
> which should be the same with USB-C to DP. I do get some weird artifacts
> like the screen "shaking" back and forth a bit until I launch Xorg which
> then works perfectly.

Thanks for explaining. Some shaking could be lived with...

I just realized that some monitors (e.g. LG 27UD88) can connect via
USB-C directly, whilest serving as a USB hub and power source. Would
this be expected to work as well?



Re: 4k display on integrated Intel graphics?

2018-06-29 Thread Maximilian Pichler
> It worked for me last time I tried, but I could only drive 30Hz. Probably an
> adapter limitation.

The spec indeed says it can only do 30Hz over HDMI, but 60Hz over DP.
So thanks for pointing this out, you saved me from buying the wrong
cable. https://ark.intel.com/products/95451/Intel-Core-i7-7500U

On Fri, Jun 29, 2018 at 3:05 AM, Mike Larkin  wrote:
> Oh, just noticed the USB-C bit. You're on your own.

Does this mean it's unlikely to work with an USB-C-to-DP adapter or
just hasn't been tried?

This review (in German) says it works, but presumably on some other
OS. https://notebooks-und-mobiles.de/asus-zenbook-ux390ua-laptop-im-test

Thanks!



4k display on integrated Intel graphics?

2018-06-28 Thread Maximilian Pichler
Can OpenBSD drive a 4k display on integrated Intel graphics via HDMI
these days? Specifically, I'm hoping to connect it to my laptop's
"Intel HD Graphics 620" (Kaby Lake) via a single HDMI cable (which
would go into a USB-C-to-HDMI adapter).

(I'm aware something similar has been asked two years ago, but am
guessing the bleeding edge has moved on a bit since then...)

Thanks



Re: virtual colocation? Amazon/cloud?

2018-06-21 Thread Maximilian Pichler
I've had a very good experience with the Netherlands-based transip.
Their pricing is competitive (especially for storage if you don't want
do deal with anything S3-like), they are reliable, and have also been
good at keeping up with new OpenBSD releases:
https://www.transip.eu/vps/openbsd/

On Thu, Jun 14, 2018 at 10:50 PM, Steve Fairhead  wrote:
> Yes, I have consulted the interwebs. But, forsooth, the interwebs have
> forsaken me...
>
> I've been running various colocated OpenBSD boxen for a long time (19
> years?). The hardware is mine; the phat pipe I pay for, in some aircon'ed
> warehouse somewhere in southern England... never been... (I'm in West
> Sussex/Surrey, but I doubt that matters these days.)
>
> Two of my machines are getting a little elderly, and need replacing... and
> my son-in-law (I quite like him) said "have you considered virtual
> hosting?". Hmmm.
>
> I would love to be able to do this - make the hardware someone else's
> problem - and maybe into the bargain pay less per month.
>
> I gather Amazon are not quite there yet re OpenBSD virtual machines. Can
> anyone here provide a cluebat as to prospects or alternatives? I don't want
> to move away from OpenBSD - it's my security blanket... and I love it *so*
> much...
>
> Steve
>



Re: How to copy n bytes from stdin to stdout?

2018-06-21 Thread Maximilian Pichler
On Thu, Jun 21, 2018 at 3:15 PM, Daniel Hartmeier  wrote:
> I think they meant dd and just didn't care about efficiency:
>
>   http://austingroupbugs.net/bug_view_page.php?bug_id=407

Thanks for digging this out!

> Does ghead -c beat a simple buffer loop?

Your head-c.c seems to have the same performance as ghead -c,
presumably because they're doing the same thing. :)



Re: How to copy n bytes from stdin to stdout?

2018-06-21 Thread Maximilian Pichler
On Thu, Jun 21, 2018 at 11:05 AM, Abel Abraham Camarillo Ojeda
 wrote:
> $ cat file | perl -ne 'BEGIN { $/ = \1 } print if $. <= 5; exit 0 if $. == 5'

This is much slower than 'dd ibs=1'



Re: FTP login delay

2018-06-21 Thread Maximilian Pichler
Thanks for the suggestion! ktracing reveals that it IS hanging on a DNS lookup.

 99982 ftpd CALL  connect(3,0xae7e11d72a0,16)
 99982 ftpd STRU  struct sockaddr { AF_INET, 192.168.1.1:53 }
 99982 ftpd RET   connect 0
 99982 ftpd CALL  sendto(3,0xae80477fa00,0x27,0,0,0)
 99982 ftpd GIO   fd 3 wrote 39 bytes
   "7\M^M\^A\0\0\^A\0\0\0\0\0\0\vzen-thought\^Bmy\^Fdomain\0\0\^A\0\^A"
 99982 ftpd RET   sendto 39/0x27
 99982 ftpd CALL  clock_gettime(CLOCK_MONOTONIC,0x7f7c51f0)
 99982 ftpd STRU  struct timespec { 47305.577400182 }
 99982 ftpd RET   clock_gettime 0
 99982 ftpd CALL  poll(0x7f7c5200,1,2)
<...hanging here for 20s...>
 99982 ftpd STRU  struct pollfd { fd=3, events=0x1, revents=0<> }
 99982 ftpd RET   poll 0
 99982 ftpd CALL  recvfrom(3,0xae80477a000,0x1000,0,0,0)
 99982 ftpd RET   recvfrom -1 errno 35 Resource temporarily unavailable

(It repeats this a few times with different timeouts: 5s + 10s + 20s +
40s = 75s)

I'm not familiar with the DNS protocol, but the query
"7\M^M\^A\0\0\^A\0\0\0\0\0\0\vzen-thought\^Bmy\^Fdomain\0\0\^A\0\^A"
contains a machine name, so it looks like a forward, not a reverse
lookup, right?

After adding 'zen-thought.my.domain' to /etc/hosts, the delay
disappears! Previously (after reading the FAQ) I had made entries only
for my naked machin name (zen-thought) and the machine name suffixed
with the ISP's domain, but not with 'my.domain'.

It also turns out that hostname(1) returned 'zen-thought.my.domain',
which is what ftpd seems to be looking up. After *setting* the
hostname to zen-thought only (without domain suffix) the delay
disappear as well, even when removing all entries from /etc/hosts
(except for the localhost ones of course).

My remaining questions are:

(1) Why does ftpd need to make a *forward* DNS lookup (assuming I'm
reading the query correctly) of the machine name?

(2) Generally, when setting the machine name with hostname(1), should
it be suffixed with a domain name?

Thanks again, your suggestion allowed me to get things working at least!


On Thu, Jun 21, 2018 at 10:09 AM, Janne Johansson  wrote:
>
>
> Den ons 20 juni 2018 kl 23:28 skrev Maximilian Pichler
> :
>>
>> I've enabled ftpd and am experiencing very long delays (consistently
>> 75 seconds) when logging in from localhost.
>>
>> Running nc reveals that the connection is accepted immediately, but
>> the server waits before spitting out the 'ready' line:
>>
>> $ nc -4v localhost 21
>> Connection to localhost 21 port [tcp/ftp] succeeded!
>> <<...75 seconds go by...>>
>> 220 zen-thought.my.domain FTP server ready.
>>
>> This smelled a lot like https://www.openbsd.org/faq/faq8.html#RevDNS,
>> but of course localhost is in /etc/hosts (and /etc/resolv.conf has
>> 'lookup file bind').
>
>
> Try running the ftpd under a ktrace and then use kdump to see what it does
> just before those 75 seconds?
> RevDNS was a good guess though. ;)
>
>
> --
> May the most significant bit of your life be positive.



Re: How to copy n bytes from stdin to stdout?

2018-06-21 Thread Maximilian Pichler
On Thu, Jun 21, 2018 at 9:48 AM, Otto Moerbeek  wrote:
>> On Thu, Jun 21, 2018 at 12:11:52AM +0200, Maximilian Pichler wrote:
>> > I'm just wondering what these other utilities might be.
>>
>> hexdump -v -n 1234567 -e '"%c"'

Speed-wise this is roughly on par with 'dd bs=1'.

>> If the input doesn't contain backslashes (or something else, tr(1))
>>
>>   vis -aoF6 | head -n 1234567 | unvis

Backslashes exist. :)

> Variation that buffers the writes:
>
> dd ibs=1 count=n

Nice, this is about three time as fast as bs=1. Both are much slower
than 'ghead -c'.



Re: How to copy n bytes from stdin to stdout?

2018-06-20 Thread Maximilian Pichler
POSIX says 
(http://pubs.opengroup.org/onlinepubs/9699919799/utilities/head.html#tag_20_57_18)
about the 'head' utility:

"There is no -c option (as there is in tail) because it is not
historical practice and because other utilities in this volume of
POSIX.1-2017 provide similar functionality."

I'm just wondering what these other utilities might be.

On Wed, Jun 20, 2018 at 5:32 PM, Maximilian Pichler
 wrote:
> dd bs=1 count=1234567 will copy 1234567 bytes and then stop, but it's slow.
>
> I can't seem to think of a faster command that also works in the
> presence of short reads and blocking. There is ghead -c from coreutils
> in ports, but this should be possible in base, no?
>
> Max



Re: How to copy n bytes from stdin to stdout?

2018-06-20 Thread Maximilian Pichler
Your script is incorrect.

$ dd if=/dev/zero bs=1 | ./nread 1234567 | wc -c
0+2411 records in
0+2411 records out
2411 bytes transferred in 0.038 secs (62579 bytes/sec)
135+0 records in
135+0 records out
135 bytes transferred in 0.001 secs (126148 bytes/sec)
2546

$ man dd
...
 count=n  Copy only n input blocks.
...

These are input, not output blocks.


On Wed, Jun 20, 2018 at 11:42 PM, Tomasz Rola  wrote:
> On Wed, Jun 20, 2018 at 08:20:16PM +0200, Maximilian Pichler wrote:
>> On Wed, Jun 20, 2018 at 7:17 PM, Tomasz Rola  wrote:
>> > But seriously: man sh.
>>
>> Are you saying there is a shell built-in that does this? If so, which one?
>
> =>  (591 13):cat nread
> #!/bin/sh
>
> # nread n - read up to n bytes from stdio, put them on to stdout
>
> N=$1
>
> dd bs=512 count=$((N / 512))
> dd bs=1 count=$((N % 512))
>
> =>  (591 14):   md5sum  9c6d3e6aa2b11f6351290fc4f770bf44  -
>
> =>  (591 15):  chmod a+x nread
>
> =>  (591 16):   cat HUGE | /usr/bin/time ./nread 1234567 | wc -c
> 2411+0 records in
> 2411+0 records out
> 1234432 bytes (1.2 MB) copied, 0.0122527 s, 101 MB/s
> 135+0 records in
> 135+0 records out
> 135 bytes (135 B) copied, 0.000620305 s, 218 kB/s
> 0.00user 0.01system 0:00.02elapsed 57%CPU (0avgtext+0avgdata 768maxresident)k
> 0inputs+0outputs (0major+731minor)pagefaults 0swaps
> 1234567
>
> Total time is well below 1s. If you want faster, then you have to
> write it in C or assembly.
>
> --
> Regards,
> Tomasz Rola
>
> --
> ** A C programmer asked whether computer had Buddha's nature.  **
> ** As the answer, master did "rm -rif" on the programmer's home**
> ** directory. And then the C programmer became enlightened...  **
> ** **
> ** Tomasz Rola  mailto:tomasz_r...@bigfoot.com **
>



FTP login delay

2018-06-20 Thread Maximilian Pichler
I've enabled ftpd and am experiencing very long delays (consistently
75 seconds) when logging in from localhost.

Running nc reveals that the connection is accepted immediately, but
the server waits before spitting out the 'ready' line:

$ nc -4v localhost 21
Connection to localhost 21 port [tcp/ftp] succeeded!
<<...75 seconds go by...>>
220 zen-thought.my.domain FTP server ready.

This smelled a lot like https://www.openbsd.org/faq/faq8.html#RevDNS,
but of course localhost is in /etc/hosts (and /etc/resolv.conf has
'lookup file bind').



Re: How to copy n bytes from stdin to stdout?

2018-06-20 Thread Maximilian Pichler
On Wed, Jun 20, 2018 at 7:17 PM, Tomasz Rola  wrote:
> But seriously: man sh.

Are you saying there is a shell built-in that does this? If so, which one?



Re: How to copy n bytes from stdin to stdout?

2018-06-20 Thread Maximilian Pichler
On Wed, Jun 20, 2018 at 6:27 PM, Tomasz Rola  wrote:
> On my Linux box:

?

> cat HUGE | /usr/bin/time dd bs=1 count=1234944 | wc -c

stdin might be something much faster than your disk, in which case the
relative cost of bs=1 increases.

> cat HUGE | /usr/bin/time dd bs=1024 count=1206 | wc -c

Doesn't work for prime numbers. ;)



Re: How to copy n bytes from stdin to stdout?

2018-06-20 Thread Maximilian Pichler
On Wed, Jun 20, 2018 at 5:50 PM, Solene Rapenne  wrote:
> it's slow because it flushes the output every byte, what would you
> expect? Maybe you should do in a different manner.

I know, my question is what such a different manner might look like. :)



Re: New laptop recommendations

2018-06-20 Thread Maximilian Pichler
I'm quite happy with my Asus Zenbook 3 (UX390UA). It's thinner,
lighter and more powerful than the current MacBooks and costs about
1100 EUR now.

On Tue, Jun 19, 2018 at 12:37 PM, Rupert Gallagher  wrote:
> I'm done with my 10 years old 1200EUR MacBookPro. It served me well, every 
> day, but is now falling apart, finally.
>
> I would buy a new one if only Steve Jobs would be alive and keeping Apple 
> inspired. The new models are meticulously designed to make you suffer: 
> expensive, slow cpu, soldered ram, soldered disk, small disk, bad keyboard 
> keys, wifi only, must pay extra for standard connectors.
>
> I have 1500EUR for a new laptop. What would you buy with it?



How to copy n bytes from stdin to stdout?

2018-06-20 Thread Maximilian Pichler
dd bs=1 count=1234567 will copy 1234567 bytes and then stop, but it's slow.

I can't seem to think of a faster command that also works in the
presence of short reads and blocking. There is ghead -c from coreutils
in ports, but this should be possible in base, no?

Max



Re: Reading files faster than raw disk?

2018-06-15 Thread Maximilian Pichler
Thanks for the detailed explanation! As both you and Alexandre hinted
at I was using the wrong tool. dd(1) indeed yields the expected speed
on rsd1c. At least for this particular SD card a block size of 64k
appears to be optimal:

$ doas dd if=/dev/rsd1c of=/dev/null bs=32k count=16k
16384+0 records in
16384+0 records out
536870912 bytes transferred in 14.867 secs (36110418 bytes/sec)

$ doas dd if=/dev/rsd1c of=/dev/null bs=64k count=8k
8192+0 records in
8192+0 records out
536870912 bytes transferred in 8.494 secs (63202126 bytes/sec)

$ doas dd if=/dev/rsd1c of=/dev/null bs=128k count=4k
4096+0 records in
4096+0 records out
536870912 bytes transferred in 8.434 secs (63649774 bytes/sec)

On Fri, Jun 15, 2018 at 9:30 AM, Joseph Mayer
 wrote:
> /dev/sd*
>
>  * are cached (cache has a 3GB cap presently since the DMA pushback
>diff not was experienced as stable and therefore rolled back), which
>may make access appear faster

I've been careful to un- and replug before every test to avoid any
effects of caching.

>  * I think the underlying hardware access is always split to 512B (or
>in certain cases 4096B) accesses by the file/IO subsystem,

Indeed at least for this particular SD card the optimal blocksize when
reading via sd1c is 4096B. This is also the blocksize at which reading
speeds from sd1c and rsd1c roughly coincide, which confirms your
statement.

> this
>together with serialization via the kernel biglock and subsystem
>design gives you a system-global cap of about 120MB/sec independent
>of actual hardware.

What does this 120MB/s limit apply to? I'm gettng sustained 400MB/s
read speeds from files on my internal (encrypted) SSD, even with files
much larger than RAM.

> Modern SSD:s all give you about 80MB/sec access in normal sequential
> read mode. As you parallelize it you will see an linear speed increase
> with higher number of threads up to approx 10 threads, where a SATA SSD
> will give you about 500MB/sec and a PCIe NVMe SSD will give you about
> 900MB/sec.

I'm not sure I understand this. When reading from rsd1c with dd(1) I
get 500MB/s. Does that mean that dd or the kernel is parallelizing
requests?



Reading files faster than raw disk?

2018-06-15 Thread Maximilian Pichler
I'm getting much faster read speeds from an SD card when mounting the
card and reading files (~50MB/s) than when reading the raw device
rsd1c (~25MB/s). If anything, shouldn't it be the other way round,
given that the file system has some overhead?

Here are the measurements when mounting and reading files:
$ doas mount /dev/sd1i /card
$ mount | grep card
/dev/sd1i on /card type msdos (local)
$ cat /card/DCIM/100MSDCF/* | pv -bra -Ss500m | sha1
 500MiB [49.2MiB/s] [49.2MiB/s]
e823304263649ee4aff5c4563878cd9111cffebf

For the raw device (rsd1c):
$ doas cat /dev/rsd1c | pv -bra -Ss500m | sha1
 500MiB [25.5MiB/s] [25.5MiB/s]
ca17bdb9a657bbcf654a60057861be8fe02df0b1

For what it's worth, the block device (sd1c):
$ doas cat /dev/sd1c | pv -bra -Ss500m | sha1
 500MiB [8.53MiB/s] [8.53MiB/s]
ca17bdb9a657bbcf654a60057861be8fe02df0b1

The card was previously formatted with "newfs_msdos -s 800 sd1c"
and then files were written on it by a camera.

Here is the card reader's dmesg bit:
umass0 at uhub0 port 13 configuration 1 interface 0 "Generic USB3.0
Card Reader" rev 3.00/15.32 addr 5
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0:  SCSI4
0/direct removable
sd1: 488154MB, 512 bytes/sector, 999740416 sectors
sd2 at scsibus2 targ 1 lun 1:  SCSI4
0/direct removable



Limit CPU usage of a process?

2018-05-27 Thread Maximilian Pichler
Is it possible to limit the CPU usage of a given process to, say, 20%?

I'd like to slow down the web browser since it is draining my laptop's
battery. With enough tabs open it's often consuming ~50% of CPU but
not doing anything productive. Apparently with RLIMIT_CPU in
setrlimit(2) the total CPU time of a process can be limited. Can a
similar limit be set for the percentage?

Thanks



Re: Resume fails with connected USB hub

2018-02-06 Thread Maximilian Pichler
On Wed, Jan 31, 2018 at 1:15 PM, Eric Furman  wrote:
> What he is saying is that for this to be properly fixed he needs to have
> actual possession of one of these machines. Some one needs to donate
> one so they can fix the problem.

Unfortunately I currently don't have that option.

On the other hand I added a bunch of printf's to the kernel and am
observing the following: with the hub plugged in, upon suspend the
system consistently
gets stuck in a call to 'tsleep' in 'xhci_command_submit':

error = tsleep(&sc->sc_cmd_trb, PZERO, "xhcicmd",
(timeout*hz+999)/ 1000 + 1);

More precisely, after a hard power down the last entry in
/var/messages/log from before reboot is the output of a printf
immediately before this line of code. The output of a printf
immediately after it is missing.

The call stack is:
tsleep (with timo=51)
xhci_command_submit
xhci_cmd_slot_control
xhci_pipe_close  (called via 'pipe->methods->close')
usbd_close_pipe
usb_free_device
usbd_detach (with dev->address = 7)
[...]
acpi_sleep_state

address 7 presumably refers to the hub:
uhub2 at uhub0 port 13 configuration 1 interface 0 "VIA Labs, Inc.
USB3.0 Hub" rev 3.00/6.85 addr 7

Is this information of any use?



Re: Resume fails with connected USB hub

2018-01-30 Thread Maximilian Pichler
On Tue, Jan 30, 2018 at 5:54 PM, Theo de Raadt  wrote:
> Is that a pure USB dock, or is it something else?  Does it connect with
> a pure USB connector?

I'm not sure what "pure" means. It is a box with one female USB-C,
HDMI, USB-A plug each, and it has a cable with a male USB-C plug that
goes into the laptop. Here is a picture:
https://gzhls.at/i/28/61/1552861-n0.jpg

This is how it manifests itself when plugged in:

uhub1 at uhub0 port 1 configuration 1 interface 0 "VIA Labs, Inc.
USB2.0 Hub" rev 2.10/6.80 addr 5
uhub2 at uhub0 port 13 configuration 1 interface 0 "VIA Labs, Inc.
USB3.0 Hub" rev 3.00/6.85 addr 6
ugen2 at uhub1 port 2 "VIA Technologies Inc. USB 2.0 BILLBOARD" rev
2.01/3.04 addr 7

(The addr numbers and the uhub/ugen numbers vary each time it is plugged in.)

> Maybe the resume-side EFI/ACPI/SMI makes assumptions about it?
>
> At suspend time, we 'kick off' all devices which we suspect aren't
> "part of the machine".  That's so that upon resume, we aren't touching
> their registers or otherwise expecting them to work.  The "suspect"
> part includes downstream usb hubs.

It looks like uhub0 ("Intel xHCI root hub") is not among the devices
being kicked off during bad suspends (with the dock)...

apmd: system suspending
/bsd: ugen0 detached
/bsd: uhub1 detached
/bsd: video0 detached
/bsd: uvideo0 detached
/bsd: ugen1 detached
/bsd: ugen2 detached
/bsd: uhub2 detached
[unable to resume]

...on the other hand, during the good suspends (without the dock)
uhub0 *is* detached:

apmd: system suspending
/bsd: video0 detached
/bsd: uvideo0 detached
/bsd: ugen0 detached
/bsd: ugen1 detached
/bsd: uhub0 detached
/bsd: uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub"
rev 3.00/1.00 addr 1
apmd: system resumed from sleep

Also, upon further testing there was one instance where resume *did*
work with the dock. The glaring difference is that uhub0 *was* being
detached:

apmd: system suspending
/bsd: ugen2 detached
/bsd: uhub1 detached
/bsd: video0 detached
/bsd: uvideo0 detached
/bsd: ugen0 detached
/bsd: ugen1 detached
/bsd: uhub2 detached
/bsd: uhub0 detached
/bsd: uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub"
rev 3.00/1.00 addr 1
apmd: system resumed from sleep
/bsd: uhub1 at uhub0 port 1 configuration 1 interface 0 "VIA Labs,
Inc. USB2.0 Hub" rev 2.10/6.80 addr 2
/bsd: ugen0 at uhub1 port 2 "VIA Technologies Inc. USB 2.0 BILLBOARD"
rev 2.01/3.04 addr 3
/bsd: uvideo0 at uhub0 port 5 configuration 1 interface 0 "AzureWave
USB2.0 VGA UVC WebCam" rev 2.00/16.09 addr 4
/bsd: video0 at uvideo0
/bsd: ugen1 at uhub0 port 8 "Intel Bluetooth" rev 2.00/0.01 addr 5
/bsd: ugen2 at uhub0 port 9 "ELAN ELAN:Fingerprint" rev 2.00/1.35 addr 6
/bsd: uhub2 at uhub0 port 13 configuration 1 interface 0 "VIA Labs,
Inc. USB3.0 Hub" rev 3.00/6.85 addr 7

> There are a few people who can debug this.  It is quite hard to debug
> without having a machine on the desk.  Something about have non-working
> hardware makes Mike and I and others figure out a strategy for determining
> where it is locking up.  Providing a list of approaches is too hard.

Not quite sure I got the point, but am more than happy to help in any way I can.

Also, this might be related: https://marc.info/?l=openbsd-bugs&m=151730049020517

Thanks!



Resume fails with connected USB hub

2018-01-29 Thread Maximilian Pichler
Hi,

Resume after suspend fails on a Zenbook UX390UA if (and only if) the
USB hub/adapter that comes with it is connected.

When resume is attempted by pressing a key, the fan starts to spin,
but the screen remains blank. The laptop can no longer be ssh'ed into.

This is fully reproducible and suspend/resume works perfectly fine
without the hub.

The offender is this:
uhub1 at uhub0 port 1 configuration 1 interface 0 "VIA Labs, Inc.
USB2.0 Hub" rev 2.10/6.80 addr 2
ugen0 at uhub1 port 2 "VIA Technologies Inc. USB 2.0 BILLBOARD" rev
2.01/3.04 addr 3

https://www.asus.com/Laptops-Accessory/Mini-Dock/

Incidentally, after having been forced to shut down the machine by
holding the power button for a few seconds, each time triggering fsck
upon reboot, I can no longer boot the default kernel /bsd, but have to
type "boot bsd.sp" at the boot prompt. Without this, a single line of
text saying "entry point at 0xf000158" appears on the screen for a few
seconds and then the machine reboots by itself. For what it's worth,
all partitions are mounted with softdep.

Best,

Max


OpenBSD 6.2-current (RAMDISK_CD) #379: Wed Jan 24 12:58:41 MST 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 17037766656 (16248MB)
avail mem = 16517648384 (15752MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xeb350 (31 entries)
bios0: vendor American Megatrends Inc. version "UX390UAK.312" date 04/25/2017
bios0: ASUSTeK COMPUTER INC. UX390UAK
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP APIC FPDT ECDT MCFG FIDT SSDT MSDM SSDT HPET
UEFI SSDT LPIT WSMT SSDT SSDT DBGP DBG2 BGRT DMAR TPM2
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz, 2594.89 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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: apic clock running at 24MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 120 pins
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 3 (RP09)
acpiprt5 at acpi0: bus -1 (RP10)
acpiprt6 at acpi0: bus -1 (RP11)
acpiprt7 at acpi0: bus -1 (RP12)
acpiprt8 at acpi0: bus -1 (RP13)
acpiprt9 at acpi0: bus 1 (RP01)
acpiprt10 at acpi0: bus -1 (RP02)
acpiprt11 at acpi0: bus -1 (RP03)
acpiprt12 at acpi0: bus -1 (RP04)
acpiprt13 at acpi0: bus -1 (RP05)
acpiprt14 at acpi0: bus 2 (RP06)
acpiprt15 at acpi0: bus -1 (RP07)
acpiprt16 at acpi0: bus -1 (RP08)
acpiprt17 at acpi0: bus -1 (RP17)
acpiprt18 at acpi0: bus -1 (RP18)
acpiprt19 at acpi0: bus -1 (RP19)
acpiprt20 at acpi0: bus -1 (RP20)
acpiprt21 at acpi0: bus -1 (RP14)
acpiprt22 at acpi0: bus -1 (RP15)
acpiprt23 at acpi0: bus -1 (RP16)
acpiec at acpi0 not configured
acpicpu at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpitz at acpi0 not configured
"INT3F0D" at acpi0 not configured
"ACPI0003" at acpi0 not configured
"PNP0C0D" at acpi0 not configured
"PNP0C0A" at acpi0 not configured
"INT3403" at acpi0 not configured
"INT3403" at acpi0 not configured
"INT3403" at acpi0 not configured
"INT3403" at acpi0 not configured
"ATK3001" at acpi0 not configured
"ELAN1301" at acpi0 not configured
"PNP0C0E" at acpi0 not configured
"INT33A1" at acpi0 not configured
"PNP0C0C" at acpi0 not configured
"MSFT0101" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"ATK4002" at acpi0 not configured
"INT3400" at acpi0 not configured
"INT340E" at acpi0 not configured
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 7G Host" rev 0x02
"Intel HD Graphics 620" rev 0x02 at pci0 dev 2 function 0 not configured
"Intel Core 6G Thermal" rev 0x02 at pci0 dev 4 function 0 not configured
xhci0 at pci0 dev 20 function 0 "Intel 100 Series xHCI" r

Re: "uhub1: device problem, disabling port 1" on Zenbook

2018-01-28 Thread Maximilian Pichler
On Sun, Jan 28, 2018 at 8:12 PM, Kenneth Gober  wrote:
> When you reach the "(I)nstall, (U)pgrade, (A)utoinstall or (S)hell?"
> prompt, enter S then type the following commands to create the sd1
> device entries:
>
> # cd /etc
> # ./MAKEDEV sd1

Thanks! I had confused the absence of the node with the absence of the drive.

I'm assuming you meant:
# cd /dev
# sh ./MAKEDEV sd1

After more testing, it looks like there is non-deterministic
behaviour: at each reboot either the thumb drive is recognized (i.e.
sd1 appears in dmesg) or it isn't (no sd1 in dmesg, but "uhub1: device
problem, disabling port 1"). Sometimes unplugging and replugging the
hub or drive gets it recognized, but not always.

At least this allowed me to install the system, after a lucky reboot...



"uhub1: device problem, disabling port 1" on Zenbook

2018-01-28 Thread Maximilian Pichler
Hi,

I'm trying to install OpenBSD 6.2 on a Zenbook (UX390UA) but it is
unable to find the installer USB key (after booting from it). The key
is connected via the USB-A/C adapter/hub that comes with the laptop.
The same hardware works fine under Linux.

The initial dmesg (full output below) has:

sd1 at scsibus1 targ 1 lun 0:  SCSI2
0/direct removable
sd1: 3728MB, 512 bytes/sector, 7634944 sectors

...but:

$ ls /dev/*sd1*
ls: /dev/*sd1*: No such file or directory

When un- and replugging the key, the following additional lines appear:

sd1 detached
scsibus1 detached
umass0 detached
uhub1: port 1, set config 0 at addr 3 failed
uhub1: device problem, disabling port 1

When un- and replugging the adapter (with the key in it), the
following additional lines appear:

uhub1 detached
uhub2 detached
uhub1 at uhub0 port 1 configuration 1 interface 0 "VIA Labs, Inc.
USB2.0 Hub" rev 2.10/6.80 addr 2
uhub1: port 1, set config 0 at addr 3 failed
uhub1: device problem, disabling port 1
"VIA Technologies Inc. USB 2.0 BILLBOARD" rev 2.01/3.04 addr 3 at
uhub1 port 2 not configured
uhub2 at uhub0 port 13 configuration 1 interface 0 "VIA Labs, Inc.
USB3.0 Hub" rev 3.00/6.85 addr 4

Using another type of USB hub and an external HDD gives similar results:

uhub1 at uhub0 port 1 configuration 1 interface 0 "Apple Inc. USB2.0
Hub" rev 2.10/45.28 addr 2
"Apple Inc. USB-C Digital AV Multiport Adapter" rev 2.10/2.35 addr 3
at uhub1 port 2 not configured
uhub2 at uhub0 port 13 configuration 1 interface 0 "Apple Inc. USB3.0
Hub" rev 3.00/45.28 addr 4
umass0 at uhub2 port 1 configuration 1 interface 0 "Seagate Expansion"
rev 3.00/0.00 addr 8
mass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0:  SCSI4 0/direct fixed
sd1: 3815447MB, 512 bytes/sector, 7814037167 sectors
uhub1 detached
uhub1 at uhub0 port 1 configuration 1 interface 0 "Apple Inc. USB2.0
Hub" rev 2.10/45.28 addr 2
"Apple Inc. USB-C Digital AV Multiport Adapter" rev 2.10/2.35 addr 3
at uhub1 port 2 not configured

Any help with this would be much appreciated!

Thanks

Max


Initial dmesg:

OpenBSD 6.2 (RAMDISK_CD) #132: Tue Oct  3 21:26:51 MDT 2017
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 17037766656 (16248MB)
avail mem = 16517648384 (15752MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xeb350 (31 entries)
bios0: vendor American Megatrends Inc. version "UX390UAK.312" date 04/25/2017
bios0: ASUSTeK COMPUTER INC. UX390UAK
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP APIC FPDT ECDT MCFG FIDT SSDT MSDM SSDT HPET
UEFI SSDT LPIT WSMT SSDT SSDT DBGP DBG2 DMAR TPM2
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz, 2904.00 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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: TSC frequency 290400 Hz
cpu0: apic clock running at 23MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 120 pins
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 3 (RP09)
acpiprt5 at acpi0: bus -1 (RP10)
acpiprt6 at acpi0: bus -1 (RP11)
acpiprt7 at acpi0: bus -1 (RP12)
acpiprt8 at acpi0: bus -1 (RP13)
acpiprt9 at acpi0: bus 1 (RP01)
acpiprt10 at acpi0: bus -1 (RP02)
acpiprt11 at acpi0: bus -1 (RP03)
acpiprt12 at acpi0: bus -1 (RP04)
acpiprt13 at acpi0: bus -1 (RP05)
acpiprt14 at acpi0: bus 2 (RP06)
acpiprt15 at acpi0: bus -1 (RP07)
acpiprt16 at acpi0: bus -1 (RP08)
acpiprt17 at acpi0: bus -1 (RP17)
acpiprt18 at acpi0: bus -1 (RP18)
acpiprt19 at acpi0: bus -1 (RP19)
acpiprt20 at acpi0: bus -1 (RP20)
acpiprt21 at acpi0: bus -1 (RP14)
acpiprt22 at acpi0: bus -1 (RP15)
acpiprt23 at acpi0: bus -1 (RP16)
acpiec at acpi0 not configured
acpicpu at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 

Re: Reinitializing software from hardware clock?

2018-01-10 Thread Maximilian Pichler
On Thu, Jan 11, 2018 at 2:23 AM, Mike Larkin  wrote:
>> Following your hint at vmmci and looking at
>> https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/dev/pv/vmmci.c.diff?r1=1.2&r2=1.3&f=h
>> it looks like inittodr(9) would reinitialize the software clock.
>> However it seems to be available inside the kernel only. Is there no
>> way to do this from userland?
>
> not that I know of.

Not quite what I'd hoped for... now resorting to periodically updating
the clock:

while true; do date +%Y%m%d%H%M.%S | ssh virtual_machine 'date; xargs
doas date'; sleep 60; done



Re: Reinitializing software from hardware clock?

2018-01-10 Thread Maximilian Pichler
On Wed, Jan 10, 2018 at 6:50 PM, Mike Larkin  wrote:
>> > My question is: Can OpenBSD be told initialize the software from the
>> > hardware clock again after the system is booted?

> This does occur on occasion; for example, when running an OpenBSD vmm(4)
> guest, vmd(8) will notify the guest to resynch the clock from the RTC
> after the host resumes from suspend/hibernate (actually, "any time
> the host clock varies from more than 5s since it was last read by vmd(8"),
> but that practically means "only during suspend/hibernate resumes").
>
> If the OP was looking for code to do this for whatever reason, it's done
> via vmmci(4).

In fact this is precisely the use case I had in mind, except for that
instead of inside vmm OpenBSD is running in Virtualbox on Mac OS. The
clock seems to drift randomly and is off significantly after
suspend/hibernate.

Following your hint at vmmci and looking at
https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/dev/pv/vmmci.c.diff?r1=1.2&r2=1.3&f=h
it looks like inittodr(9) would reinitialize the software clock.
However it seems to be available inside the kernel only. Is there no
way to do this from userland?

Thanks!



Reinitializing software from hardware clock?

2018-01-10 Thread Maximilian Pichler
My vague understanding of how OpenBSD keeps track of time is:

* At boot the software clock (the value returned by gettimeofday) is
initialized from the hardware clock (the one with the coin-shaped
battery).

* The software clock is then incremented hz(9) times a second by a CPU
interrupt.

My question is: Can OpenBSD be told initialize the software from the
hardware clock again after the system is booted?

(Also, is the hardware clock ever modified aside from explicit
invocations of date(1) or similar?)

Thanks!



Re: no valid ntpd peers

2018-01-10 Thread Maximilian Pichler
On Wed, Jan 10, 2018 at 6:05 PM, Stuart Henderson  wrote:
> On 2018/01/10 09:43, Maximilian Pichler wrote:
>> $ doas rdate -nvp pool.ntp.org
>> rdate: Unable to receive NTP packet from server: No route to host
>
> This usually indicates either not having a route, or a firewall rule
> on the OpenBSD system blocking it.

Indeed, the ISP was to blame here. Mac OS couldn't get the time
either. Once I switched to my phone's internet connection everything
was fine.

Thanks



Re: no valid ntpd peers

2018-01-10 Thread Maximilian Pichler
On Wed, Jan 10, 2018 at 11:55 AM, x9p  wrote:
> I had similar problems once under VirtualBox, other OS. try switching from 
> NAT to BRIDGED
> mode and give it a try.

Thanks, but no luck on my end. Any insight into why this should have helped?



Re: no valid ntpd peers

2018-01-09 Thread Maximilian Pichler
I should probably mention that this is OpenBSD 6.2 running under
VirtualBox on MacOS.

On Mon, Jan 8, 2018 at 10:02 PM, Stuart Henderson  wrote:
> How does "rdate -nvp pool.ntp.org" look?

$ doas rdate -nvp pool.ntp.org
rdate: Unable to receive NTP packet from server: No route to host
rdate: Unable to receive NTP packet from server: No route to host
rdate: Unable to receive NTP packet from server: No route to host
rdate: Unable to receive NTP packet from server: No route to host
rdate: Unable to get a reasonable time estimate

On the other hand (suggested by Rudy Baker in a private message):

$ nc -vu pool.ntp.org 123
Connection to pool.ntp.org 123 port [udp/ntp] succeeded!

 $ traceroute -c -p 123 pool.ntp.org
traceroute: Warning: pool.ntp.org has multiple addresses; using 203.159.70.33
traceroute to pool.ntp.org (203.159.70.33), 64 hops max, 40 byte packets
 1  10.0.2.2 (10.0.2.2)  0.867 ms  0.349 ms  0.246 ms
 2  * * *
 3  192.168.11.1 (192.168.11.1)  2.514 ms  2.137 ms  1.786 ms
 4  125.213.235.25 (125.213.235.25)  2.848 ms  2.51 ms  2.617 ms
 5  125.213.235.17 (125.213.235.17)  5.88 ms  3.059 ms  3.211 ms
 6  * * *
 7  * * *
 8  * * *
 9  * 125.213.235.17 (125.213.235.17)  3.367 ms !X *

Disabling pf (as well as the firewall on the host MacOS) gives
identical results.

Also, it looks like no packets are coming back (suggested by David
Dahlberg in a private message):
$ doas tcpdump -envps1500 -i em0 port ntp or icmp
tcpdump: listening on em0, link-type EN10MB
06:16:31.765946 08:00:27:34:76:da 52:54:00:12:35:02 0800 90:
10.0.2.15.47084 > 203.158.247.150.123: [bad udp cksum cf8d! -> 5deb]
v4 client strat 0 poll 0 prec 0 dist 0.00 disp 0.00 ref
(unspec)@0.0 orig 0.0 rec -0.0 xmt
-34468692.156416639 [tos 0x10] (ttl 64, id 34769, len 76)
06:16:31.766020 08:00:27:34:76:da 52:54:00:12:35:02 0800 90:
10.0.2.15.35704 > 203.158.118.2.123: [bad udp cksum 4df9! -> 780a] v4
client strat 0 poll 0 prec 0 dist 0.00 disp 0.00 ref
(unspec)@0.0 orig 0.0 rec -0.0 xmt
-95552486.879830002 [tos 0x10] (ttl 64, id 47214, len 76)
06:16:31.766340 08:00:27:34:76:da 52:54:00:12:35:02 0800 90:
10.0.2.15.31315 > 103.22.182.121.123: [bad udp cksum 29e8! -> dad3] v4
client strat 0 poll 0 prec 0 dist 0.00 disp 0.00 ref
(unspec)@0.0 orig 0.0 rec -0.0 xmt
+1659942531.907521903 [tos 0x10] (ttl 64, id 53951, len 76)
06:16:31.766494 08:00:27:34:76:da 52:54:00:12:35:02 0800 90:
10.0.2.15.11278 > 203.159.70.33.123: [bad udp cksum 1e19! -> 6dc7] v4
client strat 0 poll 0 prec 0 dist 0.00 disp 0.00 ref
(unspec)@0.0 orig 0.0 rec -0.0 xmt
+94128219.587299346 [tos 0x10] (ttl 64, id 30931, len 76)
06:16:31.768890 52:54:00:12:35:02 08:00:27:34:76:da 0800 90:
125.213.235.17 > 10.0.2.15: icmp: host 203.158.247.150 unreachable -
admin prohibited filter [icmp cksum ok] [tos 0xd0] (ttl 63, id 48216,
len 76)

What is "admin prohibited filter"?

Thanks for all the suggestions!



no valid ntpd peers

2018-01-08 Thread Maximilian Pichler
Hi,

For some reason my ntpd doesn't get any replies from the time servers.
They can however be pinged, so I'm unsure what causes this. Any ideas?

Thanks!

Max


$ doas ntpctl -s all
0/4 peers valid, constraint offset 107s, clock unsynced

peer
   wt tl st  next  poll  offset   delay  jitter
203.159.70.33 from pool pool.ntp.org
1  2  -  215s  300s  peer not valid 
203.158.118.2 from pool pool.ntp.org
1  2  -  215s  300s  peer not valid 
203.158.247.150 from pool pool.ntp.org
1  2  -  215s  300s  peer not valid 
124.109.2.169 from pool pool.ntp.org
1  2  -  215s  300s  peer not valid 

$ ping 203.159.70.33
PING 203.159.70.33 (203.159.70.33): 56 data bytes
64 bytes from 203.159.70.33: icmp_seq=0 ttl=254 time=34.143 ms
64 bytes from 203.159.70.33: icmp_seq=1 ttl=254 time=34.348 ms
^C

$ doas ntpd -d -s
/var/db/ntpd.drift is empty
ntp engine ready
constraint request to 74.125.130.103
constraint request to 74.125.130.99
constraint request to 74.125.130.147
constraint request to 74.125.130.105
constraint request to 74.125.130.106
constraint request to 74.125.130.104
constraint reply from 74.125.130.147: offset 107.627988
constraint reply from 74.125.130.104: offset 107.625112
constraint reply from 74.125.130.99: offset 107.617672
constraint reply from 74.125.130.105: offset 107.616788
constraint reply from 74.125.130.103: offset 107.613464
constraint reply from 74.125.130.106: offset 107.609782
no reply received in time, skipping initial time setting
no reply from 203.159.70.33 received in time, next query 300s
no reply from 203.158.118.2 received in time, next query 300s
no reply from 203.158.247.150 received in time, next query 300s
no reply from 124.109.2.169 received in time, next query 300s



fsck: CANNOT READ: BLK 4235468160

2018-01-06 Thread Maximilian Pichler
Hi,

I'm running fsck on an external USB hard drive, using OpenBSD 6.2
inside VirtualBox on MacOS.

On each run it gives a handful of "CANNOT READ: BLK ..." messages, but
the block numbers reported are different (!) each time.

If the disk is damaged, shouldn't the problematic blocks be
consistent? Does this point to a communication problem with the disk
(e.g. faulty USB cable)? Or is this a hopelessly unstable situation
given the general screwiness of USB over VirtualBox/Mac OS...?

Also, does answering "y" to "CANNOT READ" modify the disk contents?

Thanks for any insights!

Max


xhci0 at pci0 dev 12 function 0 "Intel 7 Series xHCI" rev 0x00: apic 2 int 20
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev
3.00/1.00 addr 1
umass0 at uhub0 port 9 configuration 1 interface 0 "Seagate Expansion"
rev 3.00/0.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus4 at umass0: 2 targets, initiator 0
sd0 at scsibus4 targ 1 lun 0:  SCSI4 0/direct fixed
sd0: 3815447MB, 512 bytes/sector, 7814037167 sectors

$ doas fsck /dev/sd0a
** /dev/rsd0a
** Last Mounted on /home/max/mnt
** Phase 1 - Check Blocks and Sizes

CANNOT READ: BLK 4235468160
CONTINUE? [Fyn?] y

THE FOLLOWING DISK SECTORS COULD NOT BE READ:

CANNOT READ: BLK 4128081280
CONTINUE? [Fyn?] y

THE FOLLOWING DISK SECTORS COULD NOT BE READ:
CANNOT READ: BLK 4194986880
CONTINUE? [Fyn?] y
CONTINUE? [Fyn?] y

THE FOLLOWING DISK SECTORS COULD NOT BE READ:
** Phase 2 - Check Pathnames

CANNOT READ: BLK 4195146384
CONTINUE? [Fyn?] y
CONTINUE? [Fyn?] y

THE FOLLOWING DISK SECTORS COULD NOT BE READ:
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
614222 files, 408012667 used, 76524122 free (3658 frags, 9565058
blocks, 0.0% fragmentation)

MARK FILE SYSTEM CLEAN? [Fyn?] y


* FILE SYSTEM WAS MODIFIED *


$ doas fsck -f /dev/sd0a
** /dev/rsd0a
** File system is already clean
** Last Mounted on /home/max/mnt
** Phase 1 - Check Blocks and Sizes

CANNOT READ: BLK 4236615424
CONTINUE? [Fyn?] y

THE FOLLOWING DISK SECTORS COULD NOT BE READ:
** Phase 2 - Check Pathnames

CANNOT READ: BLK 3732315520
CONTINUE? [Fyn?] y

THE FOLLOWING DISK SECTORS COULD NOT BE READ:

CANNOT READ: BLK 4161885792
CONTINUE? [Fyn?] y

THE FOLLOWING DISK SECTORS COULD NOT BE READ:

CANNOT READ: BLK 4201995728
CONTINUE? [Fyn?] y

THE FOLLOWING DISK SECTORS COULD NOT BE READ:

CANNOT READ: BLK 4202008160
CONTINUE? [Fyn?] y

THE FOLLOWING DISK SECTORS COULD NOT BE READ:

CANNOT READ: BLK 4202013680
CONTINUE? [Fyn?] y

THE FOLLOWING DISK SECTORS COULD NOT BE READ:
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups

CANNOT READ: BLK 5011229824
CONTINUE? [Fyn?] y

THE FOLLOWING DISK SECTORS COULD NOT BE READ:
614222 files, 408012667 used, 76524122 free (3658 frags, 9565058
blocks, 0.0% fragmentation)



Re: nc in inetd - under which account?

2017-06-06 Thread Maximilian Pichler
On Tue, Jun 6, 2017 at 11:06 AM, Marko Cupać  wrote:
> On Tue, 06 Jun 2017 08:18:15 -0600
> "Theo de Raadt"  wrote:
>> Never reuse a user intended for another purpose.
>>
>> Take a glance at the ptrace manual page.

> I have read ptrace manual. But I guess I need to read much MUCH more if
> I want to comprehend it :)

I'm guessing the point here is that ptrace can be used to eavesdrop on
processes of the same user id. So if the proxy user got compromised,
an attacker could not just kill the nc processes, but also read the
data they are forwarding.



Re: Blank screen after boot with Radeon HD 5450

2017-05-31 Thread Maximilian Pichler
On Wed, May 31, 2017 at 3:44 PM, Allan Streib  wrote:
>> You may be able to get a higher resolution by decreasing the refresh rate:
>>
>> $ gtf 2560 1440 33
>>
>>   # 2560x1440 @ 33.00 Hz (GTF) hsync: 48.44 kHz; pclk: 162.77 MHz
>>   Modeline "2560x1440_33.00"  162.77  2560 2688 2960 3360  1440 1441
>> 1444 1468  -HSync +Vsync
>>
>> $ xrandr --newmode 2560x1440_33.00 162.77 2560 2688 2960 3360 1440
>> 1441 1444 1468 -HSync +Vsync
>> $ xrandr --addmode DVI-0 2560x1440_33.00
>> $ xrandr --output DVI-0  --mode 2560x1440_33.00
>
> Yes, that actually worked! I tried first at 50Hz and it did not, but
> 33Hz is working at 2560x1440 (but not in console however, I don't know
> how to specify a different mode there, if it's even possible).

DVI limits the clock frequency to 165 MHz (the first number on the
mode line). You may be able to go beyond that by using a DisplayPort
cable instead.



Re: Blank screen after boot with Radeon HD 5450

2017-05-31 Thread Maximilian Pichler
On Wed, May 31, 2017 at 2:06 PM, Allan Streib  wrote:
> I think you should try another monitor if at all possible. Perhaps your
> monitor just goes into power-save mode with an incompatible signal.

If and when I get my hands on another monitor I'll definitely try it
out. (Although ultimately it would be nice to get it working with this
one, as it works fine under Linux. This is a Dell U2515H.)

> My xrandr shows the 2560x1440 mode at 59.95Hz, I'm assuming that's close
> enough to 60Hz that it should work? Or could that be the problem? The
> highest I can get working is 2048x1152.
>
> Screen 0: minimum 320 x 200, current 4096 x 1152, maximum 8192 x 8192
> DVI-0 connected primary 2048x1152+0+0 (normal left inverted right x axis y 
> axis) 553mm x 311mm
>2560x1440 59.95 +
>2048x1152 60.00*
>1920x1200 59.95
>[...]

You may be able to get a higher resolution by decreasing the refresh rate:

$ gtf 2560 1440 33

  # 2560x1440 @ 33.00 Hz (GTF) hsync: 48.44 kHz; pclk: 162.77 MHz
  Modeline "2560x1440_33.00"  162.77  2560 2688 2960 3360  1440 1441
1444 1468  -HSync +Vsync

$ xrandr --newmode 2560x1440_33.00 162.77 2560 2688 2960 3360 1440
1441 1444 1468 -HSync +Vsync
$ xrandr --addmode DVI-0 2560x1440_33.00
$ xrandr --output DVI-0  --mode 2560x1440_33.00



Re: Blank screen after boot with Radeon HD 5450

2017-05-31 Thread Maximilian Pichler
Just tried another graphics card (VisionTek Radeon HD 6350), with
identical results: the boot messages are shown, then the signal is
lost.



Re: Blank screen after boot with Radeon HD 5450

2017-05-30 Thread Maximilian Pichler
Without parameters, via ssh:

$ xrandr
Can't open display
$ echo [$DISPLAY]
[]

This is after logging in and typing startx on the keyboard, with a
blank monitor. I've also tried launching startx via ssh, with the same
result.

On Tue, May 30, 2017 at 5:08 PM, Mihai Popescu  wrote:
> What is the output of xrandr plain command, without any parameters? Do
> not use display numbers or anything else, type it like this 'xrandr'
> using a ssh connection on the non working configuration.
>



Re: Blank screen after boot with Radeon HD 5450

2017-05-30 Thread Maximilian Pichler
On Tue, May 30, 2017 at 2:55 PM, Mihai Popescu  wrote:
> Did you disable the onboard card from BIOS? What options do you have for this?

In the BIOS, "Primary Graphics Adapter" is set to "PCI Express". When
switching it to "Onboard" and plugging the cable into the onboard DP,
the boot message and the BIOS setup are shown and the display
functions at 2560x1440@60Hz.

When the setting is "PCI Express" the OpenBSD boot messages are
displayed through the PCI adapter (only). A brief moment after the
"scsibus4 at softraid0: 256 targets" there is no signal anymore,
neither on the PCI adapter nor the on-board one. (This happens no
matter whether xenodm is on or off.)



Re: Blank screen after boot with Radeon HD 5450

2017-05-30 Thread Maximilian Pichler
On Tue, May 30, 2017 at 2:15 PM,   wrote:
> Just a thought -- maybe it's because there is no error  ???
>
> man xbacklight(1)

$ xbacklight
No outputs have backlight property

The monitor is not just dark, but it says "no signal" and goes into
power save mode.



Re: Blank screen after boot with Radeon HD 5450

2017-05-30 Thread Maximilian Pichler
I would certainly have followed Allan's advice, but only own one
monitor. Apologies for having failed to mention this.



Re: Blank screen after boot with Radeon HD 5450

2017-05-30 Thread Maximilian Pichler
As mentioned, I booted another OS from a USB stick and it runs at
2560x1440@60MHz. Doesn't this make it unlikely that the issue is with
the monitor or cable? Also, the connection is via DisplayPort, even
the most basic version of which shouldn't struggle with this
resolution.

Is there not a more systematic way of debugging this? I find it
puzzling that none of the logs contains any error message.


On Tue, May 30, 2017 at 9:42 AM, Allan Streib  wrote:
> Maximilian Pichler  writes:
>
>>2560x1440 59.95*+
>>2048x1152 60.00
>>1920x1200 59.88
>>1920x1080 60.0050.0059.9430.0025.0024.00
>
> [...]
>
> Try connecting a lower-resolution monitor and see if it works, if you
> have one.
>
> I have found that my dual 2560x1440 monitors, connected with DVI->HDMI
> cables, are not capable of 2560x1440 I believe this is due to limits of
> DVI. However the monitor and/or the card does not realize this and
> reports 2560x1440 60Hz as the "preferred" mode.
>
> I have a ATI Radeon HD 5870 card.
>
> If I connect one monitor with an HDMI cable I can see the console. With
> two monitors connected with DVI->HDMI I do not. I have to do a "blind"
> login then run "startx" and all is well.
>
> Allan
>
>



Re: Blank screen after boot with Radeon HD 5450

2017-05-29 Thread Maximilian Pichler
Apologies, I have to revise the results from my previous message (by
accident I had the cable connected to the onboard video).

In fact xrandr does detect the DisplayPort connection:

$ DISPLAY=:0 xrandr
Screen 0: minimum 320 x 200, current 2560 x 1440, maximum 8192 x 8192
DisplayPort-0 connected primary 2560x1440+0+0 (normal left inverted
right x axis y axis) 553mm x 311mm
   2560x1440 59.95*+
   2048x1152 60.00
   1920x1200 59.88
   1920x1080 60.0050.0059.9430.0025.0024.00
29.9723.98
   1920x1080i60.0050.0059.94
   1600x1200 60.00
   1680x1050 59.95
   1280x1024 75.0260.02
   1200x960  59.99
   1152x864  75.00
   1280x720  60.0050.0059.94
   1440x576i 50.00
   1024x768  75.0860.00
   1440x480i 60.0059.94
   800x600   75.0060.32
   720x576   50.00
   720x480   60.0059.94
   640x480   75.0060.0059.94
   720x400   70.08
DVI-0 disconnected (normal left inverted right x axis y axis)
VGA-0 disconnected (normal left inverted right x axis y axis)

However, the screen remains blank. Changing the resolution doesn't help either:
$ DISPLAY=:0 xrandr --output DisplayPort-0 --mode 1280x720
(screen remains blank)


On Sun, May 28, 2017 at 8:02 PM, Maximilian Pichler
 wrote:
> I tried your suggestion of logging in with the keyboard while the
> screen is blank and then typing "startx". Then logged in via ssh:
> $ DISPLAY=:0 xrandr
> Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
> DisplayPort-0 disconnected primary (normal left inverted right x axis y axis)
> DVI-0 disconnected (normal left inverted right x axis y axis)
> VGA-0 disconnected (normal left inverted right x axis y axis)
>
> The DisplayPort cable is connected.
>
> Still it seems that the problem is not with X, as it occurs even with
> it is disabled.



Re: Blank screen after boot with Radeon HD 5450

2017-05-28 Thread Maximilian Pichler
I tried your suggestion of logging in with the keyboard while the
screen is blank and then typing "startx". Then logged in via ssh:
$ DISPLAY=:0 xrandr
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
DisplayPort-0 disconnected primary (normal left inverted right x axis y axis)
DVI-0 disconnected (normal left inverted right x axis y axis)
VGA-0 disconnected (normal left inverted right x axis y axis)

The DisplayPort cable is connected.

Still it seems that the problem is not with X, as it occurs even with
it is disabled.



Re: Blank screen after boot with Radeon HD 5450

2017-05-28 Thread Maximilian Pichler
On Sun, May 28, 2017 at 4:50 PM, Steven McDonald
 wrote:
> Have you tried booting more than once?

Yes, many times, both warm and cold.



Blank screen after boot with Radeon HD 5450

2017-05-28 Thread Maximilian Pichler
Hi,

After the installation of a VisionTek Radeon 5450 graphics card my
machine gives a blank screen after booting. It still shows the normal
system messages (full dmesg below), with the last visible one being
"scsibus4 at softraid0: 256 targets". Then the monitor (connected via
DisplayPort) goes into power save mode. This is on OpenBSD 6.1 and
amd64.

The machine is up and I can ssh into it. When booting with 'boot -c'
and 'disable radeondrm' the problem doesn't occur, but of course then
graphics acceleration is lost. Also, when booting another OS from a
USB stick the display is functioning at 2560x1440@60Hz.

xenodm is disabled. Just in case this provides useful information
below is also an Xorg.0.log when it is enabled (the display remains
blank).

Thanks for any insights or hints.

Max

$ fw_update -i
Installed: vmm-firmware-1.10.2p2 radeondrm-firmware-20150927
iwm-firmware-0.20161101
Installed, extra: malo-firmware-1.4p4 rsu-firmware-1.2p0
acx-firmware-1.4p5 rtwn-firmware-1.0 athn-firmware-1.1p1
upgt-firmware-1.1p4 wpi-firmware-3.2p1 uvideo-firmware-1.2p2
iwn-firmware-5.11p1 urtwn-firmware-1.2 bwi-firmware-1.4p4
uath-firmware-2.0p1 pgt-firmware-1.2p4 iwi-firmware-3.1p2
otus-firmware-1.0p1 ipw-firmware-1.3p2

$ dmesg
OpenBSD 6.1 (GENERIC.MP) #20: Sat Apr  1 13:45:56 MDT 2017
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17126002688 (16332MB)
avail mem = 16602288128 (15833MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x8fb1 (30 entries)
bios0: vendor American Megatrends Inc. version "P1.20" date 12/16/2016
bios0: ASRock Z270 Gaming-ITX/ac
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT MCFG SSDT FIDT SSDT SSDT HPET SSDT
UEFI SSDT AAFT LPIT WSMT DBGP DBG2 DMAR ASF!
acpi0: wakeup devices PEGP(S4) PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4)
PEG2(S4) PXSX(S4) RP09(S4) PXSX(S4) RP10(S4) PXSX(S4) RP11(S4)
PXSX(S4) RP12(S4) PXSX(S4) RP13(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) i7-7700K CPU @ 4.20GHz, 4200.00 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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: TSC frequency 42 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 23MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz, 4200.00 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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz, 4200.00 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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz, 4200.00 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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
cpu4 at mainbus0: apid 1 (application processor)
cpu4: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz, 4200.00 MHz
cpu4: 
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,SDBG,FMA3,CX16,xTPR,PDCM,PCID,

Re: "athn0: could not load firmware" for AR9271

2017-05-28 Thread Maximilian Pichler
Thanks a lot for sharing the details!

By the way, there seems to be an issue with the test results I sent
because dd sometimes copied fewer bytes than intended. I'll try to pin
it down and either update this thread or open a new one.



Re: "athn0: could not load firmware" for AR9271

2017-05-27 Thread Maximilian Pichler
On Sat, May 27, 2017 at 11:03 AM, Stefan Sperling  wrote:
> The ATI SB700 is known to suffer from this issue.

Good to know, thanks.

> Get a 9280 miniPCIe. Pcengines sells them as "wle200nx".
> A list of similar products can be found on wikidevi:
> https://wikidevi.com/wiki/Atheros -> Search for the entry
> called "AR9280 (Merlin)" and follow the "19 devices" link.

I've tried a PPD-AR5BHB92-H (AR9280 miniPCIe) in AP mode and connected
clients get ~12 Mbit/s downstream and ~35 Mbit/s upstream (i.e. the
card appears to receive data much faster than it sends). Selecting a
less crowded 5GHz channel helped quite a bit. Is this performance more
or less what is currently to be expected?

The dmesg is the same as previously (this is on the APU), except for:
athn0 at pci5 dev 0 function 0 "Atheros AR9281" rev 0x01: apic 2 int 16
athn0: AR9280 rev 2 (2T2R), ROM rev 22, address xx:xx:xx:xx:xx:e2

$ ifconfig athn0
athn0: flags=8943 mtu 1500
lladdr xx:xx:xx:xx:xx:e2
index 4 priority 4 llprio 3
groups: wlan
media: IEEE802.11 autoselect mode 11n hostap
status: active
ieee80211: nwid  chan 161 bssid xx:xx:xx:xx:xx:e2
wpakey xx
wpaprotos wpa2 wpaakms psk wpaciphers ccmp wpagroupcipher ccmp

The measurements were conducted by running the following commands on a
Macbook connected to the AP's wireless network:

$ for i in {1..10}; do nc 192.168.0.1 1234 | dd of=/dev/null
count=10240 bs=1000; sleep 1; done 2>&1 | grep trans
6899272 bytes transferred in 4.307439 secs (1601711 bytes/sec)
6864520 bytes transferred in 4.275299 secs (1605623 bytes/sec)
6837456 bytes transferred in 4.256377 secs (1606403 bytes/sec)
6734200 bytes transferred in 4.194057 secs (1605653 bytes/sec)
6952848 bytes transferred in 4.311542 secs (1612613 bytes/sec)
6898272 bytes transferred in 4.294667 secs (1606241 bytes/sec)
6867864 bytes transferred in 4.256106 secs (1613650 bytes/sec)
6906512 bytes transferred in 4.291027 secs (1609524 bytes/sec)
6757816 bytes transferred in 4.182866 secs (1615595 bytes/sec)
6871760 bytes transferred in 5.059761 secs (1358119 bytes/sec)

$ for i in {1..10}; do dd if=/dev/urandom count=10240 bs=1000 | nc
192.168.0.1 1234; sleep 1; done 2>&1 | grep trans
1024 bytes transferred in 2.290328 secs (4470975 bytes/sec)
1024 bytes transferred in 2.251763 secs (4547548 bytes/sec)
1024 bytes transferred in 2.160710 secs (4739183 bytes/sec)
1024 bytes transferred in 2.031869 secs (5039695 bytes/sec)
1024 bytes transferred in 2.215611 secs (4621750 bytes/sec)
1024 bytes transferred in 3.615391 secs (2832335 bytes/sec)
1024 bytes transferred in 2.340003 secs (4376063 bytes/sec)
1024 bytes transferred in 2.185185 secs (4686102 bytes/sec)
1024 bytes transferred in 2.509382 secs (4080686 bytes/sec)
1024 bytes transferred in 2.333018 secs (4389164 bytes/sec)

On the AP box:
$ nc -kl 1234 < /dev/urandom
$ nc -kl 1234 > /dev/null



Re: "athn0: could not load firmware" for AR9271

2017-05-27 Thread Maximilian Pichler
On Sat, May 27, 2017 at 4:05 AM, Stefan Sperling  wrote:
> What is the model of your USB host controller? (please always send a
> complete dmesg in problem reports -- you cannot guess exactly what people
> will want to know about your machine, so by sending a complete dmesg
> you'll save people a round-trip to get more information they need)

It appears to be an ATI SB700, on the PC Engines APU board
(https://www.pcengines.ch/apu.htm). Full dmesg below.

> There's a problem where this chip does not get enough juice from the USB
> host controller in some cases. The firmware failing to load is a symptom
> of this. The cause has not been pinned down. It could probably be fixed
> in software, somewhere in the USB stack.

I just plugged the same adapter into a more powerful machine and it
was properly recognized, which would confirm the hypothesis.

By the way, if you had any advice on which WiFi adapter (mini PCIe or
USB) gives best performance as a Host AP right now, I'd be most
grateful.

Thanks!


#dmesg
OpenBSD 6.1 (GENERIC.MP) #20: Sat Apr  1 13:45:56 MDT 2017
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4246003712 (4049MB)
avail mem = 4112646144 (3922MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdf16d820 (6 entries)
bios0: vendor coreboot version "SageBios_PCEngines_APU-45" date 04/05/2014
bios0: PC Engines APU
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP SPCR HPET APIC HEST SSDT SSDT SSDT
acpi0: wakeup devices AGPB(S4) HDMI(S4) PBR4(S4) PBR5(S4) PBR6(S4)
PBR7(S4) PE20(S4) PE21(S4) PE22(S4) PE23(S4) PIBR(S4) UOH1(S3)
UOH2(S3) UOH3(S3) UOH4(S3) UOH5(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpihpet0 at acpi0: 14318180 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD G-T40E Processor, 1000.13 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB
64b/line 16-way L2 cache
cpu0: 8 4MB entries fully associative
cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu0: TSC frequency 1000125140 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD G-T40E Processor, 1000.00 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB
64b/line 16-way L2 cache
cpu1: 8 4MB entries fully associative
cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 21, 24 pins
acpiprt0 at acpi0: bus -1 (AGPB)
acpiprt1 at acpi0: bus -1 (HDMI)
acpiprt2 at acpi0: bus 1 (PBR4)
acpiprt3 at acpi0: bus 2 (PBR5)
acpiprt4 at acpi0: bus 3 (PBR6)
acpiprt5 at acpi0: bus -1 (PBR7)
acpiprt6 at acpi0: bus 5 (PE20)
acpiprt7 at acpi0: bus -1 (PE21)
acpiprt8 at acpi0: bus -1 (PE22)
acpiprt9 at acpi0: bus -1 (PE23)
acpiprt10 at acpi0: bus 0 (PCI0)
acpiprt11 at acpi0: bus 4 (PIBR)
acpicpu0 at acpi0: C2(0@100 io@0x841), C1(@1 halt!), PSS
acpicpu1 at acpi0: C2(0@100 io@0x841), C1(@1 halt!), PSS
acpibtn0 at acpi0: PWRB
cpu0: 1000 MHz: speeds: 1000 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "AMD AMD64 14h Host" rev 0x00
ppb0 at pci0 dev 4 function 0 "AMD AMD64 14h PCIE" rev 0x00: msi
pci1 at ppb0 bus 1
re0 at pci1 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E
(0x2c00), msi, address 00:0d:b9:35:a4:78
rgephy0 at re0 phy 7: RTL8169S/8110S/8211 PHY, rev. 4
ppb1 at pci0 dev 5 function 0 "AMD AMD64 14h PCIE" rev 0x00: msi
pci2 at ppb1 bus 2
re1 at pci2 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E
(0x2c00), msi, address 00:0d:b9:35:a4:79
rgephy1 at re1 phy 7: RTL8169S/8110S/8211 PHY, rev. 4
ppb2 at pci0 dev 6 function 0 "AMD AMD64 14h PCIE" rev 0x00: msi
pci3 at ppb2 bus 3
re2 at pci3 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E
(0x2c00), msi, address 00:0d:b9:35:a4:7a
rgephy2 at re2 phy 7: RTL8169S/8110S/8211 PHY, rev. 4
ahci0 at pci0 dev 17 function 0 "ATI SBx00 SATA" rev 0x40: apic 2 int
19, AHCI 1.2
ahci0: port 0: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0:  SCSI3
0/direct fixed naa.5002538844584d30
sd0: 953869MB, 512 bytes/sector, 1953525168 sectors, thin
ohci0 at pci0 dev 18 function 0 "ATI SB700 USB" rev 0x00: apic 2 int
18, version 1.0, legacy support
ehci0 at pci0 dev 18 function 

"athn0: could not load firmware" for AR9271

2017-05-26 Thread Maximilian Pichler
Hi,

I'm trying to use an Olimex MOD-WIFI-AR9271-ANT USB wireless adapter, but:
# dmesg
OpenBSD 6.1 (GENERIC.MP) #20: Sat Apr  1 13:45:56 MDT 2017
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
[...]
athn0 at uhub0 port 5 configuration 1 interface 0 "ATHEROS UB93" rev
2.00/1.08 addr 2
athn0: could not load firmware
[...]

The athn firmware is installed:
# fw_update -i
Installed: athn-firmware-1.1p1
Installed, extra: iwi-firmware-3.1p2 radeondrm-firmware-20150927
pgt-firmware-1.2p4 bwi-firmware-1.4p4 urtwn-firmware-1.2
ipw-firmware-1.3p2 iwn-firmware-5.11p1 uath-firmware-2.0p1
iwm-firmware-0.20161101 otus-firmware-1.0p1 wpi-firmware-3.2p1
vmm-firmware-1.10.2p2 rsu-firmware-1.2p0 acx-firmware-1.4p5
upgt-firmware-1.1p4 rtwn-firmware-1.0 malo-firmware-1.4p4
uvideo-firmware-1.2p2

And the device is there:
# usbdevs -vdf /dev/usb0
Controller /dev/usb0:
addr 1: high speed, self powered, config 1, EHCI root hub(0x),
ATI(0x1002), rev 1.00
  uhub0
 port 1 powered
 port 2 powered
 port 3 powered
 port 4 powered
 port 5 addr 2: high speed, power 500 mA, config 1, UB93(0x3327),
ATHEROS(0x13d3), rev 1.08, iSerialNumber 12345
   athn0

According to the manufacturer
(https://www.olimex.com/Products/USB-Modules/MOD-WIFI-AR9271-ANT/)
this is an AR9271 chip, which is listed on the athn man page. What am
I missing?

Thanks

Max



Slow video in VLC and mplayer, but not in browsers

2017-05-16 Thread Maximilian Pichler
Hi,

I'm getting slow and choppy (non-accelerated?) video in both VLC and
mplayer on OpenBSD 6.1. However, when watching the same video inside
chromium or firefox the quality is decent. What might cause this?

$ dmesg | grep vga
vga1 at pci0 dev 2 function 0 "Intel HD Graphics 630" rev 0x04
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)

$ glxinfo
[...]
direct rendering: Yes
[...]
Extended renderer info (GLX_MESA_query_renderer):
Vendor: VMware, Inc. (0x)
Device: softpipe (0x)
Version: 13.0.6
Accelerated: no
Video memory: 16068MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 3.3
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0

Btw, for VLC I also need to export
LD_PRELOAD=/usr/X11R6/lib/libGL.so.17.1 to work around undefined
symbols in swrast_dri.so, as described in
https://marc.info/?l=openbsd-ports&m=146532946103283.

Thanks for any hints!

Maxim



Re: Performance of Firefox and Chromium

2016-04-29 Thread Maximilian Pichler
On Fri, Apr 29, 2016 at 8:45 AM, Donald Allen  wrote:
> I have not tried 'current', but again, there is discussion in the archives
> about internal changes (in the scheduler?) that have apparently improved
> things significantly in this area.

Thanks for the hint. Updating to -current made both browsers usable
again, both for chromium and firefox. While there may still be room
for improvement, the difference is quite dramatic.



Performance of Firefox and Chromium

2016-04-29 Thread Maximilian Pichler
Hi,

After upgrading to 5.9 (and thus Chromium 48 and Firefox 44) browser
performance seems degraded. Opening three different tabs with e.g.
newspaper websites results in a noticeable lag (up to several seconds)
when switching tabs or even just typing a URL into the address bar.

My question is: In the current state of things is this "normal" or
does it indicate that something is wrong with my system? I've read
http://www.tedunangst.com/flak/post/firefox-vs-rthreads, but am not
sure whether what is described there accounts for this sort of
behavior.

I'm aware that other browsers exist, but my question is specifically
about these two.

Thanks

Max



iPhone?

2015-10-24 Thread Maximilian Pichler
Hi,

I just connected an iPhone to my OpenBSD box and it doesn't seem
possible to access its memory. Is there any way to make this work? In
fact, is there anything at all that can be done with OpenBSD and an
iPhone...?

Thanks

Max

uaudio0 at uhub0 port 1 configuration 2 interface 0 "Apple Inc.
iPhone" rev 2.00/8.01 addr 6
uaudio0: audio rev 1.00, 0 mixer controls
audio1 at uaudio0
uhidev3 at uhub0 port 1 configuration 2 interface 2 "Apple Inc.
iPhone" rev 2.00/8.01 addr 6
uhidev3: iclass 3/0, 21 report ids
uhid1 at uhidev3 reportid 1: input=5, output=0, feature=0
uhid2 at uhidev3 reportid 2: input=9, output=0, feature=0
uhid3 at uhidev3 reportid 3: input=13, output=0, feature=0
uhid4 at uhidev3 reportid 4: input=17, output=0, feature=0
uhid5 at uhidev3 reportid 5: input=25, output=0, feature=0
uhid6 at uhidev3 reportid 6: input=49, output=0, feature=0
uhid7 at uhidev3 reportid 7: input=95, output=0, feature=0
uhid8 at uhidev3 reportid 8: input=193, output=0, feature=0
uhid9 at uhidev3 reportid 9: input=255, output=0, feature=0
uhid10 at uhidev3 reportid 10: input=255, output=0, feature=0
uhid11 at uhidev3 reportid 11: input=255, output=0, feature=0
uhid12 at uhidev3 reportid 12: input=255, output=0, feature=0
uhid13 at uhidev3 reportid 13: input=0, output=5, feature=0
uhid14 at uhidev3 reportid 14: input=0, output=9, feature=0
uhid15 at uhidev3 reportid 15: input=0, output=13, feature=0
uhid16 at uhidev3 reportid 16: input=0, output=17, feature=0
uhid17 at uhidev3 reportid 17: input=0, output=25, feature=0
uhid18 at uhidev3 reportid 18: input=0, output=49, feature=0
uhid19 at uhidev3 reportid 19: input=0, output=95, feature=0
uhid20 at uhidev3 reportid 20: input=0, output=193, feature=0
uhid21 at uhidev3 reportid 21: input=0, output=255, feature=0



Re: xbacklight: No outputs have backlight property

2015-05-09 Thread Maximilian Pichler
I guess what you might be after is called DDC/IC or MCCS:
http://en.wikipedia.org/wiki/Display_Data_Channel#DDC.2FCI

Not sure what part of OpenBSD manages this.


On Tue, May 5, 2015 at 11:47 PM, Sandrine Duvalier
 wrote:
> Hi!
>
> Not sure if this is possible but I'd like to dim my external display's
> backlight. Unfortunately this gives:
>
> $ xbacklight
> No outputs have backlight property
>
> One can do "xrandr --output DP2 --brightness 0.5", but this only makes the
> colors less bright (as opposed to dimming the backlight).
>
> Any ideas?
>
> Thanks!
>
> Clementine
>
>
> $ xrandr
> Screen 0: minimum 320 x 200, current 2560 x 1440, maximum 32767 x 32767
> DP1 disconnected (normal left inverted right x axis y axis)
> HDMI1 disconnected (normal left inverted right x axis y axis)
> DP2 connected 2560x1440+0+0 (normal left inverted right x axis y axis)
> 553mm x 311mm
>2560x1440 59.95*+
>2048x1152 60.00
>1920x1200 59.88
>1920x1080 50.0030.00
>1600x1200 60.00
>1680x1050 59.95
>1280x1024 75.0260.02
>1200x960  59.99
>1152x864  75.00
>1280x720  50.00
>1024x768  75.0860.00
>800x600   75.0060.32
>720x576   50.00
>720x480   59.94
>640x480   75.0060.0059.94
>720x400   70.08
> HDMI2 disconnected (normal left inverted right x axis y axis)
> VIRTUAL1 disconnected (normal left inverted right x axis y axis)



Remote X app with GLX

2015-05-08 Thread Maximilian Pichler
Hi,

I'm trying to run a remote X application with accelerated graphics,
but this doesn't seem to work:

$ ssh -Y 192.168.1.2 glxgears
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: i965
28 frames in 5.1 seconds =  5.458 FPS

$ ssh -Y 192.168.1.2 glxinfo | grep Accelerated
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: i965
Accelerated: no

The gears show up, but the frame rate is very low and CPU usage of the
X server process spikes.

When running the same command on the X server locally, things work fine:

$ glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
246 frames in 5.0 seconds = 49.144 FPS

$ glxinfo | grep Accelerated
Accelerated: yes

Do I understand correctly that AIGLX should use the graphics card of
the machine that is running the X server (i.e. the one that has the
monitor connected to it)? Does this need to be configured somehow?

Thanks

Max



Slow graphics with Intel Iris 6100

2015-05-04 Thread Maximilian Pichler
On Monday, May 4, 2015, Mihai Popescu > wrote:

> > Perhaps it would be helpful if the man page inteldrm(4)
> > mentioned this, so people can avoid buying unsupported hardware.
>
> Come on, are you serious about this? The man page of inteldrm(4) has a
> section intel(4) where you can see the supported hardware very nice
> listed.


The Intel Iris 6100 is listed as supported on intel(4). My suggestion was
to document that this is not true on Broadwell.



Re: iwm0: fatal firmware error / could not initiate scan

2015-05-04 Thread Maximilian Pichler
On Mon, May 4, 2015 at 6:10 AM, Stefan Sperling  wrote:
>> Is the following thread of any use:
>>
>> http://openbsd-archive.7691.n7.nabble.com/iwm0-fatal-firmware-error-on-current-td267434.html
>
> That might be it. Maximilian, can you please try this patch which was
> committed by jsg@ in r1.39 of if_iwm.c? This fix went in after 5.7.

That did it, with the patch it's working now. Thanks!



iwm0: fatal firmware error / could not initiate scan

2015-05-03 Thread Maximilian Pichler
Hi,

I'm getting these console errors on startup and each time I run
"ifconfig iwm0 scan":

iwm0: fatal firmware error
iwm0: could not initiate scan

Not sure how to diagnose the problem better. I tried rebooting, but to
no avail. Full dmesg below.

Best,

Max


OpenBSD 5.7 (GENERIC.MP) #881: Sun Mar  8 11:04:17 MDT 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17088098304 (16296MB)
avail mem = 16629297152 (15858MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xec170 (84 entries)
bios0: vendor Intel Corp. version "WYLPT10H.86A.0030.2014.0919.1139"
date 09/19/2014
bios0: Intel Corporation D54250WYK
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT FIDT SSDT SSDT SSDT MCFG HPET SSDT
SSDT DMAR CSRT
acpi0: wakeup devices PS2K(S3) PS2M(S3) 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) [...]
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) i5-4250U CPU @ 1.30GHz, 2295.06 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,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID
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) i5-4250U CPU @ 1.30GHz, 2294.69 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,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID
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) i5-4250U CPU @ 1.30GHz, 2294.69 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,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID
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) i5-4250U CPU @ 1.30GHz, 2294.69 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,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 40 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 (RP04)
acpiprt3 at acpi0: bus -1 (PEG0)
acpiec0 at acpi0: not present
acpicpu0 at acpi0: C2, C1, PSS
acpicpu1 at acpi0: C2, C1, PSS
acpicpu2 at acpi0: C2, C1, PSS
acpicpu3 at acpi0: C2, C1, PSS
acpipwrres0 at acpi0: FN00, resource for FAN0
acpipwrres1 at acpi0: FN01, resource for FAN1
acpipwrres2 at acpi0: FN02, resource for FAN2
acpipwrres3 at acpi0: FN03, resource for FAN3
acpipwrres4 at acpi0: FN04, resource for FAN4
acpitz0 at acpi0: critical temperature is 105 degC
acpitz1 at acpi0: critical temperature is 105 degC
acpibat0 at acpi0: BAT0 not present
acpibat1 at acpi0: BAT1 not present
acpibat2 at acpi0: BAT2 not present
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: LID0
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: Enhanced SpeedStep 2295 MHz: speeds: 1901, 1900, 1800, 1700,
1600, 1500, 1400, 1300, 1200, 1100, 1000, 900, 800, 779 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 4G Host" rev 0x09
vga1 at pci0 dev 2 function 0 "Intel HD Graphics 5000" rev 0x09
intagp at vga1 not configured
inteldrm0 at vga1
drm0 at inteldrm0
error: [drm:pid0:i915_write32] *ERROR* Unknown unclaimed register
before writing to 10
inteldrm0: 2560x1440
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
azalia0 at pci0 dev 3 function 0 "Intel Core 4G HD Audio" rev 0x09: msi
azalia0: No codecs found
xhci0 at pci0 dev 20 functi

Re: Slow graphics with Intel Iris 6100

2015-05-01 Thread Maximilian Pichler
On Fri, May 1, 2015 at 6:39 AM, Jonathan Gray  wrote:
>> > There is currently no support for 5th generation Core i*/Broadwell
>> > graphics in inteldrm(4).  So all X operations with be unaccelerated.
>>
>> Thanks for the answer! Is this evident somewhere in the documentation?
>> intel(4) explicitly lists "Intel(R) Iris(TM) Graphics: 5100/6100" as
>> supported. Presumably this is only the case on Haswell.
>
> intel(4) is the xorg driver (xf86-video-intel). inteldrm(4) is the
> kernel driver that does the mode setting and command submission.

I see. Perhaps it would be helpful if the man page inteldrm(4)
mentioned this, so people can avoid buying unsupported hardware.

Thanks again!



Re: Slow graphics with Intel Iris 6100

2015-05-01 Thread Maximilian Pichler
On Fri, May 1, 2015 at 3:52 AM, Jonathan Gray  wrote:
> There is currently no support for 5th generation Core i*/Broadwell
> graphics in inteldrm(4).  So all X operations with be unaccelerated.

Thanks for the answer! Is this evident somewhere in the documentation?
intel(4) explicitly lists "Intel(R) Iris(TM) Graphics: 5100/6100" as
supported. Presumably this is only the case on Haswell.

Also, I was curious how one can determine in general whether
acceleration is enabled.



Slow graphics with Intel Iris 6100

2015-04-30 Thread Maximilian Pichler
Hi,

I'm getting quite slow graphics on an Intel NUC with an integrated
Iris 6100. My guess is that acceleration is not working, although I'm
not sure how to confirm this. The symptoms are that the X process
constantly consumes about 25% of CPU time while scrolling and
switching web pages is sluggish (in several browsers) and any sort of
video is almost unwatchable, especially when scaled.

Any help would be much appreciated!

Thanks,

Max


OpenBSD 5.7-current (GENERIC.MP) #963: Wed Apr 29 10:08:38 MDT 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17043804160 (16254MB)
avail mem = 16523407360 (15757MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xed750 (86 entries)
bios0: vendor Intel Corporation version
"RYBDWi35.86A.0246.2015.0309.1355" date 03/09/2015
bios0: 
\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?
\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT FIDT MCFG HPET SSDT UEFI SSDT ASF!
SSDT SSDT SSDT DMAR
acpi0: wakeup devices PEGP(S4) PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4)
PEG2(S4) PS2K(S3) PS2M(S3) PXSX(S4) RP01(S4) PXSX(S4) RP02(S4)
PXSX(S4) RP03(S4) PXSX(S4) RP04(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) i7-5557U CPU @ 3.10GHz, 2826.50 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,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP
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) i7-5557U CPU @ 3.10GHz, 2819.92 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,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP
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) i7-5557U CPU @ 3.10GHz, 2815.13 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,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP
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) i7-5557U CPU @ 3.10GHz, 2816.10 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,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 40 pins
acpimadt0: bogus nmi for apid 0
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 1 (RP01)
acpiprt5 at acpi0: bus -1 (RP02)
acpiprt6 at acpi0: bus -1 (RP03)
acpiprt7 at acpi0: bus 2 (RP04)
acpiprt8 at acpi0: bus -1 (RP05)
acpiprt9 at acpi0: bus -1 (RP06)
acpiprt10 at acpi0: bus -1 (RP07)
acpiprt11 at acpi0: bus -1 (RP08)
acpiec0 at acpi0: not present
acpicpu0 at acpi0: C3, C1, PSS
acpicpu1 at acpi0: C3, C1, PSS
acpicpu2 at acpi0: C3, C1, PSS
acpicpu3 at acpi0: C3, C1, PSS
acpipwrres0 at acpi0: PG00, resource for PEG0
acpipwrres1 at acpi0: PG01, resource for PEG1
acpipwrres2 at acpi0: PG02, resource for PEG2
acpipwrres3 at acpi0: FN00, resource for FAN0
acpipwrres4 at acpi0: FN01, resource for FAN1
acpipwrres5 at acpi0: FN02, resource for FAN2
acpipwrres6 at acpi0: FN03, resource for FAN3
acpipwrres7 at acpi0: FN04, resource for FAN4
acpitz0 at acpi0: critical temp

Re: Trying to restart pppoe0: Device busy

2015-02-08 Thread Maximilian Pichler
On Sun, Feb 8, 2015 at 4:20 PM, Hrvoje Popovski  wrote:
> try
> ifconfig pppoe0 destroy
> sh netstart pppoe0

That worked, thanks!

I'm still struggling with the meaning of the error message and why
this is required...



Trying to restart pppoe0: Device busy

2015-02-08 Thread Maximilian Pichler
Hi,

I'm trying to restart the pppoe0 interface, so as to renegotiate a new
connection to the ISP, but am getting the following error.

$ sudo sh /etc/netstart pppoe0
ifconfig: SIOCSSARAMS(SPPPIOSXAUTH): Device busy
route: writing to routing socket: File exists
add net default: gateway 0.0.0.1: File exists

Does anyone know what does SIOCSSARAMS(SPPPIOSXAUTH) means?

More details below.

Thanks,

Max


$ ifconfig pppoe0
pppoe0: flags=28851 mtu 1492
priority: 0
dev: re0 state: session
sid: 0xdf4 PADI retries: 5 PADR retries: 0 time: 1d 00:51:51
sppp: phase network authproto pap
groups: pppoe egress
status: active
inet 98.113.101.171 --> 10.49.17.1 netmask 0x
$ ifconfig re0
re0: flags=28843 mtu 1500
lladdr 00:0d:b9:35:a4:78
priority: 0
media: Ethernet autoselect (100baseTX full-duplex,rxpause,txpause)
status: active

$ cat /etc/hostname.pppoe0
inet 0.0.0.0 255.255.255.255 NONE pppoedev re0 authproto pap authname
'newdsl' authkey 'newdsl1' up
dest 0.0.0.1
!/sbin/route add default -ifp pppoe0 0.0.0.1
$ cat /etc/hostname.re0
up

$ ifconfig re0 down
ifconfig: SIOCSIFFLAGS: Operation not permitted
$ ifconfig pppoe0 down
ifconfig: SIOCSIFFLAGS: Operation not permitted

$ dmesg | grep ^re0
re0 at pci1 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E
(0x2c00), msi, address 00:0d:b9:35:a4:78



Volume and brightness keys

2014-11-26 Thread Maximilian Pichler
Hi,

On my MacBook Air 4,1 the volume keys seem to work out of the box,
though currently I have to hold down 'fn' while pressing them. What
mechanism is responsible for this? (I'd like to get it to work without
the fn key.)

On the other hand, the brightness keys don't seem to do anything. I've
tried tinkering with usbhidaction and usbhidctl, but can't seem to
figure out what the available item names are:

$ usbhidctl -f /dev/uhid0 -r
Report descriptor:
Feature size=8 count=1 page=0xff01 usage=0x000b, logical range 0..1
usbhidctl: Excessive collection ends

$ usbhidctl -f /dev/uhid0
usbhidctl: USB_GET_REPORT (probably not supported by device): Input/output error

Any hints would be much appreciated.

Thanks,

Max


OpenBSD 5.6 (GENERIC.MP) #333: Fri Aug  8 00:20:21 MDT 2014
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
RTC BIOS diagnostic error
fb
real mem = 4185079808 (3991MB)
avail mem = 4064886784 (3876MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe (53 entries)
bios0: vendor Apple Inc. version "MBA41.88Z.0077.B11.1310091428" date 10/09/2013
bios0: Apple Inc. MacBookAir4,1
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC SBST ECDT SSDT SSDT SSDT SSDT SSDT
SSDT SSDT SSDT MCFG SSDT SSDT SSDT
acpi0: wakeup devices P0P2(S4) EC__(S4) HDEF(S4) ARPT(S4) RP02(S4)
EHC1(S3) EHC2(S3) ADP1(S4) LID0(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz, 1800.28 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC
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 100MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz, 1800.01 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC
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) i7-2677M CPU @ 1.80GHz, 1800.01 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC
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) i7-2677M CPU @ 1.80GHz, 1800.01 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
acpiec0 at acpi0
acpimcfg0 at acpi0 addr 0xe000, bus 0-151
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 3 (P0P2)
acpiprt2 at acpi0: bus 2 (RP02)
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpicpu2 at acpi0: C3, C2, C1, PSS
acpicpu3 at acpi0: C3, C2, C1, PSS
acpibat0 at acpi0: BAT0 model "3545797981023400290" type
3545797981528607052 oem "3545797981528608836"
acpiac0 at acpi0: AC unit offline
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
acpibtn2 at acpi0: SLPB
acpivideo0 at acpi0: IGPU
acpivout0 at acpivideo0: DD02
cpu0: Enhanced SpeedStep 1800 MHz: speeds: 1801, 1800, 1700, 1600,
1500, 1400, 1300, 1200, 1100, 1000, 900, 800 MHz
memory map conflict 0xe00f8000/0x1000
memory map conflict 0xfed1c000/0x4000
memory map conflict 0xffed/0x3
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09
ppb0 at pci0 dev 1 function 0 "Intel Core 2G PCIE" rev 0x09: msi
pci1 at ppb0 bus 3
ppb1 at pci1 dev 0 function 0 vendor "Intel", unknown product 0x151a rev 0x01
pci2 at ppb1 bus 4
ppb2 at pci2 dev 0 function 0 vendor "Intel", unknown product 0x151a rev 0x01
pci3 at ppb2 bus 5
vendor "Intel", unknown product 0x151a (class system subclass
miscellaneous, rev 0x01) at pci3 dev 0 function 0 not configured
ppb3 at pci2 dev 3 function 0 vendor "Intel", unknown product 0x151a rev 0x01
pci

Re: libxmmsmad.so: undefined symbol '__guard_local'

2014-11-26 Thread Maximilian Pichler
On Wed, Nov 26, 2014 at 11:30 AM, Christian Weisgerber
 wrote:
>> When starting xmms the following error appears:
>> xmms:/usr/local/lib/xmms/Input/libxmmsmad.so: undefined symbol 
>> '__guard_local'
>> Cannot load specified object
>
> Indeed, I can reproduce this.  This plug-in is broken.

By the way, I also get:
xmms:/usr/local/lib/xmms/Input/libxmmstremor.so: undefined symbol
'__guard_local'

> As a simple workaround, remove the xmms-mad package and install
> xmms-mp3 instead.

That worked, thanks! (And installing xmms-faad also proved helpful for
playing AAC files.)



libxmmsmad.so: undefined symbol '__guard_local'

2014-11-26 Thread Maximilian Pichler
Hi,

When starting xmms the following error appears:
xmms:/usr/local/lib/xmms/Input/libxmmsmad.so: undefined symbol '__guard_local'
Cannot load specified object

Then, I cannot open any files or add them to the playlist. No error
message appears, but nothing happens (file doesn't play and its name
isn't shown in the player or in the playlist).

Other players (e.g. parole) do work.

Thanks,

Max

OpenBSD 5.6 (GENERIC.MP) #333: Fri Aug  8 00:20:21 MDT 2014
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
RTC BIOS diagnostic error
fb
real mem = 4185079808 (3991MB)
avail mem = 4064886784 (3876MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe (53 entries)
bios0: vendor Apple Inc. version "MBA41.88Z.0077.B11.1310091428" date 10/09/2013
bios0: Apple Inc. MacBookAir4,1
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC SBST ECDT SSDT SSDT SSDT SSDT SSDT
SSDT SSDT SSDT MCFG SSDT SSDT SSDT
acpi0: wakeup devices P0P2(S4) EC__(S4) HDEF(S4) ARPT(S4) RP02(S4)
EHC1(S3) EHC2(S3) ADP1(S4) LID0(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz, 1800.31 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC
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 100MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz, 1800.02 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC
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) i7-2677M CPU @ 1.80GHz, 1800.02 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC
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) i7-2677M CPU @ 1.80GHz, 1800.02 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
acpiec0 at acpi0
acpimcfg0 at acpi0 addr 0xe000, bus 0-151
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 3 (P0P2)
acpiprt2 at acpi0: bus 2 (RP02)
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpicpu2 at acpi0: C3, C2, C1, PSS
acpicpu3 at acpi0: C3, C2, C1, PSS
acpibat0 at acpi0: BAT0 model "3545797981023400290" type
3545797981528607052 oem "3545797981528608836"
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
acpibtn2 at acpi0: SLPB
acpivideo0 at acpi0: IGPU
acpivout0 at acpivideo0: DD02
cpu0: Enhanced SpeedStep 1800 MHz: speeds: 1801, 1800, 1700, 1600,
1500, 1400, 1300, 1200, 1100, 1000, 900, 800 MHz
memory map conflict 0xe00f8000/0x1000
memory map conflict 0xfed1c000/0x4000
memory map conflict 0xffed/0x3
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09
ppb0 at pci0 dev 1 function 0 "Intel Core 2G PCIE" rev 0x09: msi
pci1 at ppb0 bus 3
ppb1 at pci1 dev 0 function 0 vendor "Intel", unknown product 0x151a rev 0x01
pci2 at ppb1 bus 4
ppb2 at pci2 dev 0 function 0 vendor "Intel", unknown product 0x151a rev 0x01
pci3 at ppb2 bus 5
vendor "Intel", unknown product 0x151a (class system subclass
miscellaneous, rev 0x01) at pci3 dev 0 function 0 not configured
ppb3 at pci2 dev 3 function 0 vendor "Intel", unknown product 0x151a rev 0x01
pci4 at ppb3 bus 6
ppb4 at pci2 dev 4 function 0 vendor "Intel", unknown product 0x151a rev 0x01
pci5 at ppb4 bus 55
vga1 at pci0 dev 2 function 0 "Intel HD Graphics 3000" rev 0x09
intagp at vga1 not configured
inteldrm0 at vga1
drm0 at inteldrm0
drm: Memory usable by graphics device = 2048M
inteldrm0: 1366x768
wsdisplay0 at vga

Re: Trackpad after suspend/resume on MacBookAir4,1

2014-11-24 Thread Maximilian Pichler
That works! In fact, 'xinput enable /dev/wsmouse1' seems to suffice to
fix the trackpad after resume.

In the text console the keyboard remains broken, though.

Thanks

On Mon, Nov 24, 2014 at 9:09 AM, Jaime Tarrant  wrote:
> * On Mon Nov 24, 2014 at 08:56:59AM -0500 1558 , Maximilian Pichler 
> (maxim.pich...@gmail.com) wrote:
>> On Mon, Nov 24, 2014 at 8:21 AM, Martin Pieuchot  
>> wrote:
>> > On 24/11/14(Mon) 08:11, Maximilian Pichler wrote:
>> >> It's even slightly worse: after resuming, the keyboard still works in
>> >> X, but switching to a text console (either via ctrl-alt-f1 or by
>> >> quitting X) results in the keyboard being unusable, i.e. typing
>> >> anything results in garbled characters. I therefore cannot even try
>> >> your previous suggestions of restarting X.
>> >
>> > This is a bug.
>>
>> If I can do anything to help diagnose this better, please let me know.
>>
>
> Hi all, I have a macbook pro 8.1 with the same mouse characteristics post
> suspend/resume. Its only a work around, however you may be able to get
> the mouse back by running the following from a console after resuming:
>
>   xinput disable /dev/wsmouse1 && sleep 1 && xinput enable /dev/wsmouse1
>
> Your dmesg looks similar to mine, so hopefully the above will work for
> you too.



Re: Trackpad after suspend/resume on MacBookAir4,1

2014-11-24 Thread Maximilian Pichler
Thanks for explaining!

On Sun, Nov 23, 2014 at 12:44 AM, Martin Pieuchot wrote:
> The best you can do for the moment is restart X after resuming,
> it should recalibrate your touchpad properly.

Quitting X after resuming results in the keyboard becoming unusable in
the text console, i.e. garbled characters appear when typing (my
keyboard layout is dvorak, but the output is neither dovark nor
qwerty). Therefore I'm unable to restart X. The keyboard does work
correctly in the text console before suspending. It also works
correctly inside X after resuming.

Max



Re: Trackpad after suspend/resume on MacBookAir4,1

2014-11-24 Thread Maximilian Pichler
On Mon, Nov 24, 2014 at 8:21 AM, Martin Pieuchot  wrote:
> On 24/11/14(Mon) 08:11, Maximilian Pichler wrote:
>> It's even slightly worse: after resuming, the keyboard still works in
>> X, but switching to a text console (either via ctrl-alt-f1 or by
>> quitting X) results in the keyboard being unusable, i.e. typing
>> anything results in garbled characters. I therefore cannot even try
>> your previous suggestions of restarting X.
>
> This is a bug.

If I can do anything to help diagnose this better, please let me know.



Re: Trackpad after suspend/resume on MacBookAir4,1

2014-11-24 Thread Maximilian Pichler
Thanks for the explanations!

On Mon, Nov 24, 2014 at 4:19 AM, Martin Pieuchot  wrote:
> On 24/11/14(Mon) 09:04, Peter Hessler wrote:
>> Can you switch from the graphical console (ctrl-alt-f5) to a text
>> console (ctrl-alt-f1), and back?  That may help with input device
>> related problems.
>
> That won't work in this case.  His pointer isn't behind the mux and
> needs to be calibrated.

It's even slightly worse: after resuming, the keyboard still works in
X, but switching to a text console (either via ctrl-alt-f1 or by
quitting X) results in the keyboard being unusable, i.e. typing
anything results in garbled characters. I therefore cannot even try
your previous suggestions of restarting X.

Here is yet another experiment: after booting into text console mode,
suspend and resume. The keyboard still works. However, now attempting
to start X results in a black screen. Killing X and starting it a
second time works (and mouse and keyboard are fine within X). The
difference between the logs are:

22c22
< (==) Log file: "/var/log/Xorg.0.log", Time: Mon Nov 24 07:38:46 2014
---
> (==) Log file: "/var/log/Xorg.0.log", Time: Mon Nov 24 07:39:50 2014
45c45
< (II) Loader magic: 0xaceac707520
---
> (II) Loader magic: 0x1a2444b07520
131a132
> (--) intel(0): Output eDP1 using initial mode 1366x768 on pipe 0
160a162,163
> (II) intel(0): switch to mode 1366x768@60.0 on eDP1 using pipe 0, position 
> (0, 0), rotation normal, reflection none
> (II) intel(0): Setting screen physical size to 361 x 203
213c216
< (II) ws: /dev/wsmouse: maximum x position: 1023
---
> (II) ws: /dev/wsmouse: maximum x position: 1365



Trackpad after suspend/resume on MacBookAir4,1

2014-11-23 Thread Maximilian Pichler
Hi,

After resuming from suspend (either by closing and reopening the lid
or via zzz) the trackpad behaves erratically -- the pointer jumps
around wildly when using it. The issue is reproducible.

Here is the dmesg from boot:

OpenBSD 5.6 (GENERIC.MP) #333: Fri Aug  8 00:20:21 MDT 2014
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
RTC BIOS diagnostic error
fb
real mem = 4185079808 (3991MB)
avail mem = 4064886784 (3876MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe (53 entries)
bios0: vendor Apple Inc. version "MBA41.88Z.0077.B11.1310091428" date 10/09/2013
bios0: Apple Inc. MacBookAir4,1
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC SBST ECDT SSDT SSDT SSDT SSDT SSDT
SSDT SSDT SSDT MCFG SSDT SSDT SSDT
acpi0: wakeup devices P0P2(S4) EC__(S4) HDEF(S4) ARPT(S4) RP02(S4)
EHC1(S3) EHC2(S3) ADP1(S4) LID0(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz, 1800.24 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC
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 100MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz, 1800.02 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC
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) i7-2677M CPU @ 1.80GHz, 1800.02 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC
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) i7-2677M CPU @ 1.80GHz, 1800.02 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
acpiec0 at acpi0
acpimcfg0 at acpi0 addr 0xe000, bus 0-151
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 3 (P0P2)
acpiprt2 at acpi0: bus 2 (RP02)
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpicpu2 at acpi0: C3, C2, C1, PSS
acpicpu3 at acpi0: C3, C2, C1, PSS
acpibat0 at acpi0: BAT0 model "3545797981023400290" type
3545797981528607052 oem "3545797981528608836"
acpiac0 at acpi0: AC unit offline
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
acpibtn2 at acpi0: SLPB
acpivideo0 at acpi0: IGPU
acpivout0 at acpivideo0: DD02
cpu0: Enhanced SpeedStep 1800 MHz: speeds: 1801, 1800, 1700, 1600,
1500, 1400, 1300, 1200, 1100, 1000, 900, 800 MHz
memory map conflict 0xe00f8000/0x1000
memory map conflict 0xfed1c000/0x4000
memory map conflict 0xffed/0x3
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09
ppb0 at pci0 dev 1 function 0 "Intel Core 2G PCIE" rev 0x09: msi
pci1 at ppb0 bus 3
ppb1 at pci1 dev 0 function 0 vendor "Intel", unknown product 0x151a rev 0x01
pci2 at ppb1 bus 4
ppb2 at pci2 dev 0 function 0 vendor "Intel", unknown product 0x151a rev 0x01
pci3 at ppb2 bus 5
vendor "Intel", unknown product 0x151a (class system subclass
miscellaneous, rev 0x01) at pci3 dev 0 function 0 not configured
ppb3 at pci2 dev 3 function 0 vendor "Intel", unknown product 0x151a rev 0x01
pci4 at ppb3 bus 6
ppb4 at pci2 dev 4 function 0 vendor "Intel", unknown product 0x151a rev 0x01
pci5 at ppb4 bus 55
vga1 at pci0 dev 2 function 0 "Intel HD Graphics 3000" rev 0x09
intagp at vga1 not configured
inteldrm0 at vga1
drm0 at inteldrm0
drm: Memory usable by graphics device = 2048M
inteldrm0: 1366x768
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 6 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
uhci0 at