Re: OSS and ALSA

2013-01-28 Thread Andriy Gapon
on 23/01/2013 23:15 Oliver Lehmann said the following:
 I noticed, that the OSS4 plugin also workes without the oss4 dependency.
 Can someone please try this as well?
 
 - deinstall audacious-plugins
 - deinstall oss4
 - change audacious-plugins/Makefile and comment out the oss4 BUILD_DEPENDENCY
 - install audacious-plugins
 - start audacious
 
 for me it works... please some more tests.

This is a late answer, but yes, it does work.
Thank you!

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: OSS and ALSA

2013-01-21 Thread Andriy Gapon
on 21/01/2013 14:22 David Demelier said the following:
 I mean audacious, not VLC
 
 
 2013/1/21 David Demelier demelier.da...@gmail.com
 
 Don't enable OSS4 nor ALSA, VLC can run fine with FreeBSD kernel mixer
 support (that has a OSS compatibility support).

 Just use defaults, it will always work more when you use default options.

Are you sure?  And are you speaking about the latest version - 3.3.3 ?

In that version, if neither ALSA nor OSS4 is selected then the only output
possible is FileWriter.  BTW, OSS4 is On by default, which is annoying - why 
do
I have install some external kernel code if we already have quite good audio 
code.

It seems that audacious has lost support for normal OSS and became useless to
me.  Maybe SDL Output plugin/option could help, I need to try that.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: OSS and ALSA

2013-01-21 Thread Andriy Gapon
on 21/01/2013 16:18 Andriy Gapon said the following:
 Are you sure?  And are you speaking about the latest version - 3.3.3 ?
 
 In that version, if neither ALSA nor OSS4 is selected then the only output
 possible is FileWriter.  BTW, OSS4 is On by default, which is annoying - 
 why do
 I have install some external kernel code if we already have quite good audio 
 code.
 
 It seems that audacious has lost support for normal OSS and became useless 
 to
 me.  Maybe SDL Output plugin/option could help, I need to try that.

Yes, SDL Output works fine.  I think that this should be the default for the
following reasons:
- unlike OSS4 it doesn't require an additional external kernel driver
- unlike PulseAudio it doesn't require any daemon (and possibly extra 
configuration)
- unlike ALSA OSS plugin, SDL code is sane in its usage of OSS API

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Phenom II 975 BE shows 0 celsius

