Re: Kernel Debugging

2012-12-26 Thread Luis Useche
I just tried today and I couldn't build it either. But the following simple
patch fixed it for me:

diff --git a/sys/ddb/db_run.c b/sys/ddb/db_run.c
index 8b64fa3..825b72e 100644
--- a/sys/ddb/db_run.c
+++ b/sys/ddb/db_run.c
@@ -51,8 +51,6 @@ db_breakpoint_t   db_taken_bkpt = 0;

 intdb_inst_count;

-#ifndef KGDB
-
 #include ddb/db_lex.h
 #include ddb/db_watch.h
 #include ddb/db_output.h
@@ -298,7 +296,6 @@ db_continue_cmd(db_expr_t addr, int have_addr,
db_expr_t count, char *modif)

db_cmd_loop_done = 1;
 }
-#endif /* NO KGDB */

 #ifdef SOFTWARE_SSTEP
 /*

However this might be wrong. Most likely there is a good reason why that
ifdef is there.

Luis


On Mon, Dec 24, 2012 at 5:40 AM, sickm...@lavabit.com wrote:

 On 15:34 Sun 23 Dec , Justin Mayes wrote:
  I was looking into kernel debug options and found that trying to build a
  kernel with kgdb option enabled fails. Anyone using the kgdb setup? I can
  use ddb it's just painful to have to manually walk structures to examine
  values. I have moved on to plan B which was to build with option
  DDB_STRUCT
  and the build is a success but the 'show struct' command always returns
  'unknown structure' for anything other than mbuf. Anyone have any kernel
  debugging strategies they'd like to share?
 
 
 
  Justin
 
  [demime 1.01d removed an attachment of type application/pkcs7-signature
 which had a name of smime.p7s]

 I gave it a try about a year ago, but not much luck. If you want to use
 gdb, you'll have either to fix kgdb or to run openbsd inside qemu and
 use qemu as a gdb backend. And you can always stick to ddb.



Re: OpenBSD on GitHub

2012-08-04 Thread Luis Useche
You don't have to ask permission to anyone to do whatever you want
with the OpenBSD code. If you can create a github account that
reliably mirror OpenBSD's commits, I think some people would be
interested.

For what is worth, there is already a git repository that follows
OpenBSD: http://anoncvs.estpak.ee/cgi-bin/cgit/openbsd-src/. However,
I have found it unreliable and that is why I don't use it.

Luis.

On Sat, Aug 4, 2012 at 9:43 AM, Tony ableton...@gmail.com wrote:
 Hey!

 Guys, what do you think about putting OpenBSD on GitHub? I see you guys
 already have an account there so I just thought I'd ask:
 https://github.com/openbsd

 Will it attract more followers? Will it make life easier for developers?

 Personally I'd love to make a fork and contribute back a ton of pull
 requests, mostly on the documentation side though.

 Tony



Re: Following -current through a semi-automatic process: a strategy for encouraging user involvement?

2012-06-19 Thread Luis Useche
On Tue, Jun 19, 2012 at 11:00 PM, Ted Unangst t...@tedunangst.com wrote:
 On Tue, Jun 19, 2012 at 21:41, eagir...@cox.net wrote:

 What may be a slightly faster method of tracking close to current:

 http://www.tedunangst.com/snapper.html

 I haven't used it in a while, because I used to build the kernel with NTFS
 support, and never got back to using it after that became part of GENERIC.

 I had a report that amd64 may not be working?  i386 is, at least
 assuming you catch a current snap.  I've given up on trying to keep
 pkgs up to date, though, it requires an insane amount of disk space.


I used bluesnapper for amd64 twice today and worked just fine.

Luis.



nginx tmp

2012-05-07 Thread Luis Useche
Hi Guys,

I was just trying to start nginx on the last snapshot and it was
failing with this message:

2012/05/07 14:46:03 [emerg] 29247#0: mkdir() tmp/client_body_temp
failed (2: No such file or directory)

I fixed it by creating the directory /var/www/tmp/

I don't know if it was something I missed or this directory is not
being created by default. Just raising the flag.

Thanks,
Luis.



mplayer problems

2011-11-30 Thread Luis Useche
Hi Guys,

Is anyone having problems lately with mplayer? After my last update of
packages mplayer alternates between these two errors:

(0)$ mplayer
mplayer: can't load library 'liborc-0.4.so.4.0'
(0)$ mplayer
mplayer: can't load library 'libenca.so.0.0'

I also tried to compile from ports without success:

Missing library for orc-0.4=0.0

Any advice?

Thanks,
Luis.



Re: Single Stepping Process in Kernel

2011-11-27 Thread Luis Useche
On Sun, Nov 27, 2011 at 4:14 AM, Philip Guenther guent...@gmail.com wrote:
 On Sat, Nov 26, 2011 at 10:25 PM, Luis Useche use...@gmail.com wrote:
 On Sat, Nov 26, 2011 at 7:31 PM, Ted Unangst t...@tedunangst.com wrote:
 On Sat, Nov 26, 2011, Luis Useche wrote:
 For a project I need to single step a user space process while
 executing the fault handler. I was thinking that probably ddb single
 stepping can be reused but this is probably for kernel single stepping
 only. How about ptrace?

 I am officially confused because the fault handler runs in the kernel.
 If you want to step through a process then ptrace is what you want, or
 it's slightly easier to use interface, gdb.

 The interfaces you are talking about are to single step a user level
 process from another user level process. However, I need to single
 step in the fault handler the (user level) instruction that just
 faulted.

 My final goal is to extract the data that the application was trying
 to store at the unmapped page by mapping a temporary page.

 That won't always work if you're on a platform like i386 where the
 kernel memory appears in the address space of processes, as you
 *can't* just map in a temporary page if the process tries to access an
 address in the kernel's range.

The idea is to create this temporary mapping after we make sure the
access was valid but the page was not in memory.

 Anyway, you don't need to trace the fault handler to do what you want.
  You trace the process with ptrace(),  then use ptrace() to examine
 the state of the process when it gets a signal when it tries to access
 the page in a non-permitted way.  For example, gdb reports the signal
 that was sent after examining the registers with ptrace(PT_GETREGS)
 and then uses ptrace(PT_IO) to get the instruction that faulted.
 Disassemble that to figure out what instruction it was and work out
 the exact address and data involved.

I am not proposing to trace the fault handler. My idea is to single
step the last user-space instruction of the process in the fault
handler to obtain the data that it was trying to write and return so
the process can continue.

Example:

map_pte(cr2, tmp_page)
single_step(cur)
unmap_pte(cr2)

Luis



Re: Single Stepping Process in Kernel

2011-11-27 Thread Luis Useche
On Sun, Nov 27, 2011 at 4:42 PM, Philip Guenther guent...@gmail.com wrote:
 On Sun, Nov 27, 2011 at 9:19 AM, Luis Useche use...@gmail.com wrote:
 ...
 The idea is to create this temporary mapping after we make sure the
 access was valid but the page was not in memory.
 ...
 I am not proposing to trace the fault handler. My idea is to single
 step the last user-space instruction of the process in the fault
 handler to obtain the data that it was trying to write and return so
 the process can continue.

 Example:

 map_pte(cr2, tmp_page)
 single_step(cur)
 unmap_pte(cr2)

 I've read what you've read three times and I still don't understand
 what problem you're trying to solve.

OK. I guess I'm not the best explaining, but the problem is simple.

After the process is in the fault handler due to an access of a page
not in memory, the current fault handler would map the page, return
and the instruction that generated the fault re-executed.

What I need is to keep control in kernel after re-executing the
instruction. My idea was to single step by disassembling this
instruction instead of returning to user space.

In any case, I found a solution today. In x86 the TF flag repeat the
current instruction and generates a debug trap that is caught by the
kernel. This is how I get the control back after executing the
instruction that generated the fault.

I think I have the answer to my problem.

I hope this fourth explanation makes sense.

Luis.



Single Stepping Process in Kernel

2011-11-26 Thread Luis Useche
Hi Guys,

For a project I need to single step a user space process while
executing the fault handler. I was thinking that probably ddb single
stepping can be reused but this is probably for kernel single stepping
only. How about ptrace?

Any ideas on this?

Thanks for the help,
Luis.



Re: Single Stepping Process in Kernel

2011-11-26 Thread Luis Useche
On Sat, Nov 26, 2011 at 7:31 PM, Ted Unangst t...@tedunangst.com wrote:
 On Sat, Nov 26, 2011, Luis Useche wrote:
 For a project I need to single step a user space process while
 executing the fault handler. I was thinking that probably ddb single
 stepping can be reused but this is probably for kernel single stepping
 only. How about ptrace?

 I am officially confused because the fault handler runs in the kernel.
 If you want to step through a process then ptrace is what you want, or
 it's slightly easier to use interface, gdb.

The interfaces you are talking about are to single step a user level
process from another user level process. However, I need to single
step in the fault handler the (user level) instruction that just
faulted.

My final goal is to extract the data that the application was trying
to store at the unmapped page by mapping a temporary page.

Luis



Re: State of Intel HD GPU (HM55) - or how it will do on HP's Pavilion DM4

2011-09-09 Thread Luis Useche
My intel hd graphics works fine on a Dell Latitude 13.

In any case, my suggestion will be to install OpenBSD on a USB key and
boot it to see what happens.

Luis.

On Fri, Sep 9, 2011 at 12:16 PM, Matej D=ach matej.l...@gmail.com wrote:
 Good day,

 I am considering switch from Linux to OpenBSD, but I am a bit concerned
 about my GPU...

 i own HP Pavilion DM4 1150ea... some technical details;

 Processor Intel Core i5-450M Processor 2.4 GHz, Level 3 cache 3 MB
 Intel HM55 chipset
 Display 35.5 cm (14) diagonal High-Definition LED HP BrightView
 Display, Display Resolution: 1366 x 768
 Video Intel HD Graphics, up to 1696 MB total available graphics memory

 Now, I do not care about Webcam, TouchPad etc. - so what I want to know?
 If the following is working in OpenBSD:

 Intel HD Graphics (HM55 chipset) - including GPU acceleration (at least
2D).

 I know Broadcom Wireless 4313 will NOT work, so I'm prepared for that.
 Thanks,

 --

 [demime 1.01d removed an attachment of type APPLICATION/DEFANGED which had a
name of matej_lach.28083DEFANGED-vcf]



Package mirrors

2011-08-09 Thread Luis Useche
Hi Guys,

Is there something going on with the package mirrors? They are empty :S

Thanks,
Luis.

luis@meg:~
$ ftp ftp://openbsd.mirror.frontiernet.net/pub/OpenBSD/snapshots/packages/amd64/
Connected to openbsd-mirror01.roch.ny.frontiernet.net.
220- =
220- = Welcome to openbsd.mirror.frontiernet.net =
220- =
220-
220-   releases:
220- * ftp://openbsd.mirror.frontiernet.net/pub/OpenBSD/
220- * http://openbsd.mirror.frontiernet.net/pub/OpenBSD/
220- * rsync://openbsd.mirror.frontiernet.net/OpenBSD/
220-
220-   anoncvs:
220- * anon...@openbsd.mirror.frontiernet.net:/cvs
220-
220-   cvsweb:
220- * http://cvsweb.openbsd.mirror.frontiernet.net/
220-
220-   ssh connection rate limiting enforced by pf(4).  don't be a jerk.
220-
220-   report problems to j...@frontiernet.net.
220-
220 openbsd-mirror01.roch.ny.frontiernet.net FTP server ready.
331 Guest login ok, send your email address as password.
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
200 Type set to I.
250 CWD command successful.
ftp ls
150 Opening ASCII mode data connection for '/bin/ls'.
226 Transfer complete.
ftp ^D221 Goodbye.



Re: i386 or amd64?

2011-08-05 Thread Luis Useche
If I'm not mistaken, i386 does not support more that 3GB of memory.
amd64 bumped this number recently and machines with big amount of RAM
available can use all its memory.

Luis.

On Fri, Aug 5, 2011 at 2:43 PM, System Administrator ad...@bitwise.net wrote:
 Looking to build a firewall for a fairly busy (25+mb) site. Hardware is
 Dell PE2850, 2 Xeon 64-bit CPUs, 4GB RAM, 6 em(4) interfaces. Software
 is primarily pf(4) and relayd(8).

 Not so long ago the recommendation was to use the i386 build for a
 slight perfomance and stability benefit. Is that still the case? What
 are the advantages and shortcomings of amd64?

 Thanks in advance.



Re: different nwkeys for wifi

2011-07-10 Thread Luis Useche
I use the following perl script below. I saved it in /etc/rc.wireless
and apply the following patch:

--- netstartFri Jul  8 15:34:09 2011
+++ /etc/netstart   Sun Jul 10 11:43:20 2011
@@ -255,6 +255,8 @@
ip6kernel=NO
 fi

+#wifi
+/etc/rc.wireless

 # Configure all the non-loopback interfaces which we know about, but
 # do not start interfaces which must be delayed. Refer to hostname.if(5)

Good luck!

Luis.

#!/usr/bin/perl -w

# TODO
# 1. Connect to ethernet if available instead.
# 2. Retry if the network was not found.

use strict;

my $nwif = iwn0;
my $profiles =  {
wpanet = {psk = passwordwpa, proto = wpa },
noencrypt = {},
wepnet = {psk =passwordwep, proto = wep},
};

sub conf_nw {
my $nwid = shift;
my $conf = $profiles-{$nwid};

my $psk_str = $conf-{psk};
if($psk_str) {
my $proto = lc $conf-{proto};
if($proto eq wep) {
$psk_str = nwkey \$psk_str\;
} elsif($proto eq wpa) {
$psk_str = wpakey \$psk_str\;
} else {
die Only \wep\ and \wpa\ supported.;
}
} else {
$psk_str = -wpakey -nwkey;
}

# finally write in hostname.if
open HOSTNAME, /etc/hostname.$nwif or die Couldn't open hostname.if
file.;
print HOSTNAME # THIS IS A TEMPORAL FILE.\n# MAKE THE MODIFICATION
IN /etc/rc.wireless.\n;
print HOSTNAME dhcp nwid \$nwid\ $psk_str\n;
close HOSTNAME;
}

print Configuring wifi $nwif... ;
my $nwid = no known net;

# scanning available networks
open FD, ifconfig $nwif scan| or die where'd ifconfig go?;
while(FD) {
if(/^\s*nwid ?(.*?)? chan/) {
if($profiles-{$1}) {
conf_nw $1;
$nwid = $1;
last;
}
}
}

print $nwid detected\n;


On Sun, Jul 10, 2011 at 12:51 PM, Jan Stary h...@stare.cz wrote:
 Scenario: I am moving my laptop between different wifi networks
 (obviously). Some of these networks are encrypted with WEP, using
 various nwkeys.

 What would be an elegant way to remember the various networks' settings
 and choose the one I am connecting to at netstart(8) time? Before I start
 symlinking /etc/rc/hostname.run0.whatever in my rc.local, what existing
 solutions do people use?

Thank yuo for your time

Jan



TRIM and RAID

2011-07-08 Thread Luis Useche
Hi Guys,

I saw that Ted recently submitted a patch to support the TRIM
operation in FFS. I was wondering if this TRIM can be used to signal
softraid what blocks are in use or not and reduce the reconstruction
time. I think this could also help to some other optimizations.

Any thoughts?

Luis.



Re: TRIM and RAID

2011-07-08 Thread Luis Useche
On Fri, Jul 8, 2011 at 10:29 AM, Ted Unangst t...@tedunangst.com wrote:
 On Fri, Jul 08, 2011, Luis Useche wrote:
 Hi Guys,

 I saw that Ted recently submitted a patch to support the TRIM
 operation in FFS. I was wondering if this TRIM can be used to signal
 softraid what blocks are in use or not and reduce the reconstruction
 time. I think this could also help to some other optimizations.

 In theory, yes, but that would require softraid to keep such information
 in its metadata and there's no space for that.  So no.  On the other hand,
 softraid will be changed to pass TRIM down to the underlying drives.

I see. I was thinking that it probably does not have to save all the
information. A bloom filter could help to discard some of the empty
blocks in the reconstruction process. But again, I don't know the
restrictions of space in softraid.

Luis.



Re: Xorg sucking CPU

2011-05-27 Thread Luis Useche
I just realized I am having exactly the same problem described in this
thread:

http://marc.info/?l=openbsd-miscm=127601909229979w=2

In my case, I also see an error:

mtrr set failled: invalid argument

According to the thread, this was solved in current. Previous versions
of current worked fine for me. This problem showed up in recent
versions.

Any suggestion?

Thanks,
Luis.

On Thu, May 26, 2011 at 8:38 PM, Luis Useche use...@gmail.com wrote:
 Hi Guys,

 Recently, after my last update with bluesnapper on amd64, I have been
 seeing a high CPU utilization of the Xorg process. I don't know if it
 is normal, but top report Xorg to be constantly on 30 or 40% and some
 times it can go up to even 70 or 80%. I was wondering if this is
 normal. What are normal CPU utilization?

 This is my current top Xorg line:

 PID USERNAME PRI NICE  SIZE   RES STATE WAIT  TIMECPU COMMAND
 31683 _x11   20   38M   20M sleep/0   select4:08 39.55% Xorg

 Below is my dmesg.

 Thanks,
 Luis.

 OpenBSD 4.9-current (GENERIC.MP) #1: Fri May 20 20:28:10 EDT 2011
  
 l...@meg.my.domain:/home/luis/develop/openbsd/openbsd-src/sys/arch/amd64/com
pile/GENERIC.MP
 real mem = 4251635712 (4054MB)
 avail mem = 4124409856 (3933MB)
 mainbus0 at root
 bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf70c0 (43 entries)
 bios0: vendor Dell Inc. version A00 date 01/06/2010
 bios0: Dell Inc. Latitude 13
 acpi0 at bios0: rev 2
 acpi0: sleep states S0 S3 S4 S5
 acpi0: tables DSDT FACP HPET  APIC ASF! MCFG TCPA SLIC SSDT
 acpi0: wakeup devices PCI0(S5) PCIE(S4) USB1(S0) USB2(S0) USB3(S0)
 USB4(S0) USB5(S0) USB6(S0) EHC2(S0) EHCI(S0) AZAL(S3) RP01(S3)
 RP02(S1) RP03(S3) RP04(S3) RP05(S3) RP06(S5) LID_(S3) PBTN(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: Genuine Intel(R) CPU U7300 @ 1.30GHz, 1297.14 MHz
 cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3
,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG
 cpu0: 3MB 64b/line 8-way L2 cache
 cpu0: apic clock running at 199MHz
 cpu1 at mainbus0: apid 1 (application processor)
 cpu1: Genuine Intel(R) CPU U7300 @ 1.30GHz, 1296.90 MHz
 cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3
,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG
 cpu1: 3MB 64b/line 8-way L2 cache
 ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
 ioapic0: misconfigured as apic 0, remapped to apid 2
 acpimcfg0 at acpi0 addr 0xf800, bus 0-63
 acpiprt0 at acpi0: bus 2 (PCIE)
 acpiprt1 at acpi0: bus 11 (RP01)
 acpiprt2 at acpi0: bus 12 (RP02)
 acpiprt3 at acpi0: bus -1 (RP03)
 acpiprt4 at acpi0: bus 13 (RP04)
 acpiprt5 at acpi0: bus -1 (RP05)
 acpiprt6 at acpi0: bus 9 (RP06)
 acpiprt7 at acpi0: bus 0 (PCI0)
 acpiec0 at acpi0
 acpicpu0 at acpi0: C3, C2, C1, PSS
 acpicpu1 at acpi0: C3, C2, C1, PSS
 acpitz0 at acpi0: critical temperature 107 degC
 acpibtn0 at acpi0: LID_
 acpibtn1 at acpi0: PBTN
 acpibtn2 at acpi0: SBTN
 acpiac0 at acpi0: AC unit online
 acpibat0 at acpi0: BAT0 model DELL NTG4J0B serial 409 type LION oem SMP
 acpivideo0 at acpi0: VID_
 acpivout0 at acpivideo0: LCD_
 acpivideo1 at acpi0: VID2
 cpu0: Enhanced SpeedStep 1296 MHz: speeds: 1300, 1200, 800 MHz
 pci0 at mainbus0 bus 0
 pchb0 at pci0 dev 0 function 0 Intel GM45 Host rev 0x07
 vga1 at pci0 dev 2 function 0 Intel GM45 Video rev 0x07
 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
 wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
 intagp0 at vga1
 agp0 at intagp0: aperture at 0xe000, size 0x1000
 inteldrm0 at vga1: apic 2 int 16
 drm0 at inteldrm0
 Intel GM45 Video rev 0x07 at pci0 dev 2 function 1 not configured
 uhci0 at pci0 dev 26 function 0 Intel 82801I USB rev 0x02: apic 2 int 20
 uhci1 at pci0 dev 26 function 1 Intel 82801I USB rev 0x02: apic 2 int 21
 uhci2 at pci0 dev 26 function 2 Intel 82801I USB rev 0x02: apic 2 int 22
 ehci0 at pci0 dev 26 function 7 Intel 82801I USB rev 0x02: apic 2 int 22
 usb0 at ehci0: USB revision 2.0
 uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
 azalia0 at pci0 dev 27 function 0 Intel 82801I HD Audio rev 0x02:
 apic 2 int 21
 azalia0: codecs: Realtek ALC269
 audio0 at azalia0
 ppb0 at pci0 dev 28 function 0 Intel 82801I PCIE rev 0x02: apic 2 int 16
 pci1 at ppb0 bus 11
 ppb1 at pci0 dev 28 function 1 Intel 82801I PCIE rev 0x02: apic 2 int 17
 pci2 at ppb1 bus 12
 iwn0 at pci2 dev 0 function 0 Intel WiFi Link 5100 rev 0x00: apic 2
 int 17, MIMO 1T2R, MoW, address 00:24:d6:ad:e7:a8
 ppb2 at pci0 dev 28 function 3 Intel 82801I PCIE rev 0x02: apic 2 int 19
 pci3 at ppb2 bus 13
 ppb3 at pci0 dev 28 function 5 Intel 82801I PCIE rev 0x02: apic 2 int 17
 pci4 at ppb3 bus 9
 bge0 at pci4 dev 0 function 0 Broadcom BCM5761E rev 0x10, BCM5761 A1

Re: Xorg sucking CPU

2011-05-27 Thread Luis Useche
Hi Amit,

Thanks for the response.

On Fri, May 27, 2011 at 11:15 AM, Amit Kulkarni amitk...@gmail.com wrote:
 I just realized I am having exactly the same problem described in this
 thread:

 http://marc.info/?l=openbsd-miscm=127601909229979w=2

 In my case, I also see an error:

 mtrr set failled: invalid argument

 I also see it daily on amd64 but there is no problem with X for me.
 IMHO that's not relevant at all.

Well, in my case, after a while, X gets slow and unresponsive.
Moreover, I didn't see this behavior before. This also makes the
battery goes down quickly.

 Check your /var/log/Xorg.0.log for error messages and post your
 /etc/X11/xorg.conf (if any). If you don't have a xorg.conf, there is a
 default one created for you, bits and pieces of which is visible in
 the /var/log/Xorg.0.log  (and /var/log/Xorg.0.log.old) file.

 Make sure everything is current including kernel, userland, and
 xenocara to eliminate other variables. Sometimes you have upgraded
 kernel and userland but not xenocara.

I upgraded everything with bluesnapper except the kernel. I updated
the kernel from CVS and compile.

Given the message: mtrr set failed: Invalid argument I am starting
to think there is some API problems. Somehow my kernel is not the
right one for the userland in bluesnapper.

Thanks,
Luis.



Xorg sucking CPU

2011-05-26 Thread Luis Useche
Hi Guys,

Recently, after my last update with bluesnapper on amd64, I have been
seeing a high CPU utilization of the Xorg process. I don't know if it
is normal, but top report Xorg to be constantly on 30 or 40% and some
times it can go up to even 70 or 80%. I was wondering if this is
normal. What are normal CPU utilization?

This is my current top Xorg line:

PID USERNAME PRI NICE  SIZE   RES STATE WAIT  TIMECPU COMMAND
31683 _x11   20   38M   20M sleep/0   select4:08 39.55% Xorg

Below is my dmesg.

Thanks,
Luis.

OpenBSD 4.9-current (GENERIC.MP) #1: Fri May 20 20:28:10 EDT 2011

l...@meg.my.domain:/home/luis/develop/openbsd/openbsd-src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4251635712 (4054MB)
avail mem = 4124409856 (3933MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf70c0 (43 entries)
bios0: vendor Dell Inc. version A00 date 01/06/2010
bios0: Dell Inc. Latitude 13
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET  APIC ASF! MCFG TCPA SLIC SSDT
acpi0: wakeup devices PCI0(S5) PCIE(S4) USB1(S0) USB2(S0) USB3(S0)
USB4(S0) USB5(S0) USB6(S0) EHC2(S0) EHCI(S0) AZAL(S3) RP01(S3)
RP02(S1) RP03(S3) RP04(S3) RP05(S3) RP06(S5) LID_(S3) PBTN(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: Genuine Intel(R) CPU U7300 @ 1.30GHz, 1297.14 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,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG
cpu0: 3MB 64b/line 8-way L2 cache
cpu0: apic clock running at 199MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Genuine Intel(R) CPU U7300 @ 1.30GHz, 1296.90 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,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG
cpu1: 3MB 64b/line 8-way L2 cache
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpiprt0 at acpi0: bus 2 (PCIE)
acpiprt1 at acpi0: bus 11 (RP01)
acpiprt2 at acpi0: bus 12 (RP02)
acpiprt3 at acpi0: bus -1 (RP03)
acpiprt4 at acpi0: bus 13 (RP04)
acpiprt5 at acpi0: bus -1 (RP05)
acpiprt6 at acpi0: bus 9 (RP06)
acpiprt7 at acpi0: bus 0 (PCI0)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpitz0 at acpi0: critical temperature 107 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: PBTN
acpibtn2 at acpi0: SBTN
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model DELL NTG4J0B serial 409 type LION oem SMP
acpivideo0 at acpi0: VID_
acpivout0 at acpivideo0: LCD_
acpivideo1 at acpi0: VID2
cpu0: Enhanced SpeedStep 1296 MHz: speeds: 1300, 1200, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 Intel GM45 Host rev 0x07
vga1 at pci0 dev 2 function 0 Intel GM45 Video rev 0x07
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xe000, size 0x1000
inteldrm0 at vga1: apic 2 int 16
drm0 at inteldrm0
Intel GM45 Video rev 0x07 at pci0 dev 2 function 1 not configured
uhci0 at pci0 dev 26 function 0 Intel 82801I USB rev 0x02: apic 2 int 20
uhci1 at pci0 dev 26 function 1 Intel 82801I USB rev 0x02: apic 2 int 21
uhci2 at pci0 dev 26 function 2 Intel 82801I USB rev 0x02: apic 2 int 22
ehci0 at pci0 dev 26 function 7 Intel 82801I USB rev 0x02: apic 2 int 22
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 Intel 82801I HD Audio rev 0x02:
apic 2 int 21
azalia0: codecs: Realtek ALC269
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 Intel 82801I PCIE rev 0x02: apic 2 int 16
pci1 at ppb0 bus 11
ppb1 at pci0 dev 28 function 1 Intel 82801I PCIE rev 0x02: apic 2 int 17
pci2 at ppb1 bus 12
iwn0 at pci2 dev 0 function 0 Intel WiFi Link 5100 rev 0x00: apic 2
int 17, MIMO 1T2R, MoW, address 00:24:d6:ad:e7:a8
ppb2 at pci0 dev 28 function 3 Intel 82801I PCIE rev 0x02: apic 2 int 19
pci3 at ppb2 bus 13
ppb3 at pci0 dev 28 function 5 Intel 82801I PCIE rev 0x02: apic 2 int 17
pci4 at ppb3 bus 9
bge0 at pci4 dev 0 function 0 Broadcom BCM5761E rev 0x10, BCM5761 A1
(0x5761100): apic 2 int 17, address 00:26:b9:69:27:e6
brgphy0 at bge0 phy 1: BCM5761 10/100/1000baseT PHY, rev. 0
uhci3 at pci0 dev 29 function 0 Intel 82801I USB rev 0x02: apic 2 int 20
uhci4 at pci0 dev 29 function 1 Intel 82801I USB rev 0x02: apic 2 int 21
uhci5 at pci0 dev 29 function 2 Intel 82801I USB rev 0x02: apic 2 int 22
ehci1 at pci0 dev 29 function 7 Intel 82801I USB rev 0x02: apic 2 int 20
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 Intel EHCI root hub rev 2.00/1.00 addr 1
ppb4 at pci0 dev 30 function 0 Intel 82801BAM Hub-to-PCI 

Re: cpu performance counters (cache hit/miss etc)

2011-04-27 Thread Luis Useche
Unless already fixed, I remember this didn't work very well with SMP
kernels. If you have problems try to use bsd.sp.

Luis.

On Tue, Apr 26, 2011 at 9:16 PM, Philip Guenther guent...@gmail.com wrote:
 On Tue, Apr 26, 2011 at 5:00 PM, David Steiner
 davidsteiner2...@gmail.com wrote:
 is there a convenient way to display CPU cache statistics in openbsd?
 like the amount of L1/L2 hits/misses? there's OProfile for linux, Vtune
 for Linux/Windows, cachekit for Solaris, but what's available for the
 best OS out there?

 sure i could read the intel manuals on accessing the special
 performance registers to find out. but time is limited. i've searched
 manpages and on the web without any cache hits so to speak.

 Did you try searching for the subject of your message?

 $ apropos 'cpu performance counters'
 pctr (1) - display CPU performance counters
 pctr (4/AMD64) - driver for CPU performance counters
 pctr (4/i386) - driver for CPU performance counters
 $


 Philip Guenther



MacBook pro compatibility

2011-03-04 Thread Luis Useche
Hi Guys,

I was wondering if anybody is using the last macbook pro with OpenBSD. They
come with an intel or ati video device now which I guess make it more
compatible. My main concern was about the wireless net device. I think it
comes with a broadcom by default that, as far as I know, is not supported in
OBSD.

Is anybody using this laptop with OBSD?

Luis.



AHCI configuration delay

2011-02-23 Thread Luis Useche
Hi Guys,

Today I installed a new machine with an ahci sata controller. When the
machine is booting, during the configuration of the ahci driver, the kernel
has a delay of aproximately 30 seconds. During this time, the disk led is
constantly blinking. Then, the driver prints two messages of PHY offline on
port and the machine boots normally.

The snippet that matters:

ahci0 at pci0 dev 31 function 2 Intel 82801I AHCI rev 0x02: apic 2 int 19
(irq 10), AHCI 1.2
ahci0: PHY offline on port 1
ahci0: PHY offline on port 5
scsibus0 at ahci0: 32 targets

For the sake of completeness, I am also attaching the complete dmesg:

OpenBSD 4.9 (GENERIC.MP) #811: Tue Feb 22 12:04:57 MST 2011
t...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3714764800 (3542MB)
avail mem = 3601858560 (3435MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf70c0 (43 entries)
bios0: vendor Dell Inc. version A00 date 01/06/2010
bios0: Dell Inc. Latitude 13
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET  APIC ASF! MCFG TCPA SLIC SSDT
acpi0: wakeup devices PCI0(S5) PCIE(S4) USB1(S0) USB2(S0) USB3(S0) USB4(S0)
USB5(S0) USB6(S0) EHC2(S0) EHCI(S0) AZAL(S3) RP01(S3) RP02(S1) RP03(S3)
RP04(S3) RP05(S3) RP06(S5) LID_(S3) PBTN(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: Genuine Intel(R) CPU U7300 @ 1.30GHz, 1297.09 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,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG
cpu0: 3MB 64b/line 8-way L2 cache
cpu0: apic clock running at 199MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Genuine Intel(R) CPU U7300 @ 1.30GHz, 1296.89 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,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG
cpu1: 3MB 64b/line 8-way L2 cache
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpiprt0 at acpi0: bus 2 (PCIE)
acpiprt1 at acpi0: bus 11 (RP01)
acpiprt2 at acpi0: bus 12 (RP02)
acpiprt3 at acpi0: bus -1 (RP03)
acpiprt4 at acpi0: bus 13 (RP04)
acpiprt5 at acpi0: bus -1 (RP05)
acpiprt6 at acpi0: bus 9 (RP06)
acpiprt7 at acpi0: bus 0 (PCI0)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpitz0 at acpi0: critical temperature 107 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: PBTN
acpibtn2 at acpi0: SBTN
acpiac0 at acpi0: AC unit offline
acpibat0 at acpi0: BAT0 model DELL NTG4J0B serial 409 type LION oem SMP
acpivideo0 at acpi0: VID_
acpivout0 at acpivideo0: CRT_
acpivout1 at acpivideo0: TV__
acpivout2 at acpivideo0: LCD_
acpivout3 at acpivideo0: DP__
acpivout4 at acpivideo0: DP2_
acpivout5 at acpivideo0: DVI_
acpivout6 at acpivideo0: DVI2
acpivideo1 at acpi0: VID2
cpu0: Enhanced SpeedStep 1296 MHz: speeds: 1300, 1200, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 Intel GM45 Host rev 0x07
vga1 at pci0 dev 2 function 0 Intel GM45 Video rev 0x07
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xe000, size 0x1000
inteldrm0 at vga1: apic 2 int 16 (irq 11)
drm0 at inteldrm0
Intel GM45 Video rev 0x07 at pci0 dev 2 function 1 not configured
uhci0 at pci0 dev 26 function 0 Intel 82801I USB rev 0x02: apic 2 int 20
(irq 10)
uhci1 at pci0 dev 26 function 1 Intel 82801I USB rev 0x02: apic 2 int 21
(irq 7)
uhci2 at pci0 dev 26 function 2 Intel 82801I USB rev 0x02: apic 2 int 22
(irq 5)
ehci0 at pci0 dev 26 function 7 Intel 82801I USB rev 0x02: apic 2 int 22
(irq 5)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 Intel 82801I HD Audio rev 0x02: apic 2
int 21 (irq 7)
azalia0: codecs: Realtek ALC269
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 Intel 82801I PCIE rev 0x02: apic 2 int 16
(irq 0)
pci1 at ppb0 bus 11
ppb1 at pci0 dev 28 function 1 Intel 82801I PCIE rev 0x02: apic 2 int 17
(irq 0)
pci2 at ppb1 bus 12
iwn0 at pci2 dev 0 function 0 Intel WiFi Link 5100 rev 0x00: apic 2 int 17
(irq 4), MIMO 1T2R, MoW, address 00:24:d6:ad:e7:a8
ppb2 at pci0 dev 28 function 3 Intel 82801I PCIE rev 0x02: apic 2 int 19
(irq 0)
pci3 at ppb2 bus 13
ppb3 at pci0 dev 28 function 5 Intel 82801I PCIE rev 0x02: apic 2 int 17
(irq 0)
pci4 at ppb3 bus 9
bge0 at pci4 dev 0 function 0 Broadcom BCM5761E rev 0x10, BCM5761 A1
(0x5761100): apic 2 int 17 (irq 4), address 00:26:b9:69:27:e6
brgphy0 at bge0 phy 1: BCM5761 10/100/1000baseT PHY, rev. 0
uhci3 at pci0 dev 29 function 0 Intel 82801I USB rev 0x02: apic 2 int 20
(irq 10)
uhci4 at pci0 dev 29 function 

Re: Tracking What it's changing in current

2011-02-21 Thread Luis Useche
I would love this feature in OpenBSD src list. Is it possible to use the
activitymail script on the OpenBSD CVS repo?

Luis.

On Thu, Feb 17, 2011 at 1:59 PM, Andres Perera andre...@zoho.com wrote:

 On Thu, Feb 17, 2011 at 2:05 PM, Dan Brosemer o...@svartalfheim.net
 wrote:
  On Thu, Feb 17, 2011 at 09:01:20AM -0600, Marco Peereboom wrote:
  Right, but that is the holy grail because now you'd have change sets.
  On Thu, Feb 17, 2011 at 06:13:32AM -0800, patrick keshishian wrote:
   On Thu, Feb 17, 2011 at 6:05 AM, Christiano F. Haesbaert
   haesba...@haesbaert.org wrote:
On 16 February 2011 22:21, Marco Peereboom sl...@peereboom.us
 wrote:
Is it possible to catch the entire commit and have that diff
 generated?
   
   
I'm a little late at this thread but yes, we do that here in work.
Don't have access to the scripts though :(
  
   he means a commit that touches files in multiple directory locations
   throughout a source tree. I'm not sure if this is possible so easily.
  
   --patrick
 
  I'll pay prize money for that ;-)
 
  Am I missing something, or is this what you're looking for?
  http://cleannorth.org/lists/archive/cvs/2011-02/msg00022.html
 
  If so, it's generated by:
  http://search.cpan.org/dist/activitymail/bin/activitymail

 looking at their gitrepo:
 https://github.com/theory/activitymail/blob/master/bin/activitymail

 it parses stdin to determine which is the last dir modified in the commit,
 copying each invocation to a tmpfile before concat/sending them

 it works but i don't like the fact that it's working around cvs



Re: Tracking What it's changing in current

2011-02-21 Thread Luis Useche
On Mon, Feb 21, 2011 at 2:31 PM, Ted Unangst ted.unan...@gmail.com wrote:

 On Mon, Feb 21, 2011 at 10:08 AM, Luis Useche use...@gmail.com wrote:
  I would love this feature in OpenBSD src list. Is it possible to use the
  activitymail script on the OpenBSD CVS repo?

 seems like a serious waste of bandwidth.  If you care about seeing the
 diffs often enough that checking things out in cvsweb is a hassle,
 just start mirroring the cvs repo yourself.


Fair enough.

Another solution is to append the URL with the diff in the cvsweb like the
guys on dragonflybsd do. For example:
http://leaf.dragonflybsd.org/mailarchive/commits/2011-02/msg0.html.

BTW, I guess I am not smart enough, but I haven't been able to find this
information from the cvsweb.

Luis



Re: Tracking What it's changing in current

2011-02-16 Thread Luis Useche
One thing I would really like to see is the diffs of every commit. This is
available for DragonflyBSD for instance. Is there a way to find this on
OBSD?

Luis.

On Tue, Feb 15, 2011 at 11:27 AM, Adriaan misc.adri...@gmail.com wrote:

 On Tue, Feb 15, 2011 at 5:53 PM, Orestes Leal R.
 l...@cubacatering.avianet.cu wrote:
  I need to see (with a tool or whatever) what changes have occured between
  current,
  let's say between current 4.9 from february 9 and current dated february
 14.
 
 For future changes subcribe to the source-changes mailing list. For
 past changes see the mailing list archive of source-changes. See
 http://openbsd.org/mail.html



Re: Shutdown option in gnome-session

2011-01-09 Thread Luis Useche
Perhaps you have to uncomment the next line from visudo:

# %users  localhost=/sbin/shutdown -h now

Luis

On Sun, Jan 9, 2011 at 9:49 PM, dave shar openbsdam...@gmail.com wrote:

 Hi,

 I have installed kde3 and gnome2 on my box. I use kdm to load desktop
 sessions. There is no shutdown option available in gnome-session. How
 do I get shutdown  reboot options working in gnome-session.

 Best,

 Dave

 Please pardon my typo, I am just a kid.



USB Keyboard problem

2011-01-05 Thread Luis Useche
Hi Guys,

I installed a new machine with OBSD 4.8. For some reason, when I disconnect
the USB keyboard and connect it again, it does not work anymore. Moreover,
when I connected on some specific USB sockets it works again. Any clue of
what could be happening?

Thanks,
Luis

OpenBSD 4.8 (GENERIC.MP) #335: Mon Aug 16 09:09:20 MDT 2010
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3211264000 (3062MB)
avail mem = 3111964672 (2967MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xfd180 (31 entries)
bios0: vendor Dell Inc. version 2.2.0 date 07/06/2010
bios0: Dell Inc. Precision T1500
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG SLIC OEMB HPET SSDT
acpi0: wakeup devices P0P1(S4) P0P3(S4) P0P4(S4) P0P5(S4) P0P6(S4) BR1E(S4)
PS2K(S4) PS2M(S4) EUSB(S4) USB0(S4) USB1(S4) USB2(S4) USB3(S4) USBE(S4)
USB4(S4) USB5(S4) USB6(S4) BR20(S4) BR21(S4) BR22(S4) BR23(S4) BR24(S4)
BR25(S4) BR26(S4) BR27(S4) GBE_(S4) SLPB(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 CPU 650 @ 3.20GHz, 3192.42 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,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: apic clock running at 133MHz
cpu1 at mainbus0: apid 4 (application processor)
cpu1: Intel(R) Core(TM) i5 CPU 650 @ 3.20GHz, 3192.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,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG
cpu1: 256KB 64b/line 8-way L2 cache
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Core(TM) i5 CPU 650 @ 3.20GHz, 3192.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,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG
cpu2: 256KB 64b/line 8-way L2 cache
cpu3 at mainbus0: apid 5 (application processor)
cpu3: Intel(R) Core(TM) i5 CPU 650 @ 3.20GHz, 3192.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,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,LONG
cpu3: 256KB 64b/line 8-way L2 cache
ioapic0 at mainbus0: apid 6 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 1, remapped to apid 6
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 3 (BR1E)
acpiprt2 at acpi0: bus 2 (BR20)
acpiprt3 at acpi0: bus -1 (BR21)
acpiprt4 at acpi0: bus -1 (BR22)
acpiprt5 at acpi0: bus -1 (BR23)
acpiprt6 at acpi0: bus -1 (BR24)
acpiprt7 at acpi0: bus -1 (BR25)
acpiprt8 at acpi0: bus -1 (BR26)
acpiprt9 at acpi0: bus -1 (BR27)
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
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: PWRB
cpu0: Enhanced SpeedStep 3192 MHz: speeds: 3201, 3200, 3067, 2933, 2800,
2667, 2533, 2400, 2267, 2133, 2000, 1867, 1733, 1600, 1467, 1333, 1200 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 Intel Core Host rev 0x18
ppb0 at pci0 dev 1 function 0 Intel Core PCIE rev 0x18: apic 6 int 16 (irq
10)
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 vendor NVIDIA, unknown product 0x06fd rev
0xa1
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
Intel 3400 MEI rev 0x06 at pci0 dev 22 function 0 not configured
ehci0 at pci0 dev 26 function 0 Intel 3400 USB rev 0x06: apic 6 int 16
(irq 10)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 Intel 3400 HD Audio rev 0x06: apic 6 int
22 (irq 11)
azalia0: codecs: Realtek ALC662
audio0 at azalia0
ppb1 at pci0 dev 28 function 0 Intel 3400 PCIE rev 0x06: apic 6 int 17
(irq 5)
pci2 at ppb1 bus 2
bge0 at pci2 dev 0 function 0 Broadcom BCM57780 rev 0x01, BCM57780 A1
(0x57780001): apic 6 int 16 (irq 10), address a4:ba:db:fd:cd:84
brgphy0 at bge0 phy 1: BCM57780 10/100/1000baseT PHY, rev. 1
ehci1 at pci0 dev 29 function 0 Intel 3400 USB rev 0x06: apic 6 int 23
(irq 15)
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 Intel EHCI root hub rev 2.00/1.00 addr 1
ppb2 at pci0 dev 30 function 0 Intel 82801BA Hub-to-PCI rev 0xa6
pci3 at ppb2 bus 3
ATT/Lucent FW322 1394 rev 0x70 at pci3 dev 1 function 0 not configured
pcib0 at pci0 dev 31 function 0 Intel H57 LPC rev 0x06
ahci0 at pci0 dev 31 function 2 Intel 3400 AHCI rev 0x06: apic 6 int 19
(irq 14), AHCI 1.3
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0: ATA, Maxtor 6V160E0, VA11 SCSI3 0/direct
fixed
sd0: 152627MB, 512 bytes/sec, 312581808 sec 

Re: USB Keyboard problem

2011-01-05 Thread Luis Useche
 targ 1 lun 0: ATA, WDC WD3200AAKS-7, 02.0 SCSI3 0/direct
fixed
sd1: 305245MB, 512 bytes/sec, 625142448 sec total
cd0 at scsibus0 targ 2 lun 0: HL-DT-ST, DVD-ROM DH30N, A101 ATAPI 5/cdrom
removable
sd2 at scsibus0 targ 3 lun 0: ATA, WDC WD2500AAKS-0, 12.0 SCSI3 0/direct
fixed
sd2: 238475MB, 512 bytes/sec, 488397168 sec total
ichiic0 at pci0 dev 31 function 3 Intel 3400 SMBus rev 0x06: apic 6 int 18
(irq 3)
iic0 at ichiic0
iic0: addr 0x28 01=00 02=00 03=00 04=41 05=80 06=00 07=03 41=00 42=00 43=00
44=01 45=80 46=00 47=03 81=00 82=00 83=00 84=01 85=80 86=00 87=03 c1=00
c2=00 c3=00 c4=01 c5=80 c6=00 c7=03 words 00=ff00 01= 02= 03=00ff
04=01ff 05=80ff 06=00ff 07=
spdmem0 at iic0 addr 0x50: 2GB DDR3 SDRAM PC3-10600
spdmem1 at iic0 addr 0x52: 2GB DDR3 SDRAM PC3-10600
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: probed fifo depth: 15 bytes
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
mtrr: Pentium Pro MTRR support
uhub2 at uhub0 port 1 Intel Rate Matching Hub rev 2.00/0.00 addr 2
uhub3 at uhub1 port 1 Intel Rate Matching Hub rev 2.00/0.00 addr 2
uhub4 at uhub3 port 2 Standard Microsystems product 0x2514 rev 2.00/b.b3
addr 3
uhidev0 at uhub4 port 1 configuration 1 interface 0 Dell Dell Premium USB
Optical Mouse rev 2.00/0.09 addr 4
uhidev0: iclass 3/1
ums0 at uhidev0: 5 buttons, Z dir
wsmouse0 at ums0 mux 0
uhidev1 at uhub4 port 2 configuration 1 interface 0 Dell Dell USB Keyboard
rev 1.10/3.06 addr 5
uhidev1: iclass 3/1
ukbd0 at uhidev1: 8 modifier keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
softraid0 at root
root on sd0a swap on sd0b dump on sd0b
uhub5 at uhub2 port 1 Standard Microsystems product 0x2514 rev 2.00/b.b3
addr 3
uhidev2 at uhub5 port 1 configuration 1 interface 0 Dell Dell Premium USB
Optical Mouse rev 2.00/0.09 addr 4
uhidev2: iclass 3/1
ums1 at uhidev2: 5 buttons, Z dir
wsmouse1 at ums1 mux 0
uhidev3 at uhub5 port 2 configuration 1 interface 0 Dell Dell USB Keyboard
rev 1.10/3.06 addr 5
uhidev3: iclass 3/1
ukbd1 at uhidev3: 8 modifier keys, 6 key codes
wskbd2 at ukbd1 mux 1
wskbd2: connecting to wsdisplay0

On Wed, Jan 5, 2011 at 3:30 PM, Ted Unangst ted.unan...@gmail.com wrote:

 On Wed, Jan 5, 2011 at 2:45 PM, Luis Useche use...@gmail.com wrote:
  I installed a new machine with OBSD 4.8. For some reason, when I
 disconnect
  the USB keyboard and connect it again, it does not work anymore.
 Moreover,
  when I connected on some specific USB sockets it works again. Any clue of
  what could be happening?

 You didn't include the part of the dmesg that includes plugging the
 keyboard in and out so we can't see the port disabled message, but
 that's probably what happened.



Re: USB Keyboard problem

2011-01-05 Thread Luis Useche
I just tried with a bsd.rd from a snapshot and the USB does work fine. I
guess this was solved long before I found the problem. Thanks.

Luis.

On Wed, Jan 5, 2011 at 4:22 PM, Ted Unangst ted.unan...@gmail.com wrote:

 On Wed, Jan 5, 2011 at 3:51 PM, Luis Useche use...@gmail.com wrote:
  This is a more complete dmesg. Here I boot with the keyboard and mouse
  connected in one of the back USB ports. This works fine. Then, I
 disconnect
  and connect again and it does not work anymore. Then, I connect both in
 the
  front USB and works fine.

 This is a lot more interesting.

  uhub4 at uhub3 port 2 Standard Microsystems product 0x2514 rev
 2.00/b.b3
  uhidev1 at uhub4 port 2 configuration 1 interface 0 Dell Dell USB
 Keyboard
  wskbd1: connecting to wsdisplay0

 There's the original attach.

  softraid0 at root
  root on sd0a swap on sd0b dump on sd0b

 I imagine at about this point you unplugged it.  No detach messages are
 printed.

  uhub5 at uhub2 port 1 Standard Microsystems product 0x2514 rev
 2.00/b.b3
  uhidev3 at uhub5 port 2 configuration 1 interface 0 Dell Dell USB
 Keyboard
  wskbd2: connecting to wsdisplay0

 Now it's connected to the back.

 So we're missing the usb detach events for some reason.  That's not
 enough for me to solve the problem, but it's certainly critical
 information whoever may solve your problem will need.  The obvious
 suggestion is to try a snapshot kernel and see if the same thing
 happens.  I have a laptop where one port doesn't work right, not sure
 why, I just use the other ports.



Re: Memory results

2011-01-03 Thread Luis Useche
Using amd64 instead of i386 will give you more memory. Additionally, you
should look for bigmem in the archivals if the previous solution is not
enough.

Luis.

On Mon, Jan 3, 2011 at 9:07 AM, jinhitmanBarracuda jinhit...@gmail.comwrote:

 Hi.
 I have a problem in computer memory results.
 My computer has got 3.5Gbyte Ram, but memory amount seems 2.6 Gbyte on some
 command output.
 How could i fix this ?
 Here is the Dmesg output and faulty result.
 --

 bash-4.1# dmesg
 OpenBSD 4.8 (GENERIC.MP) #359: Mon Aug 16 09:16:26 MDT 2010
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
 cpu0: AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ (AuthenticAMD
 686-class, 512KB L2 cache) 2.41 GHz
 cpu0:

 FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16
 real mem  = 3220598784 (3071MB)
 avail mem = 3157938176 (3011MB)
 mainbus0 at root
 bios0 at mainbus0: AT/286+ BIOS, date 04/07/08, BIOS32 rev. 0 @ 0xf0010,
 SMBIOS rev. 2.5 @ 0xfc320 (54 entries)
 bios0: vendor MS-7250 version V3.10 date 04/07/2008
 bios0: MSI MS-7250
 acpi0 at bios0: rev 0
 acpi0: sleep states S0 S3 S4 S5
 acpi0: tables DSDT FACP APIC MCFG OEMB HPET SSDT
 acpi0: wakeup devices PS2K(S4) PS2M(S4) NSMB(S4) USB0(S4) USB2(S3) NMAC(S5)
 NMAD(S5) P0P1(S4) HDAC(S4) BR10(S4) BR11(S4) BR12(S4) BR13(S4) BR14(S4)
 BR15(S4) SLPB(S4)
 acpitimer0 at acpi0: 3579545 Hz, 24 bits
 acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
 cpu0 at mainbus0: apid 0 (boot processor)
 cpu0: apic clock running at 200MHz
 cpu1 at mainbus0: apid 1 (application processor)
 cpu1: AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ (AuthenticAMD
 686-class, 512KB L2 cache) 2.41 GHz
 cpu1:

 FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16
 ioapic0 at mainbus0: apid 2 pa 0xfec0, version 11, 24 pins
 acpihpet0 at acpi0: 2500 Hz
 acpiprt0 at acpi0: bus 0 (PCI0)
 acpiprt1 at acpi0: bus 1 (P0P1)
 acpiprt2 at acpi0: bus 7 (BR10)
 acpiprt3 at acpi0: bus 6 (BR11)
 acpiprt4 at acpi0: bus 5 (BR12)
 acpiprt5 at acpi0: bus 4 (BR13)
 acpiprt6 at acpi0: bus 3 (BR14)
 acpiprt7 at acpi0: bus 2 (BR15)
 acpicpu0 at acpi0: PSS
 acpicpu1 at acpi0: PSS
 acpibtn0 at acpi0: SLPB
 acpibtn1 at acpi0: PWRB
 bios0: ROM list: 0xc/0x1
 cpu0: PowerNow! K8 2407 MHz: speeds: 2400 2200 2000 1800 1000 MHz
 pci0 at mainbus0 bus 0: configuration mode 1 (bios)
 NVIDIA MCP55 Memory rev 0xa2 at pci0 dev 0 function 0 not configured
 pcib0 at pci0 dev 1 function 0 NVIDIA MCP55 ISA rev 0xa3
 nviic0 at pci0 dev 1 function 1 NVIDIA MCP55 SMBus rev 0xa3
 iic0 at nviic0
 spdmem0 at iic0 addr 0x50: 2GB DDR2 SDRAM non-parity PC2-6400CL5
 spdmem1 at iic0 addr 0x51: 1GB DDR2 SDRAM non-parity PC2-5300CL5
 spdmem2 at iic0 addr 0x53: 512MB DDR2 SDRAM non-parity PC2-5300CL5
 iic1 at nviic0
 iic1: addr 0x2f 00=c0 01=0f 02=02 03=01 04=07 05=00 06=18 07=00 08=00 14=14
 15=62 16=02 17=05 words 00=c0ff 01=0fff 02=02ff 03=01ff 04=07ff 05=00ff
 06=18ff 07=00ff
 admtemp0 at iic1 addr 0x4c: gl523sm
 ohci0 at pci0 dev 2 function 0 NVIDIA MCP55 USB rev 0xa1: apic 2 int 10
 (irq 10), version 1.0, legacy support
 ehci0 at pci0 dev 2 function 1 NVIDIA MCP55 USB rev 0xa2: apic 2 int 11
 (irq 11)
 usb0 at ehci0: USB revision 2.0
 uhub0 at usb0 NVIDIA EHCI root hub rev 2.00/1.00 addr 1
 pciide0 at pci0 dev 4 function 0 NVIDIA MCP55 IDE rev 0xa1: DMA, channel
 0
 configured to compatibility, channel 1 configured to compatibility
 wd0 at pciide0 channel 0 drive 0: Maxtor 6E040L0
 wd0: 16-sector PIO, LBA, 39202MB, 80287039 sectors
 wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6
 pciide0: channel 1 ignored (disabled)
 pciide1 at pci0 dev 5 function 0 NVIDIA MCP55 SATA rev 0xa3: DMA
 pciide1: using apic 2 int 5 (irq 5) for native-PCI interrupt
 wd1 at pciide1 channel 0 drive 0: SAMSUNG HD161HJ
 wd1: 16-sector PIO, LBA48, 152627MB, 312581808 sectors
 wd1(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 6
 pciide2 at pci0 dev 5 function 1 NVIDIA MCP55 SATA rev 0xa3: DMA
 pciide2: using apic 2 int 10 (irq 10) for native-PCI interrupt
 pciide3 at pci0 dev 5 function 2 NVIDIA MCP55 SATA rev 0xa3: DMA
 pciide3: using apic 2 int 10 (irq 10) for native-PCI interrupt
 atapiscsi0 at pciide3 channel 0 drive 0
 scsibus0 at atapiscsi0: 2 targets
 cd0 at scsibus0 targ 0 lun 0: TSSTcorp, CDDVDW SH-S223C, SB04 ATAPI
 5/cdrom removable
 cd0(pciide3:0:0): using PIO mode 4, Ultra-DMA mode 5
 wd2 at pciide3 channel 1 drive 0: ST3320613AS
 wd2: 16-sector PIO, LBA48, 305245MB, 625142448 sectors
 wd2(pciide3:1:0): using PIO mode 4, Ultra-DMA mode 6
 ppb0 at pci0 dev 6 function 0 NVIDIA MCP55 PCI-PCI rev 0xa2
 pci1 at ppb0 bus 1
 vendor Techsan Electronics, unknown product 0x2103 (class network
 subclass
 miscellaneous, rev 0x02) at pci1 dev 1 function 0 not configured
 azalia0 at pci0 dev 6 function 1 NVIDIA MCP55 HD Audio rev 0xa2: apic 2
 int 11 (irq 11)
 azalia0: codecs: Realtek ALC888
 audio0 at azalia0
 nfe0 at pci0 dev 8 

Re: reboot command doesn't work

2010-12-31 Thread Luis Useche
I dont know if it helps but have you tried setting machdep.apmhalt=1?

Luis.

On Fri, Dec 31, 2010 at 9:23 AM, netmgr7 netm...@hotmail.com wrote:

 Sorry, my subject line should have been more specific.

 Yes, I should have mentioned that I have tested reboot command with VMWare
 and Virtualbox virtual machines and it works fine.
 The problem is with my Compaq Deskpro DPENS-P350/6.4/N4.

 I have tried 'powerdown=YES' in rc.shutdown, but it made no difference.

 I did notice with 'dmesg', that there was an error on startup regarding
 can't enable ACPI, so I tried booting a kernel file with ACPI
 disabled. Still no successful reboot.

 Not sure what else to try, or even how to go about troubleshooting this
 problem.


 On 12/31/2010 1:35 AM, Indunil Jayasooriya wrote:

 I am running both 32bit and  64 bit as virtual Servers on VirtualBOX. Pls
 see my /etc/rc.shutdown   file below. it is default.

 I just hit *reboot* command.

 reboot works fine on both machines.



 # cat
 /etc/rc.shutdown

 #   $OpenBSD: rc.shutdown,v 1.7 2006/06/22 00:41:59 deraadt Exp $
 #
 # If it exists, this script is run at system-shutdown by reboot(8),
 # halt(8).  If the architecture supports keyboard requested halting,
 # it is also run by init(8) when such an event happens.
 #

 *powerdown=NO*# set to YES for powerdown

 #
 # Your shell code goes here






 On Fri, Dec 31, 2010 at 12:20 PM, Markus Bergkvist
 markus.bergkv...@telia.com  wrote:



 On 12/31/10 00:56, m c wrote:



 Hello all.

 First time posting here, so I apologize in advance if my question
 doesn't
 belong on this list.

 I've been using some Compaq Deskpro DPENS Pentium II machines as OpenBSD
 firewalls since late 2.x to early 3.x. Recently I made the jump to 4.8
 and
 all
 seems to work fine except I noticed the reboot command does not appear
 to
 work. The machine gets halted, screen blanks out, but that's as far as
 it
 goes. I re-installed 3.3 and confirmed the reboot works fine under 3.3.

 Any tips/hints to help troubleshoot or resolve this problem would be
 greatly
 appreciated.

  Do you have powerdown=YES in /etc/rc.shutdown?


  Thanks in advance!


 MC.



Re: removing unneeded package dependencies

2010-12-27 Thread Luis Useche
I recently submitted a patch to do this. I haven't received much feedback
but check if it works for you.

http://marc.info/?l=openbsd-techm=129320921012808w=2

Luis

On Mon, Dec 27, 2010 at 9:35 AM, Dmitrij D. Czarkoff czark...@gmail.comwrote:

 Hello!

 I use a custom script to remove automaticly installed dependencies to the
 manually installed packages I deleted.

 AFAIK ``pkg'' doesn't provide this functionality (if I'm wrong, correct me,
 please).

 The things I wanted to ask are:

 1. Is there any reason for this functionality being missing in ``pkg''? (I
 would like to make a patch to ``pkg'' to make it possible if there is a
 chance
 that the patch would be accepted.)

 2. Is anyone working on this functionality already?

 --
 Dmitrij D. Czarkoff



iso to usb installer script

2010-12-24 Thread Luis Useche
Hi Guys,

I have heard a couple of times in this list about the problem of how to
convert from iso to usb installer. I made one small script to do this
conversion that I use myself and perhaps is useful to others. Assuming your
usb key was attached in sd1, you should call the script as:

./iso2usb /full/path/to/install.iso sd1

WARNING: This script makes modifications to the parition tables so make sure
the argument you are passing as USB is the correct one. Otherwise you can
wipe your root disk.

This script is not bullet-proof either, I do not make any errors check. It
was intended just as a proof of concept and works very well for me.

I higly recommend understanding the script before using.

Luis.

#!/bin/sh

ISO=$1
USB=$2

ISO_MNT=/tmp/iso/
USB_MNT=/tmp/usb/

# make temporary mount dirs
mkdir $ISO_MNT $USB_MNT

# mount iso
vnconfig svnd0 $ISO
mount /dev/svnd0c $ISO_MNT

# prepare and mount usb
dd if=/dev/zero of=/dev/${USB}c count=1 bs=1m
echo reinit\nwrite\nquit\n | fdisk -e $USB
echo a\n\n\n\n\nw\nq\n | disklabel -E $USB
newfs /dev/r${USB}a
mount /dev/${USB}a $USB_MNT

# copy data from iso to usb
cp -r $ISO_MNT/* $USB_MNT

# make usb bootable
cp /usr/mdec/boot $USB_MNT/boot
/usr/mdec/installboot -v $USB_MNT/boot /usr/mdec/biosboot $USB

# unmounting and cleaning everything
umount $ISO_MNT $USB_MNT
vnconfig -u svnd0



Accessing Invalid Physical Address

2010-12-15 Thread Luis Useche
Hi Guys,

This is not very related to OpenBSD but perhaps somebody can help me from
this list.

I need to find what happen when an invalid physical address is accessed from
the kernel for a small project I am doing. My guess is that it will trigger
some kind of exception trapped by the kernel. I tried this with amd64
OpenBSD to check what was the behavior. The result is that the invalid
physical memory is accessed with no trap. This does not make much sense.

Here is the code in the kernel:

u = malloc(PAGE_SIZE,0,M_WAITOK);
*u = 27;
printf(U 0: %llx %llx
%d\n,(vaddr_t)u,vtophys((vaddr_t)u),*u);
pte = vtopte((vaddr_t)u);
printf(PTE: %llx\n,*pte);
*pte = ~PG_FRAME;
*pte |= 0x00023000UL;
pmap_update_pg((vaddr_t)u);
printf(U 1: %llx %llx
%d\n,(vaddr_t)u,vtophys((vaddr_t)u),*u);

The result in the dmesg is:

USECHE 0: 801f7000 bf33f000 27
PTE: bf33f163
USECHE 1: 801f7000 00023000 -1

Somebody has a clue on why this does not crash or what happen when the
invalid physical memory is accessed?

Thanks in advance,
Luis.



bce and Broadcom BCM4401B1

2010-11-20 Thread Luis Useche
Hi Guys,

OBSD 4.8 was unable to set up my Broadcom BCM4401B1. What is interesting is
that when I tried with OBSD 4.7 the bce set up the interface with no
problem.

Here there are the two dmesg:

OpenBSD 4.7 (RAMDISK_CD) #353: Wed Mar 17 21:02:53 MDT 2010
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/RAMDISK_CD
cpu0: Intel(R) Pentium(R) M processor 1.60GHz (GenuineIntel 686-class)
1.60 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,SBF,EST,TM2
real mem  = 536104960 (511MB)
avail mem = 512565248 (488MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 01/18/05, BIOS32 rev. 0 @ 0xffe90,
SMBIOS rev. 2.3 @ 0xf8cb0 (61 entries)
bios0: vendor Dell Computer Corporation version A16 date 01/18/2005
bios0: Dell Computer Corporation Inspiron 600m
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (AGP_)
acpiprt2 at acpi0: bus 2 (PCIE)
bios0: ROM list: 0xc/0x1
cpu0 at mainbus0: (uniprocessor)
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 Intel 82855PM Host rev 0x03
ppb0 at pci0 dev 1 function 0 Intel 82855PM AGP rev 0x03
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 ATI Radeon Mobility M9 rev 0x02
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
uhci0 at pci0 dev 29 function 0 Intel 82801DB USB rev 0x01: irq 11
uhci1 at pci0 dev 29 function 1 Intel 82801DB USB rev 0x01: irq 11
uhci2 at pci0 dev 29 function 2 Intel 82801DB USB rev 0x01: irq 11
ehci0 at pci0 dev 29 function 7 Intel 82801DB USB rev 0x01: irq 11
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
ppb1 at pci0 dev 30 function 0 Intel 82801BAM Hub-to-PCI rev 0x81
pci2 at ppb1 bus 2
bce0 at pci2 dev 0 function 0 Broadcom BCM4401B1 rev 0x02: irq 11, address
00:11:43:45:55:c3
bmtphy0 at bce0 phy 1: BCM4401 10/100baseTX PHY, rev. 0
cbb0 at pci2 dev 1 function 0 O2 Micro OZ711EC1 SmartCardBus rev 0x20: irq
11, CardBus support disabled
cbb1 at pci2 dev 1 function 1 O2 Micro OZ711EC1 SmartCardBus rev 0x20: irq
11, CardBus support disabled
ipw0 at pci2 dev 3 function 0 Intel PRO/Wireless 2100 rev 0x04: irq 11,
address 00:0c:f1:5e:b0:74
cardslot0 at cbb0 slot 0 flags 0
pcmcia0 at cardslot0
cardslot1 at cbb1 slot 1 flags 0
pcmcia1 at cardslot1
ichpcib0 at pci0 dev 31 function 0 Intel 82801DBM LPC rev 0x01
pciide0 at pci0 dev 31 function 1 Intel 82801DBM IDE rev 0x01: DMA,
channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: WDC WD400VE-75HDT0
wd0: 16-sector PIO, LBA, 38154MB, 78140160 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: HL-DT-ST, CDRW/DVD GCC4244, B103 ATAPI
5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
Intel 82801DB AC97 rev 0x01 at pci0 dev 31 function 5 not configured
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 Intel UHCI root hub rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 Intel UHCI root hub rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 Intel UHCI root hub rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
biomask ffed netmask ffed ttymask 
rd0: fixed, 3800 blocks
softraid0 at root
root on rd0a swap on rd0b dump on rd0b
umass0 at uhub0 port 3 configuration 1 interface 0 Generic Mass Storage
rev 2.00/1.41 addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd0 at scsibus1 targ 1 lun 0: Flash, Drive_AU_USB20, 8.07 SCSI2 0/direct
removable
sd0: 2000MB, 512 bytes/sec, 4096000 sec total


OpenBSD 4.8 (GENERIC) #136: Mon Aug 16 09:06:23 MDT 2010
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Pentium(R) M processor 1.60GHz (GenuineIntel 686-class)
1.60 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,SBF,EST,TM2
real mem  = 536104960 (511MB)
avail mem = 517378048 (493MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 01/18/05, BIOS32 rev. 0 @ 0xffe90,
SMBIOS rev. 2.3 @ 0xf8cb0 (61 entries)
bios0: vendor Dell Computer Corporation version A16 date 01/18/2005
bios0: Dell Computer Corporation Inspiron 600m
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP
acpi0: wakeup devices LID_(S3) PBTN(S4) PCI0(S3) USB0(S1) USB1(S1) USB2(S1)
USB3(S1) MODM(S3) PCIE(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (AGP_)
acpiprt2 at acpi0: bus 2 (PCIE)
acpicpu0 at acpi0: C3, C3, C2, C1, PSS
acpitz0 at acpi0: critical temperature 102 degC

iostat and more than one core

2010-11-17 Thread Luis Useche
Hi Guys,

Doing a small disk benchmark in my laptop with dd, I found that dd and
iostats were reporting different numbers. To be precise, iostat was
returning half of the MB/sec than dd (24.5 vs 49 MB/sec).

Digging a bit on the iostat code, I realized that the struct _disk cpu
time was returning 200 timer ticks even though it was read every second. I
tested by booting my machine with bsd.sp (to use one core instead of two)
and now it was returning the right number.

It seems like the number of ticks are incrementing by a factor proportional
to the number of CPUs (I think this makes sense). This makes iostat to
report the wrong bandwidth disk utilization.

Here is a patch I implemented to fix the problem:

diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c
index 7da45b5..ffcd43a 100644
--- a/usr.sbin/iostat/iostat.c
+++ b/usr.sbin/iostat/iostat.c
@@ -64,6 +64,8 @@

 #include sys/dkstat.h
 #include sys/time.h
+#include sys/param.h
+#include sys/sysctl.h

 #include err.h
 #include ctype.h
@@ -84,7 +86,7 @@ extern intdk_ndrive;
 kvm_t *kd;
 char*nlistf, *memf;

-inthz, reps, interval;
+inthz, reps, interval, ncpu;
 static inttodo = 0;

 volatile sig_atomic_t wantheader;
@@ -112,8 +114,9 @@ int dkinit(int);
 int
 main(int argc, char *argv[])
 {
-int ch, hdrcnt;
+int ch, hdrcnt, mib[2];
 struct timevaltv;
+size_t size;

 while ((ch = getopt(argc, argv, Cc:dDIM:N:Tw:)) != -1)
 switch(ch) {
@@ -156,6 +159,11 @@ main(int argc, char *argv[])
 if (!ISSET(todo, SHOW_CPU | SHOW_TTY | SHOW_STATS_1 | SHOW_STATS_2))
 todo |= SHOW_CPU | SHOW_TTY | SHOW_STATS_1;

+mib[0] = CTL_HW;
+mib[1] = HW_NCPU;
+size = sizeof(ncpu);
+(void) sysctl(mib, 2, ncpu, size, NULL, 0);
+
 dkinit(0);
 dkreadstats();
 selectdrives(argv);
@@ -342,7 +350,7 @@ display(void)
 if (etime == 0.0)
 etime = 1.0;
 /* Convert to seconds. */
