DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 3rd May 2009
wraith0x2b's Avatar
wraith0x2b wraith0x2b is offline
Port Guard
 
Join Date: May 2009
Posts: 12
Thanked 0 Times in 0 Posts
Default [ OpenBSD 4.5 ] apm -C not working

Hey Guys.
First of all it's nice to be here. I had some previous experience with FreeBSD but I decided to give OpenBSD a go and I'm not one bit dissapointed.
I installed 4.4 3 days ago(had not known at the time that the next will be released the second day).
Was surprised to see that cpu scaling worked out of the box.that was not the case with any Linux I ever used, or with FreeBSD.
X configure actually worked and I had a working window manager in 1 minute.

I set apmd_flags to "-C", rebooted and automatic scaling worked. then I decided to upgrade to 4.5 (copied all the sets off the 4.5 cd to /sets, booted the 4.5 bsd.rd, started updating from disc, mounted /sets...it all worked ok...or so it seemed )
Without any other change I booted to 4.5, just to see my cpu was at full capacity when idling in the console (1.800 MHz). `sysctl hw` shows all the scaling stuff, and I can use `sysctl hw.setperf=0` to get it to 800MHz (minimum and cool), but apm does not do it automatically. So for now I have it with "-L" (manual mode) but I'd like apmd to do it automatically.
I should point out that I disabled apm in the kernel and enabled acpi (apm would crash on boot if enabled..this was a problem with everything I used before..it's my laptop's fault). I did this for 4.4 too and it worked.

Second problem is that my Broadcom won't connect to the AP. This is buggy under Linux too, but after a few tries it works.
It can detect AP's, and I see it can get my AP's bssid etc, so traffic works, but it just doesn't get an ip. dhclient says "no link ........ sleeping" and that's all. It runs in the background but no connection can be made. Enabling debug shows the auth beeing sent but after that nothing. The AP is unsecured so it's not a WEP/WPA issue. I decided to buy a rt73 chip based card tomorrow...so this ain't a big problem anymore (even though a fix would be nice)
Thank you all for any type of input

Last edited by wraith0x2b; 3rd May 2009 at 09:56 AM.
Reply With Quote
  #2   (View Single Post)  
Old 3rd May 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,429
Thanked 214 Times in 189 Posts
Default

Welcome to DaemonForums, and welcome to OpenBSD, too!

Re: apmd(8):