2011-08-01 Thread Andriy Gapon
on 01/08/2011 03:28 Mario Lobo said the following:
 Hi to all
 
 In my desktop machine, I had an AM2+ ASROCK mobo with Phenom II 955 BE that 
 showed each core temperature perfectly under FBSD 8-STABLE, via 
 dev.cpu.x.temp. amdtemp.ko loaded.
 
 Unfortunately this Mobo died and only found AM3 boards for which my phenom 
 955 
 doesn't fit. So I got an ASUS M4A88T-V EVO with a Phenom II 975 BE. 
 
 Funny thing. An AM3 phenom II fits on an AM2 board but an AM3 board doesn't 
 accept an AM2/AM2+ phenom II :(.
 
 Anyway, now, under the very same system, it shows 0 degrees on dev.cpu.x.temp 
 for all cores.

Sorry, I've got lost in all the config changes.  So what system do you have now?
Can please also provide CPU-related information from dmesg?

 I've been looking through k8temp and amdtemp src code. I am definitely not 
 sure of this but I believe something might have happened to those:
 
 From k8temp.h
 
 K10_THERM_REG  0xa4 
 K10_THERMTRIP_REG  0xe4
 K10_CURTMP(val)(((val)  21)  0xfff)
 K10_THERMTRIP(val) ((val  1)  1)
 
 From amdtemp.c
 
 /*
  * Register control (K8 family)
  */
 #define   AMDTEMP_REG0F   0xe4
 #define   AMDTEMP_REG_SELSENSOR   0x40
 #define   AMDTEMP_REG_SELCORE 0x04
 
 /*
  * Register control (K10  K11) family
  */
 #define   AMDTEMP_REG 0xa4
 
 
 Output of k8temp -dn:
 
 CPUID: Vendor: AuthenticAMD, 0x100f43: Model=04 Family=f+1 Stepping=3
 Advanced Power Management=0x1f9
Temperature sensor: Yes
  Frequency ID control: No
Voltage ID control: No
 THERMTRIP support: Yes
HW Thermal control: Yes
SW Thermal control: Yes
100MHz multipliers: Yes
HW P-State control: Yes
 TSC Invariant: Yes
 Temp=c0fef
 ThermTrip=1fc00c30
 0
 
 I keep a small win7 partition to test little things like this and see if the 
 same thing happens there, and it doesn't, so I concluded that the sensors are 
 there and are working.
 
 One thing is worth noting though. I have used a free gadget that shows 
 activity/temp for each core. It worked fine with the previous MB/CPU.That 
 ALSO 
 stopped working with this new MB. Like FBSD, it shows 0 degrees for any core 
 too, although it correctly displays each core load.

Most likely that gadget just re-uses OS-provided information.

 The only windows tool that correctly shows the temperature are the ASUS tools 
 that came with the mobo.
 
 Other than that, everything is working fine! The only thing I had to fix was 
 the fstab ada location.
 
 I know this is not a big thing but I got accustomed to keeping an eye on 
 those 
 temperatures.
 
 I have googled for a few days now searching for Thermal register address or 
 offsets for the Phenom II 975 BE, or anything related to this problem and 
 found nothing. Every search on AMD site was fruitless. I could not find a 
 single bit of tech info on this processor there, or any other tech info for 
 that matter.

http://support.amd.com/us/Processor_TechDocs/31116.pdf
 Would any one have any pointers/clues/suggestions on this?

I would try to add some printfs (or used dtrace - whichever is easier for you) 
to
see what's going on.  Or you can even use pciconf to directly sneak a peek at
what's reported by the hardware, e.g.:
# pciconf -r pci0:0:24:3 0xa4
1c881880

You can read the BKDG to see how to interpret the value - search for F3xA4.  See
F3xE4 for offset calculation.

Hopefully you should be able to see if hardware reports sane value and how the
amdtemp ends up reporting 0°C.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: editors/libreoffice: can not compile, crash on FreeBSD 9.0-CUR/amd64

2011-05-18 Thread Andriy Gapon
on 18/05/2011 12:10 O. Hartmann said the following:
 ---
 Oh dear - something failed during the build - sorry !
   For more help with debugging build errors, please see the section in:
 http://wiki.documentfoundation.org/Development
 
   internal build errors:
 
 ERROR: error 65280 occurred while making
 /usr/ports/editors/libreoffice/work/libreoffice-build-3.3.2.2/build/libreoffice/pyuno/source/loader
 
 
  it seems that the error is inside 'pyuno', please re-run build
  inside this module to isolate the error and/or test your fix:
 ---
 
 /usr/local/bin/bash
 cd 
 /usr/ports/editors/libreoffice/work/libreoffice-build-3.3.2.2/build/libreoffice
 source ./FreeBSDAMDEnv.Set.sh
 cd pyuno
 build

What happens if you try to follow this advice?

 when the problem is isolated and fixed exit and re-run 'make' from the 
 top-level
 sometimes (sadly) it is necessary to rm -Rf unxfbsdx.pro in a module.
 gmake: *** [stamp/build] Error 1
 *** Error code 1
 
 Stop in /usr/ports/editors/libreoffice.
 *** Error code 1
 
 Stop in /usr/ports/editors/libreoffice.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ZFS-Only FreeBSD and crashdump

2011-04-28 Thread Andriy Gapon
on 28/04/2011 19:01 Vladislav V. Prodan said the following:
 I have the ZFS-Only FreeBSD 8.2.
 # gpart show
 =   34  321672893  ad4  GPT  (153G)
  341281  freebsd-boot  (64K)
 162   335544322  freebsd-swap  (16G)
33554594  2881183333  freebsd-zfs  (137G)
 
 How to obtain crash dump, so he kept on zfs?
 Is it enough for it to correct /etc/rc.d/zfs, adding:
 # BEFORE: dumpon ?

At the moment FreeBSD doesn't support dumping to ZFS zvols, if that's what you 
are
asking.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: XIO: fatal IO error 35 (Resource temporarily unavailable) on X server :0.0

2011-03-26 Thread Andriy Gapon
on 26/03/2011 11:10 O. Hartmann said the following:
 Updating ports and source of my FreeBSD 9.0-CURRENT/amd64 host, equipted with 
 a
 AMD/ATi HD4830 graphics board driven by X11 xf86-video-ati driver (which has
 been recently update as far as I saw),
 resulted this morning in an 'un-login-able' box.
 
 I see the xdm-login requester, but after successfully login, I see for a 
 second
 the desktop (windowmaker), but X11 immediately dies and resets to the xdm
 requester again.

Are you subscribed to our x11 list?  It's quite low volume.
Please see recent messages in its archive, perhaps they could help you.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: 8.1-STABLE Unexpected XML: what does it mean?

2010-12-14 Thread Andriy Gapon
on 14/12/2010 16:27 Eugene Mitrofanov said the following:
 Hi
 
 I observe the very strange message while run a lot of commands:
 
 r...@beaver:eugene# glabel status
 Unexpected XML: name=stripesize data=18432
 Unexpected XML: name=stripeoffset data=0
 Unexpected XML: name=stripesize data=18432
 Unexpected XML: name=stripeoffset data=0
  Name  Status  Components
 iso9660/CDROM N/A  acd0
 
 r...@beaver:eugene# mdconfig -l
 Unexpected XML: name=stripesize data=18432
 Unexpected XML: name=stripeoffset data=0
 
 r...@beaver:eugene# gmirror status
 Unexpected XML: name=stripesize data=18432
 Unexpected XML: name=stripeoffset data=0
 gmirror: Command 'status' not available.
 
 What subsystem prints them? How can I fix it?

I'd hazard a guess that either your userland and kernel are out of sync or
something like that is taking place.
The messages come from libgeom and they mean it doesn't understand those 
stripe*
properties.

P.S.
geom@ is often the best mailing list for geom issues.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: monitoring hardware temperatures

2010-12-06 Thread Andriy Gapon
on 07/12/2010 01:09 Mikhail T. said the following:
 On 06.12.2010 18:02, Andriy Gapon wrote:
 BTW, you could probably write a simple script employing smbmsg(1) to query 
 the
 DIMMs based on logic in the sdtemp driver.
 From OpenBSD's sdtemp man-page, it would seem, the driver uses the iic 
 framework
 (if that's the right word, khmm...)
 
 And on this server I can't get /dev/iic* (nor smb*) to appear despite loading
 everything I could think of (even the viapm):
 
  31 0x80c23000 d22  iic.ko
  44 0x80c24000 10e7 iicbus.ko
  51 0x80c26000 f16  iicsmb.ko
  65 0x80c27000 819  smbus.ko
  71 0x80c28000 c02  smb.ko
  83 0x80c29000 114f iicbb.ko
  91 0x80c2b000 1df3 ichsmb.ko
101 0x80c2d000 1aed intpm.ko
111 0x80c2f000 e38  pcf.ko
121 0x80c3 b83  lpbb.ko
131 0x80c31000 368b ppbus.ko
141 0x80c35000 262a viapm.ko
 
 Could it be, that the motherboard simply does not have the iic-circuitry and
 that some other method has to be used? Thanks! Yours,

That's quite possible.
Another possibility is that a driver that should be able to handle your hardwre
just doesn't know the particular IDs.

pciconf -lv output could shed some light.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: monitoring hardware temperatures

2010-12-06 Thread Andriy Gapon
on 06/12/2010 23:05 Mikhail T. said the following:
 The sensors-patches did not add any new entries under hw.sensors hierarchy :(

Oh good, one less potential source of sensors framework flames :-)
Seriously, the version that was ported to FreeBSD was very desktop-ish, so no
miracle was expected and none happened.

BTW, you could probably write a simple script employing smbmsg(1) to query the
DIMMs based on logic in the sdtemp driver.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: monitoring hardware temperatures

2010-12-06 Thread Andriy Gapon
on 07/12/2010 04:47 Mikhail T. said the following:
 On 06.12.2010 18:19, Andriy Gapon wrote:
 Another possibility is that a driver that should be able to handle your 
 hardwre
 just doesn't know the particular IDs.

 pciconf -lv output could shed some light.
 Attached -- it is a vanilla PowerEdge 2900 with just one add-on card -- 
 audio...

Looks like no SMBus device indeed.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Strange network issue in freebsd 8

2010-01-28 Thread Andriy Gapon
on 28/01/2010 05:03 sam said the following:
 that s why I 've been so in doubt using freebsd AMD64 release.

Why again?

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: booting off GPT partitions

2010-01-27 Thread Andriy Gapon
on 27/01/2010 18:45 Dan Naumov said the following:
 Hey
 
 I was under the impression that everyone and their dog is using GPT
 partitioning in FreeBSD these days, including for boot drives and that
 I was just being unlucky with my current NAS motherboard (Intel
 D945GCLF2) having supposedly shaky support for GPT boot. But right now
 I am having an email exchange with Supermicro support (whom I
 contacted since I am pondering their X7SPA-H board for a new system),
 who are telling me that booting off GPT requires UEFI BIOS, which is
 supposedly a very new thing and that for example NONE of their current
 motherboards have support for this.
 
 Am I misunderstanding something or is the Supermicro support tech misguided?

Perhaps both :-)
It depends on what booting capabilities you need from your BIOS.
With FreeBSD we currently typically don't use pure GPT and use Protective MBR
and install real boot code into a special boot partition.  Protective MBR looks
like a normal MBR to BIOS, and boot code in Protective MBR is smart to find 
the
boot partition and hand off boot process to code in it.
This way you can almost have the best of both worlds, but with some limitations
(like multibooting).  I don't know what other OSes do or expect in this area.

Obligatory wikipedia link:
http://en.wikipedia.org/wiki/GUID_Partition_Table#Legacy_MBR_.28LBA_0.29

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Loader, MBR and the boot process

2010-01-25 Thread Andriy Gapon
on 25/01/2010 04:41 Robert Noland said the following:
 On Mon, 2010-01-25 at 07:57 +1100, Mark Andrews wrote:
  offset  The offset of the start of the partition from the beginning of
  the drive in sectors, or * to have bsdlabel calculate the 
 correct
  offset to use (the end of the previous partition plus one, 
 ignor-
  ing partition `c'.  For partition `c', * will be interpreted as
  an offset of 0.  The first partition should start at offset 16,
  because the first 16 sectors are reserved for metadata.
 
 Ok, now this has my attention... My gut feeling right now is that this
 is a bug in geom_part_bsd.  I don't understand why the label isn't
 protected.  (Adding -b 16 when adding the swap partition fixes this)
 Another project to goes on my list...
 
 If anyone knows why this is done like this... please share.

I presume that this is for purely historic reasons.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: 8.0-RELEASE / gpart / GPT / marking a partition as active

2010-01-19 Thread Andriy Gapon
on 19/01/2010 19:11 Dan Naumov said the following:
 I have found this discussion from about a month ago:
 http://www.mail-archive.com/freebsd-sta...@freebsd.org/msg106918.html
 where Robert mentions that gpart set -a active -i 1 is no longer
 needed in 8-STABLE, because the pmbr will be marked as active during

It was never ever needed, because it never worked.

 the installation of the bootcode. Is there anything I can do to
 archieve the same result in 8.0-RELEASE or is installing from a
 snapshop of 8-STABLE my only option?

People did it using fdisk -a, google should have turned that up.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: 8.0-RELEASE / gpart / GPT / marking a partition as active

2010-01-19 Thread Andriy Gapon
on 19/01/2010 23:09 Dan Naumov said the following:
 After using gpart to create the GPT (and thus the PMBR and its
 bootcode), why not simply use fdisk -a -1 DISKNAME to set the PMBR
 partition active?
 
 According to the fdisk output, the partition flag did change from 0 to
 80. Can the fdisk: Class not found error showing up at the very end
 of the procedure of doing fdisk -a -1 DISKNAME be safely ignored?

Yes, I think so.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: IMAP and SMTP-AUTH with sendmail on FreeBSD 7

2008-05-14 Thread Andriy Gapon


Have you recompiled your sendmail with SASL support?
It's in the handbook:
http://www.freebsd.org/doc/en/books/handbook/smtp-auth.html

--
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


sbc: isa plug-n-play

2008-02-22 Thread Andriy Gapon

I have an older hardware system with a newer OS on it :-)
It's i386 7.0-RC1 on 440BX / Pentium III.
I have the following soundcard in ISA slot on the system:
sbc0: Creative SB AWE64 Gold at port
0x220-0x22f,0x330-0x331,0x388-0x38b irq 5 drq 1,5 pnpid CTL00b2 on isa0
sbc0: [GIANT-LOCKED]
sbc0: [ITHREAD]
pcm0: SB16 DSP 4.16 on sbc0

I believe that the soundcard supports ISA Plug-n-Play.

Everything works great. But recently I had an itch to go trough BIOS
settings. I spotted one named Plug-n-Play OS and it was set to
disabled. I thought what the heck FreeBSD is a Plug-n-Play OS for a
long time, so flipped it to enabled.
After that no joy, the soundcard stopped to work. It was detected as
before, there is no difference in dmesg whatsoever, but it did not
generate any interrupts (verified with vmstat -i). And any playback
attempt resulted in zero sound and the following message on console:
pcm0:virtual:dsp0.vp0: play interrupt timeout, channel dead

So I disabled the option again and everything is fine.
Practical conclusion: don't do it.
Question of curiosity: what is it that BIOS can do with this card that
our driver can not ?

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


newfs_msdos and dvd-ram

2008-02-17 Thread Andriy Gapon

Should newfs_msdos be able to work on whole cdX/acdX device ?
[ufs/ffs] newfs can do it.
But with newfs_msdos I had to run disklabel first and then I could
create a filesystem on cdXa, but I couldn't do it on the whole disk.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


A4Tech OP-3D mouse

2008-01-29 Thread Andriy Gapon

Anyone using A4Tech OP-3D mouse with FreeBSD or Linux ?
Please let me know if you have its wheel working.
Please see below for the description of the problem I am having (both in
6.3. and 7.0-RC1).

 Original Message 
Subject: mouse problems
Date: Fri, 25 Jan 2008 14:35:27 +0200
From: Andriy Gapon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED], [EMAIL PROTECTED]