-etime /= (float)hz;
+etime /= (float)hz*ncpu;

 /* If we're showing totals only, then don't divide by the
  * system time.


Any thoughts?
Luis.



Re: High Resolution Timer

2010-10-09 Thread Luis Useche
Hi Phillip,

Thanks for the response.

I guess I don't know much about hardware to at least have some direction.
From what I have read, it seems like timers implemented with the hpet device
could give me the granularity I am looking for. If I understand correctly,
the getitimer function in Linux uses hpet.

The problem of using busy loop is that the CPU should be free for the
benchmark I want to run.

In case it is relevant, the machine is an AMD Opteron with nVidia
motherboard.

Luis.

On Sat, Oct 9, 2010 at 2:40 AM, Philip Guenther guent...@gmail.com wrote:

 On 9/29/10, Luis Useche use...@gmail.com wrote:
  I need to read a performance monitoring counter (RDPMC) every 100
  microseconds or so. I found a way to do this on linux using the normal
  getitimer library. However, the resolution of this timer in OBSD is 10
  milliseconds. Do you know a way to have a higher resolution of the timer
 in
  OBSD? One way is to do a busy loop, but this is not feasible in my
 problem.

 You don't really give enough information to give good advice
 (platform?  how is the RDPMC read?  notice how many replies you've
 gotten?), but depending on the details, writing a kernel driver may be
 the most natural way.  Otherwise, a busy loop in userspace watching
 the CPU's performance counter might be an option.


 Philip Guenther



Re: Wireless Network GUI

2010-10-07 Thread Luis Useche
I would also prefer a console based approach. I think it is not a good idea
to do it for one single windows manager.

Anyway, Arch Linux has a very nice console based network connection manager
in case anybody is looking for ideas:
http://wiki.archlinux.org/index.php/Netcfg

Luis.

2010/10/7 Guillaume Duali g.du...@otasc.org

 On Thu, 7 Oct 2010 09:33:44 -0300, Christiano F. Haesbaert
 haesba...@haesbaert.org wrote:
  Why not make a curses GUI ? I find it much more useful than gtk/qt
 (IMHO).

 In my opinion, the aim of this project is to provide a graphical tool,
 which can be inserted in some WM like XFCE, etc.
 Guillaume.



High Resolution Timer

2010-09-29 Thread Luis Useche
Hi Guys,

I need to read a performance monitoring counter (RDPMC) every 100
microseconds or so. I found a way to do this on linux using the normal
getitimer library. However, the resolution of this timer in OBSD is 10
milliseconds. Do you know a way to have a higher resolution of the timer in
OBSD? One way is to do a busy loop, but this is not feasible in my problem.

Thanks in advance,
Luis.



Re: OpenBSD Dell Latitude E6500 built in wireless

2010-09-14 Thread Luis Useche
I had that problem before. I bought and install an intel card and problem
solved.

Luis.

On Tue, Sep 14, 2010 at 4:14 AM, James Peltier james_a_pelt...@yahoo.cawrote:

 Anyone using the Dell Latitude E6500 with the built in Broadcom wireless
 adaptor?  I see that marco@ mentions he owns a E6500 here

  http://www.mail-archive.com/source-chan...@openbsd.org/msg04064.html

 but I don't see reference to it in the bwi device or elsewhere.  I'm
 running
 -current

 --
 James A. Peltier james_a_pelt...@yahoo.ca



Re: Is there anything I can use in place of MATLAB on OpenBSD?

2010-09-03 Thread Luis Useche
octave may work. You can install it from ports.

Luis.

On Sat, Sep 4, 2010 at 1:20 AM, Siju George sgeorge...@gmail.com wrote:

 Hi,

 Is there anything I can use in place of MATLAB on OpenBSD?

 http://www.mathworks.com/products/matlab/

 even at least through Linux emulation?
 Looking for a free Alternative :-)

 thanks

 --Siju



Pragmatics of Following current

2010-08-19 Thread Luis Useche
Hi Guys,

I have been meaning to follow current for a couple of weeks now. I read the
Building Sources page and it seems like I should follow the process of:
cvs up src xenocara ports - compile - install, where install includes
merging of configuration files. Moreover, I should also keep an eye on the
Following -current webpage for any change I should make. This looks like a
lot of work every-time you run cvs up (mainly the compilation of ports and
merging of conf files).

I was wondering how do you usually work on current and if you all follow
this process through-fully. If not, what kind of tricks do you use to make
the process easier.

For now, I am using snapshots with binary packages.

Thanks in advance,
Luis.



Re: Battery update frequency

2010-08-09 Thread Luis Useche
I tried today's (August 9th) snapshot and the problems is gone.

Thanks,
Luis.

On Sun, Jul 25, 2010 at 4:38 AM, Peter Hessler phess...@theapt.org wrote:

 There was a fix for this very recently, please update to a snapshot or
 -current.

 On 2010 Jul 24 (Sat) at 12:04:56 -0700 (-0700), Luis Useche wrote:
 :HI Guys,
 :
 :I have a Dell Inspiron 1420 laptop where I am using OpenBSD.
 :
 :My problem is that the battery status is not updated frequently enough. It
 :is updated when the machine boots and when less than 10% of the battery is
 :remaining. I was wondering if this is the expected behavior.
 :
 :I check apm and apmd code and the issue seems to be comming from the
 acpi
 :driver itself. I tried to read acpi, but it looks very intimidating to me.
 :
 :Any thoughts?
 :
 :Thanks in advance,
 :Luis.
 :

 --
 I often quote myself; it adds spice to my conversation.
-- G. B. Shaw



Battery update frequency

2010-07-24 Thread Luis Useche
HI Guys,

I have a Dell Inspiron 1420 laptop where I am using OpenBSD.

My problem is that the battery status is not updated frequently enough. It
is updated when the machine boots and when less than 10% of the battery is
remaining. I was wondering if this is the expected behavior.

I check apm and apmd code and the issue seems to be comming from the acpi
driver itself. I tried to read acpi, but it looks very intimidating to me.

Any thoughts?

Thanks in advance,
Luis.



Re: Dynamic Tracing

2010-07-06 Thread Luis Useche
On Tue, Jul 6, 2010 at 2:52 AM, Edd Barrett vex...@gmail.com wrote:

 On Sat, Jul 03, 2010 at 12:26:14AM -0700, Luis Useche wrote:
  Hi Guys,
 
  I googled this a bit but I couldn't find anything. I just want to check
 if
  there is a dynamic tracing tool for OpenBSD. Similar tools are kprobes
 for
  Linux or DTrace for Solaris.

 Could be an interesting project for someone.

 Although not the same, we do have ktrace(1) which is similar to truss or
 strace.


I was looking OBSD code and it seems like the trace interruptions are always
catched by ddb. This code can be probably used for a dynamic tracing tool.
Is this correct?

Luis.



Dynamic Tracing

2010-07-03 Thread Luis Useche
Hi Guys,

I googled this a bit but I couldn't find anything. I just want to check if
there is a dynamic tracing tool for OpenBSD. Similar tools are kprobes for
Linux or DTrace for Solaris.

Thanks in advance,
Luis.



OpenBSD disk scheduler

2010-05-02 Thread Luis Useche
Hi Guys,

Reading some archives, I found people saying that OpenBSD has no disk
scheduler. My first question is: is this true? If so, what is the reason? Is
it technical or there are no resources for this?

Thanks in advance,
Luis.



softraid video

2010-04-19 Thread Luis Useche
Hi Guys,

I am trying to watch the softraid video of the asiabsdcon 2010 in ustream
with no luck. I don't have flash (I am on a OpenBSD box). Do any of you have
any trick to download the videos from this site. Alternatively, you can also
point me to a place with the asiabsdcon in a non-flash format.

Thanks in advance,
Luis.



Re: softraid video

2010-04-19 Thread Luis Useche
On Mon, Apr 19, 2010 at 12:18 PM, Paul Irofti bulib...@sdf.lonestar.orgwrote:

 See first post for all videos:
 http://undeadly.org/cgi?action=articlesid=20100322204337

 The softraid one:
 http://ustream.vo.llnwd.net/pd2/0/1/5/5430/5430117/1_3201831_5430117.flv


OK. Cool. I didn't see that one.

Sorry for the noise.

Luis.



pkg_add looping bug

2010-04-19 Thread Luis Useche
(Sorry if you received this email before with the wrong FROM address)

Hi Guys,

Today I decided to give -current a try and probably find some bugs. I hit my 
first bug when I was updating my packages. For some reason, pkg_add start 
consuming full CPU and there was no progress. I re-ran pkg_add with -v with 
the hope to find the problem. I could track the bug until pkg_add:1069.

Below you can find the (long) output I was able to get. At the end pkg_add 
continously loop between the packages: glib2, fam, exo, and desktop-file-utils.

I also was able to check that the @todo2 array is always increasing.

Any help will be appreciated,
Luis.

==
Update candidates: quirks-1.10 - quirks-1.10
parsing quirks-1.10
Comparing full signature for quirks-1.10 quirks-1.10,@comment $OpenBSD: 
PLIST,v 1.1.1.1 2009/12/04 16:50:48 espie Exp $
@name quirks-1.10
@option always-update
@comment subdir=devel/quirks cdrom=yes ftp=yes
@arch *
+DESC
@sha ZcShuBxD9cPsWmJce9rnoKKlC4qYQve7PwElfX/uk8Q=
@size 348
@cwd /usr/local
libdata/perl5/site_perl/OpenBSD/
libdata/perl5/site_perl/OpenBSD/Quirks.pm
@sha rZ7bZJTcao39CHGP1KntE/Ke78zggt5OvPVgljx+SsE=
@size 5817
 vs. quirks-1.10,@comment $OpenBSD: PLIST,v 1.1.1.1 2009/12/04 16:50:48 espie 
Exp $
@name quirks-1.10
@option always-update
@comment subdir=devel/quirks cdrom=yes ftp=yes
@arch *
+DESC
@sha ZcShuBxD9cPsWmJce9rnoKKlC4qYQve7PwElfX/uk8Q=
@size 348
@cwd /usr/local
libdata/perl5/site_perl/OpenBSD/
libdata/perl5/site_perl/OpenBSD/Quirks.pm
@sha rZ7bZJTcao39CHGP1KntE/Ke78zggt5OvPVgljx+SsE=
@size 5817
: equal
No change in quirks-1.10
Update candidates: BitTorrent-4.4.0p6 - BitTorrent-4.4.0p6
parsing BitTorrent-4.4.0p6
Comparing full signature for BitTorrent-4.4.0p6 
BitTorrent-4.4.0p6,python-2.5.4p5 vs. BitTorrent-4.4.0p6,python-2.5.4p5: 
equal
No change in BitTorrent-4.4.0p6
Update candidates: ImageMagick-6.4.5.6 - ImageMagick-6.4.5.6p0
parsing ImageMagick-6.4.5.6p0
Direct dependencies for ImageMagick-6.4.5.6-ImageMagick-6.4.5.6p0 resolve to: 
libxml-2.7.6 transfig-3.2.5p0 tiff-3.8.2p5 ghostscript-8.63p7-gtk 
netpbm-10.26.64 png-1.2.41 lcms-1.18a libwmf-0.2.8.3p4 jasper-1.900.1p1 
jbigkit-1.6p1 bzip2-1.0.5 (todo: libxml-2.7.6- ghostscript-8.63p7-gtk- 
jasper-1.900.1p1- libwmf-0.2.8.3p4- tiff-3.8.2p5- lcms-1.18a- 
netpbm-10.26.64- jbigkit-1.6p1- png-1.2.41- bzip2-1.0.5- transfig-3.2.5p0-)
Update candidates: libxml-2.7.6 - libxml-2.7.6
parsing libxml-2.7.6
Comparing full signature for libxml-2.7.6 
libxml-2.7.6,c.53.1,iconv.6.0,libiconv-1.13p0,m.5.2,z.4.1 vs. 
libxml-2.7.6,c.53.1,iconv.6.0,libiconv-1.13p0,m.5.2,z.4.1: equal
No change in libxml-2.7.6
Update candidates: ghostscript-8.63p7-gtk - ghostscript-8.63p12-gtk
parsing ghostscript-8.63p12-gtk
Direct dependencies for ghostscript-8.63p7-gtk-ghostscript-8.63p12-gtk resolve 
to: jpeg-7 gtk+2-2.14.7p0 png-1.2.41 gettext-0.17p0 ijs-0.35 
ghostscript-fonts-8.11p2 libiconv-1.13p0 (todo: ijs-0.35- jpeg-7- 
ghostscript-fonts-8.11p2- gettext-0.17p0- libiconv-1.13p0- png-1.2.41- 
gtk+2-2.14.7p0-)
Update candidates: ijs-0.35 - ijs-0.35
parsing ijs-0.35
Comparing full signature for ijs-0.35 ijs-0.35 vs. ijs-0.35: equal
No change in ijs-0.35
Update candidates: jpeg-7 - jpeg-7
parsing jpeg-7
Comparing full signature for jpeg-7 jpeg-7,c.53.1 vs. jpeg-7,c.53.1: equal
No change in jpeg-7
Update candidates: ghostscript-fonts-8.11p2 - ghostscript-fonts-8.11p2
parsing ghostscript-fonts-8.11p2
Comparing full signature for ghostscript-fonts-8.11p2 
ghostscript-fonts-8.11p2 vs. ghostscript-fonts-8.11p2: equal
No change in ghostscript-fonts-8.11p2
Update candidates: gettext-0.17p0 - gettext-0.17p0
parsing gettext-0.17p0
Comparing full signature for gettext-0.17p0 
gettext-0.17p0,c.53.1,expat.9.0,iconv.6.0,libiconv-1.13p0,m.5.2,ncurses.11.0 
vs. 
gettext-0.17p0,c.53.1,expat.9.0,iconv.6.0,libiconv-1.13p0,m.5.2,ncurses.11.0: 
equal
No change in gettext-0.17p0
Update candidates: libiconv-1.13p0 - libiconv-1.13p0
parsing libiconv-1.13p0
Comparing full signature for libiconv-1.13p0 libiconv-1.13p0,c.53.1 vs. 
libiconv-1.13p0,c.53.1: equal
No change in libiconv-1.13p0
Update candidates: png-1.2.41 - png-1.2.41
parsing png-1.2.41
Comparing full signature for png-1.2.41 png-1.2.41 vs. png-1.2.41: equal
No change in png-1.2.41
Update candidates: gtk+2-2.14.7p0 - gtk+2-2.18.9
parsing gtk+2-2.18.9
Direct dependencies for gtk+2-2.14.7p0-gtk+2-2.18.9 resolve to: jpeg-7 
glib2-2.18.4p3 tiff-3.8.2p5 png-1.2.41 atk-1.24.0 shared-mime-info-0.60 
gettext-0.17p0 pango-1.22.4p0 hicolor-icon-theme-0.11p0 libiconv-1.13p0 (todo: 
hicolor-icon-theme-0.11p0- glib2-2.18.4p3- shared-mime-info-0.60- 
atk-1.24.0- pango-1.22.4p0- tiff-3.8.2p5-)
Update candidates: hicolor-icon-theme-0.11p0 - hicolor-icon-theme-0.11p0
parsing hicolor-icon-theme-0.11p0
Comparing full signature for hicolor-icon-theme-0.11p0 
hicolor-icon-theme-0.11p0 vs. hicolor-icon-theme-0.11p0: equal
No change in hicolor-icon-theme-0.11p0
Update candidates: glib2-2.18.4p3 - 

Re: Generic Discuss about CPU resource scheduling

2010-04-18 Thread Luis Useche
I don't think there is a way the operating system can detect how long is
going to last some particular process. Not even the compiler can do this.

This makes me remember of Turing's proof where there is no way to compute if
a program will terminate at some point or not.

Just my two cents.
Luis.

On Sun, Apr 18, 2010 at 9:35 AM, Aaron Lewis aaron.lewis1...@gmail.comwrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1


 Hi,
I'm reading Operating System Concepts (7th Edition) , Written by
 Abraham , Peter  Greg.

In chapter 5.3 , it talks about a schedule algorithm: SJF
SJF means shortest jobs schedules firstly.

To compare different process , thy use a process running time.

e.g
P1 takes 6 secs to run
P2 takes 3 seconds
P3 takes 10 secs

Then we should put those tasks in array like this:
P2 = P1 = P3

That looks much reasonable , but my question is , how does an OS
 know
 that a process will takes longer time to finish its life ?
I think it's impossible to let OS know exactly how long a process
 will
 take to run.


So far in my experience , i think there's a few ways to compare
 Process running time:

Forgive me if i have a poor experience on OS ;-)

I) Number of Loops in a Program , can be detected by compiler
As long as you have any loops , you are slower than any straight
 ahead
 program

II) Length of Program , longer code takes longer time sometimes ,
 not a
 good way.


Anyone wants to share some experience with me ?

Be very glad to hear your voice ;-)



 - --
 Best Regards,
 Aaron Lewis - PGP: 0x4A6D32A0
 FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
 irc: A4r0n on freenode
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkvLCq4ACgkQvf41sEptMqB/tgCgickA4qHtRxw7TpkAIi6ghHbz
 x+kAoKaMkC0FU7NLioMw1hvhEuOvifO/
 =S080
 -END PGP SIGNATURE-



Re: problem with microsoft arc mouse

2010-03-19 Thread Luis Useche
I had a similar problem a couple of months back. At the end, I decided to
buy another mouse (Logitech). In case it is helpful, this is the archival of
the mail thread: http://marc.info/?l=openbsd-miscm=124864549827787w=2

Luis

On Fri, Mar 19, 2010 at 2:29 PM, Benoit Chesneau bchesn...@gmail.comwrote:

 Hi,

 To remove wires on my desk i decided to test the micosoft arc mouse
 with openbsd. Seem the system is able to recognize it :

 uhidev4 at uhub7 port 2 configuration 1 interface 0 Microsoft
 Microsoft\M-. 2.4GHz Transceiver v5.0 rev 2.00/1.40 addr 2
 uhidev4: iclass 3/1, 23 report ids
 ums1 at uhidev4 reportid 17: 5 buttons, Z dir


 But i've no cursor in X11 even if it seems to find it :

 (**) Option Protocol wsmouse
 (**) Mouse0: Protocol: wsmouse
 (**) Option CorePointer
 (**) Mouse0: always reports core events
 (**) Option Device /dev/wsmouse
 (==) Mouse0: Emulate3Buttons, Emulate3Timeout: 50
 (**) Option ZAxisMapping 4 5 6 7
 (**) Mouse0: ZAxisMapping: buttons 4, 5, 6 and 7
 (**) Mouse0: Buttons: 11
 (II) XINPUT: Adding extended input device Mouse0 (type: MOUSE)
 (**) Mouse0: (accel) keeping acceleration scheme 1
 (**) Mouse0: (accel) filter chain progression: 2.00
 (**) Mouse0: (accel) filter stage 0: 20.00 ms


 did I missed smth? xorg.conf is here :

 http://friendpaste.com/1Rc4j5nDNK3290fQl8PUDy

 - benont



Re: Mini PCI Wireless Card

2010-01-11 Thread Luis Useche
I'm using an Intel PRO/Wireless 3945ABG successfully.

Luis



On Mon, Jan 11, 2010 at 9:25 PM, Benjamin Adams freebsdwo...@gmail.com wrote:
 Anyone know a good card with 4.6 support?
 Thanks

 Ben



Re: pkg_clean: a utility to remove Lola packages

2009-12-28 Thread Luis Useche
This sounds very similar to a patch I wrote for pkg_delete some time
back. The new added -r option seems to offer the same functionality
you are proposing here.

In case this is useful for you somehow, I wrote a complete page about
it:
http://users.cis.fiu.edu/~lusec001/moin.cgi/Software/OBSD_Recursive_pkg_del

Hope this helps someone,
Luis



On Sun, Dec 27, 2009 at 7:25 PM, Andris adelf...@gmail.com wrote:
 pkg_clean helps to delete Lola packages.

 A package is said to be Lola only if:

 1. It's unneeded by other packages.
 2. It's unwanted by the root user.

 If a package that was deleted needed _now_ Lola packages, pkg_clean
 will also help deleting them. This is usual when a package uses
 libraries unneeded by other packages. Each run request a list of
 unneeded packages to pkg_info -t. After each iteration of unwanted
 packages of that list, pkg_info -t is called again, and the whole
 process starts again. So it's usual to see a run that goes: A-Z, then
 M, A, X, B, etc., where each letter is the first letter of a package
 name.

 pkg_clean asks the user if he/she wants to delete each Lola package.
 For example:

 --

 Delete amsn-0.97.2p1? (l, n, YES): [n]

 l:
 list package files

 n:
 don't delete the package, add it to the exception list instead

 YES:
 delete the package

 --

 pkg_clean writes its exception list to /etc/pkg_clean.conf. If the
 name of the utility is changed, so will change the name of this file.

 The exception list can be cleared by calling: pkg_clean -c. This also
 starts pkg_clean in interactive mode.

 The exception list won't be useful if a package is updated, since it
 has the package name, including its version. I haven't added a feature
 to be able to treat an updated package just as an non-updated package,
 so pkg_clean will ask for each package-1.0, package-1.0p0,
 package-1.0p1. This is mainly because packages-specs(7) does not rule
 out the possibility that a version from upstream can't match
 p[[:digit:]]+$.

 --

 Please feel free to report any bug, or request any feature. Any
 comment of the shell script itself is well received. Even if I could
 manage to write it, doesn't hurt to know whenever something could be
 written in a better way. Better if any change would me it eligible to
 be part of base :P

 --

 In case you remember, this are the previous versions of the tool:

 http://article.gmane.org/gmane.os.openbsd.misc/105917
 http://article.gmane.org/gmane.os.openbsd.misc/105964
 http://article.gmane.org/gmane.os.openbsd.misc/106012

 None of them is now supported.

 --

 #!/bin/sh

 # Copyright 2006, 2007, 2008, 2009 Andris Delfino adelf...@gmail.com

 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
 # copyright notice and this permission notice appear in all copies.

 # THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

 util_name=${0##*/}
 conf_pathname=/etc/${util_name}.conf

 clean_conf=0
 show_usage=0

 while getopts ':c' ch; do
