Re: Error booting OpenBSD 5.5 on Macbook Air

2014-06-09 Thread Alexander Polakov
* Anders Østergaard Jensen-Waud aojen...@gmail.com [140609 08:58]:
 Note: I would like to provide a dmesg, but am not sure how to do this
 when the system cannot boot successfully.
 
 I took a photo of the boot screen with my phone, which is shown here:
 
 https://www.dropbox.com/s/7ne9jpx8vja2rck/2014-06-09%2015.55.27.jpg
 
 On Mon, Jun 9, 2014 at 4:01 PM, Anders Jensen-Waud aojen...@gmail.com wrote:
  Hello,
 
  I am trying to boot OpenBSD 5.5 (amd64) from an SD memory card on my 
  Macbook Air (most recent model).
 
  When I boot from the SD card (both bsd and bsd.mp) the boot process hangs 
  at “root device: “
 
  The SSD drive in the machine is identified as sd0 upon boot. The OpenBSD 
  boot loader identifies both hd0 and hd1. I also tried asking the kernel to 
  ASK for a root device by issuing: boot hd0a:/bsd.mp -a, but with no luck.
 
  Any ideas how I can boot from this card successfully?
 
  Cheers
 
  Anders
 
  (Note: I created the OpenBSD installation by mounting the SD card in 
  VirtualBox on Mac OS X and then installing OpenBSD onto it inside the VM. 
  The installation wen fine.)