I've recently got a cheap PS/2 mouse A4 Tech OP-3D:
http://www.a4tech.com/EN/product2.asp?CID=114SCID=115MNO=OP-3D

It looks like your regular mouse with a combined
middle-button/scroll-wheel. The only unusual feature is an additional
button for double-click - I am not sure if it's simulated within the
mouse itself or if it is reported to controller/driver.

There is a problem with this mouse though: if I don't do anything
special then this mouse acts very erratically and misbehaves all it can
- movements are ignored or reported as button clicks, button clicks get
reported as movements or clicks of different buttons, etc.
One cure that I initially found was to kill moused, disconnect and
reconnect the mouse and restart moused, after that moused worked well.
Then, I found out that I could achieve the same if I specify 0x200 flag
(no id probing).
Judging from verbose dmesg the mouse is detected as a generic ps/2 mouse
with or without this flag, there is no difference whatsoever. So it
seems that probing for various mouse models somehow hoses this mouse.

Question #1: maybe some kind of additional mouse reset should be
performed after all probes failed and we settle on generic?

Well, while flag 0x200 makes the mouse behave reasonably, it seems that
the presence of the wheel is not detected (or mouse is configured to
ignore it?), so I can not use it.

Question #2: what are the further steps to debug this issue so that this
mouse is properly recognized? I really would like to get the wheel working.