case ${ch} in
(c)
clean_conf=1
;;
(*)
show_usage=1

break
# NOTREACHED
;;
esac
 done

 if [ ${show_usage} -eq 1 ]; then
printf 'usage: %s [-ch]\n' ${util_name} 2

exit 1
 fi

 if ! [ `id -u` -eq 0 ]; then
printf '%s must be run as root\n' ${util_name} 2

exit 2
 fi

 if ! [ -e ${conf_pathname} ] || [ ${clean_conf} -eq 1 ]; then
printf ''  ${conf_pathname}
 fi

 while true; do
# Note: this does't work flawlessly, some ports are identified by
 their version (autoconf, python)
# packages=`pkg_info -At | cut -d ' ' -f 1 | sed 's/-[^-]\{1,\}$//'
|
 grep -f ${conf_pathname} -vx`

# Note: this doesn't work flawlessly either, since package updates
 will render the exception list useless
packages=`pkg_info -At | cut -d ' ' -f 1 | grep -f ${conf_pathname}
-vx`

if [ -z ${packages} ]; then
printf '%s: no unwanted packages to delete\n' ${util_name}
2

break
fi

for package in $packages; do
while true; do
printf 'Delete %s? (l, n, YES): [n] ' ${package}
2

read

case ${REPLY} in
(l)
pkg_info -Lq ${package} | less

Re: asynchronous I/O

2009-12-04 Thread Luis Useche
On Fri, Dec 4, 2009 at 12:07 AM, Ted Unangst ted.unan...@gmail.com wrote:
 On Thu, Dec 3, 2009 at 11:47 PM, Dope Ice Apollyon the Third
 kou...@gmail.com wrote:
 On Thu, Dec 3, 2009 at 10:57 PM, Luis Useche use...@gmail.com wrote:
 Hi Guys,

 I have been looking for information on how to do asynchronous I/Os in
 OBSD with no luck. The only thing I have found so far is the O_ASYNC
 flag in the fcntl syscall. I couldn't find any manual that talks about
 this. Is this functionality included in OBSD?. If so, where can I find
 information?


 Well, open(2) mentions If the O_SYNC flag is set, all I/O operations
 on the file will be done synchronously., so I suppose we're supposed
 to assume the default is O_ASYNC. But I suspect what you're really
 looking for is select(2).

 He's probably looking for aio_read and aio_write and such, but as one
 can tell by the absence of man pages, they don't exist here.

Exactly, I am more interested more in something close to aio_read 
aio_write. I was hoping there was some api I can use. Is there any
reason why POSIX aio does not exist in OBSD? Security reasons maybe?

Luis.



Re: asynchronous I/O

2009-12-04 Thread Luis Useche
Iguess the short answers is that it is not implemented and probably it won't.

There are certain applications that would certainly benefit from aio.
The one I can think of (it is the one I use the most) is I/O trace
replay. But I am sure that there are plenty of applications that can
benefit from this facility.

It is true that aio can be easily implemented having an I/O handler
thread. But it is always nice to have a library that do it for you ;)

Thanks for your responses,
Luis

On Fri, Dec 4, 2009 at 5:45 PM, Ted Unangst ted.unan...@gmail.com wrote:
 On Fri, Dec 4, 2009 at 4:45 PM, Todd T. Fries t...@fries.net wrote:
 Does aio really require threading?

 In some sense, yes, in others, no.  aio is designed so you don't need
 (userland) threads.

 Normally you'd write your server to use non-blocking io.  But that
 doesn't work with files on disk.  How can it?  With network sockets,
 you have somebody on the other end pushing data into your pipe which
 the kernel buffers.  But the file system isn't going to read stuff
 from disk until you ask for it, there's no somebody else pushing
 data at you.  That's what aio is for.  It starts up a disk request
 without waiting for it.  Then you can come back and get the result.
 Think of it as preemptive polling.  Instead of calling select()/poll()
 to find out what's _ready_ for io, you call aio and then later it
 tells you what's _done_ with io.

 A normal implementation would be purely kernel based, with a few new
 syscalls.  But the kernel would still need to keep track of all the
 buffers and io requests.  So at that level, there's still something
 resembling threading.

 This is all fairly easy to fake in userland.  When somebody calls
 aio_read(), just spin up a thread that calls read() until done.  The
 main process goes on with its work, magic happens in the background.
 Of course, this requires the ability for one thread to execute while
 another is blocked, which the uthreads implementation we have doesn't
 have.



asynchronous I/O

2009-12-03 Thread Luis Useche
Hi Guys,

I have been looking for information on how to do asynchronous I/Os in
OBSD with no luck. The only thing I have found so far is the O_ASYNC
flag in the fcntl syscall. I couldn't find any manual that talks about
this. Is this functionality included in OBSD?. If so, where can I find
information?

Thanks in advance,
Luis



Re: Audio seems correct but it doesn't sound (azalia)

2009-11-22 Thread Luis Useche
Hi Jacob,

You sent me this patch a couple of months ago. After I upgraded my
system to 4.6 I had the same problem as before. After I tried to apply
this patch I realized that the file is different now. I made the
appropriate changes and now the sound works again. Here is the new
patch.

--- dev/pci/azalia_codec.c  Sun Jun 28 11:32:32 2009
+++ /usr/src/sys/dev/pci/azalia_codec.c Thu Oct 22 23:04:28 2009
@@ -246,7 +246,8 @@
break;
case 0x83847616:
this-name = Sigmatel STAC9228X;
-   if (this-subid == 0x02271028) {/* DELL_V1400 */
+   if (this-subid == 0x02271028||
+   this-subid == 0x01f31028) {/* DELL_V1400 */
this-qrks |= AZ_QRK_GPIO_UNMUTE_2;
}
break;

Best,
Luis



On Sat, Aug 1, 2009 at 8:34 PM, Jacob Meuser jake...@sdf.lonestar.org
wrote:
 thanks.

 the following should apply to src/sys/dev/pci/azalia_codec.c for OpenBSD
 4.5 (azalia_codec.c r1.114).

 please let me know if this fixes the issue.

 --
 jake...@sdf.lonestar.org
 SDF Public Access UNIX System - http://sdf.lonestar.org

 Index: azalia_codec.c
 ===
 RCS file: /cvs/src/sys/dev/pci/azalia_codec.c,v
 retrieving revision 1.114
 diff -u azalia_codec.c
 --- azalia_codec.c  24 Jan 2009 09:44:02 -  1.114
 +++ azalia_codec.c  2 Aug 2009 01:30:50 -
 @@ -64,6 +64,7 @@
  #define IDT92HD71B7_DELL_E6500 0x024f1028
  #define SIGMATEL_STAC9228X 0x83847616
  #define STAC9228X_DELL_V1400   0x02271028
 +#define STAC9228X_DELL_I1400   0x01f31028

  intazalia_generic_codec_init_dacgroup(codec_t *);
  intazalia_generic_codec_fnode(codec_t *, nid_t, int, int);
 @@ -2227,7 +2228,9 @@
if (this-vid == REALTEK_ALC880  this-subid ==
ALC880_MEDION_MD95257) {
azalia_gpio_unmute(this, 1);
}
 -   if (this-vid == SIGMATEL_STAC9228X  this-subid ==
STAC9228X_DELL_V1400) {
 +   if (this-vid == SIGMATEL_STAC9228X 
 +   (this-subid == STAC9228X_DELL_V1400 ||
 +   this-subid == STAC9228X_DELL_I1400)) {
azalia_gpio_unmute(this, 2);
}
return 0;



Re: kern.bufcachepercent

2009-11-04 Thread Luis Useche
On Tue, Nov 3, 2009 at 11:44 PM, Bob Beck b...@ualberta.ca wrote:
 2009/11/3 Luis Useche use...@gmail.com:


 I read in the 4.6 changelog that his was part of the release.

 Am I missing something? Do I have to recompile? Or this is just a bug?

 Yeah you are missing something. Listen to the *whole* presentation and
 read the *whole* changelog. This is *not* in 4.6

 It is in current.

OK. Sorry for the noise. In any case, this change is in the 4.6
changelog (twice, http://www.openbsd.org/plus46.html):

Added dynamic buffer cache sizing. The sysctl kern.bufcachepercent
will allow you to specify a high-water mark above 10 percent for use
by the cache. If you run low on memory, the page daemon will reclaim
pages from the buffer cache. 

Added a kern.bufcachepercent sysctl(8) to allow adjusting the buffer
cache size on a running system.

Moreover it is also in the sysctl(8) manual: kern.bufcachepercent
   integer   yes

If all I am saying is wrong, sorry again. I just think this would be
an error in the documentation worth to take into account.

Luis.



Re: kern.bufcachepercent

2009-11-04 Thread Luis Useche
Maurice: Thanks for pointing that out.

Bob: At this point this is probably irrelevant. In any case, I found
it in the officiel webpage http://www.openbsd.org/plus46.html.

Thanks for your help!
Luis



On Wed, Nov 4, 2009 at 10:42 AM, Bob Beck b...@openbsd.org wrote:
 I don't know what version of plus46.html you are looking at - but that
 text doesnt' appear in any version I look at.

 Of course it is in the cvs commit log, but that's not the same thing.
 That same commit was backed out before 4.6 - and has since gone back
 into current.

 2009/11/4 Luis Useche use...@gmail.com:
 On Tue, Nov 3, 2009 at 11:44 PM, Bob Beck b...@ualberta.ca wrote:
 2009/11/3 Luis Useche use...@gmail.com:


 I read in the 4.6 changelog that his was part of the release.

 Am I missing something? Do I have to recompile? Or this is just a bug?

 Yeah you are missing something. Listen to the *whole* presentation and
 read the *whole* changelog. This is *not* in 4.6

 It is in current.

 OK. Sorry for the noise. In any case, this change is in the 4.6
 changelog (twice, http://www.openbsd.org/plus46.html):



kern.bufcachepercent

2009-11-03 Thread Luis Useche
Hi Guys,

Today I watched the presentation by Bob Beck about the OpenBSD VFS
hacking where he talked about the buffer cache and how it recently
changed (among many other things). Following his advice, I tried to
increase my buffer cache size with no success. The commands I am
running:

$ sysctl kern.bufcachepercent
kern.bufcachepercent=0
$ sudo sysctl -w kern.bufcachepercent=90
kern.bufcachepercent: 0 - 90
$ sysctl kern.bufcachepercent
kern.bufcachepercent=0

I read in the 4.6 changelog that his was part of the release.

Am I missing something? Do I have to recompile? Or this is just a bug?

Thanks in advance,
Luis



mmap'ing to address 0x0

2009-10-09 Thread Luis Useche
Hi Guys,

I was reading some information that indicated that letting user
process to map to address 0x0 can exploit some kernel NULL-pointer
bugs. I checked how different operating systems mitigate this problem
and I found information about Linux and FreeBSD. I was trying to find
the same information for OpenBSD with no luck. Can anybody help me
with this one?

Thanks in advance,
Luis



Re: SSD performace

2009-09-12 Thread Luis Useche
Luis



On Fri, Sep 11, 2009 at 10:51 PM, Ted Unangst ted.unan...@gmail.com wrote:
 On Fri, Sep 19, 2008 at 1:11 AM, Aaron Stellman openbsd-m...@x96.org
wrote:
 Since the prices on SSD are falling I'm thinking about aquiring one.
 Before I do that however, I'd like to see some quantified benchmarks.
 I'd really appreciate if anyone could comment on perfomance figures and
 maybe even send results of bonnie/bonnie++ benchmark on any SSD drive
 on OpenBSD.

 Depends on what you're doing (reading vs writing vs seeking), but
 here's one example.  With an Intel X25 SSD, a cvs checkout from /cvs
 on the same disk is basically CPU bound.  With sync mounts, no
 softdep.



A paper with good insights on SSDs is Understanding intrinsic
characteristics and system implications of flash memory based solid
state drives published on SIGMETRICS.

Luis



Re: OpenBSD hacking

2009-09-11 Thread Luis Useche
On Fri, Sep 11, 2009 at 4:29 AM, Edd Barrett vex...@gmail.com wrote:
 On Thu, Sep 10, 2009 at 4:32 PM, Luis Useche use...@gmail.com wrote:
 Edd: I haven't seen anything like a snapshot in FFS. I think snapshots
 come really unnatural to FFS-like file systems.

 NetBSD and FreeBSD have them :)

I found it. You were right. It looks nice. However, it is somewhat
limited. It can only perform a maximum of 20 snapshots. It is a matter
of take a look to the implementation and see if there is some
workaround.

 This is usually
 implemented in COW file systems. For this reason, I was also thinking
 on porting LFS from NetBSD and include the snapshoting functionality.
 But again, I thought this could probably be somewhat complicated. It
 could be a future project though.

 I very much doubt anyone would want to switch from FFS. Keep it simple.

This can be a subject of discussion, but you are probably right.

Luis.



Re: mutt: xterm_title conf var

2009-09-10 Thread Luis Useche
I don't know if this solve your problem or you already did this, but
you need to set the xterm in order to have colors for manuals or vim.
Read from FAQ How do I get color man pages on XTerm?.

Luis



On Thu, Sep 10, 2009 at 3:43 AM, Bernd 'Siggy' Brentrup b...@xlab.net wrote:
 Hi List,

 I'm absolutely new to openbsd so please bear with me if it's not
 the right place to ask my question.  The box I installed 4.5 will
 be running headless so I'm logged in remotely on a color xterm.

 I rsynced mutt configuration from my Ubuntu box because it's also
 running mutt 1.5.18,  most things work out as expected except for
 lack of colors, missing threading and convenient confvars
 xterm_set_titles and xterm_title that I use to display status
 information in the xterm title.

 I'll investigate the first 2 quirks later, as for ther xterm stuff
 my question is did you leave these out on purpose, they are missing
 in your muttrc(5) too (if so why) or should I check Ubuntu's resp.
 Debian's source code to see if they patched mutt.

 Thanks
  Siggy
 --
 O ascii ribbon campaign - stop html mail - www.asciiribbon.org+
 |36 days until|Open Source in Northern Germany: www.free-it.org|
 |www.Ubucon.de|tech contact: bsb-at-free-dash-it-dot-de|
 +--- ceterum censeo javascriptum esse restrictam +



Re: OpenBSD hacking

2009-09-10 Thread Luis Useche
Thank you all for your suggestions. I will respond by names.

Jesus: I sent this email to this list because is the only contact I
know to the OBSD developers. Are there other list more appropriate for
my question?

Claudio: I don't think FS2 assumptions are completely out-dated. If
this were true, many of the file systems and I/O schedulers
optimizations based on locality would not work (I guess this is a
discussion for another thread). I thought about the Journaling for FFS
before but I felt it was too complicated for an initial kernel
project; maybe I'm wrong. In any case, I will find out more about
this. Thanks.

David: Sure, it does not matter if it is not FS2 related. We can talk
by email or through the misc list, whichever you prefer.

Edd: I haven't seen anything like a snapshot in FFS. I think snapshots
come really unnatural to FFS-like file systems. This is usually
implemented in COW file systems. For this reason, I was also thinking
on porting LFS from NetBSD and include the snapshoting functionality.
But again, I thought this could probably be somewhat complicated. It
could be a future project though.

Jonathan: Again, this is journaling for FFS. I guess same comments for
Claudio apply to you.

Thanks,

Luis



OpenBSD hacking

2009-09-09 Thread Luis Useche
Hi Guys,

I am having some time free soon and I feel like doing some hacking in
the OpenBSD kernel. I would like to work in the I/O stack. I would
prefer something easy to do to get introduced to the kernel. I was
thinking on implementing a simplified version of FS2
(http://citeseerx.ist.psu.edu/showciting?doi=10.1.1.125.4078). This
project would increase performance and reduce power consumption. I
have a couple of question:

1. I would like to know if that project is interesting to the
community. After all, I would prefer to spend my time in something
useful. If not, any other suggestion for project?
2. Any suggestion to get introduced to the kernel easily? Any advice?
I already have the 4.4BSD design and implementation book.

Luis



Re: printer problem

2009-08-21 Thread Luis Useche
Don't you need a filter for your printer?

In my case, my /etc/printcap looks something like:

lp|home:\
:lp=/dev/ulpt0:\
:af=/etc/foomatic/HP-DeskJet_F4100-hpijs.ppd:\
:if=/usr/local/bin/foomatic-rip:\
:sd=/var/spool/output:\
:lf=/var/log/lpd-errs:

With the foomatic-rip filter.

Luis


2009/8/21 igor denisov denisovigor1...@rambler.ru:
 Hi there,

 I have a problem with Samsung ML-2015

 /etc/printcap

 lp|local printer|ML2015:\
:lp=/dev/lpt0:\
:sd=/var/spool/output:\
:lf=/var/log/lpd-errs:

 rc.conf

 lpd_flags=

 ps ax | grep lpd
 114 ?? Is 0:00.00 lpd
 25472 S+ 0:00.00 grep lpd

 Run

 #lptest 70 5 | lpr -PML2015

 LCD blincks, printer sounds promising and no any output at all.

 Regards,
 Igor.

 --
 igor denisov.

 --
 Internet Explorer 8 - sqjnphrek| hmrepmer`! http://ie.rambler.ru/