It is probably the same problem I'm having on Macbook Pro (late 13): all
usb ports are USB3 on this device, and usb3 is not yet supported by
openbsd. You can try enabling xhci* by compiling custom kernel, but it's
still experimental and probably would not work (I've tried, no luck).

-- 
Alexander Polakov | plhk.ru



Re: cwm rocks : but...

2013-10-06 Thread Alexander Polakov
* Mayuresh Kathe mayur...@devio.us [131005 17:06]:
 have been using 'cwm' for over a week now.
 enjoying every moment of it.
 very well thought out and well executed from an openbsd perspective.
 questions;
 * is there any mailing list for keeping an eye on 'cwm' progress?
 * can the openbsd 'xdm' be made to look equally minimalistic?
   (i tried fiddling with the resources, made my system freeze).
 best.

Here're my pretty minimalistic /etc/X11/xdm/Xresources  Xsetup_0 to get you
started:

Xsetup_0
=
#!/bin/sh
# $OpenBSD: Xsetup_0,v 1.3 2010/03/28 09:33:02 matthieu Exp $
#if [ $DISPLAY = :0 -o $DISPLAY = :0.0 ]
#then
#   xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed 
-exitOnFail
#fi
xsetroot -solid black
xset +fp /usr/local/lib/X11/fonts/terminus/
#sxpm OpenBSD.xpm 

Xresources
==

! $Xorg: Xresources,v 1.3 2000/08/17 19:54:17 cpqbld Exp $
!
!
!
!
!




xlogin*login.translations: #override \
CtrlKeyR: abort-display()\n\
KeyF1: set-session-argument(failsafe) finish-field()\n\
KeyLeft: move-backward-character()\n\
KeyRight: move-forward-character()\n\
KeyHome: move-to-begining()\n\
KeyEnd: move-to-end()\n\
CtrlKeyKP_Enter: set-session-argument(failsafe) finish-field()\n\
KeyKP_Enter: set-session-argument() finish-field()\n\
CtrlKeyReturn: set-session-argument(failsafe) finish-field()\n\
KeyReturn: set-session-argument() finish-field()

//xlogin*greeting: Welcome to CLIENTHOST
xlogin*greeting: 
xlogin*namePrompt: Login:
xlogin*fail: Login incorrect or forbidden by policy

#if WIDTH  800
xlogin*greetFont: -*-terminus-medium-r-*-*-14-*-*-*-*-*-iso10646-1
xlogin*font: -*-terminus-medium-r-*-*-14-*-*-*-*-*-iso10646-1
xlogin*promptFont: -*-terminus-medium-r-*-*-14-*-*-*-*-*-iso10646-1
xlogin*failFont: -*-terminus-medium-r-*-*-14-*-*-*-*-*-iso10646-1
xlogin*greetFace:   Terminus-14
xlogin*face:Terminus-14
xlogin*promptFace:  Terminus-14:bold
xlogin*failFace:Terminus-14
#else
xlogin*greetFont: -adobe-helvetica-bold-o-normal--17-120-100-100-p-92-iso8859-1
xlogin*font: -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1
xlogin*promptFont: -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1
xlogin*failFont: -adobe-helvetica-bold-o-normal--14-140-75-75-p-82-iso8859-1
xlogin*greetFace:   Luxi Sans-18:bold:italic:dpi=75
xlogin*face:Luxi Sans-12:dpi=75
xlogin*promptFace:  Luxi Sans-12:bold:dpi=75
xlogin*failFace:Luxi Sans-12:bold:dpi=75
#endif

#define bpp1 1

#if !(defined(bpp1) || defined(bpp4) || defined(bpp8) || defined(bpp15))
# if PLANES  4 || defined(Hp300Architecture)
#  ifndef bpp1
#   define bpp1
#  endif
# else
#  if PLANES  4
#   if PLANES  8
#ifndef bpp15
# define bpp15
#endif
#   else
#ifndef bpp8
# define bpp8
#endif bpp8
#   endif
#  else
#   ifndef bpp4
#define bpp4
#   endif
#  endif
# endif
#endif  /* If manual override */

#ifndef bpp1
xlogin*borderWidth: 1
xlogin*frameWidth: 1
xlogin*innerFramesWidth: 2

! top/left border
xlogin*hiColor: #6d9df2

! bottom/right border
xlogin*shdColor: #384c70

! 'Welcome to..' text color
xlogin*greetColor: #00
#if defined(bpp4) || defined(bpp8) || defined(bpp15)
! flood fill
!xlogin*background: #2559a5
xlogin*background: #5272b6
#endif
xlogin*failColor: red

! 'Login:' and 'Password:'
*Foreground: #fbfeff

! border/shadow
*Background: #00
#else
xlogin*borderWidth: 0
xlogin*frameWidth: 0
xlogin*innerFramesWidth: 0
xlogin*shdColor: black
xlogin*hiColor: black
xlogin*greetColor: black
xlogin*background: black
xlogin*failColor: red
xlogin*promptColor: white
*Foreground: white
*Background: black
#endif
#ifdef bpp1
//xlogin*logoFileName: /etc/X11/xdm/pixmaps/OpenBSD_1bpp.xpm
#endif

#if defined(bpp4) || defined(bpp8)
xlogin*logoFileName: /etc/X11/xdm/pixmaps/OpenBSD_4bpp.xpm
#endif
#ifdef bpp15
xlogin*logoFileName: /etc/X11/xdm/pixmaps/OpenBSD_15bpp.xpm
#endif

xlogin*useShape: true
xlogin*logoPadding: 10


! uncomment to disable logins
! xlogin.Login.allowRootLogin:  false

XConsole*background:black
XConsole*foreground:white
XConsole*borderWidth:   2
XConsole*borderColor:   grey
XConsole.text.geometry: 480x130
XConsole.verbose:   true
XConsole*iconic:true
XConsole*font:  fixed

Chooser*geometry:   640x480
Chooser*allowShellResize:   false
Chooser*viewport.forceBars: true

Chooser*label.font:   -adobe-helvetica-bold-o-normal--24-*-p-*-iso8859-1
Chooser*label.label:  XDMCP Host Menu from CLIENTHOST
Chooser*label.foreground: black
Chooser*list.font:lucidasanstypewriter-12
Chooser*Command.font: -adobe-helvetica-medium-r-normal--18-*-p-*-iso8859-1



Re: font weirdness

2013-09-03 Thread Alexander Polakov
* Ed Ahlsen-Girard eagir...@cox.net [130903 16:18]:
 Has anyone else noticed that some fonts are not displaying the right
 character? Some substitutions, some blanks?

Yes. http://reddit.com/r/programming looks like this in firefox:
http://plhk.ru/trash/rdit-fonts.png

rm -rf ~/.cache/fontconfig/* seems to fix that for me



mutt: clear your cache (time_t)

2013-08-17 Thread Alexander Polakov
I haven't seen this mentioned in current.html, so..
If you're using mutt's caching options (set header_cache,
set message_cachedir), clear the cache before upgrading
to newer snapshot if you're not a fan of 1.4G core files
lying around.



X hangs after watching too many videos (inteldrm)

2013-06-28 Thread Alexander Polakov
] (II) intel(0): Modeline 1280x800x0.0   69.30  1280 1328 1360 
1403  800 803 809 821 -hsync -vsync (49.4 kHz eP)
[25.848] (II) intel(0): Modeline 1280x800x0.0   57.59  1280 1328 1360 
1403  800 803 809 821 -hsync -vsync (41.0 kHz e)
[42.744] (II) intel(0): EDID vendor LEN, prod id 16401
[42.744] (II) intel(0): Printing DDC gathered Modelines:
[42.744] (II) intel(0): Modeline 1280x800x0.0   69.30  1280 1328 1360 
1403  800 803 809 821 -hsync -vsync (49.4 kHz eP)
[42.744] (II) intel(0): Modeline 1280x800x0.0   57.59  1280 1328 1360 
1403  800 803 809 821 -hsync -vsync (41.0 kHz e)

mplayer config:

[default]
# Write your default config options here!
vf=screenshot
subcp=cp1251
vo=gl
vfm=ffmpeg
cache=8192

-- 
Alexander Polakov | plhk.ru



Re: HP notebook and wired temperatures

2013-06-07 Thread Alexander Polakov
* Sven Gaerner sgaer...@gmx.net [130607 17:10]:
 Hi,
 
 I installed OpenBSD 5.3 i386 on my HP nc6400 notebook. Now when booting
 the system, the kernel prints
  acpitz3: critical temperate exceeded (3290 C): shutting down.
 
 This temperature (3290 C) is shown after starting a system that was
 powered off for several hours. After finishing the installation the
 reported temperature was about 4180 C.
 
 The other BSDs also report wired temperates but not that high. Some
 years ago Linux reported about 55 C for the CPU which seems to be
 a more realistic value.
 
 Attached is a dmesg from the bsd.rd as this kernel does not immediately
 shutdown the system.
 
 Is there a way to disable this immediate shutdown of the system?
 And how can I help to get sane values reported?

A recent snapshot would probably fix this.

http://openbsd.7691.n7.nabble.com/Somewhat-important-ACPI-diff-td228642.html
(committed as rev. 1.201 of dsdt.c)
-- 
Alexander Polakov | plhk.ru



Re: cwm automatic tiling

2013-05-08 Thread Alexander Polakov
* Erwin Geerdink m...@erwingeerdink.com [130508 15:44]:
 Hi,
 
 The cwm version shipped with 5.3 supports horizontal and
 vertical manual tiling of windows. This is a great feature which I
 enjoy using. 

Glad you like it (:

 I was wondering if this feature will be extended to
 automatic tiling in next releases? Something like an 'autotile' bind
 command which tiles new windows and rearranges existing ones. 

I've a patch doing that buried somewhere in my tree. I'll bring it up to
date when I have time.

-- 
Alexander Polakov | plhk.ru



snapshots SHA256 mismatch

2013-05-04 Thread Alexander Polakov
I use a script to download snapshots for me.
It compares checksums against SHA256 in snapshot directory.

Latest (April 30) snapshot gives mismatches (amd64).

from SHA256 file:

SHA256 (bsd) = e3fcc7ddbaa6674bced504974bcbf8dd267e9243aac556eb3d6e9ac2c7668ebd

computed:

SHA256 (bsd) = ea17640b86dcb3f84073867907afb0c4576055b0b2d5415cd23ac7d00f7b4bef

I guess it's just files out-of-sync.

-- 
Alexander Polakov | plhk.ru



Re: up/down in pdksh-history with set -o vi

2013-04-11 Thread Alexander Polakov
* Stefan Olsson stefan.karl.ols...@gmail.com [130412 03:50]:
 Hello,
 
 I suspect my problem is not entirely OpenBSD-related but more to do with
 pdksh and keybindings.
 
 I usually do set -o vi in my .profile. In bash on OS/X it then works to
 go up and down in history with both j+k or up+down-keys. If I ssh to a
 OpenBSD host from my Mac, I can NOT use up+down in the shell (ksh), but it
 works fine in less or vi. It even works fine with up+down keys in bash on
 OpenBSD - so what do I need to do in ksh to make up+down-keys work (apart
 from doing set -o emacs)??

You can recompile ksh with my unportable hack if you really want to:

http://plhk.ru/trash/ksh/0008-ksh-vi-arrow-keys-support.patch

-- 
Alexander Polakov | plhk.ru



Re: dzen2 with cwm

2013-03-22 Thread Alexander Polakov
* James Griffin j...@kontrol.kode5.net [130322 15:10]:
 I was wondering if anyone uses dzen2 with OpenBSD (-current). If so I'd
 be really interested to see some examples of setups and scripts.  I'd like
 to be able to see network activity, mailbox updates/status and a few other 
 items
 of interest. Nothing too complex.

You may be probably interested in sysutils/xstatbar (nice graphs) or x11/xmobar
(all included) if you're too lazy to write monitoring scripts by yorself. Or
just pipe sysutils/conky output to dzen2.

-- 
Alexander Polakov | plhk.ru



Re: KMS status

2013-03-08 Thread Alexander Polakov
* Martijn van Duren martijn...@gmail.com [130308 18:54]:
 Hello misc,
 
 Today I was looking through plus.html and I saw the following lines:
 * Imported xf86-video-modesetting 0.6.0 for KMS testing.
 * Update to drm(4) libdrm 2.4.31 and add the (non-yet-linked) libkms.
 
 This got me curious on the status of the KMS port.
 
 Running a `find /usr/src/ -iname *kms*` didn't return any result and
 searching the internet resulted just primarily in a phoronix article[1],
 where it's stated that OpenBSD is interested. And the last KMS-update I
 managed to find on the mailing-list is from 2011[2].
 
 So currently my main questions are:
 1) What is the current status of the KMS port?
 2) Are there any concrete plans/is there a roadmap for the port, and if
 so where can I track it?
 
 I'm not trying to push anyone to get to work (I can live without), but I
 just want to satisfy my curiosity concerning the progress.

I'm not representing OpenBSD project here, so everything following is
just my (mis-)understanding.

Generally, in OpenBSD, things get public when they're ready. This is
in contrast with other projects where they tell you on every corner of the
internet that they're starting work on X, or prepared pre-alpha-0.001
version of X or something like that. Get patient, follow tech@ and
source-changes@ and you'll know when something interesting comes up. 

Yes, KMS is being worked on by kettenis@ and jsg@, and it will be ready
when it will be.

-- 
Alexander Polakov | plhk.ru



Re: Strange ksh history behaviour

2013-01-07 Thread Alexander Polakov
* Anthony J. Bentley anth...@cathet.us [130107 18:44]:
 Stefan Sperling writes:
  On Mon, Jan 07, 2013 at 02:09:01PM +0100, Lars von den Driesch wrote:
   However, I like vim and as soon as I set the EDITOR env variable to it
   the arrow up/down functionality is gone. In fact even if EDITOR is
   set with export EDITOR= the functionality is gone. Commands typed in
   still appear in the history using fc -l. I just cannot use the
   arrow-keys.
   
   What am I missing here? Can someone confirm this?
  
  It's a silly ksh misfeature. ksh switches to vi editing mode as soon as
  vi is set as an editor.
 
 Well, that's one part of the problem. The other issue is that arrow keys
 don't work in vi mode even though they probably should.


I made a hack (vt220-compatible only) for anyone interested:

http://plhk.ru/trash/ksh/0008-ksh-vi-arrow-keys-support.patch

More funny diffs at

http://plhk.ru/trash/ksh/

-- 
Alexander Polakov | plhk.ru



Re: hotplugd(8) and ucom as class 0 generic

2012-12-27 Thread Alexander Polakov
* MERIGHI Marcus mcmer-open...@tor.at [121227 22:30]:
 just a reminder, in case someone with the necessary skills cares...
 
 Bye, Marcus
 
 mcmer-open...@tor.at (MERIGHI Marcus), 2012.06.13 (Wed) 14:17 (CEST):
  hello misc-ers, 
  
  while reworking my /etc/hotplug/* scripts I noticed, that I get 
  ucom* devices as class 0 = generic:
  
  dmesg snip:
  uftdi1 at uhub6 port 4 ELV AG ELV FHZ 1000 PC rev 1.10/2.00 addr 4
  ucom1 at uftdi1 portno 1
  
  syslog snip:
  hotplugd[10633]: ucom1 attached, class 0
  hotplugd[10633]: uftdi1 attached, class 0
  
  (yes, it's in reversed order in hotplugd syslog output)
  
  I think ucom1 is a class 5, serial line interface.
  
  (I can easily work around this, just thought I'd say a word about it.)
  
  bye, Marcus

Index: ucom.c
===
RCS file: /cvs/src/sys/dev/usb/ucom.c,v
retrieving revision 1.55
diff -u -p -u -r1.55 ucom.c
--- ucom.c  29 Nov 2011 17:15:44 -  1.55
+++ ucom.c  27 Dec 2012 19:34:43 -
@@ -147,7 +147,7 @@ int ucom_detach(struct device *, int); 
 int ucom_activate(struct device *, int); 
 
 struct cfdriver ucom_cd = { 
-   NULL, ucom, DV_DULL 
+   NULL, ucom, DV_TTY
 }; 
 
 const struct cfattach ucom_ca = { 

-- 
Alexander Polakov | plhk.ru



Re: uhub error

2012-11-11 Thread Alexander Polakov
* Chris Chung chunc...@gmail.com [12 06:30]:
 Hello,
 
 When attempting to connect an external hard drive through a usb port I'm
 receiving the error below. I can sucessfully mount my dvd drive and sd memory
 cards without issue. This could be a hardware issue, but I'm not
 sure. I have read the relevant FAQ sections along with the man pages for 
 disklabel and mount but still at a loss, so any additional insights would be 
 appreciated.
 
 # /var/log/messages
 openbox /bsd: uhub5: device problem, disabling port 2
 

Just a you are not alone reply.  This happens to me sometimes when I connect
my e-book reader (which presents itself as usb storage). 

This time it worked:

umass0 at uhub5 port 1 configuration 1 interface 0 Linux 2.6.24.2-Boeye with 
s3c-udc File-backed Storage Gadget rev 2.00/3.22 addr 3
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: Linux, File-Stor Gadget, 0322 SCSI2 0/direct 
removable serial.00850600372041756775
sd1: 1885MB, 512 bytes/sector, 3862393 sectors

Controller /dev/usb0:
addr 1: high speed, self powered, config 1, EHCI root hub(0x), 
Intel(0x8086), rev 1.00
 port 1 powered
 port 2 powered
 port 3 powered
 port 4 powered
 port 5 powered
 port 6 addr 2: high speed, self powered, config 1, product 0x4485(0x4485), 
IBM(0x04b3), rev 0.01
  port 1 addr 3: high speed, power 2 mA, config 1, File-backed Storage 
Gadget(0x0600), Linux 2.6.24.2-Boeye with s3c-udc(0x0085), rev 3.22, 
iSerialNumber 372041756775
  port 2 powered
  port 3 powered
  port 4 powered
 port 7 powered
 port 8 powered
Controller /dev/usb1:
addr 1: full speed, self powered, config 1, UHCI root hub(0x), 
Intel(0x8086), rev 1.00
 port 1 powered
 port 2 powered
Controller /dev/usb2:
addr 1: full speed, self powered, config 1, UHCI root hub(0x), 
Intel(0x8086), rev 1.00
 port 1 powered
 port 2 powered
Controller /dev/usb3:
addr 1: full speed, self powered, config 1, UHCI root hub(0x), 
Intel(0x8086), rev 1.00
 port 1 powered
 port 2 powered
Controller /dev/usb4:
addr 1: full speed, self powered, config 1, UHCI root hub(0x), 
Intel(0x8086), rev 1.00
 port 1 powered
 port 2 addr 2: full speed, power 100 mA, config 1, Biometric 
Coprocessor(0x2016), STMicroelectronics(0x0483), rev 0.01

-- 
Alexander Polakov | plhk.ru



Re: openbsd host halted with unknown acpi event

2012-10-31 Thread Alexander Polakov
* Sergey Bronnikov este...@gmail.com [121031 16:18]:
 Yesterday I have found an unpleasent bug in OpenBSD.
 
 I started two virtual machines in qemu with netbsd and building
 source inside each virtual machine.
 After about 10 min laptop become overheated just below the keyboard,
 Xorg was shutdowned and host halted with following messages on console:
 
 /bsd: acpithinkpad0: unknown event 0x6022
 /bsd: acpitz1: critical temperature exceeded 100C (3732K), shutting down
 
 Is described above load critical for openbsd?
 What is an event 0x6022? I didn't find such event in dumped acpi tables.

0x6022 ALARM: a sensor is extremely hot

http://www.mjmwired.net/kernel/Documentation/laptops/thinkpad-acpi.txt

-- 
Alexander Polakov | plhk.ru



Swapping ctrl and caps

2012-10-30 Thread Alexander Polakov
I used

 setxkbmap -option 'ctrl:nocaps,grp:lctrl_toggle,grp_led:caps,compose:lwin'

to swap ctrl and caps in X. It worked fine.
But I got quickly annoyed when switching to console. So I set

 keyboard.encoding=us.swapctrlcaps

in wsconsctl.conf and 

 setxkbmap -option 'grp:caps_toggle,grp_led:caps,compose:lwin'

in X11.

It works in console, but in X I can't switch layout. xev shows
Caps Lock when I press ctrl, not ISO_Next_group.

Is there a way to swap ctrl and caps and use the new caps
(real 'ctrl') to switch keyboard layouts in X?

kern.version=OpenBSD 5.2-current (GENERIC.MP) #60: Wed Oct 17 22:44:44 MDT 2012
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP

--
Alexander Polakov | plhk.ru



Re: figuring out the current xkb layout

2012-10-30 Thread Alexander Polakov
* LEVAI Daniel l...@ecentrum.hu [121030 15:30]:
 Hi!
 
 Alexander's mail made me remember that I was wondering about this for a
 while.
 I'm setting up my keyboard layout with `setxkbmap -layout 'us,hu'` so I
 can comfortably switch between layouts with alt+shift. But I can't seem
 to figure out what is the current layout. setxkbmap -query only shows
 'us,hu', and no amount of -v would display the current, which could be
 shown in certain places like tmux's or my wm's status bar.
 Is there a way to do this before I punch in some characters to test it?

I have written a small utility to do just that:

http://plhk.ru/static/skb/skb-0.4.tar.gz

-- 
Alexander Polakov | plhk.ru



Re: nautilus crashes in current

2012-10-01 Thread Alexander Polakov
* Erling Westenvik erling.westen...@gmail.com [121001 21:50]:
 Installed latest CURRENT as of 25th of September and everything is
 working great except for nautilus which keeps on crashing. I'm running
 dbus-daemon. When launching from a terminal, I get:
 
 ---8---
 $ nautilus
 Initializing nautilus-open-terminal extension
 ** (nautilus:1832): WARNING **: Can not get _NET_WORKAREA
 ** (nautilus:1832): WARNING **: Can not determine workarea, guessing at layout
 (nautilus:1832): Pango-CRITICAL **: pango_glyph_item_split: assertion 
 `split_index  orig-item-length' failed
 (nautilus:1832): Pango-CRITICAL **: pango_glyph_item_split: assertion 
 `split_index  orig-item-length' failed
 Segmentation fault (core dumped) 
 ---8---
 
 I'm starting X from .xinitrc like this:
 
 ---8---
 gnome-session 
 exec xmonad
 ---8---
 
 which is pretty much how I do it on my other machines.
 
 Any clues? Am I missing some not-so-obvious dependencies, or what?

It says xmonad doesn't support _NET_WORKAREA hint, which is a known issue,
see:
 
 http://code.google.com/p/xmonad/issues/detail?id=158

You may talk to xmonad people about this.

Crashing is not very nice from nautilus, though. Please report this to
GNOME people. I don't have hardware at hand to build nautilus, but I
got a diff which may help (or maybe not).

diff -urp nautilus-3.6.0.orig/src/nautilus-desktop-canvas-view.c 
nautilus-3.6.0/src/nautilus-desktop-canvas-view.c
--- nautilus-3.6.0.orig/src/nautilus-desktop-canvas-view.c  Fri Sep  7 
00:08:09 2012
+++ nautilus-3.6.0/src/nautilus-desktop-canvas-view.c   Tue Oct  2 00:32:14 2012
@@ -140,6 +140,7 @@ net_workarea_changed (NautilusDesktopCanvasView *canva
int length_returned;
NautilusCanvasContainer *canvas_container;
GdkScreen *screen;
+   int screen_width, screen_height;
 
g_return_if_fail (NAUTILUS_IS_DESKTOP_CANVAS_VIEW (canvas_view));
 
@@ -196,8 +197,10 @@ net_workarea_changed (NautilusDesktopCanvasView *canva
|| ((*nworkareas) * 4 * sizeof(long)) != length_returned
|| format_returned != 32) {
g_warning(Can not determine workarea, guessing at layout);
+   screen_width  = gdk_screen_get_width (screen);
+   screen_height = gdk_screen_get_height (screen);
nautilus_canvas_container_set_margins (canvas_container,
-0, 0, 0, 0);
+0, screen_width, 0, 
screen_height);
} else {
screen = gdk_window_get_screen (window);


This looks like a better guess to me.

--
open source wizard



Re: ctrl+a/c/d/e.. cwm, xterm -current

2012-09-12 Thread Alexander Polakov
* Artturi Alm artturi@gmail.com [120912 17:10]:
 Hi,
 
 I've lost atleast ctrl after updating(amd64) from source yesterday(i think),
 in anything besides cwm it seems, so that's my guess for the culprit.
 atm. i'm too busy to test if reverting /xenocara/app/cwm/xevents.c back
 to 1.65 does help, being able to ^C might speed up things, tho.
 I'm using 'sv' encoding for wscons if that matters, and got nothing related
 to keyboard in .Xfiles.
 
 anyone else with these symptoms?
 i think this is non-trivial enough to allow this mail without dmesg etc.
 
 -Artturi
 

Please post your ~/.cwmrc.

-- 
open source wizard



Re: How to paste links from browser into xterm on OpenBSD?

2012-09-11 Thread Alexander Polakov
* Mike Putnam m...@theputnams.net [120911 23:40]:
  This isn't as consistent as one'd hope it to be. For instance, selecting
  + middle-clicking works fine between xxxterm and xterm (both ways) but
  right-clicking + copy link location + middle-clicking in xterm doesn't.
  
 
 An OS-wide copy/paste buffer would be swell.

X11-wide: pkg_add autocutsel



ThinkPad T60 x86emu panic on resume

2012-09-02 Thread Alexander Polakov
The moon indicator is blinking, but screen stays black, so I connected
a serial cable. Here's what I got:

Script started on Sun Sep  2 19:52:24 2012
 sudo cu -l /dev/tty00
Connected
 OpenBSD/i386 BOOT 3.18
boot boot
booting hd0a:/bsd: 
/-\|/8354720-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\+1102340
 [52+377008|/-\|/-\|/-\|/-\|/-\|/-+363713\|/-\|/-\|/-\|/-\|/-\|/]=0x9b9cc0
entry point at 0x200120

[ using 741148 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2012 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 5.2-current (GENERIC.MP) #6: Sat Sep  1 20:16:09 MDT 2012
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Genuine Intel(R) CPU T2400 @ 1.83GHz (GenuineIntel 686-class) 1.83 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM
real mem  = 3219517440 (3070MB)
avail mem = 3156000768 (3009MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 03/21/11, BIOS32 rev. 0 @ 0xfd6b0, SMBIOS 
rev. 2.4 @ 0xe0010 (68 entries)
bios0: vendor LENOVO version 79ETE7WW (2.27 ) date 03/21/2011
bios0: LENOVO 2008ZBF
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET SLIC BOOT SSDT SSDT SSDT 
SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) LURT(S3) DURT(S3) EXP0(S4) EXP1(S4) 
EXP2(S4) EXP3(S4) PCI1(S4) USB0(S3) USB1(S3) USB2(S3) USB7(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 166MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Genuine Intel(R) CPU T2400 @ 1.83GHz (GenuineIntel 686-class) 1.83 GHz
cpu1: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpimcfg0 at acpi0 addr 0xf000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EXP1)
acpiprt4 at acpi0: bus 4 (EXP2)
acpiprt5 at acpi0: bus 12 (EXP3)
acpiprt6 at acpi0: bus 21 (PCI1)
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpipwrres0 at acpi0: PUBS
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 99 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model COMPATIBLE serial 29687 type LION oem PSPSP
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK docked (15)
bios0: ROM list: 0xc/0xfe00 0xd/0x1000 0xd1000/0x1000 0xdc000/0x4000! 
0xe/0x1!
cpu0: Enhanced SpeedStep 1829 MHz: speeds: 1833, 1333, 1000 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 Intel 82945GM Host rev 0x03
ppb0 at pci0 dev 1 function 0 Intel 82945GM PCIE rev 0x03: apic 1 int 16
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 ATI Radeon Mobility X1400 rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1: apic 1 int 16
drm0 at radeondrm0
azalia0 at pci0 dev 27 function 0 Intel 82801GB HD Audio rev 0x02: msi
azalia0: codecs: Analog Devices AD1981HD, 0x/0x, using Analog Devices 
AD1981HD
audio0 at azalia0
ppb1 at pci0 dev 28 function 0 Intel 82801GB PCIE rev 0x02: apic 1 int 20
pci2 at ppb1 bus 2
em0 at pci2 dev 0 function 0 Intel PRO/1000MT (82573L) rev 0x00: msi, address 
00:16:41:e0:54:df
ppb2 at pci0 dev 28 function 1 Intel 82801GB PCIE rev 0x02: apic 1 int 21
pci3 at ppb2 bus 3
wpi0 at pci3 dev 0 function 0 Intel PRO/Wireless 3945ABG rev 0x02: msi, MoW2, 
address 00:19:d2:03:ed:9d
ppb3 at pci0 dev 28 function 2 Intel 82801GB PCIE rev 0x02: apic 1 int 22
pci4 at ppb3 bus 4
ppb4 at pci0 dev 28 function 3 Intel 82801GB PCIE rev 0x02: apic 1 int 23
pci5 at ppb4 bus 12
uhci0 at pci0 dev 29 function 0 Intel 82801GB USB rev 0x02: apic 1 int 16
uhci1 at pci0 dev 29 function 1 Intel 82801GB USB rev 0x02: apic 1 int 17
uhci2 at pci0 dev 29 function 2 Intel 82801GB USB rev 0x02: apic 1 int 18
uhci3 at pci0 dev 29 function 3 Intel 82801GB USB rev 

Re: ThinkPad T60 x86emu panic on resume (w/patch)

2012-09-02 Thread Alexander Polakov
With the diff below it resumes ok to X, but when I try to switch
to text console or do a shutdown, I get this panic:

/etc/rc.shutdown in progress...
/etc/rc.shutdown complete.
Stopped at  cpu_idle_cycle+0xf: ret
ddb{1} bt
No such command
ddb{1} trace
cpu_idle_cycle(d406ac00) at cpu_idle_cycle+0xf
Bad frame pointer: 0xf546ef5c
ddb{1} machine ddbcpu 0
Stopped at  Debugger+0x4:   popl%ebp
ddb{0} bt
No such command
ddb{0} trace
Debugger(d0b035e0,f54c2f08,0,14,6b) at Debugger+0x4
i386_ipi_handler(0,20,0,f54c0010,d0510010) at i386_ipi_handler+0x5f
Xintripi() at Xintripi+0x49
--- interrupt ---
kputchar(6b,14,0,1,0) at kputchar+0x1a
kprintf(d08f3d1a,14,0,0,f54c2ef8) at kprintf+0x254
db_printf(d08f3d1a,1b88d72e,b,d03db6c2,0) at db_printf+0x3e
kdbprinttrap(109,0,d9ddae24,1000,d0a47d44) at kdbprinttrap+0x1e
kdb_trap(109,0,f54c2fa8,3,ffee3bd) at kdb_trap+0x1fc
trap() at trap+0x2e7
--- trap (number 0) ---
0:
ddb{0} 

Index: vga_pci.c
===
RCS file: /cvs/src/sys/dev/pci/vga_pci.c,v
retrieving revision 1.68
diff -u -r1.68 vga_pci.c
--- vga_pci.c   22 Aug 2012 20:58:30 -  1.68
+++ vga_pci.c   2 Sep 2012 17:42:09 -
@@ -186,7 +186,13 @@
{   0x, 0x, 0x, 0x }, 1, 0
},
 
-   {   /* All ATI video until further notice */
+   {   
+   {   PCI_VENDOR_ATI, PCI_PRODUCT_ATI_RADEON_X1400,
+   0x, 0x },
+   {   0x, 0x, 0x, 0x}, 0, 0
+   },
+
+   {   /* Other ATI video until further notice */
{   PCI_VENDOR_ATI, 0x,
0x, 0x },
{   0x, 0x, 0x, 0x}, 1, 0

* Alexander Polakov p...@sdf.org [120902 21:40]:
 Suspending system...
 # Stopped at  x86emu_halt_sys+0x47f7: movl0x40(%edi),%ecx
 x86emu_halt_sys(d408804c,3,f5470d6c,d0725f1c,d4088000) at 
 x86emu_halt_sys+0x47f
 7
 x86emu_exec(d4088000,c000,3,d05b0887,0) at x86emu_exec+0x41
 vga_post_call(d4088000,c0,f5470dbc,f5470d8c,d4016400) at vga_post_call+0x6c
 vga_pci_activate(d4016400,3,f5470dbc,d05b2208,d3f29180) at 
 vga_pci_activate+0x9
 8
 config_activate_children(d3f29180,3,f5470dec,d05b019c,0) at 
 config_activate_chi
 ldren+0x45
 config_activate_children(d4016600,3,4,100107,f5470e1c) at 
 config_activate_child
 ren+0x45
 ppbactivate(d4016600,3,f5470e5c,d05b2208,d3f29380) at ppbactivate+0x345
 config_activate_children(d3f29380,3,f5470e8c,d0840914,c0) at 
 config_activate_ch
 ildren+0x45
 config_activate_children(d4015fc0,3,1,f5470ebc,0) at 
 config_activate_children+0
 x45
 acpi_resume(d4013c00,3,0,d409a560,d4013c00) at acpi_resume+0x134
 ddb{0} trace
 x86emu_halt_sys(d408804c,3,f5470d6c,d0725f1c,d4088000) at 
 x86emu_halt_sys+0x47f
 7
 x86emu_exec(d4088000,c000,3,d05b0887,0) at x86emu_exec+0x41
 vga_post_call(d4088000,c0,f5470dbc,f5470d8c,d4016400) at vga_post_call+0x6c
 vga_pci_activate(d4016400,3,f5470dbc,d05b2208,d3f29180) at 
 vga_pci_activate+0x9
 8
 config_activate_children(d3f29180,3,f5470dec,d05b019c,0) at 
 config_activate_chi
 ldren+0x45
 config_activate_children(d4016600,3,4,100107,f5470e1c) at 
 config_activate_child
 ren+0x45
 ppbactivate(d4016600,3,f5470e5c,d05b2208,d3f29380) at ppbactivate+0x345
 config_activate_children(d3f29380,3,f5470e8c,d0840914,c0) at 
 config_activate_ch
 ildren+0x45
 config_activate_children(d4015fc0,3,1,f5470ebc,0) at 
 config_activate_children+0
 x45
 acpi_resume(d4013c00,3,0,d409a560,d4013c00) at acpi_resume+0x134
 acpi_sleep_state(d4013c00,3,0,d0840d41,d409a560) at acpi_sleep_state+0x7a
 acpi_sleep_task(d4013c00,3,d9fd0744,1,d4013c00) at acpi_sleep_task+0x1a
 acpi_dotask(d4013c00,20,d09ccf9d,0,d03db6c2) at acpi_dotask+0x42
 acpi_thread(d3f27770) at acpi_thread+0x123
 Bad frame pointer: 0xd0bbbe28
 ddb{0} boot reboot
 cbb0: bad Vcc request. sock_ctrl 0xff88, sock_status 0x
 rebooting...



Re: Absurdly high temperature reading - system shutdown

2012-08-14 Thread Alexander Polakov
* ba...@mail.dk ba...@mail.dk [120814 19:50]:
 HP 8530w OpenBSD 5.1 AMD64 GENERIC MP
 
 Got this message almost every time I boot:
 acpitz2: critical temperature exceeded 5424C (56976K), shutting down
 
 Applied the patch mentioned here and the message disappeared:
 
 http://old.nabble.com/acpiec-madness-%28HP-laptop-people-pay-attention-to-thi
 s-one%29-to29872059.html#a29872059

Wow. This patch does wonders. With it applied my HP 6910 boots with
keyboard and touchpad working four times out of five, and suspend works.



Re: Relayd 'check script' performance issue?

2012-07-30 Thread Alexander Polakov
* Bennett Samowich bsamow...@gmail.com [120730 19:38]:
 The problem exists even if I use the system's /usr/bin/false and
 /usr/bin/true commands.
 The problem exists even when PF is disabled or the only rule is pass in.
 
 That being said the script itself is a simple host lookup against the
 IP addresses to ensure the DNS server is actually resolving.   Again,
 just using /usr/bin/false or /usr/bin/true produces the same drop
 in throughput.
 
 An example of the drop looks like this:
 9913Mbps
 9913Mbps
 7253Mbps --- script interval point
 9913Mbps
 9913Mbps
 ...etc...
 
 When the script is an actual shell script rather than /usr/bin/false,
 the throughput drops spans the three seconds surrounding the time the
 script runs.
 9913Mbps
 9913Mbps
 4321Mbps
 7253Mbps --- script interval point
 5162Mbps
 9913Mbps
 9913Mbps

I'm not an expert, but AFAIU, on OpenBSD almost every syscall is executed
under global kernel lock (please correct if I'm wrong), which can be the
reason for what you're seeing here.



Re: problem in fstab

2012-07-24 Thread Alexander Polakov
* HvN huubvanniek...@gmail.com [120724 17:17]:
 I booted into single user mode, mounted / and /usr according to FAQ 8. 
 However, when I try to use vi to change fstab, it says unknown terminal 
 type. Any suggestions ?
 

export TERM=vt220

-- 
Alexander Polakov | plhk.ru



Re: switching between ethernet and wifi

2012-07-23 Thread Alexander Polakov
* frantisek holop min...@obiit.org [120724 03:14]:
 hi there,
 
 consider a notebook with two nic's: re0 (ethernet)
 and urtwn0 (usb wifi).  let's say, at boot time
 there is ethernet connection and /etc/hostname.re0
 contains dhcp.  urtwn0 is not plugged in.
 
 later, i want to switch to wifi.
 
 what i do: insert the usb wifi (/etc/hostname.urtwn0
 contains the correct network data), i disconnect the
 ethernet cable, route -n flush, ifconfig re0 down,
 sh /etc/netstart.
 
 what i expect: network is now through wifi.
 
 what i get: urtwn0 gets an IP, but route shows that the
 default route is still trying to go through re0, even if
 i comment out dhcp from /etc/hostname.re0
 
 how can i persuade the system to forget about re0?

man ifconfig

 priority n  Set the interface routing priority to n.  This will
 influence the default routing priority of new static
 routes added to the kernel.  n is in the range of 0 to 16
 with smaller numbers being better.



Re: Hibernate doesn't work on my T43

2012-07-21 Thread Alexander Polakov
* André S. andresto...@gmail.com [120721 10:20]:
 Hey,
 
 I'm testing the new hibernate support on my ThinkPad T43 running current.
 Many thanks to the developers for implementing this feature.

New hibernate support is ACPI-based, and you're running in APM mode.
From dmesg:

 apm0 at bios0: Power Management spec V1.2
 acpi at bios0 function 0x0 not configured

Try disabling apm with boot -c or config(8).
 
-- 
Alexander Polakov | plhk.ru



Re: Hibernate doesn't work on my T43

2012-07-21 Thread Alexander Polakov
* André S. andresto...@gmail.com [120721 19:08]:
 Hey,
 
 Alexander Polakov wrote:
  New hibernate support is ACPI-based
 
 Ah, I didn't know that.
 
  Try disabling apm with boot -c or config(8).
 
 The laptop now goes immediately into sleep after issuing ZZZ, but
 doesn't wake up anymore.

dmesg with apm disabled can be useful.



Re: Polish encoding on console in x window

2012-07-20 Thread Alexander Polakov
* Adam Bryt adam.b...@gmx.com [120720 10:56]:
 In ksh i can type polish signs in filenames (but 'ls' dont display it
 correctly).

Install colorls or use ls | cat.

-- 
Alexander Polakov | plhk.ru



HP 6910p: keyboard touchpad not working

2012-07-13 Thread Alexander Polakov
Keyboard and touchpad only work after a cold boot. And by cold
boot I mean pull out AC and detach the battery.

OpenBSD 5.2-beta (GENERIC.MP) #347: Wed Jul 11 02:33:30 MDT 2012
t...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4285202432 (4086MB)
avail mem = 4148764672 (3956MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf2d3c (27 entries)
bios0: vendor Hewlett-Packard version 68MCU Ver. F.0A date 09/13/2007
bios0: Hewlett-Packard HP Compaq 6910p
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC HPET APIC MCFG TCPA SSDT SSDT SSDT SSDT
acpi0: wakeup devices C0B0(S5) C108(S3) C10F(S3) C110(S3) C111(S3) C119(S3) 
C11A(S3) C11B(S3) C131(S5) C2A7(S5) C132(S5) C2A8(S5) C134(S5) C2A8(S5) 
C137(S0) C23D(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz, 1995.27 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,NXE,LONG,LAHF
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: apic clock running at 199MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz, 1995.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,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF
cpu1: 4MB 64b/line 16-way L2 cache
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 1
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpiprt0 at acpi0: bus 2 (C0B0)
acpiprt1 at acpi0: bus 8 (C11D)
acpiprt2 at acpi0: bus 16 (C131)
acpiprt3 at acpi0: bus 40 (C134)
acpiprt4 at acpi0: bus 0 (C003)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpipwrres0 at acpi0: C272
acpipwrres1 at acpi0: C27A
acpipwrres2 at acpi0: C281
acpipwrres3 at acpi0: C29D
acpipwrres4 at acpi0: C1C5
acpipwrres5 at acpi0: C3B5
acpipwrres6 at acpi0: C3B6
acpipwrres7 at acpi0: C3B7
acpipwrres8 at acpi0: C3B8
acpipwrres9 at acpi0: C3B9
acpitz0 at acpi0: critical temperature is 256 degC
acpitz1 at acpi0: critical temperature is 105 degC
acpitz2 at acpi0: critical temperature is 105 degC
acpitz3 at acpi0: critical temperature is 105 degC
acpitz4 at acpi0: critical temperature is 110 degC
acpibat0 at acpi0: C23B model Primary serial 02765 2005/07/03 type LIon oem 
Hewlett-Packard
acpibat1 at acpi0: C23A not present
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: C2BB
acpibtn1 at acpi0: C153
acpivideo0 at acpi0: C098
acpivout0 at acpivideo0: C1AD
cpu0: Enhanced SpeedStep 1995 MHz: speeds: 2001, 2000, 1600, 1200, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 Intel GM965 Host rev 0x0c
vga1 at pci0 dev 2 function 0 Intel GM965 Video rev 0x0c
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 0xd000, size 0x1000
inteldrm0 at vga1: apic 1 int 16
drm0 at inteldrm0
Intel GM965 Video rev 0x0c at pci0 dev 2 function 1 not configured
em0 at pci0 dev 25 function 0 Intel ICH8 IGP M AMT rev 0x03: msi, address 
00:1e:ec:20:e7:16
uhci0 at pci0 dev 26 function 0 Intel 82801H USB rev 0x03: apic 1 int 16
uhci1 at pci0 dev 26 function 1 Intel 82801H USB rev 0x03: apic 1 int 17
ehci0 at pci0 dev 26 function 7 Intel 82801H USB rev 0x03: apic 1 int 18
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 82801H HD Audio rev 0x03: msi
azalia0: codecs: Analog Devices AD1981HD, Conexant/0x2c06, using Analog Devices 
AD1981HD
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 Intel 82801H PCIE rev 0x03
pci1 at ppb0 bus 8
ppb1 at pci0 dev 28 function 1 Intel 82801H PCIE rev 0x03
pci2 at ppb1 bus 16
iwn0 at pci2 dev 0 function 0 Intel Wireless WiFi Link 4965 rev 0x61: msi, 
MIMO 2T3R, MoW2, address 00:1f:3b:3a:db:b9
ppb2 at pci0 dev 28 function 4 Intel 82801H PCIE rev 0x03: msi
pci3 at ppb2 bus 40
uhci2 at pci0 dev 29 function 0 Intel 82801H USB rev 0x03: apic 1 int 20
uhci3 at pci0 dev 29 function 1 Intel 82801H USB rev 0x03: apic 1 int 22
uhci4 at pci0 dev 29 function 2 Intel 82801H USB rev 0x03: apic 1 int 18
ehci1 at pci0 dev 29 function 7 Intel 82801H USB rev 0x03: apic 1 int 20
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 Intel EHCI root hub rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 Intel 82801BAM Hub-to-PCI rev 0xf3
pci4 at ppb3 bus 2
cbb0 at pci4 dev 6 function 0 Ricoh 5C476 CardBus rev 0xb9: apic 1 int 18
cbb1 at pci4 dev 6 function 1 Ricoh 5C476 CardBus rev 0xb9: apic 1 int 19
Ricoh 5C832 Firewire rev 0x03 at pci4 dev 6 function 2 not configured
sdhc0 at pci4 dev 6 function 3 Ricoh 5C822 SD/MMC rev 

Re: bsd.rd anonymous ftp login broken?

2012-07-11 Thread Alexander Polakov
* Jan Stary h...@stare.cz [120712 01:55]:
 Trying to reinstall with the current i386/bsd.rd.
 All goes well until I actually select a ftp mirror,
 and asked for the ftp login, I accept the default of
 'anonymous'. It keeps asking:
 
   ftp login ? anonymous [enter]
   ftp login ? anonymous [enter]
   ftp login ? anonymous [enter]
 
 and never gets past this.

Same here (amd64). I typed anonymous and it proceeded.
 
 Tried with different ftp mirrors,
 so it's not that the one mirror is broken.
 
   Jan



Re: Openbsd 5.1 Review on Distrowatch

2012-05-15 Thread Alexander Polakov
* Ralph Ellis ralphell...@netscape.ca [120515 02:22]:
 Hi,
 As a relative newcomer to Openbsd, I decided to write a review of
 the 5.1 release for Distrowatch.com from a desktop user's
 perspective.
 Openbsd has come a long way in terms of improved hardware support
 and ease of setup and my experience has been very positive.
 
 The review is at:
 
 http://distrowatch.com/weekly.php?issue=20120514#feature
 
There are no proprietary video drivers in OpenBSD so there is no 2D or
3D acceleration.

You forgot in my case part. There're no proprietary video drivers,
right, but free drm infrastructure provides acceleration for many cards.

-- 
Alexander Polakov | plhk.ru



Re: hotplugd/disklabel + smartphone sd card

2012-05-12 Thread Alexander Polakov
* frantisek holop min...@obiit.org [120511 22:42]:
 hi there,
 
 i am trying to trick /etc/hotplug/attach into mounting
 the sd card from my android smartphone.
 
 the principal problem seems to be that at the time
 of e.g. sd2 showing up, the disklabel is not ready yet.
 (maybe the delay is the time android needs to unmount it)
 
 as no disklabel is ready, 'label:' is also empty and nothing
 happens.
 
 so i set out to try make a small sleep loop until
 disklabel can return the label instead of
 ioctl DIOCGDINFO: Input/output error
 
 but it seems like disklabel does not really differentiate
 between failures.
 
 $ sudo disklabel sd2
 disklabel: ioctl DIOCGDINFO: Input/output error
 tyin:~$ echo $?
 4
 
 $ sudo disklabel sd3
 disklabel: /dev/rsd3c: Device not configured
 $ echo $?
 4
 
 also, i could not find the return codes in the disklabel
 man page.  is there a way to differentiate between the
 error situations?  i dont want to loop forever...

Makes sense to me.

Index: disklabel.c
===
RCS file: /cvs/src/sbin/disklabel/disklabel.c,v
retrieving revision 1.185
diff -u -p -u -r1.185 disklabel.c
--- disklabel.c 6 Apr 2012 18:20:35 -   1.185
+++ disklabel.c 12 May 2012 19:34:50 -
@@ -217,7 +217,7 @@ main(int argc, char *argv[])
f = opendev(dkname, (op == READ ? O_RDONLY : O_RDWR), OPENDEV_PART,
specname);
if (f  0)
-   err(4, %s, specname);
+   err(3, %s, specname);
 
switch (op) {
case EDIT:



Re: Xsetup_0 empty

2012-05-06 Thread Alexander Polakov
* Laurence Rochfort laurence.rochf...@gmail.com [120506 13:12]:
 I was editing Xsetup_0 and the power went, now the file is empty and
 my backup is gone.
 
 Would somebody send me a copy of the file as per a fresh install?
 
 Incidentally, I looked on the CVS web browser and could only find a
 very old version.  I guess I'm using the wb interface wrong.
 
 http://www.openbsd.org/cgi-bin/cvsweb/X11/xc/programs/xdm/config/Xsetup_0

http://www.openbsd.org/cgi-bin/cvsweb/xenocara/app/xdm/config/Xsetup_0

-- 
Alexander Polakov | plhk.ru



Re: Audio ports - stuttering - fixed with sndiod -r 48000 -b 7680 -z 1920

2012-02-08 Thread Alexander Polakov
* richardtoo...@paradise.net.nz richardtoo...@paradise.net.nz [120208 04:50]:
 Hi, guys.
 
 I'm not sure if this is an issue, because the defaults might be best for a
 normal/base install, just asking if this is as expected.
 
 This is my desktop/development box.  I've got a snapshot of 30th Jan and a set
 of ports from soon after.
 
 OpenBSD 5.1-beta (GENERIC.MP) #172: Mon Jan 30 16:30:40 MST 2012
 dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
 
 Rhythmbox and Gnome mplayer stuttering a bit playing mp3s ... especially if I
 Alt-Tab to Firefox  Thunderbird (and do a bit of work in them.)  If I remove
 hands from keyboard, no stuttering.

I think I have the same problem with my setup.

azalia0 at pci0 dev 20 function 2 ATI SBx00 HD Audio rev 0x00: apic 2 int 16
azalia0: codecs: Conexant/0x5066
audio0 at azalia0

 I remembered seeing this post (important audio settings to test)
 
 http://comments.gmane.org/gmane.os.openbsd.tech/27483
 
 And the below (from that post) makes my problems go away:
 
 # sndiod -r 48000 -b 7680 -z 1920

Same here. I'm using audacious to play music. 

I also noticed that with default (no) sndiod flags azalia0 interrupts
go high (200) while it's 50 when I use flags above.
 
-- 
Alexander Polakov | plhk.ru



Re: inteldrm_attach still broken

2011-12-30 Thread Alexander Polakov
* listmail listm...@entertech.com [111230 08:52]:
 Hi,
 
 Back in June of 2011, I reported problems with the Supermicro P8SCI and P8SCT
 motherboards failing to boot OpenBSD 4.8 and 4.9, due to a kernel page fault
 trap at interdrm_attach. Just for fun, I tried OpenBSD 5.0 tonight, and the
 same problem still happens. 
 
 Has anyone found a workaround for this, or are there any plans to fix it? I
 have several of these motherboards running in firewalls, and unless I can find
 a fix, these boxes are trapped at OpenBSD 4.7 until I can replace them all.

Have you tried 

 boot -c
 disable inteldrm

If it works, use config -ef /bsd to make it permanent.

-- 
Alexander Polakov | plhk.ru



Re: can not use the up key to last command at root?

2011-12-21 Thread Alexander Polakov
* David Coppa dco...@gmail.com [111221 14:09]:
 On Wed, Dec 21, 2011 at 10:41 AM, Stuart Henderson s...@spacehopper.org
 wrote:
  On 2011-12-20, johnw johnw.m...@gmail.com wrote:
  The aliases are not neccesary. I suspect root's shell is in vi mode.
  Check with set -o
 
   -Otto
 
 
  Yes, i have this one in ~/.kshrc,
  export EDITOR=vim.
  delete this can solve the problem.
 
  thank all.
 
 
  If you still want to use vim (or any editor containing the
  string 'vi') in programs which use EDITOR without invoking
  this feature of the shell, create a symlink containing
  the string 'emacs' and use that in EDITOR instead..
 
 Or:
 
 EDITOR=vi
 VISUAL=not_emacs
 
 $ ls -al /usr/bin/not_emacs
 lrwxr-xr-x  1 root  wheel  2 Dec 21 11:03 /usr/bin/not_emacs - vi


Isn't set -o emacs at the end of ~/.kshrc enough? It seems to be (at
least with my somewhat patched ksh).

-- 
Alexander Polakov | plhk.ru



Re: again on rc.d - squid

2011-11-13 Thread Alexander Polakov
* fRANz andrea.francesc...@gmail.com [13 19:39]:
 Hi,
 I just updated (fresh install) my OpenBSD box to v5.0 with pf and
 squid (squid-2.7.STABLE9p11-snmp.tgz from pkg).
 So I tried to configure rc to start squid at boot in rc.conf.local,
 with a lot of combinations:
 
 squid_flags=
 squid_flags=
 rc_scripts=squid
 squid=YES

It's pkg_scripts.
 
-- 
Alexander Polakov | plhk.ru



Re: 5.0 vmt0 kernel panic in Linux KVM

2011-11-07 Thread Alexander Polakov
* Walter Haidinger walter.haidin...@gmx.at [07 14:15]:
 ioapic0 at mainbus0: apid 1 pa 0xfec0, version 11, 24 pins
 ioapic0: misconfigured as apic 0, remapped to apid 1
 bios0: ROM list: 0xc/0x9e00 0xca000/0xa00 0xcb000/0xa00 0xcc000/0x600 
 0xcc800/0x2400
 vmt0 at mainbus0
 vmware: open failed, eax=564d5868, ecx=001e, edx=5658
 vmt0: failed to open backdoor RPC channel (TCLO protocol)
 kernel: protection fault trap, code=0
 Stopped at  k1x_init+0x56:  rdmsr
 k1x_init(d0ad7540,d09ae620,d0b8ce58,d059ce20,3002) at k1x_init+0x56

k1x_init() is not related to vmt, it is from k1x-pstate.c, which
is cpu power state driver for K10 processors. 

I don't know of an easy way to disable it but recompiling the kernel
with this:

Index: sys/arch/i386/i386/machdep.c
===
RCS file: /cvs/src/sys/arch/i386/i386/machdep.c,v
retrieving revision 1.506
diff -u -p -r1.506 machdep.c
--- sys/arch/i386/i386/machdep.c2 Nov 2011 23:53:44 -   1.506
+++ sys/arch/i386/i386/machdep.c7 Nov 2011 15:04:49 -
@@ -1347,8 +1347,10 @@ amd_family6_setperf_setup(struct cpu_inf
k8_powernow_init();
break;
}
+#if 0
if (ci-ci_family = 0x10)
k1x_init(ci);
+#endif
 }
 #endif
 

 mainbus_attach(0,d130bfc0,0,d09aafc0,0) at mainbus_attach+0xc1
 config_attach(0,d09aafc0,0,0,d0a1bc40) at config_attach+0x1bb
 config_rootfound(d08cde8c,0,0,d03d8b51,0) at config_rootfound+0x46
 cpu_configure(d0ad7540,1,1000,cff3f000,1) at cpu_configure+0x29
 main(d02004ba,d02004c2,0,0,0) at main+0x3ea
 ddb 
 
-- 
Alexander Polakov | plhk.ru



high interrupts on boot

2011-11-04 Thread Alexander Polakov
 at scsibus3 targ 1 lun 0: OPENBSD, SR CRYPTO, 005 SCSI2 0/direct fixed
sd2: 206221MB, 512 bytes/sector, 422340976 sectors
softraid0: volume sd2 is roaming, it used to be sd1, updating metadata
Stopped at  Debugger+0x5:   leave   
ddb{0} stray interrupts:
  0: 2789
  1: 3
  7: 2841
unhandled interrupts:
1: 142: pin 1@ioapic0 pin 1 flags 0 type 2 idtvec 145 levels 9/9
0x41
ddb{0} pci1: performing msi suspend for 80012800
pci2: performing msi suspend for 8002
pci1: performing msi resume for 80012800
pci2: performing msi resume for 8002
sd1 detached
scsibus1 detached
umass0 detached
umass0 at uhub1 port 1 configuration 1 interface 0 Generic USB2.0-CRW rev 
2.00/58.88 addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: Generic-, Multi-Card, 1.00 SCSI0 0/direct 
removable serial.0bda015811417340
video0 detached
uvideo0 detached
uvideo0 at uhub1 port 2 configuration 1 interface 0 Image Processor Integrated 
Camera rev 2.00/30.08 addr 3
video0 at uvideo0
Stopped at  Debugger+0x5:   leave   
ddb{0} stray interrupts:
  0: 5122
  1: 8
  7: 5275
unhandled interrupts:
1: 238: pin 1@ioapic0 pin 1 flags 0 type 2 idtvec 145 levels 9/9
11: 19: pin 22@ioapic0 pin 22 flags 0 type 3 idtvec 97 levels 6/6
0x42
ddb{0} umass1 at uhub0 port 2 configuration 1 interface 0 COWON Systems, Inc. 
iAUDIO 7 rev 2.00/1.00 addr 2
umass1: using SCSI over Bulk-Only
scsibus4 at umass1: 2 targets, initiator 0
sd3 at scsibus4 targ 1 lun 0: COWON, iAUDIO 7, 0100 SCSI0 0/direct removable 
serial.0e2107500013D304E8A7
sd3: 3896MB, 512 bytes/sector, 7979008 sectors

-- 
Alexander Polakov | plhk.ru



Re: High interrupt rates after resume

2011-11-01 Thread Alexander Polakov
* Leroy van Engelen leroy.vanenge...@gmail.com [111019 19:07]:
 This was also seen on a macbook by Jan Stary:
 http://marc.info/?l=openbsd-miscm=131213545109050w=2
 
 And on my Samsung N210:
 http://marc.info/?l=openbsd-miscm=131193104030288w=2
 
 I still have this problem, and ran out of options to investigate. The funny
 thing is that, just like the MacBook case above, the high interrupt load
 goes away every other suspend/resume. Do you see this as well?  It seems
 like a clue, but I have no idea where to begin investigating, except for the
 ipi code you wrote the diff for.


Hi, 
mikeb@ just committed a diff for ppb which solves the problem for me.
Is it the case for you?

--
Alexander Polakov



Re: High interrupt rates after resume

2011-10-22 Thread Alexander Polakov
* Philip Guenther guent...@gmail.com [111022 05:03]:
 On Sun, Oct 16, 2011 at 3:00 PM, Alexander Polakov polac...@gmail.com wrote:
  I've got a problem. When I suspend my laptop (Lenovo X100e, dmesg
  below), it suspends just fine, and resumes well too (thanks for that!).
  But after resume I see high interrupt rates (like 77%) in top and
  vmstat, it feels slower and fan never stops. Any ideas?
 ...
  % vmstat -iv
  interrupt            total   rate
  irq0/clock           185246   199
  irq0/ipi            225445   242
  irq0/ipi_nop          216556   232
  irq0/ipi_flushfp          32    0
  irq0/ipi_synchfp         8746    9
  irq0/ipi_mtrr            1    0
  irq0/ipi_setperf         110    0
  irq144/acpi0           1160    1
  irq99/re0            6380    6
  irq97/ahci0           11188    12
  irq98/ohci0             1    0
  irq98/ohci1             1    0
  irq100/ohci2            1    0
  irq101/ehci1           260    0
  irq98/azalia0          25407    27
  irq145/pckbc0          3023    3
  irq146/pckbc0          3826    4
  Total             687383   739
 
 That's the after-resume output?  What's the vmstat -i output look like
 before you first suspend+resume and the system is idle?

The numbers are pretty much the same.

Here's what I got with recent snapshot kernel

kern.version=OpenBSD 5.0-current (GENERIC.MP) #103: Thu Oct 20 17:38:10 MDT 2011
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP


BEFORE SUSPEND (0.4% interrupts)

interrupt   total rate
irq0/clock 281765  199
irq0/ipi   147700  104
irq144/acpi0 17541
irq99/re070214
irq97/ahci0 114788
irq98/ohci0 10
irq98/ohci1 10
irq100/ohci210
irq101/ehci1  1400
irq98/azalia0 3240
irq145/pckbc020251
irq146/pckbc0   112207
Total  463430  328

AFTER SUSPEND (57% interrupts)
--
interrupt   total rate
irq0/clock 286770  199
irq0/ipi   150179  104
irq144/acpi0 17891
irq99/re072485
irq97/ahci0 116018
irq98/ohci0 10
irq98/ohci1 10
irq100/ohci210
irq101/ehci1  2600
irq98/azalia0 3300
irq145/pckbc021031
irq146/pckbc0   112707
Total  471553  328

AFTER SECOND SUSPEND (0.4% interrupts)
--
interrupt   total rate
irq0/clock 304425  199
irq0/ipi   157971  103
irq144/acpi0 19041
irq99/re076224
irq97/ahci0 117797
irq98/ohci0 10
irq98/ohci1 10
irq100/ohci210
irq101/ehci1  3800
irq98/azalia0 3310
irq145/pckbc023331
irq146/pckbc0   113207
Total  498068  326

-- 
Alexander Polakov | plhk.ru



Re: High interrupt rates after resume

2011-10-21 Thread Alexander Polakov
* Alexander Polakov polac...@gmail.com [111017 02:02]:
 I've got a problem. When I suspend my laptop (Lenovo X100e, dmesg
 below), it suspends just fine, and resumes well too (thanks for that!).
 But after resume I see high interrupt rates (like 77%) in top and
 vmstat, it feels slower and fan never stops. Any ideas?


I made some experiments with boot bsd -c

1) disable ohci. 57% interrupts
2) disable ehci. ~20% interrupts
3) disable ahci. starts from 5%, +0.1% every ~5 seconds (???)
4) disable re. 57% interrupts
5) disable azalia. 57% interrupts