I can provide any additional information needed.
Thank you.

-- 
Andriy Gapon


-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mounted cd and tray locking

2007-12-13 Thread Andriy Gapon
on 13/12/2007 09:30 Nikos Vassiliadis said the following:
 On Wednesday 12 December 2007 18:58:44 Andriy Gapon wrote:
 Hmm. Looked at the code and it should be as expected. Played with
 various stuff and here's what I think: it seems that having atapicam and
 hald and maybe something in KDE that polls for CD change is to blame.
 
 I have no atapicam in my kernel. Nor hald running.
 I reproduced it like this:
 mount /cdrom
 cdcontrol eject

I don't think you reproduced it. Why would you execute the above command
unless it is your intention to eject the disk ?
I am talking about something else, disk is ejected even if my cat
accidentally touches eject button and he is not smart enough to type any
commands on console :-) Well, I don't have a cat, it's just a figure of
speech.

 press the eject key and the tray will open.
 
 Nikos
 


-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mounted cd and tray locking

2007-12-13 Thread Andriy Gapon
on 12/12/2007 20:18 Andriy Gapon said the following:
[trimmed]
 Investigated more and it seems that hald is a main culprit here. Without
 it everything works reasonably well as long as I don't mix acd and cd
 accesses.
 That is, if I mount through acd, then trough cd, then unmount the cd
 mount, then tray gets unlocked. In a perfect world I would like to fix
 even this, but in real world this is OK.
 But if mount only through one device then tray is locked.
 
 So, hald is doing something wrong here. I am not sure if it is by
 design (to make the behavior mswindows-like) or if it is a bug or a
 side-effect of something.

Okey, I think I got it finally.
There is a capability for ATAPI devices that I didn't know about before:
there is a possibility to poll a device and check if physical eject
button was pressed while tray was locked with prevent command.
Hald does just this and then posts EjectPressed event. When KDE
mediamanager gets this notification it tries to do various stuff which
should ultimately lead to unmounting media in the device and ejecting
the tray. This seems to work reasonably well if KDE knows something the
mount, but this works miserably otherwise.
Examples:
1. atapicam is enabled and media is manually mounted via acd device
2. media is mounted via user-land fuse-based filesystem driver
In these cases KDE simply issues eject command and the drive is only
happy to oblige.

I wish that there was a way in KDE to configure handling of such events
where I could select one of the following:
1. ignore eject button press
2. give me a notification about it but do not do anything
3. give me a dialog asking how to proceed
4. try to unmount media and eject tray but don't eject if proper unmount
could not be done (unknown fs, etc)

And, of course, if device was not locked (via prevent) for reasons of
mounting media or otherwise opening device file or explicit command,
then a drive itself should handle the button. It should not be
artificially prevented from doing so.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mounted cd and tray locking

2007-12-13 Thread Andriy Gapon
on 13/12/2007 12:13 Nikos Vassiliadis said the following:
 On Thursday 13 December 2007 11:42:00 Andriy Gapon wrote:
 on 13/12/2007 09:30 Nikos Vassiliadis said the following:
 On Wednesday 12 December 2007 18:58:44 Andriy Gapon wrote:
 Hmm. Looked at the code and it should be as expected. Played with
 various stuff and here's what I think: it seems that having atapicam
 and hald and maybe something in KDE that polls for CD change is to
 blame.
 I have no atapicam in my kernel. Nor hald running.
 I reproduced it like this:
 mount /cdrom
 cdcontrol eject
 I don't think you reproduced it. Why would you execute the above command
 unless it is your intention to eject the disk ?
 
 You got it wrong. cdcontrol *does not* eject the disk, it works
 correctly, as it should. cdcontrol never ejects mounted media.

Well, I got it right, it's just that in my opinion you knew what you
were doing.

 It triggers the situation where I can then press the eject key
 on the cdrom and really eject the cdrom.

It would be interesting to see what exact ioctls/commands cdcontrol
issues. ktrace+kdump can help with this. Assuming your drive is ATAPI
(not SCSI) then if only CDIOCEJECT is issued then the drive should not
become unlocked.

 I am talking about something else, disk is ejected even if my cat
 accidentally touches eject button and he is not smart enough to type any
 commands on console :-) Well, I don't have a cat, it's just a figure of
 speech.
 
 Nevertheless ejecting a mounted medium is wrong. And that's not
 a feature. This is obviously a problem, regardless of how you
 trigger it. Would you like to file a PR?

Well, I see your point and probably I would agree 80% with you :-)
But this issue seems to be a little bit different from the issue that
concerns me most (which I explained in another email).
Someone could reply to your problem with that old joke:
- Doctor, it hurts when I do this.
- Then don't do it.
There is not so simple an answer to my issue.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mounted cd and tray locking

2007-12-13 Thread Andriy Gapon
on 13/12/2007 12:28 Andriy Gapon said the following:
 on 13/12/2007 12:13 Nikos Vassiliadis said the following:
 On Thursday 13 December 2007 11:42:00 Andriy Gapon wrote:
 on 13/12/2007 09:30 Nikos Vassiliadis said the following:
 I have no atapicam in my kernel. Nor hald running.
 I reproduced it like this:
 mount /cdrom
 cdcontrol eject
 I don't think you reproduced it. Why would you execute the above command
 unless it is your intention to eject the disk ?
 You got it wrong. cdcontrol *does not* eject the disk, it works
 correctly, as it should. cdcontrol never ejects mounted media.
 
 Well, I got it right, it's just that in my opinion you knew what you
 were doing.
 
 It triggers the situation where I can then press the eject key
 on the cdrom and really eject the cdrom.
 
 It would be interesting to see what exact ioctls/commands cdcontrol
 issues. ktrace+kdump can help with this. Assuming your drive is ATAPI
 (not SCSI) then if only CDIOCEJECT is issued then the drive should not
 become unlocked.

Tried this myself:
 11991 cdcontrol CALL  open(0x7fffe130,0,0x9)
 11991 cdcontrol NAMI  /dev/acd0
 11991 cdcontrol RET   open 3
 11991 cdcontrol CALL  ioctl(0x3,CDIOCALLOW,0)
 11991 cdcontrol RET   ioctl 0
 11991 cdcontrol CALL  ioctl(0x3,CDIOCEJECT,0)
 11991 cdcontrol RET   ioctl -1 errno 16 Device busy
 11991 cdcontrol CALL  exit(0x)

It is a question for me how atapi-cd should behave on CDIOCALLOW command
issued on an opened disk (by something other than the entity doing
ioctl, i.e. geom acr  1). Maybe it should work the same way as for
CDIOCEJECT, maybe geom ace should be taken into account somehow.
Part of me says: do not allow unlocking tray if something is mounted,
the other part says: let user do what he wants.
Maybe the easiest solution here is to change cdcontrol to do only
CDIOCEJECT without CDIOCALLOW ?


-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


mounted cd and tray locking

2007-12-12 Thread Andriy Gapon

I recently noticed that FreeBSD doesn't prevent tray opening (via a
button on CD/DVD drive) even if I mount a CD with ISO 9660 filesystem on
it. This at least happens with ATAPI CD drive (acd driver/device).

Maybe my memory is failing me but I seem to remember times when mounting
a CD locked a tray. Shouldn't this be a more reasonable behavior ?

Also, I think that it would be good if tray got locked on opening a
cd/acd device (e.g. dd if=/dev/acd0).

BTW, my system is 6.2.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mounted cd and tray locking

2007-12-12 Thread Andriy Gapon
on 12/12/2007 15:55 Nikos Vassiliadis said the following:
 On Wednesday 12 December 2007 13:13:48 Andriy Gapon wrote:
 I recently noticed that FreeBSD doesn't prevent tray opening (via a
 button on CD/DVD drive) even if I mount a CD with ISO 9660 filesystem on
 it. This at least happens with ATAPI CD drive (acd driver/device).

 Maybe my memory is failing me but I seem to remember times when mounting
 a CD locked a tray. Shouldn't this be a more reasonable behavior ?
 
 Yes, could file a PR?
 
 I see the mentioned behavior for my recent 6-STABLE.

Hmm. Looked at the code and it should be as expected. Played with
various stuff and here's what I think: it seems that having atapicam and
hald and maybe something in KDE that polls for CD change is to blame.
My theory: after I mount some media on acd0, hald wants to taste it
through cd0, on opening cd0 device 'prevent' command is sent, on closing
cd0 'allow' is sent, so in the end drive's tray is in unlocked state.

I don't see any easy resolution for this, but it definitely would be
good to come up with one.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mounted cd and tray locking