Re: Delete packages with dependencies

2009-08-19 Thread Luis Useche
Do I have to do something else here? It seems like this discussion
cooled down a bit. Is the patch in review? Is the patch been
considered for inclusion? Are there any changes I can do to make more
suitable for inclusion? I don't exactly how these things work and if I
followed the regular path to submit the patch.

Thanks,

Luis



On Sat, Aug 15, 2009 at 8:52 AM, Marc Espiees...@nerim.net wrote:
 On Wed, Aug 05, 2009 at 03:59:42PM -0400, Stephen Takacs wrote:
 That might be a solution if you're stricly using package/ports.  But
 consider what happens when you manually build and install other programs
 that came in the form of plain old source code tarballs (make  make
 install, etc.)  Most of these programs will have library dependencies
 and some of those libraries will have already been installed as
 dependencies of official packages.  If you remove the whole shebang (a
 package and all its unique deps) then your custom-built programs won't
 find some of their libs anymore...

 That's on my todo list, at some point I'll nove some of the library
detection
 code from ports to source so that you can easily record manually installed
 stuff and not remove useful packages and libraries by mistake.

 There is a plan. That part is the missing piece. Also, making sure
 manual-installation is properly recorded. Then trimming outdated
dependencies
 (and more importantly, old .libs that are no longer in use) becomes rather
 simple.

 BUT you need to have a *simple* way to mesh code compiled outside of the