There were changes to ACPI code in the OS between 4.4 and 4.5. I would post a message to the @misc mailing list, briefly describing the problem, and posting a complete dmesg(8) in line with the message. To be extra helpful, you might place the output of acpidump(8) somewhere, and post a link to it (it's a few thousand lines long).

Re: bwi(4):

As to your broadcom issue, a dmesg here might prove helpful. Might not, but without it, all we could do is guess.
Reply With Quote
  #3   (View Single Post)  
Old 3rd May 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,831
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by wraith0x2b View Post
It can detect AP's, and I see it can get my AP's bssid etc, so traffic works, but it just doesn't get an ip. dhclient says "no link ........ sleeping" and that's all. It runs in the background but no connection can be made. Enabling debug shows the auth beeing sent but after that nothing.
Along with jggimi's requests,
  • please post the contents of hostname.bwi0 or whatever ifconfig(8) command is used to initialize the interface.
  • you should also ensure that the firmware used is up-to-date. bwi(4) provides more details on where to get updates.
Reply With Quote
  #4   (View Single Post)  
Old 3rd May 2009
wraith0x2b's Avatar
wraith0x2b wraith0x2b is offline
Port Guard
 
Join Date: May 2009
Posts: 12
Thanked 0 Times in 0 Posts
Default

Thanks for the responses guys
I have uploaded the outputs of dmesg, acpidump (rather big), ifconfig (before issuing config command) and uname to http://github.com/wraith0x2b/dotfiles/tree/master
The firmware is the one I got from `man bwi`, so I asume it's the latest.
About the hostname file, I stopped using hostname.bwi0 and started manually with `ifconfig bwi0 nwid "my ap name"` then `dhclient bwi0`. I was told this would be enough for a passwordless connection. Tried every other method, like disabling wep, wpa etc..I'm banging my head against the wall for 2 days now. I also have problems on Linux with this but after 5-10 tries (sometimes less) it connects and gets an ip. So I figure there's something with the card and/or the AP beeing too far away. Having a way of increasing the timeout period for dhclient would be a new thing to try I guess (don't know if I can do that or if it's possible though).
I'm buying that new card anyway... I'm sick of Broadcom and their silly closed source drivers

Last edited by wraith0x2b; 3rd May 2009 at 03:23 PM.
Reply With Quote
  #5   (View Single Post)  
Old 3rd May 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

OpenBSD doesn't use a close source driver for Broadcom devices, the bwi firmware is code that is uploaded & executed by the chipsets internal processor.. not by the kernel.

This terminology confusion is quite common, leading many to believe that OpenBSD ships proprietary drivers.. it certainly does not.
Reply With Quote
  #6   (View Single Post)  
Old 3rd May 2009
wraith0x2b's Avatar
wraith0x2b wraith0x2b is offline
Port Guard
 
Join Date: May 2009
Posts: 12
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by BSDfan666 View Post
OpenBSD doesn't use a close source driver for Broadcom devices, the bwi firmware is code that is uploaded & executed by the chipsets internal processor.. not by the kernel.

This terminology confusion is quite common, leading many to believe that OpenBSD ships proprietary drivers.. it certainly does not.

Oh I know that. But I was under the impression that open source drivers for such chipsets are crappy (well not too good anyway) because the official drivers are closed source..thus requiring re-writing/reverse engineering and such.
I know this was the case for ATI until recently anyway.
Reply With Quote
  #7   (View Single Post)  
Old 3rd May 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,429
Thanked 214 Times in 189 Posts
Default

The dmesg shows that this is -release/i386, so patch #003 from the errata might be applicable to this situation.

The dmesg also shows that the chipset is a BCM4318. There was a recent discussion about this on misc@, and while the question was not resolved, one of the respondents was able to circumvent the issue for themselves by disabling WPA on his router.

http://marc.info/?t=123505856100004&r=1&w=2
Reply With Quote
  #8   (View Single Post)  
Old 3rd May 2009
wraith0x2b's Avatar
wraith0x2b wraith0x2b is offline
Port Guard
 
Join Date: May 2009
Posts: 12
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jggimi View Post
The dmesg shows that this is -release/i386, so patch #003 from the errata might be applicable to this situation.

The dmesg also shows that the chipset is a BCM4318. There was a recent discussion about this on misc@, and while the question was not resolved, one of the respondents was able to circumvent the issue for themselves by disabling WPA on his router.

http://marc.info/?t=123505856100004&r=1&w=2
I read that when I first noticed the problem.The AP I am using has no encryption, be it WEP or WPA so disabling isn't an option.

If you're talking about the 003 patch on http://www.openbsd.org/errata45.html I will try it tomorrow...but I am getting the new card anyway so might aswell wait until then. The big problem now is the APM one
Reply With Quote
  #9   (View Single Post)  
Old 4th May 2009
wraith0x2b's Avatar
wraith0x2b wraith0x2b is offline
Port Guard
 
Join Date: May 2009
Posts: 12
Thanked 0 Times in 0 Posts
Default

Well one of the problems is solved I'm happy to say.
I received my new usb wifi card based on rt73 and IT RULES! Not only I can connect instantly and on the first try, but the signal gain is ridiculous compared to the Broadcom (from 30 dBm max went to 100 + some extra gain...). It worked out of the box which is another plus.

I'm still left with the apmd issue.
Reply With Quote
Old 4th May 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,429
Thanked 214 Times in 189 Posts
Default

If patch 003 did not make a difference, then I would, as I suggested in my first post in this thread, send an e-mail to the misc@ mailing list.

http://www.openbsd.org/mail.html
http://www.openbsd.org/report.html
Reply With Quote
Old 5th May 2009
wraith0x2b's Avatar
wraith0x2b wraith0x2b is offline
Port Guard
 
Join Date: May 2009
Posts: 12
Thanked 0 Times in 0 Posts
Default Fixed!

I fixed it. I was looking in a totally wrong area.
apmd WAS working, but the cpu got at full because the time it spent on interrupts was at 82.9%!
I disabled acpiprt and acpimadt in the kernel and now it all works ok.
Thanks everyone for the help

Last edited by wraith0x2b; 5th May 2009 at 12:33 PM.
Reply With Quote
Old 5th May 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,429
Thanked 214 Times in 189 Posts
Default

Not sure if we were much help; but we're glad you solved the problem!
Reply With Quote
Old 5th May 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

Using ACPI with acpiprt(4) disabled doesn't sound like an overly good idea, have you tried disabling ACPI entirely?

You haven't posted a dmesg(1) either, some people appreciate those.. you probably should have done that on your mailing list post as well.

Sending the results of acpidump(8) to a developer is also a good idea, hopefully they can fix ACPI on your laptop.
Reply With Quote
Old 5th May 2009
wraith0x2b's Avatar
wraith0x2b wraith0x2b is offline
Port Guard
 
Join Date: May 2009
Posts: 12
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by BSDfan666 View Post
Using ACPI with acpiprt(4) disabled doesn't sound like an overly good idea, have you tried disabling ACPI entirely?

You haven't posted a dmesg(1) either, some people appreciate those.. you probably should have done that on your mailing list post as well.

Sending the results of acpidump(8) to a developer is also a good idea, hopefully they can fix ACPI on your laptop.

I did post a link going to dmesg in this thread. Yes I should have done the same with the misc@ email.
I can disable acpi alltogether, but then I don't have scaling anymore (eg cpu at max all the time which is really bad for my laptop)
Reply With Quote
Old 5th May 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

Scaling should work without ACPI, are you sure that it doesn't?
Reply With Quote
Old 5th May 2009
wraith0x2b's Avatar
wraith0x2b wraith0x2b is offline
Port Guard
 
Join Date: May 2009
Posts: 12
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by BSDfan666 View Post
Scaling should work without ACPI, are you sure that it doesn't?
I am quite sure it doesn't work without ACPI (not on my laptop anyway)
If I have apm and acpi disabled in the kernel how does apmd get/set stuff? (asking...)
Reply With Quote
Old 5th May 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

The userland APM utilities communicate with the kernel via the apm(4) kernel API using 2 character devices, /dev/apm and /dev/apmctl.. historically this was only used only by APM, but now ACPI utilizes the interface as well.

The main purpose of this kernel interface is control the systems power states, like going into suspend/standby.. it doesn't however, control processor speed scaling.

If you look at your dmesg, you'll see this line:
cpu0: PowerNow! K8 1801 MHz: speeds: 1800 1600 800 MHz

This indicates that you can toggle between 3 different speeds using hw.setperf in sysctl(8), if you're running apmd(8), it will monitor CPU utilization and toggle this value to conserve battery life.. this functionality most definitely should work regardless of the availability of ACPI or APM.

The following line indicates the temperature sensor on your processor..
kate0 at pci0 dev 24 function 3 "AMD AMD64 0Fh Misc Cfg" rev 0x00

You can monitor this sensor via hw.sensors.kate0 in sysctl(8).. you can also configure sensorsd(8) to monitor and act upon overly high temperatures.

Hopefully this clears some things up for you, as for what happens when neither APM or ACPI are enabled... apmd(8) will still work to scale speeds depending on processor utilization, but apm(8) requests to put the system to sleep will do nothing at all.
Reply With Quote
Old 6th May 2009
wraith0x2b's Avatar
wraith0x2b wraith0x2b is offline
Port Guard
 
Join Date: May 2009
Posts: 12
Thanked 0 Times in 0 Posts
Default

That does clear things up for me. Thanks for your time!
I will try this today. I though scaling really doesn't work without acpi.
I could write a sensord.conf to scale down cpu when heat is above 70-75 degrees, but not sure if I can do this on certain load (like apmd does it)
I'll look into this and come back with any results.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Working with CVS? Zmyrgel OpenBSD General 15 6th October 2009 01:32 PM
Apache 1.3 and PHP 5, Not Working! dialeight OpenBSD Packages and Ports 7 7th June 2009 06:43 PM
pf: why is that rule not working? ivanatora FreeBSD General 14 11th December 2008 09:32 AM
Working around cheap SOHO routers under OpenBSD BSDfan666 Guides 1 23rd November 2008 07:44 PM
Working Configuration for Openbsd 4.0 - Postfix - SASL - TLS roundkat Guides 0 4th May 2008 05:38 PM


All times are GMT. The time now is 04:55 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick