Re: [9fans] USB mouse
That was it. I set *acpi=1 and now the usb mouse works. Thank you! On Friday, September 21, 2018, 7:37:38 AM CDT, Tobias Heinicke wrote: Do you have ACPI turned on (e.g. *acpi=1 in your plan9.ini), because I noticed an issue with USB mouse sometimes not being detected if they were plugged in during boot (detaching and attaching again after 9front is up solves the issue [dev/usbevent then has an attach line for the mouse while previously there was not one {no detach logged}]). I only noticed this issue with ACPI turned on, but I have not been able to track down the exact reason yet (thus I refrained from writing a mail to the ML). -- Tobias Heinicke On 09/21/2018 06:11 AM, G B wrote: > I asked previously about disabling the touchpad for a Lenovo laptop, but I've > changed things around. I put FreeBSD on the Lenovo N580 and 9front on the > Thinkpad T60. > > The good news is I have WiFi working with 9front on the T60, but I can't get > a USB mouse to work. However, if I run Plan 9 from Bell Labs on the T60 a > USB mouse works. > > How can I get the USB mouse working? >
Re: [9fans] USB mouse
Do you have ACPI turned on (e.g. *acpi=1 in your plan9.ini), because I noticed an issue with USB mouse sometimes not being detected if they were plugged in during boot (detaching and attaching again after 9front is up solves the issue [dev/usbevent then has an attach line for the mouse while previously there was not one {no detach logged}]). I only noticed this issue with ACPI turned on, but I have not been able to track down the exact reason yet (thus I refrained from writing a mail to the ML). -- Tobias Heinicke On 09/21/2018 06:11 AM, G B wrote: > I asked previously about disabling the touchpad for a Lenovo laptop, but I've > changed things around. I put FreeBSD on the Lenovo N580 and 9front on the > Thinkpad T60. > > The good news is I have WiFi working with 9front on the T60, but I can't get > a USB mouse to work. However, if I run Plan 9 from Bell Labs on the T60 a > USB mouse works. > > How can I get the USB mouse working? >
[9fans] USB mouse
I asked previously about disabling the touchpad for a Lenovo laptop, but I've changed things around. I put FreeBSD on the Lenovo N580 and 9front on the Thinkpad T60. The good news is I have WiFi working with 9front on the T60, but I can't get a USB mouse to work. However, if I run Plan 9 from Bell Labs on the T60 a USB mouse works. How can I get the USB mouse working?
Re: [9fans] USB mouse not working
hard to say. i'd start by making sure the usb controller works. the most common issue is that interrupts do not work due to broken mp tables. 9front uses acpic interrupts by default, which can result in usb not working when bios mp tables are broken. the work arround for that is to specify *acpi= on boot which uses acpi tables instead. alternatively disable apic interrupts and switch to legacy PIC interrupt model with *nomp=1, (this used to be the default of the plan9 from bell labs live cd). second is that 9front uses different mouse usb mouse/keyboard driver that sets the mouse in non-compat mode and tries to parse the report data according to the hid descriptor. source: /sys/src/cmd/nusb/kb.c to debug that, run: ps -a | grep kb to get the nusb/kb processes program arguments (contains the usb address they are attached to) and then kill the process. then start another instance of nusb/kb, passing in the original usb address and the -d flag. good luck. -- cinap
[9fans] USB mouse not working
I have 2 IBM Thinkpad X60 laptops and one of them has Plan 9 from Bell Labs installed and the other has 9front installed. I also have 3 USB mouse devices: A Dell optical mouse; A Lenovo optical ScrollPoint mouse; An IBM MUY101 3 button optical mouse. The touchpad pointer works on both Bell Labs and 9front, but the USB mouse devices only work on Plan 9 from Bell Labs and not 9front. I purchased the Lenovo ScrollPoint mouse because I read in the 9front FQA it was recommended. Is there a binding I need to get the USB mouse to work with 9front?
[9fans] usb mouse not working
i have a ehci-only system that seems to be recogizing the mouse, but the mouse doesn't work. one thing that stands out is that the online light in the scroll button doesn't light. i seem to have the kbd process running, p=(Proc)0x56798pid 92 Running t=(Thread)0x57138Running/sys/src/cmd/usb/kb/kb.c:554 kbdwork pread()+0x7 /sys/src/libc/9syscall/pread.s:5 read(fd=0xe,buf=0x673e7,n=0x8)+0x2f /sys/src/libc/9sys/read.c:7 kbdwork(a=0x4e0f8)+0x107 /sys/src/cmd/usb/kb/kb.c:554 launcher386(arg=0x4e0f8,f=0x9129)+0x10 /sys/src/libthread/386.c:10 0xfefefefe ?file?:0 p=(Proc)0x57498pid 93 Sched t=(Thread)0x57e38Rendez /sys/src/cmd/usb/kb/kb.c:435 repeatproc recvul(c=0x57458)+0x2c /sys/src/libthread/channel.c:380 repeatproc(a=0x4e0f8)+0x56 /sys/src/cmd/usb/kb/kb.c:435 launcher386(arg=0x4e0f8,f=0x8c8b)+0x10 /sys/src/libthread/386.c:10 0xfefefefe ?file?:0 p=(Proc)0x57fd8pid 94 Running t=(Thread)0x58978Running/sys/src/cmd/usb/kb/kb.c:341 ptrwork pread()+0x7 /sys/src/libc/9syscall/pread.s:5 read(fd=0x11,buf=0x77488,n=0x8)+0x2f /sys/src/libc/9sys/read.c:7 ptrwork(a=0x571d8)+0xb7 /sys/src/cmd/usb/kb/kb.c:341 launcher386(arg=0x571d8,f=0x8843)+0x10 /sys/src/libthread/386.c:10 0xfefefefe ?file?:0 usb debug output looks like this usb/usbd: hub 0x5ee48 /dev/usb/ep3.0 port 1: nildev usb/usbd: hub 0x5ee48 /dev/usb/ep3.0 port 2: /dev/usb/ep4.0 1 refs usb/usbd: hub 0x5ee48 /dev/usb/ep3.0 port 3: nildev usb/usbd: hub 0x5ee48 /dev/usb/ep3.0 port 4: nildev usb/usbd: hub 0x5ee48 /dev/usb/ep3.0 port 5: nildev usb/usbd: hub 0x5ee48 /dev/usb/ep3.0 port 6: nildev usb/usbd: hub 0x5e5e8 /dev/usb/ep2.0 port 1: nildev usb/usbd: hub 0x5e5e8 /dev/usb/ep2.0 port 2: nildev usb/usbd: hub 0x5e668 /dev/usb/ep1.0 port 1: /dev/usb/ep3.0 csp hub.0.1 vid 0x8087 did 0x24 refs 2 none nil nil conf: cval 1 attrib e0 0 mA iface csp hub.0.0 alt 0 attr 3 ival 12 ep id 1 addr 129 dir in type intr itype 0 maxpkt 1 ntds 1 usb/usbd: hub 0x5e668 /dev/usb/ep1.0 port 2: nildev usb/usbd: fs list: (1 used 2 total) usb/usbd: usbdctl ; grep usb /dev/irqalloc 97 11 123521794000276 ioapic usbehci 105 500 ioapic usbehci ; pci -v 0.0.0: brg 06.00.00 8086/0108 0 Intel Corporation Xeon E3-1200 Processor Family DRAM Controller 0.1.0: brg 06.04.00 8086/0101 11 Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port 0.25.0: net 02.00.00 8086/1502 7 0:fbb0 131072 1:fbb24000 4096 2:f021 32 Intel Corporation 82579LM Gigabit Network Connection 0.26.0: usb 0c.03.20 8086/1c2d 11 0:fbb23000 1024 Intel Corporation 6 Series Chipset Family USB Enhanced Host Controller #2 0.28.0: brg 06.04.00 8086/1c10 5 Intel Corporation 6 Series Chipset Family PCI Express Root Port 1 0.28.4: brg 06.04.00 8086/1c18 5 Intel Corporation 6 Series Chipset Family PCI Express Root Port 5 0.29.0: usb 0c.03.20 8086/1c26 5 0:fbb22000 1024 Intel Corporation 6 Series Chipset Family USB Enhanced Host Controller #1 0.30.0: brg 06.04.01 8086/244e 255 Intel Corporation 82801 PCI Bridge 0.31.0: brg 06.01.00 8086/1c54 0 Intel Corporation C204 Chipset Family LPC Controller 0.31.2: disk 01.06.01 8086/1c02 11 0:f071 16 1:f061 16 2:f051 16 3:f041 16 4:f001 32 5:fbb21000 2048 Intel Corporation 6 Series Chipset Family 6 port SATA AHCI Controller 0.31.3: smb 0c.05.00 8086/1c22 11 0:fbb20004 256 1: 16 4:1181 32 Intel Corporation 6 Series Chipset Family SMBus Controller 1.0.0: disk 01.00.00 11ab/6485 11 2:e001 128 4:fba40004 65536 5: 16 Marvell Technology Group Ltd. MV64460/64461/64462 System Controller, Revision B 3.0.0: net 02.00.00 8086/10d3 11 0:fb90 131072 2:d001 32 3:fb92 16384 Intel Corporation 82574L Gigabit Network Connection 4.3.0: vid 03.00.00 102b/0532 5 0:fa08 16777216 1:fb80 16384 2:fb00 8388608 Matrox Graphics, Inc. MGA G200eW WPCM450 - erik
Re: [9fans] usb mouse not working
a bit of an update, disabling one of the usb ehci devies fixed things but i get a number of errors and warnings from epiowait() with this format: ehci %#p: io %#p qh %#p timed out (no intr?)\n. things are not right, but at least the machine is working as a terminal. i added some general code to disable arbitrary ehci devices. also, i noticed that there's a smalloc() that really can't be counted on as we're holding an ilock. i'd rather panic on nil indirection than just hang. - erik ; 9diff usbehcipc.c post... /n/sources/plan9//sys/src/9/pc/usbehcipc.c:142,179 - usbehcipc.c:142,192 iunlock(ctlr); } + static int + checkdev(Pcidev *p) + { + char *conf, *s, dev[32]; + + conf = getconf(*badehci); + if(conf == nil) + return 0; + snprint(dev, sizeof dev, %.4ux/%.4ux, p-vid, p-did); + + s = strstr(conf, dev); + if(s != nil (s[9] == 0 || s[9] == ' ')) + return -1; + return 0; + } + static void scanpci(void) { - static int already = 0; int i; ulong io; Ctlr *ctlr; Pcidev *p; Ecapio *capio; + static int already; if(already) return; already = 1; - p = nil; - while ((p = pcimatch(p, 0, 0)) != nil) { + i = 0; + for(p = nil; (p = pcimatch(p, 0, 0)) != nil; ) { /* * Find EHCI controllers (Programming Interface = 0x20). */ - if(p-ccrb != Pcibcserial || p-ccru != Pciscusb) + if(p-ccrb != Pcibcserial || p-ccru != Pciscusb || p-ccrp != 0x20) continue; - switch(p-ccrp){ - case 0x20: - io = p-mem[0].bar ~0x0f; - break; - default: + if(i == Nhcis){ + print(ehci: bug: more than %d controllers\n, Nhcis); continue; } - if(0 p-vid == Vintel p-did == 0x3b34) { - print(usbehci: ignoring known bad ctlr %#ux/%#ux\n, - p-vid, p-did); + if(checkdev(p) == -1){ + print(usbehci: ignore %.4ux/%.4ux\n, p-vid, p-did); continue; } + io = p-mem[0].bar ~0x0f; if(io == 0){ print(usbehci: %x %x: failed to map registers\n, p-vid, p-did); /n/sources/plan9//sys/src/9/pc/usbehcipc.c:186,204 - usbehcipc.c:199,210 dprint(usbehci: %#x %#x: port %#lux size %#x irq %d\n, p-vid, p-did, io, p-mem[0].size, p-intl); - ctlr = smalloc(sizeof(Ctlr)); + ctlr = malloc(sizeof(Ctlr)); ctlr-pcidev = p; capio = ctlr-capio = vmap(io, p-mem[0].size); ctlr-opio = (Eopio*)((uintptr)capio + (capio-cap 0xff)); pcisetbme(p); pcisetpms(p, 0); - for(i = 0; i Nhcis; i++) - if(ctlrs[i] == nil){ - ctlrs[i] = ctlr; - break; - } - if(i = Nhcis) - print(ehci: bug: more than %d controllers\n, Nhcis); /* * currently, if we enable a second ehci controller on zt /n/sources/plan9//sys/src/9/pc/usbehcipc.c:208,215 - usbehcipc.c:214,225 if (i = maxehci) { print(usbehci: ignoring controllers after first %d, at %#p\n, maxehci, io); - ctlrs[i] = nil; + pciclrbme(p); + vunmap(capio, p-mem[0].size); + free(ctlr); + continue; } + ctlrs[i++] = ctlr; } }
[9fans] USB mouse doesn't like being unplugged
Folks: I am using usb/kb to provide support for my keyboard mouse which are plugged into a KVM. They both seem to work well enough. I still have to use a PS/2 keyboard to input the mount point user but at least things start working when rio is available and I can do the usb/kb thing. My problem is when I switch to another machine and then come back to my plan9 installation: the keyboard keeps working but the mouse stops responding to all input. I also get the following error when this happens: usb/kb: mouse: read: usb endpoint stalled Does anyone know how if it is possible to make the mouse portion of usb/kb somewhat more resiliant to disappearing/reappearing? I would have hoped that this were possible seeing as how it's USB. Thanks in advance, Matt -- If builders built buildings the way programmers write programs, then the first woodpecker that came along would destroy civilization. - anon
Re: [9fans] USB mouse doesn't like being unplugged
Usb code does not handle hot plugging. If you happen to have uhci I can help u off list. El 01/03/2009, a las 14:29, mad...@phantomware.ca escribió: Folks: I am using usb/kb to provide support for my keyboard mouse which are plugged into a KVM. They both seem to work well enough. I still have to use a PS/2 keyboard to input the mount point user but at least things start working when rio is available and I can do the usb/kb thing. My problem is when I switch to another machine and then come back to my plan9 installation: the keyboard keeps working but the mouse stops responding to all input. I also get the following error when this happens: usb/kb: mouse: read: usb endpoint stalled Does anyone know how if it is possible to make the mouse portion of usb/kb somewhat more resiliant to disappearing/reappearing? I would have hoped that this were possible seeing as how it's USB. Thanks in advance, Matt -- If builders built buildings the way programmers write programs, then the first woodpecker that came along would destroy civilization. - anon [/mail/box/nemo/msgs/200903/35198]
Re: [9fans] USB mouse doesn't like being unplugged
!/bin/upas/marshal -s 'Re: [9fans] USB mouse doesn''t like being unplugged' -R /mail/fs/mbox/65 9fans@9fans.net Also, since I'm a newbie it just occured to me that if it isn't easy to make usb/kb live with the mouse going away coming back that it might just be possible to unload load usb/kb when I need it - you can kill off usb/usbd and usb/kb and restart them and that usually works. i got usb/kb sort-of reliable for replugging with intel usb. but i couldn't sign up for supporting that configuration. - erik
Re: [9fans] USB mouse doesn't like being unplugged
erik quanstrom writes: you can kill off usb/usbd and usb/kb and restart them and that usually works. Oddly enough the keyboard seems to work after the switch (most of the time) but the mouse never does. Use of usb/kb -k and usb/usbmouse (and successive restarts of usb/usbmouse) seems to do the trick most of the time but it is ungainly to say the least. Would you be willing to provide an example of a script that I could start from profile (or whatever is reasonable) - something that would check for a stuck usb device and restart the appropriate components? I would give this a shot myself but I am newbie enough that I think it would take me a long time to get to that point. In any case, thanks for your assistance - Matt -- If builders built buildings the way programmers write programs, then the first woodpecker that came along would destroy civilization. - anon
Re: [9fans] USB mouse doesn't like being unplugged
had a kvm switch once and it sucked even for just ps2. now i find it rare for the need to access the real keyboard/mouse of a machine. expecialy in the case of plan9 where you can use drawterm or vnc. in case you want to use 2 monitors and only switch for keyboard/mouse input you can use the synergy client [1] for plan9. (expecting you are using window/unix on the other machine) [1] /n/sources/contrib/cinap_lenrek/synergy.tgz -- cinap ---BeginMessage--- Folks: I am using usb/kb to provide support for my keyboard mouse which are plugged into a KVM. They both seem to work well enough. I still have to use a PS/2 keyboard to input the mount point user but at least things start working when rio is available and I can do the usb/kb thing. My problem is when I switch to another machine and then come back to my plan9 installation: the keyboard keeps working but the mouse stops responding to all input. I also get the following error when this happens: usb/kb: mouse: read: usb endpoint stalled Does anyone know how if it is possible to make the mouse portion of usb/kb somewhat more resiliant to disappearing/reappearing? I would have hoped that this were possible seeing as how it's USB. Thanks in advance, Matt -- If builders built buildings the way programmers write programs, then the first woodpecker that came along would destroy civilization. - anon ---End Message---