-- 
Alexander Polakov | plhk.ru



High interrupt rates after resume

2011-10-16 Thread Alexander Polakov
 fully associative
cpu1: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 21, 24 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-3
acpihpet0 at acpi0: 14318180 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (PB5_)
acpiprt2 at acpi0: bus 4 (P2P_)
acpiprt3 at acpi0: bus 1 (AGP_)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2, PSS
acpicpu1 at acpi0: PSS
acpitz0 at acpi0: critical temperature is 92 degC
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
acpithinkpad0 at acpi0
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT1 model 42T4785 serial   958 type LION oem SANYO
acpibtn2 at acpi0: LID_
cpu0: PowerNow! K8 1596 MHz: speeds: 1600 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 AMD RS780 Host rev 0x00
ppb0 at pci0 dev 1 function 0 AMD RS780 PCIE rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 5 function 0 ATI Radeon HD 3200 rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1: apic 2 int 18
drm0 at radeondrm0
ppb1 at pci0 dev 5 function 0 AMD RS780 PCIE rev 0x00: msi
pci2 at ppb1 bus 2
re0 at pci2 dev 0 function 0 Realtek 8168 rev 0x03: RTL8168D/8111D (0x2800), 
apic 2 int 17, address c8:0a:a9:cc:b0:01
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2
ahci0 at pci0 dev 17 function 0 ATI SBx00 SATA rev 0x00: apic 2 int 22, AHCI 
1.1
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0: ATA, WDC WD2500BEVT-0, 02.0 SCSI3 0/direct 
fixed naa.50014ee204a69fb1
sd0: 238475MB, 512 bytes/sector, 488397168 sectors
ohci0 at pci0 dev 18 function 0 ATI SB700 USB rev 0x00: apic 2 int 16, 
version 1.0, legacy support
ohci1 at pci0 dev 18 function 1 ATI SB700 USB rev 0x00: apic 2 int 16, 
version 1.0, legacy support
ehci0 at pci0 dev 18 function 2 ATI SB700 USB2 rev 0x00: apic 2 int 17
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 ATI EHCI root hub rev 2.00/1.00 addr 1
ohci2 at pci0 dev 19 function 0 ATI SB700 USB rev 0x00: apic 2 int 18, 
version 1.0, legacy support
ehci1 at pci0 dev 19 function 2 ATI SB700 USB2 rev 0x00: apic 2 int 19
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 ATI EHCI root hub rev 2.00/1.00 addr 1
piixpm0 at pci0 dev 20 function 0 ATI SBx00 SMBus rev 0x3c: SMI
iic0 at piixpm0
spdmem0 at iic0 addr 0x51: 2GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
azalia0 at pci0 dev 20 function 2 ATI SBx00 HD Audio rev 0x00: apic 2 int 16
azalia0: codecs: Conexant/0x5066
audio0 at azalia0
pcib0 at pci0 dev 20 function 3 ATI SB700 ISA rev 0x00
ppb2 at pci0 dev 20 function 4 ATI SB600 PCI rev 0x00
pci3 at ppb2 bus 4
pchb1 at pci0 dev 24 function 0 AMD AMD64 0Fh HyperTransport rev 0x00
pchb2 at pci0 dev 24 function 1 AMD AMD64 0Fh Address Map rev 0x00
pchb3 at pci0 dev 24 function 2 AMD AMD64 0Fh DRAM Cfg rev 0x00
kate0 at pci0 dev 24 function 3 AMD AMD64 0Fh Misc Cfg rev 0x00: core rev 
BH-G2
usb2 at ohci0: USB revision 1.0
uhub2 at usb2 ATI OHCI root hub rev 1.00/1.00 addr 1
usb3 at ohci1: USB revision 1.0
uhub3 at usb3 ATI OHCI root hub rev 1.00/1.00 addr 1
usb4 at ohci2: USB revision 1.0
uhub4 at usb4 ATI OHCI root hub rev 1.00/1.00 addr 1
isa0 at pcib0
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
wsmouse1 at pms0 mux 0
pms0: Synaptics touchpad, firmware 7.4
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
mtrr: Pentium Pro MTRR support
umass0 at uhub1 port 1 configuration 1 interface 0 Generic USB2.0-CRW rev 
2.00/58.88 addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: Generic-, Multi-Card, 1.00 SCSI0 0/direct 
removable serial.0bda015811417340
uvideo0 at uhub1 port 2 configuration 1 interface 0 Image Processor Integrated 
Camera rev 2.00/30.08 addr 3
video0 at uvideo0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (ef779c8e627ac39e.a) swap on sd0b dump on sd0b
sd2 at scsibus3 targ 1 lun 0: OPENBSD, SR CRYPTO, 005 SCSI2 0/direct fixed
sd2: 206221MB, 512 bytes/sector, 422340976 sectors
sd1 detached
scsibus1 detached
umass0 detached
umass0 at uhub1 port 1 configuration 1 interface 0 Generic USB2.0-CRW rev 
2.00/58.88 addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: Generic-, Multi-Card, 1.00 SCSI0 0/direct 
removable serial.0bda015811417340
video0 detached
uvideo0 detached
uvideo0 at uhub1 port 2 configuration 1 interface 0 Image Processor Integrated 
Camera rev 2.00/30.08 addr 3
video0 at uvideo0