ports
 framework first...

 This is moving slowly, because, as usual when dealing with packages, full
 satisfying answers are hard to come by. 99% of the solution is not good
enough.



Re: Books on File Systems and File System Programming

2009-08-13 Thread Luis Useche
I can recommend some papers and books I know for theory as well as
programming.

Papers (you can find them on the internet):
A fast file system for UNIX by McKusick, a clasic one.
The design and implementation of the Log-structured File System by
Rosenblum
An Implementation of a Log- Structured File System for UNIX by Seltzer

Books (you have to buy them):
The Design and Implementation of the 4.4 BSD Operating System: A classic
one.
UNIX Filesystems: Evolution, Design, and Implementation: I have not
read this one much but it seems relevant to what you are looking for.

In case you are interested in books for other operating systems, Linux
has a couple as well:

Understanding the Linux Kernel
Linux kernel development by Love

Hope this helps.

Luis Useche
use...@gmail.com

On Thu, Aug 13, 2009 at 9:11 AM, Siju Georgesgeorge...@gmail.com wrote:
 Hi,

 Could Some one recommend good books on  File Systems and File System
 Programming Please?

 Thanks

 Siju



AHCI and NCQ

2009-08-12 Thread Luis Useche
Hi Guys,

How do I check if my system is successfully using the NCQ capabilities
of my SATA controller? I know I have and AHCI compliant controller and
it also supports NCQ. Unfortunately, I don't see any message (dmesg)
of the system saying that I have my NCQ enable. The manual of the ahci
driver does not say much either.

Thanks in advance,

Luis Useche
use...@gmail.com



Re: Delete packages with dependencies

2009-08-08 Thread Luis Useche
There a couple of things I forgot to mention.

I found that a package can be marked as 'manually installed' if
'pkg_add' is ran with the name of the package, even though it is
already installed. Likewise, 'pkg_add -a' will set the package as
'automatically installed'.

It is a good idea to check first the packages that the option '-r'
will delete from the system. This can be done with 'pkg_delete -nr'.
If you don't want some packages deleted, you should mark them as
manually installed with 'pkg_add' and re-try the pkg_delete command to
review again.

One way of partially solving the previous problem is to mark the
packages in the 'pristine' system as manually installed. Just after
installing the system, running something like: pkg_add `pkg_info -t`.
This will ensure that the '-r' option will not remove those packages
as dependency of other. This looks a like a 'hack' and not elegant but
if you think of the 'manual installed' bit more as 'used by the user'
(as opposed to 'used as dependency to a software') this makes more
sense.

Luis.

On Sat, Aug 8, 2009 at 12:48 AM, Luis Usecheuse...@gmail.com wrote:
 I have the first attempt of the dependencies deletion option. I
 modified 'pkg_delete' to include an option -r that perform this task.

 The main idea is to traverse the graph of package dependencies with
 some kind of bfs algorithm. The queue is initialized with the original
 packages to be removed. Packages that have not dependents and were not
 manually installed are added to the bfs queue for exploration. This is
 repeated until the queue for exploration is empty.

 Below you can find the patch. My perl-fu is not very good so I am not
 sure if this is the right way of doing things. Another thing is that I
 developed this for OpenBSD 4.5 and I don't have a box with the
 'current' branch; if somebody can test it for 4.6 that could help.

 Of course, I would like to know your thoughts about it.

 41c41
  our ($opt_v, $opt_D, $opt_d, $opt_n, $opt_q, $opt_p, $opt_c, $opt_L,
 $opt_B, $opt_I, $opt_i, $opt_x);
 ---
 our ($opt_v, $opt_D, $opt_d, $opt_n, $opt_q, $opt_p, $opt_c, $opt_L,
$opt_B, $opt_I, $opt_i, $opt_x, $opt_r);
 46c46
getopts('vchixDdnf:F:qpS:L:B:I',
 ---
   getopts('vchixDdnf:F:qpS:L:B:Ir',
 158a159,191
 }

 if($opt_r) {
   # calculate dependencies to be removed:
   # 1. Not installed manually
   # 2. Not dependecy for other package

   # bfs over the graph of packages
   my @q = @todo;  # queue of bfs
   @todo = (); # the new todo will include previous
   # and dependecies packages

   while(@q) {
   my $pkg = pop @q;

   # pkg to delete
   unshift (@todo, $pkg);

   for my $dep (OpenBSD::Requiring-new($pkg)-list) {
   my @dependents =
OpenBSD::RequiredBy-compute_closure($dep);

   # calculate @dependen...@q-@todo. We don't care about
the
   # packages that will be removed anyway.
   my %qh = map {($_, 1)} @q;
   my %todoh = map {($_, 1)} @todo;
   @dependents = grep {not($qh{$_} or $todoh{$_} or ($_
eq $dep))} @dependents;

   # check if $dep was manually installed
   my $manual =
OpenBSD::PackingList-from_installation($dep)-has('manual-installation');

   unshift (@q, $dep) unless (@dependents or $manual);
   }
   }



Re: Delete packages with dependencies

2009-08-07 Thread Luis Useche
I have the first attempt of the dependencies deletion option. I
modified 'pkg_delete' to include an option -r that perform this task.

The main idea is to traverse the graph of package dependencies with
some kind of bfs algorithm. The queue is initialized with the original
packages to be removed. Packages that have not dependents and were not
manually installed are added to the bfs queue for exploration. This is
repeated until the queue for exploration is empty.

Below you can find the patch. My perl-fu is not very good so I am not
sure if this is the right way of doing things. Another thing is that I
developed this for OpenBSD 4.5 and I don't have a box with the
'current' branch; if somebody can test it for 4.6 that could help.

Of course, I would like to know your thoughts about it.

41c41
 our ($opt_v, $opt_D, $opt_d, $opt_n, $opt_q, $opt_p, $opt_c, $opt_L,
$opt_B, $opt_I, $opt_i, $opt_x);
---
 our ($opt_v, $opt_D, $opt_d, $opt_n, $opt_q, $opt_p, $opt_c, $opt_L, $opt_B, 
 $opt_I, $opt_i, $opt_x, $opt_r);
46c46
   getopts('vchixDdnf:F:qpS:L:B:I',
---
   getopts('vchixDdnf:F:qpS:L:B:Ir',
158a159,191
 }

 if($opt_r) {
   # calculate dependencies to be removed:
   # 1. Not installed manually
   # 2. Not dependecy for other package

   # bfs over the graph of packages
   my @q = @todo;  # queue of bfs
   @todo = (); # the new todo will include previous
   # and dependecies packages

   while(@q) {
   my $pkg = pop @q;

   # pkg to delete
   unshift (@todo, $pkg);

   for my $dep (OpenBSD::Requiring-new($pkg)-list) {
   my @dependents = 
 OpenBSD::RequiredBy-compute_closure($dep);

   # calculate @dependen...@q-@todo. We don't care about 
 the
   # packages that will be removed anyway.
   my %qh = map {($_, 1)} @q;
   my %todoh = map {($_, 1)} @todo;
   @dependents = grep {not($qh{$_} or $todoh{$_} or ($_ eq 
 $dep))} @dependents;

   # check if $dep was manually installed
   my $manual = 
 OpenBSD::PackingList-from_installation($dep)-has('manual-installation');

   unshift (@q, $dep) unless (@dependents or $manual);
   }
   }



Re: Delete packages with dependencies

2009-08-06 Thread Luis Useche
On Wed, Aug 5, 2009 at 10:23 PM, Jacob Meuserjake...@sdf.lonestar.org
wrote:
 some further thoughts ...

 On Thu, Aug 06, 2009 at 01:32:07AM +, Jacob Meuser wrote:
 On Wed, Aug 05, 2009 at 06:58:48PM -0400, Luis Useche wrote:
  On Wed, Aug 5, 2009 at 3:59 PM, Stephen Takacsperl...@gmail.com wrote:
   Luis Useche wrote:
   It seems like an additional information should be added to the
package
   database. A bit indicating if the package was installed manually by
   the user (admin?) or not.

 this presumably already happens.  from pkg_add(1):

  -a  Automated pakages installations; do not record packages as in-
  stalled manually.

This is a good finding. I didn't realize that was there.

 it might be useful if:

 1) pkg_info could display what packages were manually installed
   (pkg_info -m ?)
 2) `pkg_add foo-1.0' when foo-1.0 is already installed as a dependency
   of some other package, would mark foo-1.0 as manually installed
 3) pkg_info could display packages that aren't required by any other
   packages and aren't manually installed (pkg_info -t -m ?)

 I guess I should now go look at the sources and see what exactly
 `pkg_add -a' does ...

I took a quick look to the sources and -a seems to do nothing (as well
as -q, Am I missing something?). I don't know if you find something
different. (I am looking the last version from cvsview)

Then, the package can only be deleted if the
   the user explicitly say so as oppose to automatic deletion as
   dependency.

 *maybe* an option for pkg_delete to stop it from deleting packages
 that are marked as manually installed would be useful, but it shouldn't
 be default behaviour, imo.

That is fine as long as the option exists, I guess.

Luis.



Re: Delete packages with dependencies

2009-08-06 Thread Luis Useche
 find /var/db/pkg -name \+CONTENTS -exec grep manual-installation {} /dev/null 
 \;

Then the information does exist. This is good. The only thing missing
now is the script that use this information for dependencies deletion.
I'll see what I can do.

Luis.



Re: Delete packages with dependencies

2009-08-05 Thread Luis Useche
On Wed, Aug 5, 2009 at 3:59 PM, Stephen Takacsperl...@gmail.com wrote:
 Luis Useche wrote:
 It seems like an additional information should be added to the package
 database. A bit indicating if the package was installed manually by
 the user (admin?) or not. Then, the package can only be deleted if the
 the user explicitly say so as oppose to automatic deletion as
 dependency.

 That might be a solution if you're stricly using package/ports.  But
 consider what happens when you manually build and install other programs
 that came in the form of plain old source code tarballs (make  make
 install, etc.)  Most of these programs will have library dependencies
 and some of those libraries will have already been installed as
 dependencies of official packages.  If you remove the whole shebang (a
 package and all its unique deps) then your custom-built programs won't
 find some of their libs anymore...


It is really have to solve those twisted cases. I think the 'manually
installed' bit can solve most of the 'safe deletion' problems and can
be very useful.

In your hypothetical case, when you install those libraries to be able
to compile your third-party application, the package will be
automatically marked as 'manually installed', meaning that it can only
be removed if you explicitly say so.

One thing I forgot to mention before is that I have used a couple of
package managers that support this functionality and it works very
well in my experience. It can successfully solve most of the of safely
deletion packages with its dependencies.

Luis Useche
use...@gmail.com



Re: Delete packages with dependencies

2009-08-05 Thread Luis Useche
On Wed, Aug 5, 2009 at 9:32 PM, Jacob Meuserjake...@sdf.lonestar.org wrote:
 On Wed, Aug 05, 2009 at 06:58:48PM -0400, Luis Useche wrote:
 On Wed, Aug 5, 2009 at 3:59 PM, Stephen Takacsperl...@gmail.com wrote:
  Luis Useche wrote:
  It seems like an additional information should be added to the package
  database. A bit indicating if the package was installed manually by
  the user (admin?) or not. Then, the package can only be deleted if the
  the user explicitly say so as oppose to automatic deletion as
  dependency.
 
  That might be a solution if you're stricly using package/ports.  But
  consider what happens when you manually build and install other programs
  that came in the form of plain old source code tarballs (make  make
  install, etc.)  Most of these programs will have library dependencies
  and some of those libraries will have already been installed as
  dependencies of official packages.  If you remove the whole shebang (a
  package and all its unique deps) then your custom-built programs won't
  find some of their libs anymore...
 

 It is really have to solve those twisted cases. I think the 'manually
 installed' bit can solve most of the 'safe deletion' problems and can
 be very useful.

 I think the person who installed the packages should keep a list of
 what packages they want and compare that to `pkg_info -t`.

My point is that the system should (semi?)automatically create this
list for you.

 In your hypothetical case, when you install those libraries to be able
 to compile your third-party application, the package will be
 automatically marked as 'manually installed', meaning that it can only
 be removed if you explicitly say so.

 not if the libraries were installed as dependenies of some other package.

 that's why this whole record what was intentionaly installed thing
 just won't work as well as you think.

You can re-install the package you want and that won't be deleted anymore.

 One thing I forgot to mention before is that I have used a couple of
 package managers that support this functionality and it works very
 well in my experience. It can successfully solve most of the of safely
 deletion packages with its dependencies.

 if you know what packages you want, comparing that list with what's
 installed is easy.

 here's a simple scenario:

 1) install OBSD
 2) pkg_add kdebase
 3) pkg_delete --delete-all-dependencies-I-did-not-specifically-add kdebase
 4) pkg_add gnome-desktop

 that would delete and re-add numerous pakages.  entirely wasteful.

I see this as a really unlikely scenario. Besides, it probably will
take more time but you won't have unecessary files you don't need in
your system. This could be translated into more space consumed,
increased fsck times and probably slower file system (the ffs
allocation has less flexibility). If you have a really huge disk,
probably you don't care. In my specific case is not about the space
but rather to have a clean file system.


 I often intentionally first pkg_add the package I want that brings in
 the most dependencies (many of which I do want, even if they were not
 dependencies), because it's easier than specifying all the dependencies.

This can be easily solvable by adding a option: mark all the
dependencies as manually installed.

 the only way what you suggest could be really useful is if there were a
 way to whitelist installed packages.  but isn't it just as easy to
 keep track of what packages you know you want and compare that to
 `pkg_info -t`?

We can add options as I previously suggested to build your own
whitelist but automatically.

Luis.



Delete packages with dependencies

2009-08-04 Thread Luis Useche
Hello Guys,

I was wondering if there is some tool that delete the packages
specified along with their deletable dependencies. Deletable means
packages that pkg_add added automatically (as dependencies of the
installed one) and are not dependency of another package. This will
ensure (in most of the cases) that you don't end up with a system with
unnecessary packages.

I couldn't find in pkg_delete(1) any option that implements the
previous semantic.

Best,
Luis Useche
use...@gmail.com



Re: wpi and firmware error

2009-08-04 Thread Luis Useche
I downgraded the firmware to version 3.1 and so far the problem is gone.

Luis Useche
use...@gmail.com

On Sun, Aug 2, 2009 at 9:16 PM, Matthew Szudzikmszud...@andrew.cmu.edu
wrote:
 On Sun, Aug 02, 2009 at 09:03:37PM -0400, Luis Useche wrote:
 From time to time my network card stop working and a error message
appears:

 wpi0: fatal firmware error

 I've been experiencing the same problem for about a year--ever since my
 university installed new access points.  The old access points worked
 fine with wpi, but the new access points cause frequent firmware errors.
 Some days I just give up on wireless and connect an ethernet cable...



Re: Delete packages with dependencies

2009-08-04 Thread Luis Useche
On Tue, Aug 4, 2009 at 11:20 AM, Bret S. Lambertbret.lamb...@gmail.com wrote:
 On Tue, Aug 04, 2009 at 11:11:17AM -0400, Luis Useche wrote:
 Hello Guys,

 I was wondering if there is some tool that delete the packages
 specified along with their deletable dependencies. Deletable means
 packages that pkg_add added automatically (as dependencies of the
 installed one) and are not dependency of another package. This will
 ensure (in most of the cases) that you don't end up with a system with
 unnecessary packages.

 I couldn't find in pkg_delete(1) any option that implements the
 previous semantic.


 pkg_delete `pkg_info -t` will almost do what you're looking for ;)

The problem with this command is that it will remove packages
installed for the end user. In my case, for instance, pkg_info -t
list zsh, vim, subversion and other.

Luis Useche
use...@gmail.com



Re: Delete packages with dependencies

2009-08-04 Thread Luis Useche
On Tue, Aug 4, 2009 at 11:32 AM, neal hogann...@lambdaserver.com wrote:
 On Tue, Aug 04, 2009 at 11:11:17AM -0400, Luis Useche wrote:
 Hello Guys,

 I was wondering if there is some tool that delete the packages
 specified along with their deletable dependencies. Deletable means
 packages that pkg_add added automatically (as dependencies of the
 installed one) and are not dependency of another package. This will
 ensure (in most of the cases) that you don't end up with a system with
 unnecessary packages.

 I couldn't find in pkg_delete(1) any option that implements the
 previous semantic.

 I'm unclear as to why 'pkg_delete -F dependencies' doesn't do what you
want?

 from man pkg_delete:

 -F  dependenciesalso delete the whole set of package
that depends upon the requested packages.


From the -F dependencies option I understand that pkg_delete will
remove all the packages that depend on the listed package. For
instance, if you run: pkg_delete -F dependencies xpdf-utils, it will
remove xpdf as well.

Luis Useche
use...@gmail.com



Re: Delete packages with dependencies

2009-08-04 Thread Luis Useche
On Tue, Aug 4, 2009 at 12:14 PM, Darrin
Chandlerdwchand...@stilyagin.com wrote:
 On Tue, Aug 04, 2009 at 11:30:44AM -0400, Luis Useche wrote:
 On Tue, Aug 4, 2009 at 11:20 AM, Bret S. Lambertbret.lamb...@gmail.com 
 wrote:
  pkg_delete `pkg_info -t` will almost do what you're looking for ;)

 The problem with this command is that it will remove packages
 installed for the end user. In my case, for instance, pkg_info -t
 list zsh, vim, subversion and other.

 Brett gave you the pieces and this is UNIX, so it's just a tiny bit more
 work...

 # pkg_info -t | cut -d' ' -f1  pkgs.before
 # pkg_delete whatever
 # pkg_info -t | cut -d' ' -f1  pkgs.after
 # pkg_delete $(comm -13 pkgs.before pkgs.after)


I guess your idea with this script is to find the differences between
the lists of packages with no dependents before and after deleting the
package whatever.

This is really close but it is not there quite yet. Even with this
script, there could be situations where you end up deleting things you
don't want. For instance, let say you install xfce. After some time,
you decided to install some package X that depend on xfce and other
library L used only by X. When using your script, it will remove not
only L but also xfce (which you did not want to remove because you
installed it manually).

Besides, there is another problem with the script. If you imagine the
packages installed in the system as a tree of dependencies, you can
see that your script will only remove two levels of the branch you
want to delete. Example: X depends on Y that depends on Z: X - Y -
Z. In your script, X and Y will be removed but Z will not.

It seems like an additional information should be added to the package
database. A bit indicating if the package was installed manually by
the user (admin?) or not. Then, the package can only be deleted if the
the user explicitly say so as oppose to automatic deletion as
dependency.

Any other suggestion?

Luis Useche
use...@gmail.com



Re: Delete packages with dependencies

2009-08-04 Thread Luis Useche
On Tue, Aug 4, 2009 at 1:01 PM, Ted Unangstted.unan...@gmail.com wrote:
 On Tue, Aug 4, 2009 at 12:47 PM, Luis Usecheuse...@gmail.com wrote:
 This is really close but it is not there quite yet. Even with this
 script, there could be situations where you end up deleting things you
 don't want. For instance, let say you install xfce. After some time,
 you decided to install some package X that depend on xfce and other
 library L used only by X. When using your script, it will remove not
 only L but also xfce (which you did not want to remove because you
 installed it manually).

 Besides, there is another problem with the script. If you imagine the
 packages installed in the system as a tree of dependencies, you can
 see that your script will only remove two levels of the branch you
 want to delete. Example: X depends on Y that depends on Z: X - Y -
 Z. In your script, X and Y will be removed but Z will not.

 It seems like an additional information should be added to the package
 database. A bit indicating if the package was installed manually by
 the user (admin?) or not. Then, the package can only be deleted if the
 the user explicitly say so as oppose to automatic deletion as
 dependency.

 This still doesn't work.  If I pkg_add eclipse, then later decide I'm
 going back to vim, that doesn't mean I want all my java programs to
 suddenly stop working.  What's installed manually vs not is not
 reliable.  I don't think I've ever actually requested installing
 unzip, but it's on every computer I use and I use it all the time.

True. However this situation is easily solvable by installing the jvm
manually and you are done. Instead, removing the deletable
dependencies is a harder problem to solve. Moreover, I am uncertain if
the problem can be solved with the tools that exist at this point in
time.

For the unzip case, I think it is a base application. The unzip
problem can be easily solvable by marking all the base packages as
manually installed.

Luis Useche
use...@gmail.com



Re: Delete packages with dependencies

2009-08-04 Thread Luis Useche
 Besides, there is another problem with the script. If you imagine the
 packages installed in the system as a tree of dependencies, you can
 see that your script will only remove two levels of the branch you
 want to delete. Example: X depends on Y that depends on Z: X - Y -
 Z. In your script, X and Y will be removed but Z will not.

 True

 I was not thinking to solve the general case, but more to help with an
 immeditate need.

I agree. This can solve some of the situations.

 It seems like an additional information should be added to the package
 database. A bit indicating if the package was installed manually by
 the user (admin?) or not. Then, the package can only be deleted if the
 the user explicitly say so as oppose to automatic deletion as
 dependency.

 This has been brought up many times before and a lot of people would
 like to see it (me too). I know some work has been done and some info is
 now kept, but this functionality isn't there yet.

Can you point me to documentation about this?

Luis Useche
use...@gmail.com



wpi and firmware error

2009-08-02 Thread Luis Useche
Hello,

From time to time my network card stop working and a error message appears:

wpi0: fatal firmware error
firmware error log (count=1):
  error type = SYSASSERT (0x0005)
  error data  = 0x0074
  branch link = 0x08B60274
  interrupt link  = 0x03203560
  time= 3916204702
driver status:
  tx ring  0: qid=0  cur=19  queued=0
  tx ring  1: qid=1  cur=0   queued=0
  tx ring  2: qid=2  cur=0   queued=0
  tx ring  3: qid=3  cur=0   queued=0
  tx ring  4: qid=4  cur=19  queued=0
  tx ring  5: qid=5  cur=0   queued=0
  rx ring: cur=6
  802.11 state 4

The network start working again when I call dhclient. Since I could
have my network back again pretty quickly is not a critical issue.
However, having the problem is annoying.

I am using wpi-firmware-3.2.tgz

Does any one else have this problem?

Best,

Luis Useche
use...@gmail.com