2007-12-12 Thread Andriy Gapon
on 12/12/2007 18:58 Andriy Gapon said the following:
 on 12/12/2007 15:55 Nikos Vassiliadis said the following:
 On Wednesday 12 December 2007 13:13:48 Andriy Gapon wrote:
 I recently noticed that FreeBSD doesn't prevent tray opening (via a
 button on CD/DVD drive) even if I mount a CD with ISO 9660 filesystem on
 it. This at least happens with ATAPI CD drive (acd driver/device).

 Maybe my memory is failing me but I seem to remember times when mounting
 a CD locked a tray. Shouldn't this be a more reasonable behavior ?
 Yes, could file a PR?

 I see the mentioned behavior for my recent 6-STABLE.
 
 Hmm. Looked at the code and it should be as expected. Played with
 various stuff and here's what I think: it seems that having atapicam and
 hald and maybe something in KDE that polls for CD change is to blame.
 My theory: after I mount some media on acd0, hald wants to taste it
 through cd0, on opening cd0 device 'prevent' command is sent, on closing
 cd0 'allow' is sent, so in the end drive's tray is in unlocked state.
 
 I don't see any easy resolution for this, but it definitely would be
 good to come up with one.
 

Investigated more and it seems that hald is a main culprit here. Without
it everything works reasonably well as long as I don't mix acd and cd
accesses.
That is, if I mount through acd, then trough cd, then unmount the cd
mount, then tray gets unlocked. In a perfect world I would like to fix
even this, but in real world this is OK.
But if mount only through one device then tray is locked.

So, hald is doing something wrong here. I am not sure if it is by
design (to make the behavior mswindows-like) or if it is a bug or a
side-effect of something.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: qemu and usb