-- 
Alexander Polakov | plhk.ru



Re: query bug reports?

2011-10-14 Thread Alexander Polakov
* Jeremie Courreges-Anglas ktulu+o...@wxcvbn.org [111014 05:45]:
 4) i'm not afraid to get bashed if I say crap / if I provide a wrong diff.

That's fine with me too. What I dislike is when I get no comments at
all. Developers are busy, it's a known fact, but writing will look into
it or no way for this feature in OpenBSD doesn't take much time, does
it? I guess diffs just get lost in the flows of mailinglists. Here comes
the issue of better tools.

-- 
Alexander Polakov | plhk.ru



Re: ksh: bad number (with leading zeroes) should not work for 0 - 7

2011-09-12 Thread Alexander Polakov
* Abel Abraham Camarillo Ojeda acam...@verlet.org [110913 01:46]:
 Some of our shell scripts that work with dates and do something like:
 
 month=`date +%m`
 something  month=$((month-1))
 
 Suddenly started crashing on august... there seems to be a bug identifying
 not-numbers (numbers with leading zeroes) before '08' (eigth), how to 
 reproduce:

Quoting ksh(1):

 Additionally, integers may be prefixed with `0X' or `0x' (specifying base 16) 
or
 `0' (base 8) in all forms of arithmetic expressions, except as numeric 
arguments
 to the test command.

 ksh: 08: bad number `08'