Re: Audio seems correct but it doesn't sound (azalia)

2009-08-01 Thread Luis Useche
 not configured
ichpcib0 at pci0 dev 31 function 0 Intel 82801HBM LPC rev 0x02: PM disabled
pciide0 at pci0 dev 31 function 1 Intel 82801HBM IDE rev 0x02: DMA,
channel 0 configured to compatibility, channel 1 configured to
compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: SONY, CDRWDVD CRX880A, KD09 ATAPI
5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
ahci0 at pci0 dev 31 function 2 Intel 82801HBM AHCI rev 0x02: apic 2
int 17 (irq 10), AHCI 1.1
ahci0: PHY offline on port 2
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: ATA, FUJITSU MHY2160B, 0085 SCSI3 0/direct fixed
sd0: 152627MB, 512 bytes/sec, 312581808 sec total
ichiic0 at pci0 dev 31 function 3 Intel 82801H SMBus rev 0x02: apic
2 int 17 (irq 10)
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
spdmem1 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 Intel UHCI root hub rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 Intel UHCI root hub rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 Intel UHCI root hub rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 Intel UHCI root hub rev 1.00/1.00 addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 Intel UHCI root hub rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
mtrr: Pentium Pro MTRR support
uhidev0 at uhub5 port 1 configuration 1 interface 0 Logitech USB
Receiver rev 2.00/5.00 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 16 buttons, Z dir
wsmouse1 at ums0 mux 0
uhidev1 at uhub5 port 1 configuration 1 interface 1 Logitech USB
Receiver rev 2.00/5.00 addr 2
uhidev1: iclass 3/0, 17 report ids
uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0
uhid1 at uhidev1 reportid 16: input=6, output=6, feature=0
uhid2 at uhidev1 reportid 17: input=19, output=19, feature=0
softraid0 at root
root on sd0a swap on sd0b dump on sd0b


mixerctl:
inputs.dac_mute=off  [ off on ]
inputs.dac=126,126
inputs.dac2_mute=off  [ off on ]
inputs.dac2=126,126
inputs.dac4_mute=off  [ off on ]
inputs.dac4=126,126
inputs.dac3_mute=off  [ off on ]
inputs.dac3=126,126
inputs.vendor_mute=off  [ off on ]
inputs.vendor=126,126
outputs.hp_source=dac  [ dac dac2 ]
outputs.hp_dir=output  [ none output input input-vr0 input-vr50 input-vr80 ]
outputs.hp_boost=off  [ off on ]
outputs.spkr_source=dac  [ dac ]
outputs.spkr_dir=output  [ none output input input-vr0 input-vr50 input-vr80 ]
outputs.spkr_boost=off  [ off on ]
outputs.line-in_source=dac4  [ dac4 ]
outputs.line-in_dir=input  [ none output input input-vr0 input-vr50 input-vr80 ]
outputs.line_source=dac3  [ dac3 ]
outputs.line_dir=output  [ none output input input-vr0 input-vr50 input-vr80 ]
inputs.sel_source=line-in  [ line-in line spkr hp ]
outputs.sel=126,126
inputs.sel2_source=line-in  [ line-in line spkr hp ]
outputs.sel2=126,126
inputs.sel3_source=line-in  [ line-in line spkr hp ]
outputs.sel3=126,126
inputs.sel4_source=sel  [ sel ]
inputs.sel4_sel=126,126
inputs.sel5_source=sel2  [ sel2 ]
inputs.sel5_sel2=126,126
inputs.sel6_source=sel3  [ sel3 ]
inputs.sel6_sel3=126,126
record.adc_source=sel4  [ sel4 mic ]
record.adc_mute=off  [ off on ]
record.adc2_source=sel5  [ sel5 mic ]
record.adc2_mute=off  [ off on ]
record.adc3_source=sel6  [ sel6 mic ]
record.adc3_mute=off  [ off on ]
outputs.SPDIF_source=dig-dac  [ dig-dac vendor2 adc adc2 adc3 ]
inputs.beep=85
outputs.hp_sense=unplugged  [ unplugged plugged ]
outputs.line-in_sense=unplugged  [ unplugged plugged ]
outputs.line_sense=unplugged  [ unplugged plugged ]
outputs.spkr_muters=hp,line-in,line  { hp line-in line }
outputs.master=126,126
outputs.master.mute=off  [ off on ]
outputs.master.slaves=dac  { dac dac2 dac4 dac3 vendor sel sel2 sel3 beep }
record.volume=0,0
record.volume.mute=off  [ off on ]
record.volume.slaves=adc,adc2,adc3  { adc adc2 adc3 }
inputs.usingdac=02030504  [ 02030504 1e ]


Luis Useche
use...@gmail.com



On Sat, Aug 1, 2009 at 1:09 AM, Jacob Meuserjake...@sdf.lonestar.org wrote:
 On Fri, Jul 31, 2009 at 11:24:04PM -0400, Luis Useche wrote:
 Hello,

 I have an intel HD audio device in my laptop. OpenBSD recognizes and
 setup all the drivers for the audio. In fact, even the volume keys
 work! My problem is that there is no sound at all. As suggested in the
 FAQ, I tweak all the mixerctl values with no success.

 can I see a complete dmesg and default `mixerctl -v'?

 --
 jake...@sdf.lonestar.org
 SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Audio seems correct but it doesn't sound (azalia)

2009-08-01 Thread Luis Useche
: Ricoh 5C822 SD/MMC
0x: 08221180 02100106 08050122 00804010
0x0010: fe4ff400   
0x0020:    01f31028
0x0030:  0080  0204
 3:1:2: Ricoh 5C843 MMC
0x: 08431180 02100106 08800012 00804010
0x0010: fe4ff500   
0x0020:    01f31028
0x0030:  0080  0204
 3:1:3: Ricoh 5C592 Memory Stick
0x: 05921180 02100106 08800012 00804010
0x0010: fe4ff600   
0x0020:    01f31028
0x0030:  0080  0204
 3:1:4: Ricoh 5C852 xD
0x: 08521180 02100106 08800012 00804010
0x0010: fe4ff700   
0x0020:    01f31028
0x0030:  0080  0204
 9:0:0: Broadcom BCM5906M
0x: 171314e4 00100106 0202 0010
0x0010: fe5f0004   
0x0020:    01f31028
0x0030:  0048  010a
 12:0:0: Intel PRO/Wireless 3945ABG
0x: 42228086 00100106 0282 0010
0x0010: fe8ff000   
0x0020:    10408086
0x0030:  00c8  010a

Thanks,

Luis Useche
use...@gmail.com



On Sat, Aug 1, 2009 at 5:44 PM, Jacob Meuserjake...@sdf.lonestar.org wrote:
 On Sat, Aug 01, 2009 at 10:24:14AM -0400, Luis Useche wrote:
 dmesg:
 ...

 mixerctl:
 ...

 thanks.  one more piece of info is needed.  can you send me the output
 of `pcidump -x'?

 --
 jake...@sdf.lonestar.org
 SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Audio seems correct but it doesn't sound (azalia)

2009-08-01 Thread Luis Useche
The patch does work. Thank you.

Luis Useche
use...@gmail.com



On Sat, Aug 1, 2009 at 9:34 PM, Jacob Meuserjake...@sdf.lonestar.org wrote:
 thanks.

 the following should apply to src/sys/dev/pci/azalia_codec.c for OpenBSD
 4.5 (azalia_codec.c r1.114).

 please let me know if this fixes the issue.

 --
 jake...@sdf.lonestar.org
 SDF Public Access UNIX System - http://sdf.lonestar.org

 Index: azalia_codec.c
 ===
 RCS file: /cvs/src/sys/dev/pci/azalia_codec.c,v
 retrieving revision 1.114
 diff -u azalia_codec.c
 --- azalia_codec.c  24 Jan 2009 09:44:02 -  1.114
 +++ azalia_codec.c  2 Aug 2009 01:30:50 -
 @@ -64,6 +64,7 @@
  #define IDT92HD71B7_DELL_E6500 0x024f1028
  #define SIGMATEL_STAC9228X 0x83847616
  #define STAC9228X_DELL_V1400   0x02271028
 +#define STAC9228X_DELL_I1400   0x01f31028

  intazalia_generic_codec_init_dacgroup(codec_t *);
  intazalia_generic_codec_fnode(codec_t *, nid_t, int, int);
 @@ -2227,7 +2228,9 @@
if (this-vid == REALTEK_ALC880  this-subid ==
ALC880_MEDION_MD95257) {
azalia_gpio_unmute(this, 1);
}
 -   if (this-vid == SIGMATEL_STAC9228X  this-subid ==
STAC9228X_DELL_V1400) {
 +   if (this-vid == SIGMATEL_STAC9228X 
 +   (this-subid == STAC9228X_DELL_V1400 ||
 +   this-subid == STAC9228X_DELL_I1400)) {
azalia_gpio_unmute(this, 2);
}
return 0;



Audio seems correct but it doesn't sound (azalia)

2009-07-31 Thread Luis Useche
Hello,

I have an intel HD audio device in my laptop. OpenBSD recognizes and
setup all the drivers for the audio. In fact, even the volume keys
work! My problem is that there is no sound at all. As suggested in the
FAQ, I tweak all the mixerctl values with no success.

I also ran a couple of commands just to check that the device is
processing data:

l...@meg ~ $ cat  /dev/audio  /dev/zero 
[1] 3181
l...@meg ~ $ audioctl play.{seek,samples,errors}
play.seek=57600
play.samples=672000
play.errors=0
l...@meg ~ $ audioctl play.{seek,samples,errors}
play.seek=57600
play.samples=1555200
play.errors=0
l...@meg ~ $ audioctl play.{seek,samples,errors}
play.seek=57600
play.samples=2112000
play.errors=0
l...@meg ~ $ kill %1
l...@meg ~ $
[1]  + terminated  cat  /dev/audio  /dev/zero

This seems correct to me. More info:

l...@meg ~ $ mixerctl
inputs.dac_mute=off
inputs.dac=254,254
inputs.dac2_mute=off
inputs.dac2=200,200
inputs.dac4_mute=off
inputs.dac4=200,200
inputs.dac3_mute=off
inputs.dac3=200,200
inputs.vendor_mute=off
inputs.vendor=200,200
outputs.hp_source=dac
outputs.hp_dir=output
outputs.hp_boost=on
outputs.spkr_source=dac
outputs.spkr_dir=output
outputs.spkr_boost=on
outputs.line-in_source=dac4
outputs.line-in_dir=input
outputs.line_source=dac3
outputs.line_dir=output
inputs.sel_source=line-in
outputs.sel=189,189
inputs.sel2_source=line-in
outputs.sel2=189,189
inputs.sel3_source=line-in
outputs.sel3=189,189
inputs.sel4_source=sel
inputs.sel4_sel=198,198
inputs.sel5_source=sel2
inputs.sel5_sel2=198,198
inputs.sel6_source=sel3
inputs.sel6_sel3=198,198
record.adc_source=sel4
record.adc_mute=off
record.adc2_source=sel5
record.adc2_mute=off
record.adc3_source=sel6
record.adc3_mute=off
outputs.SPDIF_source=dig-dac
inputs.beep=85
outputs.hp_sense=unplugged
outputs.line-in_sense=unplugged
outputs.line_sense=unplugged
outputs.spkr_muters=hp,line-in,line
outputs.master=255,255
outputs.master.mute=off
outputs.master.slaves=dac
record.volume=0,0
record.volume.mute=off
record.volume.slaves=adc,adc2,adc3
inputs.usingdac=02030504

l...@meg ~ $ audioctl
name=HD-Audio
version=1.0
config=azalia0
encodings=slinear_le:16,slinear_le:20,slinear_le:24
properties=full_duplex,independent
full_duplex=0
fullduplex=0
blocksize=9600
hiwat=6
lowat=1
output_muted=0
monitor_gain=0
mode=
play.rate=48000
play.channels=2
play.precision=16
play.encoding=slinear_le
play.gain=255
play.balance=32
play.port=0x0
play.avail_ports=0x0
play.seek=9600
play.samples=3139200
play.eof=0
play.pause=0
play.error=1
play.waiting=0
play.open=0
play.active=0
play.buffer_size=65536
play.block_size=9600
play.errors=2400
record.rate=48000
record.channels=2
record.precision=16
record.encoding=slinear_le
record.gain=0
record.balance=32
record.port=0x0
record.avail_ports=0x0
record.seek=0
record.samples=0
record.eof=0
record.pause=0
record.error=0
record.waiting=0
record.open=0
record.active=0
record.buffer_size=65536
record.block_size=9600
record.errors=0

Any suggestion?

Thanks in advance for your help.

Luis Useche
use...@gmail.com



Re: Microsoft mouse, ums and wsmouse

2009-07-28 Thread Luis Useche
So, What can I do to make this work? :)

Luis Useche
use...@gmail.com

On Sun, Jul 26, 2009 at 5:51 PM, Miod Vallatm...@online.fr wrote:
 Hello,

 I am new to OpenBSD and I was giving it a try by installing in my laptop. My
 problem is that my usb wireless mouse does not work on X or with wsmoused.
 From a message standpoint, everything seem normal. I got from dmesg:

 uhidev0 at uhub4 port 2 configuration 1 interface 0 Microsoft Microsoft
 Wireless Optical Mouse\M-. 1.00 rev 2.00/0.07 addr 2
 uhidev0: iclass 3/1, 23 report ids
 ums0 at uhidev0 reportid 17: 3 buttons, Z dir
 wsmouse1 at ums0 mux 0
 uhid0 at uhidev0 reportid 18: input=0, output=0, feature=1
 uhid1 at uhidev0 reportid 19: input=1, output=0, feature=0
 uhid2 at uhidev0 reportid 20: input=1, output=0, feature=0
 uhid3 at uhidev0 reportid 21: input=3, output=0, feature=0
 uhid4 at uhidev0 reportid 23: input=0, output=0, feature=1

 Which means that the mouse is detected and attached to the wsmouse driver as
 wsmouse1. However, it does not work at all. I have been looking all day
 for a solution with no success. At this point I am clueless.


 Sigh. Yet another Microsoft mouse with a botched report descriptor
 layout.

 I'm afraid that this device will not work under OpenBSD until enough
 information is found to make it work.

 Miod



Re: Microsoft mouse, ums and wsmouse

2009-07-26 Thread Luis Useche
 Sigh. Yet another Microsoft mouse with a botched report descriptor
 layout.

 I'm afraid that this device will not work under OpenBSD until enough
 information is found to make it work.

This is weird. What do you mean by more information? I think I have
been able to use this mouse under freebsd, netbsd and Linux. I am
guessing all these OSes have code for this mouse.

Luis.



Re: Microsoft mouse, ums and wsmouse

2009-07-24 Thread Luis Useche
 xD rev 0x12 at pci5 dev 1 function 4 not configured
ichpcib0 at pci0 dev 31 function 0 Intel 82801HBM LPC rev 0x02: PM disabled
pciide0 at pci0 dev 31 function 1 Intel 82801HBM IDE rev 0x02: DMA,
channel 0 configured to compatibility, channel 1 configured to
compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: SONY, CDRWDVD CRX880A, KD09 ATAPI
5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
ahci0 at pci0 dev 31 function 2 Intel 82801HBM AHCI rev 0x02: apic 2
int 17 (irq 10), AHCI 1.1
ahci0: PHY offline on port 2
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: ATA, FUJITSU MHY2160B, 0085 SCSI3 0/direct fixed
sd0: 152627MB, 512 bytes/sec, 312581808 sec total
ichiic0 at pci0 dev 31 function 3 Intel 82801H SMBus rev 0x02: apic
2 int 17 (irq 10)
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
spdmem1 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 Intel UHCI root hub rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 Intel UHCI root hub rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 Intel UHCI root hub rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 Intel UHCI root hub rev 1.00/1.00 addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 Intel UHCI root hub rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
mtrr: Pentium Pro MTRR support
softraid0 at root
root on sd0a swap on sd0b dump on sd0b
uhidev0 at uhub4 port 2 configuration 1 interface 0 Microsoft
Microsoft Wireless Optical Mouse\M-. 1.00 rev 2.00/0.07 addr 2
uhidev0: iclass 3/1, 23 report ids
ums0 at uhidev0 reportid 17: 3 buttons, Z dir
wsmouse1 at ums0 mux 0
uhid0 at uhidev0 reportid 18: input=0, output=0, feature=1
uhid1 at uhidev0 reportid 19: input=1, output=0, feature=0
uhid2 at uhidev0 reportid 20: input=1, output=0, feature=0
uhid3 at uhidev0 reportid 21: input=3, output=0, feature=0
uhid4 at uhidev0 reportid 23: input=0, output=0, feature=1

Luis Useche
use...@gmail.com



On Wed, Jul 22, 2009 at 10:49 PM, Luis Usecheuse...@gmail.com wrote:
 On Wed, Jul 22, 2009 at 9:51 PM, Hendrickson,
 Kennethkhend...@harris.com wrote:
 turn on wsmouse in /etc/rc.conf.local

 read /etc/rc.conf (but don't modify it) to see what it does

 I'm sorry I didn't mention it. The wsmoused is working and, in fact,
 my touchpad is perfectly fine for both: console and X. Another
 suggestion?

 Luis Useche
 use...@gmail.com



Microsoft mouse, ums and wsmouse

2009-07-22 Thread Luis Useche
Hi Guys,

I am new to OpenBSD and I was giving it a try by installing in my laptop. My
problem is that my usb wireless mouse does not work on X or with wsmoused.
From a message standpoint, everything seem normal. I got from dmesg:

uhidev0 at uhub4 port 2 configuration 1 interface 0 Microsoft Microsoft
Wireless Optical Mouse\M-. 1.00 rev 2.00/0.07 addr 2
uhidev0: iclass 3/1, 23 report ids
ums0 at uhidev0 reportid 17: 3 buttons, Z dir
wsmouse1 at ums0 mux 0
uhid0 at uhidev0 reportid 18: input=0, output=0, feature=1
uhid1 at uhidev0 reportid 19: input=1, output=0, feature=0
uhid2 at uhidev0 reportid 20: input=1, output=0, feature=0
uhid3 at uhidev0 reportid 21: input=3, output=0, feature=0
uhid4 at uhidev0 reportid 23: input=0, output=0, feature=1

Which means that the mouse is detected and attached to the wsmouse driver as
wsmouse1. However, it does not work at all. I have been looking all day
for a solution with no success. At this point I am clueless.

Any help is very appreciated.

Luis Useche
use...@gmail.com



Re: Microsoft mouse, ums and wsmouse

2009-07-22 Thread Luis Useche
On Wed, Jul 22, 2009 at 9:51 PM, Hendrickson,
Kennethkhend...@harris.com wrote:
 turn on wsmouse in /etc/rc.conf.local

 read /etc/rc.conf (but don't modify it) to see what it does

I'm sorry I didn't mention it. The wsmoused is working and, in fact,
my touchpad is perfectly fine for both: console and X. Another
suggestion?

Luis Useche
use...@gmail.com