2007-08-16 Thread Andriy Gapon
on 15/08/2007 20:06 Juergen Lock said the following:
 On Wed, Aug 15, 2007 at 12:57:36PM +0300, Andriy Gapon wrote:
 Is it possible on FreeBSD to provide access to host USB devices for qemu
 guests ?

 I tried playing with -usb and -usbdevice and to follow some linux
 how-to's but with no luck.
 
 Does the following snippet from the ports' pkg-message help?
 
 [...]
 - if you want to use usb devices connected to the host in the guest
 (usb_add host:... monitor command) you need to make sure the host isn't
 claiming them, e.g. for umass devices (like memory sticks or external
 harddrives) make sure umass isn't in the kernel (you can then still load it
 as a kld when needed), also unless you are running qemu as root you then
 need to fix permissions for /dev/ugen* device nodes: if you are on 5.x or
 later (devfs) put a rule in /etc/devfs.rules, activate it in /etc/rc.conf
 and run /etc/rc.d/devfs restart.  example devfs.rules:
   [ugen_ruleset=20]
   add path 'ugen*' mode 660 group operator
 corresponding rc.conf line:
   devfs_system_ruleset=ugen_ruleset
 - still usb: since the hub is no longer attached to the uchi controller
 and the wakeup mechanism, resume interrupt is not implemented yet linux
 guests will suspend the bus, i.e. they wont see devices usb_add'ed after
 its (linux') uhci module got loaded.  workaround: either add devices
 before linux loads the module or rmmod and modprobe it afterwards.
 [...]
 
  With this I was able to mount an usb cardreader from the guest.
 (although that is pretty slow...)

Juergen,

thank you very much! While I unloaded umass I totally forgot to load ugen.


-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


qemu and usb

2007-08-15 Thread Andriy Gapon

Is it possible on FreeBSD to provide access to host USB devices for qemu
guests ?

I tried playing with -usb and -usbdevice and to follow some linux
how-to's but with no luck.

Thank you.

-- 
Andriy Gapon

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


linux emulation: / resolves to real root dir; why ?

2004-10-22 Thread Andriy Gapon

Under Linux emulation /  resolves to real root directory, not
/compat/linux directory and I am very curious why this is so.

I see that in linux_emul_convpath() there is a special check for this
case with the following comment:

/*
 * We now compare the vnode of the linux_root to the one
 * vnode asked. If they resolve to be the same, then we
 * ignore the match so that the real root gets used.
 * This avoids the problem of traversing ../.. to find the
 * root directory and never finding it, because / resolves
 * to the emulation root directory. This is expensive :-(
 */


Because of such behavior mkdir -p (in linux base 7) is broken in cases
where more than one path components needs to be created - mkdir first
chdir()s to / and then iteratively mkdir()s and chdir()s to subdirectories.

My rationale for throwing out that check is that no linux program should
ever need to access real root directory, and in case of a user using an
interactive linux shell he should be smart enough to break out of
/compat/linux (very easy).

I have already posted this question to freebsd-emulation list, but got
no responses so far.

-- 
Andriy Gapon
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: linux emulation: / resolves to real root dir; why ?

2004-10-22 Thread Andriy Gapon
on 22.10.2004 14:18 Konrad Heuer said the following:
 On Fri, 22 Oct 2004, Andriy Gapon wrote:
 
 Linux binaries often need to access files outside the emulation directory
 tree, just think of data files in the user's homes when running
 applications like acroread, linux-mozilla, staroffice etc. So you
 absolutely need to break out.
 

we are taking about different break outs. Removing the check will
*not* affect accessing any other filesystem node but /. Only things like
cd /
ls /
or
cd .. from /compat/linux/foo
will be affected.

-- 
Andriy Gapon
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: nforce2 vs. apic

2004-09-17 Thread Andriy Gapon
on 16.09.2004 23:35 yuri van Overmeeren said the following:
...
 You could check the abit site and update/flash the mainboard with the
 latest bios.
 
 but I'm not sure about the 'official' fixed status of the nf7 and nf7
 V2.0. Btw when flashing the bios make sure you get the correct bios, you
 can check your board to see if you have a normal NF7 or NF7 v2.0.
 flashing it with the wrong bios means bye bye bios.

this is the next thing on my list, thanks

 -I suggest chipmakers make a new standard for something and call it
 'apci', just to keep things clear...-

the more the merrier

-- 
Andriy Gapon
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: nforce2 vs. apic

2004-09-17 Thread Andriy Gapon
on 17.09.2004 00:18 Vulpes Velox said the following:
 I own a Abit NF7
 
 Yeah... I remember this. A bit... I remember having to tweak it a bit
 to get it to play nicely. IIRC 5.2.1 does not have apic in by defualt?
 I may just haved removed it... I forget now, but any ways. Before
 trying apic, make sure your kernel has it. If your kernel does not, go
 into the setup screen and turn it off. I never had any ACPI problems
 with it and that has all ways worked well, minus a warning about a odd
 character or the like in it at startup.

I have also never had any ACPI problems, and everything is fine if APIC
is disabled either in BIOS or in kernel, but when it is enabled in both
the system freezes.

 So far my only complaint with it has been the onboard vr ethernet chip
 appears to suck compared to the dc pci card I have been using. Not
 taken the time to sort that out yet. Appears some what slow under
 heavy load. Think that has to do with a problem with device polling
 for that chipset.

Btw, to be precise I have NF7-S and I use network driver from
ports/net/nvnet, works fine for me, although I never did any performance
benchmarking.

-- 
Andriy Gapon
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


nforce2 vs. apic

2004-09-16 Thread Andriy Gapon

I have nforce2-based motherboard Abit NF7 and run 5.2.1-RELEASE on that
system. I have tried to enable APIC by compiling kernel with 'device
apic' (both with and without SMP option, although this is a UP system),
but system just freezes during boot with it. Everything works pretty
well without APIC, I was just curious about getting it to work.

I found this discussion:

http://lists.freebsd.org/pipermail/freebsd-current/2004-May/027316.html

and I have also found numerous reports on nforce2+APIC lockup problem in
Linux and some patches that were reported to help with it.

So, I want to find out if anything changed with respect to this in
FreeBSD, maybe some patches/workarounds, or success stories about
FreeBSD+nforce2+APIC.

Also some notes about my lockup. It happens at this point (exerpt for
non-verbose non-APIC dmesg):

psm0: PS/2 Mouse irq 12 on atkbdc0
psm0: model IntelliMouse, device ID 3
pmtimer0 on isa0
sc0: System console on isa0
sc0: VGA 16 virtual consoles, flags=0x200
vga0: Generic ISA VGA at port 0x3c0-0x3df iomem 0xa-0xb on isa0
Timecounter TSC frequency 1830012912 Hz quality 800
Timecounters tick every 10.000 msec
ipfw2 initialized, divert disabled, rule-based forwarding enabled,
default to accept, logging limited to 100 packets/entry by default
 In APIC case system freezes here 
GEOM: create disk ad0 dp=0xc6e15e60
ad0: 76319MB WDC WD800JB-00ETA0 [155061/16/63] at ata0-master UDMA100
acd0: CDRW TEAC CD-W552E at ata1-master UDMA33

Also, when system freezes keyboard LEDs still work properly and cursor
disappears when I press Scroll Lock, but arrow and PgUp/PgDown do not
work; if I try Alt-FN system speacker emits monotonic sound that can
not be turned off (except by reset, of course).

I am ready to provide any additional information. Unfortunately I am not
able to use serial console, so I can't give much info for APIC-enabled case.

-- 
Andriy Gapon
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: nforce2 vs. apic

2004-09-16 Thread Andriy Gapon
on 16.09.2004 15:46 yuri van Overmeeren said the following:

 5.2.1 freezes on a nforce2 mainboard with apci, I have a nforce2 (same
 abit board) based machine here running freebsd, never got the
 5.2.1-release to work with acpi.
 It was fixed a little while after the release, 5-current has been
 running on the nforce2 for a while.
 If you can wait untill the 5.3-release,which should be in about 2~3
 weeks, (and run 5.2.1 without acpi for that time) I would do that, 5.3
 no longer has the lock-up issue.

Yuri,

have you really talked about acpi or apic ? Because I was talking about
apic. I have acpi enabled and apic disabled and that works fine. But I
want to try to enable apic.

-- 
Andriy Gapon
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]