08 doesn't exist in base 8

-- 
Alexander Polakov | plhk.ru



Re: 'ő' character doesn't get displayed in ls(1) output with UTF-8 locale

2011-08-12 Thread Alexander Polakov
2011/8/12, LEVAI Daniel l...@ecentrum.hu:
 Hi!

 I'm using -current, and running X with LC_CTYPE=hu_HU.UTF-8.
 I noticed that ls(1) won't display this one character (there are maybe
 more, I only noticed this one): 'E ' (nor its capitalized version: 'E ').

ls doesn't support multibyte characters yet, try this:
http://kerneltrap.org/mailarchive/openbsd-tech/2011/1/4/6887598

The bugs in wcwidth() mentioned later in the thread are now fixed, I think.

-- 
Alexander Polakov | plhk.ru



Re: Load average question

2011-08-08 Thread Alexander Polakov
2011/8/8, Rikky Taylor rikkytay...@hotmail.co.uk:
 I am a little puzzled by how openbsd calculated load avaerage.

 I have a server running 4.9 i386 that should be doing very little indeed yet
 has a consistent load average of 0.6-0.9

 Other similar servers have consisten load averages of 0.05-0.1

 when i do a ps aux it shows a small number of processes using 0.0 CPU and
 very little memory.

 Where is the load coming from? I am not sure where to look.

http://www.undeadly.org/cgi?action=articlesid=20090715034920mode=expanded

-- 
Alexander Polakov | plhk.ru



savecore: /bsd: kvm_read: version misread

2011-07-27 Thread Alexander Polakov
When booting the system I see this message, how can I get rid of it?
Userland  kernel are *not* out-of-sync (upgraded from snapshot).
If I do boot crash, savecore saves core fine on the next boot,
but on subsequent boots version misread is back again.

I'm tracking -current on amd64.
-- 
Alexander Polakov | plhk.ru



Re: ksh - arrow keys in vi mode?

2011-07-22 Thread Alexander Polakov
* Alexander Polakov polac...@gmail.com [110721 22:01]:
 * Dmitrij D. Czarkoff czark...@gmail.com [110721 14:49]:
  Hello!
  
  I tried both documentation and google, and I could only figure out how to
  enable arrow keys in emacs mode of ksh.
  
  Is there a way to enable them in vi mode? Same goes for HOME and END 
  buttons.
 
 Try the patch below. 
 
 You probably wonder why cursor movement is done in such a strange way,
 reimplementing both domove() and vi_cmd(), but I couldn't find a better
 way to go to end of line + one.

This one should be a bit better..

diff --git a/edit.c b/edit.c
index 36f26ea..5d97dba 100644
--- a/edit.c
+++ b/edit.c
@@ -27,6 +27,7 @@ static intx_file_glob(int, const char *, int, char ***);
 static int x_command_glob(int, const char *, int, char ***);
 static int x_locate_word(const char *, int, int, int *, int *);
 
+int inputq;
 
 /* Called from main */
 void
@@ -117,6 +118,12 @@ x_getc(void)
char c;
int n;
 
+   if (inputq) {
+   c = inputq;
+   inputq = 0;
+   return c;
+   }
+
while ((n = blocking_read(STDIN_FILENO, c, 1))  0  errno == EINTR)
if (trap) {
x_mode(false);
@@ -128,6 +135,26 @@ x_getc(void)
return (int) (unsigned char) c;
 }
 
+int
+x_nbgetc(void)
+{
+   char c;
+   int n;
+   int flags;
+
+   if ((flags = fcntl(STDIN_FILENO, F_GETFL, 0))  0)
+   return -1;
+   flags |= O_NONBLOCK;
+   if (fcntl(STDIN_FILENO, F_SETFL, flags)  0)
+   return -1;
+   while ((n = read(STDIN_FILENO, c, 1))  0  errno == EAGAIN)
+   return -1;
+   if (n != 1)
+   return -1;
+   reset_nonblock(STDIN_FILENO);
+   return (int) (unsigned char) c;
+}
+
 void
 x_flush(void)
 {
@@ -135,6 +162,12 @@ x_flush(void)
 }
 
 void
+x_putback(int c) 
+{
+   inputq = c;
+}
+
+void
 x_putc(int c)
 {
shf_putc(c, shl_out);
diff --git a/edit.h b/edit.h
index 258affe..87c52cc 100644
--- a/edit.h
+++ b/edit.h
@@ -46,7 +46,9 @@ EXTERN X_chars edchars;
 
 /* edit.c */
 intx_getc(void);
+intx_nbgetc(void);
 void   x_flush(void);
+void   x_putback(int);
 void   x_putc(int);
 void   x_puts(const char *);
 bool   x_mode(bool);
diff --git a/vi.c b/vi.c
index 0bac6be..5850b50 100644
--- a/vi.c
+++ b/vi.c
@@ -247,6 +247,47 @@ x_vi(char *buf, size_t len)
return es-linelen;
 }
 
+static int keypad(int ch) {
+   int cur = 0;
+   char cmd;
+
+   switch (ch) {
+   case 'D': /* left */
+   cur--;
+   break;
+   case 'C': /* right */
+   cur++;
+   break;
+   case 'A': /* up */
+   cmd = 'k';
+   vi_cmd(1, cmd);
+   break;
+   case 'B': /* down */
+   cmd = 'j';
+   vi_cmd(1, cmd);
+   break;
+   case 'H': /* home */
+   es-cursor = 0;
+   break;
+   case 'F': /* end */
+   es-cursor = es-linelen;
+   break;
+   default:
+   return 1;
+   }
+   if ((cur += es-cursor) = 0) {
+   if (cur  es-linelen  cur != 0) {
+   cur--;
+   vi_error();
+   }
+   es-cursor = cur;
+   } else
+   vi_error();
+
+   refresh(0);
+   return 0;
+}
+
 static int
 vi_hook(int ch)
 {
@@ -559,6 +600,8 @@ static int
 vi_insert(int ch)
 {
int tcursor;
+   static  int escseq = 0;
+   int c;
 
if (ch == edchars.erase || ch == Ctrl('h')) {
if (insert == REPLACE) {
@@ -629,6 +672,14 @@ vi_insert(int ch)
return 1;
 
case Ctrl('['):
+   if ((c = x_nbgetc()) != -1) {
+   if (c == '[') {
+   escseq = c;
+   return 0;
+   } else
+   x_putback(c);
+   }
+escmode:
expanded = NONE;
if (first_insert) {
first_insert = 0;
@@ -673,6 +724,13 @@ vi_insert(int ch)
/* End nonstandard vi commands } */
 
default:
+   if (escseq) {
+   escseq = 0;
+   if (keypad(ch)) 
+   goto escmode;
+   return 0;
+   }
+
if (es-linelen = es-cbufsize - 1)
return -1;
ibuf[inslen++] = ch;

-- 
Alexander Polakov | plhk.ru



Re: ksh - arrow keys in vi mode?

2011-07-21 Thread Alexander Polakov
* Dmitrij D. Czarkoff czark...@gmail.com [110721 14:49]:
 Hello!
 
 I tried both documentation and google, and I could only figure out how to
 enable arrow keys in emacs mode of ksh.
 
 Is there a way to enable them in vi mode? Same goes for HOME and END buttons.

No. Currently there's no way to do that.
 
 P.S.: I know it is rather a separate question, but is there a way to start
 with command mode as it is in vi? Man page says just You start out in insert
 mode without any tips on whether this configuration is default or fixed.

No. But you can use the patch below:

diff --git a/vi.c b/vi.c
index 0bac6be..b8f6d5b 100644
--- a/vi.c
+++ b/vi.c
@@ -193,6 +193,7 @@ x_vi(char *buf, size_t len)
int c;
 
vi_reset(buf, len  CMDLEN ? CMDLEN : len);
+   insert = 0;
vi_pprompt(1);
x_flush();
while (1) {

-- 
Alexander Polakov | plhk.ru



Re: ksh - arrow keys in vi mode?

2011-07-21 Thread Alexander Polakov
* Dmitrij D. Czarkoff czark...@gmail.com [110721 14:49]:
 Hello!
 
 I tried both documentation and google, and I could only figure out how to
 enable arrow keys in emacs mode of ksh.
 
 Is there a way to enable them in vi mode? Same goes for HOME and END buttons.

Try the patch below. 

You probably wonder why cursor movement is done in such a strange way,
reimplementing both domove() and vi_cmd(), but I couldn't find a better
way to go to end of line + one.

diff --git a/vi.c b/vi.c
index 0bac6be..c1a7b7d 100644
--- a/vi.c
+++ b/vi.c
@@ -247,6 +247,48 @@ x_vi(char *buf, size_t len)
return es-linelen;
 }
 
+static void keypad(int ch) {
+   int cur = 0;
+   char cmd;
+
+   switch (ch) {
+   case 'D': /* left */
+   cur--;
+   break;
+   case 'C': /* right */
+   cur++;
+   break;
+   case 'A': /* up */
+   cmd = 'k';
+   vi_cmd(1, cmd);
+   break;
+   case 'B': /* down */
+   cmd = 'j';
+   vi_cmd(1, cmd);
+   break;
+   case 'H': /* home */
+   es-cursor = 0;
+   break;
+   case 'F': /* end */
+   es-cursor = es-linelen;
+   break;
+   default:
+   vi_error();
+   return;
+   }
+   if ((cur += es-cursor) = 0) {
+   if (cur  es-linelen  cur != 0) {
+   cur--;
+   vi_error();
+   }
+   es-cursor = cur;
+   } else
+   vi_error();
+
+   refresh(0);
+   return;
+}
+
 static int
 vi_hook(int ch)
 {
@@ -261,6 +303,15 @@ vi_hook(int ch)
state = VLIT;
ch = '^';
}
+
+   if (ch == '\033') {
+  if (x_getc() == '[')
+  keypad(x_getc());
+  else /* unknown sequence */
+  vi_error();
+  return 0;
+   }
+   
switch (vi_insert(ch)) {
case -1:
vi_error();

-- 
Alexander Polakov | plhk.ru



Re: watchdog timeout with re0 after MSI change

2011-06-08 Thread Alexander Polakov
* John Danks john.da...@gmail.com [110608 17:59]:
 I'm seeing re0: watchdog timeout after the MSI change to the re
 driver. Reverted the change and it stops.

I have reported the same issue already
http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yesnumbers=6622

-- 
Alexander Polakov | plhk.ru



[ksh] clear screen with Ctrl-L

2011-05-15 Thread Alexander Polakov
Just wanted to share this small diff (it's for vi command mode).
I guess it doesn't meet openbsd's high standards, but someone may
find it useful.

Index: bin/ksh/vi.c
===
RCS file: /cvs/src/bin/ksh/vi.c,v
retrieving revision 1.26
diff -u -p -u -r1.26 vi.c
--- bin/ksh/vi.c29 Jun 2009 22:50:19 -  1.26
+++ bin/ksh/vi.c15 May 2011 22:21:14 -
@@ -714,6 +714,12 @@ vi_cmd(int argcnt, const char *cmd)
switch (*cmd) {
 
case Ctrl('l'):
+   /* These are ANSI escape codes, non-portable */
+   x_puts(\033[2J);
+   x_puts(\033[0;0H);
+   redraw_line(0);
+   break;
+
case Ctrl('r'):
redraw_line(1);
break;
-- 
Alexander Polakov | plhk.ru



Re: DUID's and fstab

2011-04-12 Thread Alexander Polakov
* Sergey Bronnikov este...@gmail.com [110412 14:29]:
 On 09:20 Tue 12 Apr , jirib wrote:
  On Tue, 12 Apr 2011 02:06:51 +0400
  Alexander Polakov polac...@gmail.com wrote:
  
   I am probably misunderstanding something, but are DUID's supposed to
   be used in place of device filenames in fstab? I suppose they are,
   so this looks strange to me:
   
   % sudo mount f777cc5bbeded528.a
   mount: can't find fstab entry for f777cc5bbeded528.a.
  
  I was always in believing that one has to define mountpoint for `mount'
  without specifying device, like `mount /foo'.
 
 Agree.
 Alexander, do you always remember the DUIDs in your system?

No. Why would I do that? I have such thing as a computer at hand, you
know.

 IMHO much more logical to remember mountpoint instead DUID...

How is it relevant? 

Tip: you can use DUID in a script. Ever thought about mounting disks by
DUID in /etc/hotplug/attach? 

-- 
Alexander Polakov | plhk.ru



Re: DUID's and fstab

2011-04-12 Thread Alexander Polakov
* Stuart Henderson s...@spacehopper.org [110412 15:48]:
 On 2011-04-12, jirib ji...@devio.us wrote:
  On Tue, 12 Apr 2011 02:06:51 +0400
  Alexander Polakov polac...@gmail.com wrote:
 
  I am probably misunderstanding something, but are DUID's supposed to
  be used in place of device filenames in fstab? I suppose they are,
  so this looks strange to me:
  
  % sudo mount f777cc5bbeded528.a
  mount: can't find fstab entry for f777cc5bbeded528.a.
 
 # mount wd0i
 mount: can't find fstab entry for wd0i.

# mount /dev/sd0i
# 

-- 
Alexander Polakov | plhk.ru



DUID's and fstab

2011-04-11 Thread Alexander Polakov
I am probably misunderstanding something, but are DUID's supposed to be
used in place of device filenames in fstab? I suppose they are,
so this looks strange to me:

% sudo mount f777cc5bbeded528.a
mount: can't find fstab entry for f777cc5bbeded528.a.

% grep f777 /etc/fstab 
f777cc5bbeded528.a  /home ffs rw,nodev,nosuid,noauto 0 0

I have got a diff.

Index: sbin/mount/mount.c
===
RCS file: /cvs/src/sbin/mount/mount.c,v
retrieving revision 1.51
diff -u -r1.51 mount.c
--- sbin/mount/mount.c  6 Apr 2011 11:36:26 -   1.51
+++ sbin/mount/mount.c  11 Apr 2011 21:56:38 -
@@ -232,9 +232,11 @@
mntonname = mntbuf-f_mntonname;
} else {
if ((fs = getfsfile(mntpath)) == NULL 
-   (fs = getfsspec(mntpath)) == NULL)
-   errx(1, can't find fstab entry for %s.,
-   *argv);
+   (fs = getfsspec(mntpath)) == NULL 
+   (isduid(*argv, 0) == 0 ||
+   (fs = getfsspec(*argv)) == NULL))
+   errx(1, can't find fstab entry for 
%s.,
+   *argv);
if (BADTYPE(fs-fs_type))
errx(1, %s has unknown file system type.,
*argv);
-- 
Alexander Polakov | plhk.ru



Re: dmesg changes

2011-04-10 Thread Alexander Polakov
2011/4/11, frantisek holop min...@obiit.org:
 1. how can be the kernel # smaller of a later kernel,
 if these are both 4.9-current?

It just means that compilation directory was wiped.

 2. what is the extra hard disk information?

Disk's serial number it is.

-- 
Alexander Polakov | plhk.ru



Re: Upgrade i386 to amd64

2011-04-07 Thread Alexander Polakov
* Steven R. Gerber sger...@gerber-systems.com [110407 02:51]:
 I ran the upgrade from CD.
 I want to be sure that packages are OK.
 Is pkg_add -u sufficient?  (It looks like nothing changed.)
 Should I try pkg_add -u -D update or something else?

I did i386-amd64 upgrade once, it went smoothly. 
I had to reinstall packages, though. pkg_add -u -D installed was not
enough.
And you can always make sure that your binaries are of right arch by
running file on them.

-- 
Alexander Polakov | plhk.ru



No async for msdosfs. Why?

2011-04-03 Thread Alexander Polakov
mount_msdos(8) says:

-o options
   Use the specified mount options, as described in
   mount(8).

But when you try -o async it says option not supported.
I added MOPT_ASYNC into mount_msdos (see diff below), and now msdosfs
can be mounted asynchronously (bwrite() checks mount flags and 
passes buffer to bdwrite() if MNT_ASYNC is on the list).
I haven't done any benchmarks, but it feels a little faster (and more
responsive) when writing to a usb flash drive.

So the question is: why doesn't mount_msdos support -o async?

Index: mount_msdos.c
===
RCS file: /cvs/src/sbin/mount_msdos/mount_msdos.c,v
retrieving revision 1.23
diff -u -r1.23 mount_msdos.c
--- mount_msdos.c   27 Oct 2009 23:59:33 -  1.23
+++ mount_msdos.c   3 Apr 2011 23:09:50 -
@@ -50,6 +50,7 @@
 const struct mntopt mopts[] = {
MOPT_STDOPTS,
MOPT_UPDATE,
+   MOPT_ASYNC,
{ NULL }
 };
 

-- 
Alexander Polakov | plhk.ru



Re: Radeon HD 4850 and drmRadeonCmdBuffer: -22.

2011-02-28 Thread Alexander Polakov
* Pascal Stumpf pascal.stu...@cubes.de [110228 21:47]:
 On Thu, Feb 24, 2011 at 10:03:06AM -0500, Joe Snikeris wrote:
  On Thu, Feb 24, 2011 at 3:09 AM, Andy Bradford
  amb-open...@bradfords.org wrote:
  
   Is it going to be possible to get acceleration working with this? If so,
   any pointers?
  
  +1
  
 
 For the record: I've also tried the radeonhd driver instead of radeon.
 'glxinfo' reports a lot more GLX Visuals and GLXFBConfigs, OpenGL
 version 2.1 instead of 1.5, but glxgears does not seem any faster
 (around 290 FPS). Other applications using GL (supertuxkart ...) still
 crash when trying to use hardware acceleration.
 
 For my part, I'd greatly appreciate *any* feedback from graphics people
 on this. Is it being worked on? Which component is the culprit (kernel,
 xorg driver, Mesa)?

I am not an openbsd dev, but I think this [1] is related.

[1] http://www.mail-archive.com/source-changes@openbsd.org/msg16212.html

-- 
Alexander Polakov | plhk.ru



Re: NFS file list incomplete

2010-10-03 Thread Alexander Polakov
2010/10/3, Otto Moerbeek o...@drijf.net:
 Does this also happen with udp mounts?

Yes, it does.

-- 
Alexander Polakov | plhk.ru



NFS file list incomplete

2010-10-02 Thread Alexander Polakov
Hi misc,

 I experience a strange issue here with NFS. I am running a dragonflybsd
 NFS server and an OpenBSD client. DragonFly client works just fine, so
 I am asking on this list.

 When I try to get directory listing it appears incomplete:
 # client
 [~]% ls /mnt/net/music/|wc -l
  180
 # server
  ls /var/data/music/|wc -l
  260
 
 but:

 [~]% ls /mnt/net/music/|grep 3nd
 [~]% ls /mnt/net/music/3nd
 2003 - 1st demo/2003 - 9gatsu 29nichi (demo)/   2007 -
 View From Here/  2009 - World Tour/  Band.jpg

 I tried tracing ls and got this:
 
 25213 ls   CALL  open(0x824e8800,0x4,0x)
 25213 ls   NAMI  /mnt/net/music/
 25213 ls   RET   open 5
 25213 ls   CALL  fstat(0x5,0xcfbe62e0)
 25213 ls   RET   fstat 0
 25213 ls   CALL  fcntl(0x5,0x2,0x1)
 25213 ls   RET   fcntl 0
 25213 ls   CALL  mmap(0,0x2000,0x3,0x1002,0x,0,0,0)
 25213 ls   RET   mmap -1962889216/0x8b00b000
 25213 ls   CALL  mmap(0,0x1000,0x3,0x1002,0x,0,0,0)
 25213 ls   RET   mmap -1967628288/0x8ab86000
 25213 ls   CALL  getdirentries(0x5,0x8b00b000,0x2000,0x7fd62394)
 25213 ls   RET   getdirentries 4696/0x1258
 25213 ls   CALL  mmap(0,0x1000,0x3,0x1002,0x,0,0,0)
 25213 ls   RET   mmap -1980260352/0x89f7a000
 25213 ls   CALL  mmap(0,0x1000,0x3,0x1002,0x,0,0,0)
 25213 ls   RET   mmap -2120105984/0x81a1c000
 25213 ls   CALL  mmap(0,0x1000,0x3,0x1002,0x,0,0,0)
 25213 ls   RET   mmap -2130837504/0x80fe
 25213 ls   CALL  mmap(0,0x1000,0x3,0x1002,0x,0,0,0)
 25213 ls   RET   mmap -2094350336/0x832ac000
 25213 ls   CALL  mmap(0,0x1000,0x3,0x1002,0x,0,0,0)
 25213 ls   RET   mmap -2067316736/0x84c74000
 25213 ls   CALL  getdirentries(0x5,0x8b00b000,0x2000,0x7fd62394)
 25213 ls   RET   getdirentries -1 errno 22 Invalid argument
 25213 ls   CALL  close(0x5)

 [~]% mount -v|grep net
 192.168.0.101:/var/data on /mnt/net type nfs (rw, nodev, nosuid,
 ctime=Sun Oct  3 00:20:53 2010, v3, tcp, hard, wsize=8192, rsize=8192,
 rdirsize=8192, timeo=100, retrans=101, maxgrouplist=16, readahead=1,
 acregmin=5, acregmax=60, acdirmin=5, acdirmax=60)

 [~]% dmesg|head -2
 OpenBSD 4.8-current (GENERIC) #407: Sat Oct  2 05:47:52 MDT 2010
 dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC

--
Alexander Polakov | plhk.ru



Re: UTF-8

2010-08-07 Thread Alexander Polakov
* Jordi Beltran Creix jbcreix.m...@gmail.com [100804 17:26]:
  ls(1) does not seem to be 100% UTF-8 ready:
 
 
  madro...@madthought:~% /bin/ls testb8-C4-D5-b/-\#
  testo?=o?=-C4-D5-o?=o?=-#
  madro...@madthought:~% /bin/ls testb8-C4-D5-b/-\# |cat
  testb8-C4-D5-b/-#
 
 ls(1) needs to use wcwidth(3) instead of just assuming 1 for alignment
 and if I remember correctly it also mangles the strings using
 isprint(3) or hardcoded values instead of iswprint(3) when printing to
 terminal which is probably what you are seeing here.

I made a patch for ls based on NetBSD (see below), works just fine for me.

 ed(1) is broken by the latter and ksh(1) for both reasons.

One can use mksh instead (or better backport their utf8-handling code).

 wcwidth(3) doesn't seem to have been added yet, though.

wcwidth() is in, but no man page yet.


--- ls.c2010/08/07 15:15:04 1.1
+++ ls.c2010/08/07 15:17:32
@@ -41,6 +41,7 @@
 #include err.h
 #include errno.h
 #include fts.h
+#include locale.h
 #include grp.h
 #include pwd.h
 #include stdio.h
@@ -102,6 +103,7 @@
int kflag = 0;
char *p;

+   setlocale(LC_CTYPE, );
/* Terminal defaults to -Cq, non-terminal defaults to -1. */
if (isatty(STDOUT_FILENO)) {
if ((p = getenv(COLUMNS)) != NULL)
--- util.c  2010/08/07 15:00:48 1.1
+++ util.c  2010/08/07 15:13:52
@@ -41,18 +41,75 @@
 #include stdio.h
 #include stdlib.h
 #include string.h
+#include wchar.h

 #include ls.h
 #include extern.h

+#define MB_LEN_MAX 32 /* goes into limits.h */
+
+static int
+printwc(wchar_t wc, mbstate_t * pst)
+{
+   size_t  size;
+   charbuf[MB_LEN_MAX];
+
+   size = wcrtomb(buf, wc, pst);
+   if (size == (size_t) -1)   /* This shouldn't happen, but for
+* sure */
+   return 0;
+   if (wc == L'\0') {
+   /* The following condition must be always true, but for sure */
+   if (size  0  buf[size - 1] == '\0')
+   --size;
+   }
+   if (size  0)
+   fwrite(buf, 1, size, stdout);
+   return wc == L'\0' ? 0 : wcwidth(wc);
+}
+
 int
-putname(char *name)
+putname(char *src)
 {
-   int len;
+   int n = 0;
+   mbstate_t   src_state, stdout_state;
+   /* The following +1 is to pass '\0' at the end of src to mbrtowc(). */
+   const char *endptr = src + strlen(src) + 1;

-   for (len = 0; *name; len++, name++)
-   putchar((!isprint(*name)  f_nonprint) ? '?' : *name);
-   return len;
+   /*
+   * We have to reset src_state each time in this function, because
+   * the codeset of src pathname may not match with current locale.
+   * Note that if we pass NULL instead of src_state to mbrtowc(),
+   * there is no way to reset the state.
+   */
+   memset(src_state, 0, sizeof(src_state));
+   memset(stdout_state, 0, sizeof(stdout_state));
+   while (src  endptr) {
+   wchar_t wc;
+   size_t  rv, span = endptr - src;
+   rv = mbrtowc(wc, src, span, src_state);
+   if (rv == 0) {  /* assert(wc == L'\0'); */
+   /* The following may output a shift sequence. */
+   n += printwc(wc, stdout_state);
+   break;
+   }
+   if (rv == (size_t) -1) {   /* probably errno == EILSEQ */
+   n += printwc(L'?', stdout_state);
+   /* try to skip 1byte, because there is no better way */
+   src++;
+   memset(src_state, 0, sizeof(src_state));
+   } else if (rv == (size_t) - 2) {
+   if (span  MB_CUR_MAX) {/* incomplete char */
+   n += printwc(L'?', stdout_state);
+   break;
+   }
+   src += span;/* a redundant shift sequence? */
+   } else {
+   n += printwc(iswprint(wc) ? wc : L'?', stdout_state);
+   src += rv;
+   }
+   }
+   return n;
 }

 void



Re: cwm: cycle in group

2010-04-23 Thread Alexander Polakov
2010/4/23, Thomas Pfaff tpf...@tp76.info:
 On Fri, 23 Apr 2010 03:31:31 +0400
 Alexander Polakov polac...@gmail.com wrote:

 Hi there!

  I think it's very convenient to cycle through windows in a group.


 Sorry, but I don't quite understand what this does.  If you want to
 cycle through groups there's ``cyclegroup'' and if you want to cycle
 through visible windows (in the active group) there's ``cycle''.

 Could you please elaborate on what this does?

Cycles through windows belonging to the same group as current window.
Like if you have an xterm group, which all xterm's belong to, with cycleingroup
you cycle only through xterms, no other windows get in your way.
Currently to do this, one has to hide all other groups (or maybe i am
just missing something obvious).

-- 
Alexander Polakov | plhk.ru



cwm: cycle in group

2010-04-22 Thread Alexander Polakov
Hi there!

 I think it's very convenient to cycle through windows in a group.
 So I made a quick patch to demonstrate this feature [1].
 If you think it's nice and useful, I can rewrite client_cycleingroup()
 to use a flag for client_cycle(), make documentation and so.

 [1] http://plhk.ru/static/misc/cwm-cycle-in-a-group.diff

-- 
Alexander Polakov | plhk.ru



Re: Sensorsd

2010-01-06 Thread Alexander Polakov
2010/1/6, Morris, Roy rmor...@internetsecure.com:
 Ok, figured that might be what it was! Thanks. Too bad it
 would be nice to know if the disk count changed ie. someone
 plugged in a USB key.

You can use hotplugd(8) for that.



Re: OpenBSD on first gen Asus eeePCs

2009-09-19 Thread Alexander Polakov
2009/9/18, frantisek holop min...@obiit.org:
 hmm, on Thu, Sep 17, 2009 at 04:20:09PM -0400, Brad Tilley said that
 drives so I lay them out manually, but other than that, everything
 works OK (except the built-in wireless). I'm considering an Acer

 does the built in usb emulated sd card reader works?
 i can read anything from it, but writing anything big
 ( 100MB) freezes first the process doing the writing,
 then the io subsystem, and eventually the whole system.

Try setting OS Installation in BIOS Setup to Finished.



Re: Control noise of harddisk

2009-08-15 Thread Alexander Polakov
2009/8/15, obvvbooo obvvbooo obvvb...@googlemail.com:
 Hi,

 BSD4.5 works well on my laptop, but I don't like the noise of the harddisk.

atactl(8)



Re: Cyrillic fonts in X Window.

2009-08-01 Thread Alexander Polakov
2009/8/1, 4625 4625...@gmail.com:
 Probably bitmap fonts are disabled. Take a look at /etc/fonts/conf.d.
 If there is no 70-yes-bitmaps.conf then link or copy it from
 /etc/fonts/conf.avail and use fc-cache -fv

 cd: /etc/fonts/conf.avail: No such file or directory

% tar tvzf xetc46.tgz|grep conf.avail
drwxr-xr-x root/wheel0 2009-07-29 21:45 ./etc/fonts/conf.avail

Something is wrong with your install.



cwm maximized mode

2009-01-18 Thread Alexander Polakov
What do you think about cwm(1) maximized mode? I find it rather useful
on small screens. A patch is attached.

-- 
Alexander Polakov | http://rootshell.be/~polachok/
diff -ur cwm/calmwm.h cwm.max/calmwm.h
--- cwm/calmwm.hMon Jan 19 00:52:40 2009
+++ cwm.max/calmwm.hMon Jan 19 00:48:44 2009
@@ -249,6 +249,7 @@
struct mousebinding_qmousebindingq;
 
 #defineCONF_STICKY_GROUPS   0x0001
+#defineCONF_MAX_ALL 0x0010
int  flags;
 
char termpath[MAXPATHLEN];
diff -ur cwm/client.c cwm.max/client.c
--- cwm/client.cMon Jan 19 00:52:40 2009
+++ cwm.max/client.cMon Jan 19 00:49:31 2009
@@ -137,9 +137,11 @@
client_gethints(cc);
client_update(cc);
 
-   if (mapped)
+   if (mapped) {
group_autogroup(cc);
-
+   if ((Conf.flags  CONF_MAX_ALL)  state != IconicState)
+client_maximize(cc);
+   }
return (cc);
 }
 
diff -ur cwm/cwmrc.5 cwm.max/cwmrc.5
--- cwm/cwmrc.5 Mon Jan 19 00:52:40 2009
+++ cwm.max/cwmrc.5 Mon Jan 19 00:50:08 2009
@@ -172,6 +172,13 @@
 By enabling sticky group mode,
 .Xr cwm 1
 will assign new windows to the currently selected group.
+.Pp
+.It Ic maximizeall Ic yes Ns \| Ns Ic no
+Toggle maximize mode.
+The default behavior for new windows is to not maximize them.
+By enabling maximize mode,
+.Xr cwm 1
+will make all new windows appear fullscreen.
 .El
 .Sh EXAMPLE CONFIGURATION
 .Bd -literal
diff -ur cwm/parse.y cwm.max/parse.y
--- cwm/parse.y Mon Jan 19 00:52:40 2009
+++ cwm.max/parse.y Mon Jan 19 00:51:25 2009
@@ -64,7 +64,7 @@
 
 %}
 
-%token FONTNAME STICKY GAP MOUSEBIND
+%token FONTNAME STICKY GAP MOUSEBIND MAXIMIZEALL
 %token AUTOGROUP BIND COMMAND IGNORE
 %token YES NO
 %token ERROR
@@ -107,6 +107,12 @@
else
conf-flags |= CONF_STICKY_GROUPS;
}
+   | MAXIMIZEALL yesno {
+   if ($2 == 0)
+   conf-flags = ~CONF_MAX_ALL;
+   else
+   conf-flags |= CONF_MAX_ALL;
+   }
| COMMAND STRING string {
conf_cmd_add(conf, $3, $2, 0);
free($2);
@@ -202,6 +208,7 @@
{ fontname,   FONTNAME},
{ gap,GAP},
{ ignore, IGNORE},
+   { maximizeall,MAXIMIZEALL},
{ mousebind,  MOUSEBIND},
{ no, NO},
{ sticky, STICKY},



Ответ: ACPI not supported on my amd64 laptop

2008-12-16 Thread Alexander Polakov
http://openbsd.org/report.html



Re: cvs, cvsup and xenocara advice

2008-11-13 Thread Alexander Polakov
cvsup is not written in C. ;)

net/csup is a cvsup client written in C.

2008/11/13, Girish Venkatachalam [EMAIL PROTECTED]:
 On 01:28:57 Nov 13, Ansen Lloyd wrote:
 1. What are the main differences between cvs and cvsup when updating
 sources
 to stable?


 cvs is the revision control technology. You can use cvs to check out the
 main OpenBSD repository to your local machine by which you only get the
 files pertaining to the revision you ask.

 Whereas cvsup and cvsync are tools that fetch the entire cvs
 repository to your local machine.

 So you have to necessary run a cvs checkout on your local repository to
 obtain the sources.

 2. I'm just the typical home user of obsd, so which should I use, cvs or
 cvsup?


 I use cvsync. cvsup is not written in C. ;)

 You can use cvs if you have copious bandwidth. If you are like me you
 have to either use cvsup or cvsync.


 3. As of Nov 13th of 2008 why do only 4 of the 17 cvsup servers have the
 xenocara repository?
 ( according to this list: http://www.openbsd.org/cvsup.html )


 Some mirrors may be out of date.

 -Girish



Re: openbsd fail2ban

2008-11-06 Thread Alexander Polakov
2008/11/6, Charlie Clark [EMAIL PROTECTED]:
 Hi,

 I have noticed that people constantly try to brute force sshd on my
 openbsd box, on my server I use fail2ban to prevent this and wondered if
 there is a similar solution for openbsd.

Have you tried sshguard?



Re: Is this an fsck_ffs memory issue?

2008-08-02 Thread Alexander Polakov
Sorry for hijacking your thread, but... What do you guys think about
journalized ffs [1]? Can it help in such situations? Is there any
chance to get it into OpenBSD kernel?

[1] http://mail-index.netbsd.org/netbsd-announce/2008/07/31/msg37.html

2008/8/2, M. Feenstra [EMAIL PROTECTED]:
 Hi,

 I use a small device (Alix 1C based) running flashboot (OpenBSD 4.3) as my
 home Bacula backup server. The entire system is running in RAM (flashboot
 does that for me) except of course for the backup storage which is a 500G
 USB drive.

 Today I had an power issue causing the system to go down uncleanly. At boot
 it would not mount the USB drive anymore reporting I should run fsck.

 This was ofcourse no surprise and I tried running fsck. But it frooze my
 device:
 --
 [EMAIL PROTECTED] root]# fsck -v /dev/sd0a

 start /dev/sd0a wait fsck_ffs /dev/rsd0a
 ** /dev/rsd0a
 --

 and that is it. Nothing more is happening.

 If I attach the USB drive to the OpenBSD system I used to build the
 flashboot I have no troubles fsck'ing the disk.

 What surprices me is that is hangs the whole system. I can not login,
 reboot, access the kernel debugger or anything. I can only unplug the power
 and reboot after issueing this command.

 Is this caused because the system has no enough memory or am I missing
 something obvious here?

 Mark



Re: NEC usb controller and huawei E620 support

2008-06-19 Thread Alexander Polakov
* Maxim Belooussov [EMAIL PROTECTED] [080619 14:11]:
 Hi all,
 
 I have a small question, but it's not tech enough for tech@, so asking it 
 here.
 
 How do I add support for NEC usb controller to OpenBSD?
 
 http://www.huawei.com/mobileweb/en/products/view.do?id=145
 
 Currently it looks like the NEC usb controller is not recognized
 because OpenBSD doesn't know its id. Huawei card is 'hiding' behind
 the controller, and is not visible at the moment.
 
 I've taken a look at /usr/src/sys/dev/usb/usbdevs file and saw this:
 
 /* NEC products */
 product NEC USB2EXTEND  0x0409  Repeater
 product NEC HUB 0x55aa  hub
 product NEC HUB_B   0x55ab  hub
 product NEC PICTY7600xbef4  Picty760
 product NEC PICTY9000xefbe  Picty900
 product NEC PICTY9200xf0be  Picty920
 product NEC PICTY8000xf1be  Picty800
 
 According to my dmesg (below), device id is:
 ohci0 at cardbus0 dev 0 function 0 NEC USB rev 0x43: irq 5, version 0.0
 ohci0: unsupported OHCI revision
 ohci1 at cardbus0 dev 0 function 1 NEC USB rev 0x43: irq 5, version 0.0
 ohci1: unsupported OHCI revision
 
 But I cannot figure out what string should I add to usbdevs file:
 
 product NEC PCMCIAUSB  0x4300
 
 or
 
 product NEC PCMCIAUSB  0x3433 (43 into hex??)
 
 or something completely different?
 
 
you can get the id from pcidump -v, something like this:

0:0:0: Intel 82Q965 Host
  0x: Vendor ID: 8086 Product ID: 2990
  
-- 
Alexander Polakov | http://rootshell.be/~polachok/



network.conf

2008-06-08 Thread Alexander Polakov
Hi there.

Here is ports(7)

...
NETWORK CONFIGURATION
The variables pertaining to network access have been marshalled
into
${PORTSDIR}/infrastructure/templates/network.conf.template.

To customize that setup, copy that file into
${PORTSDIR}/infrastructure/db/network.conf and edit
it.
...

I did that, but the file (${PORTSDIR}/infrastructure/db/network.conf)
is deleted with every cvsup. Is there any way to keep it?
Thanks in advance.

$ cat /var/sup/OpenBSD-ports/refuse
infrastructure/db/network.conf

$ cat /root/ports.cvsup 

 
*default host=rt.fm
*default base=/var
*default prefix=/usr
*default release=cvs
*default delete use-rel-suffix compress

OpenBSD-ports tag=.
-- 
Alexander Polakov | http://rootshell.be/~polachok/