Search Results

Search found 80 results on 4 pages for 'wakeup'.

Page 1/4 | 1 2 3 4  | Next Page >

  • How do I make changes to /proc/acpi/wakeup permanent?

    - by Jolan
    I had a problem with my Ubuntu 12.04 waking up immediately after going into suspend. I solved the problem by changing the settings in /proc/acpi/wakeup, as suggested in this question: How do I prevent immediate wake up from suspend?. After changing the settings, the system goes flawlessly into suspend and stays suspended, but after I wake it back up, the settings in /proc/acpi/wakeup are different from what I set them to. Before going to suspend: cat /proc/acpi/wakeup Device S-state Status Sysfs node SMB0 S4 *disabled pci:0000:00:03.2 PBB0 S4 *disabled pci:0000:00:09.0 HDAC S4 *disabled pci:0000:00:08.0 XVR0 S4 *disabled pci:0000:00:0c.0 XVR1 S4 *disabled P0P5 S4 *disabled P0P6 S4 *disabled pci:0000:00:15.0 GLAN S4 *enabled pci:0000:03:00.0 P0P7 S4 *disabled pci:0000:00:16.0 P0P8 S4 *disabled P0P9 S4 *disabled USB0 S3 *disabled pci:0000:00:04.0 USB2 S3 *disabled pci:0000:00:04.1 US15 S3 *disabled pci:0000:00:06.0 US12 S3 *disabled pci:0000:00:06.1 PWRB S4 *enabled SLPB S4 *enabled I tell the system to suspend, and it works as it should. But later after waking it up, the settings are changed to either: USB0 S3 *disabled pci:0000:00:04.0 USB2 S3 *enabled pci:0000:00:04.1 US15 S3 *disabled pci:0000:00:06.0 US12 S3 *enabled pci:0000:00:06.1 or USB0 S3 *enabled pci:0000:00:04.0 USB2 S3 *enabled pci:0000:00:04.1 US15 S3 *enabled pci:0000:00:06.0 US12 S3 *enabled pci:0000:00:06.1 Any ideas? Thank you for your response. Unfortunately it did not solve my problem. all of /sys/bus/usb/devices/usb1/power/wakeup /sys/bus/usb/devices/usb2/power/wakeup /sys/bus/usb/devices/usb3/power/wakeup /sys/bus/usb/devices/usb4/power/wakeup as well as /sys/bus/usb/devices/3-1/power/wakeup are set to disabled, and the notebook still wakes up by itself right after going to sleep. The only thing it seems to react to are the settings in /proc/acpi/wakeup, which keep changing (resetting) every time i power off/restart my notebook.

    Read the article

  • KDE Sometimes Glitches On Wakeup

    - by Mew
    Well, a picture is work 1k words: Looks bad, huh? I am using the 331-updates latest 331.67 drivers from NVidia's website on a Dell Latitude e6400. Everything else is up-to-date. This only happens when I resume from sleep, or I switch to a VT and back. It also doesn't ALWAYS happen, which I find odd. Graphics Card: Nvidia Quadro NVS160M UPDATE AFTER TESTING: This problem only exists with KDE (specifically QT). I can go into Unity or Mint or any non QT-based GUI and it works perfectly with no resume errors. UPDATE: This only happens when I use KWin (and KDE). I have upgraded to 14.04 and the problem is not occurring as frequently. Also, sometimes this effect doesn't happen, but instead the top menu bar simply goes out of focus with the rest of the screen goes blank.

    Read the article

  • can not wakeup suspend com[puter

    - by user3528144
    I am unable to wake up my suspend Ubuntu 13.10. I click on suspend accidentally and HD led continues flash, but I tried to press any key keyboard, and CTL-ALT-PS R-E-I-S-U-B and power button, but can not wake up computer. I had to unplug power and put power back on to reboot computer. I would like to know are there any way to wake up suspend computer? Your help and information is great appreciated, regards, Iccsi,

    Read the article

  • Disable MOUSE wakeup when doing suspend on UBUNTU

    - by Shadyabhi
    When I do SUSPEND on ubuntu, in order to wake up, i can just move the mouse and the computer will wake up. But, I dont want that the computer is waked up when I move my mouse. How can I do that? My /proc/acpi/wakeup file:- shadyabhi@shadyabhi-desktop:~$ cat /proc/acpi/wakeup Device S-state Status Sysfs node SLPB S4 *enabled P32 S4 disabled pci:0000:00:1e.0 UAR1 S4 disabled pnp:00:09 ILAN S4 disabled pci:0000:00:19.0 PEGP S4 disabled PEX0 S4 disabled pci:0000:00:1c.0 PEX1 S4 disabled pci:0000:00:1c.1 PEX2 S4 disabled pci:0000:00:1c.2 PEX3 S4 disabled pci:0000:00:1c.3 PEX4 S4 disabled pci:0000:00:1c.4 PEX5 S4 disabled UHC1 S3 disabled pci:0000:00:1d.0 UHC2 S3 disabled pci:0000:00:1d.1 UHC3 S3 disabled pci:0000:00:1d.2 UHC4 S3 disabled EHCI S3 disabled pci:0000:00:1d.7 EHC2 S3 disabled pci:0000:00:1a.7 UH42 S3 disabled pci:0000:00:1a.0 UHC5 S3 disabled pci:0000:00:1a.1 UHC6 S3 disabled pci:0000:00:1a.2 AZAL S3 disabled pci:0000:00:1b.0 shadyabhi@shadyabhi-desktop:~$

    Read the article

  • Disabling Keyboard Wakeup for Ubuntu 10.04 on Acer 1810TZ

    - by sybreon
    My Acer Aspire 1810TZ laptop suspends fine but wakes up on any slight key-press. I would like to disable this behaviour. I read that it involves disabling something in the /proc/acpi/wakeup but SLPB does not seem to be listed at all. root@1810TZ:/etc# cat /proc/acpi/wakeup Device S-state Status Sysfs node UHC0 S3 disabled pci:0000:00:1d.0 UHC1 S3 disabled pci:0000:00:1d.1 UHC2 S3 disabled pci:0000:00:1d.2 UHCR S3 disabled EHC1 S3 disabled pci:0000:00:1d.7 UHC3 S3 disabled pci:0000:00:1a.0 UHC4 S3 disabled UHC5 S3 disabled EHC2 S3 disabled pci:0000:00:1a.7 EXP1 S4 disabled pci:0000:00:1c.0 PXSX S4 disabled pci:0000:01:00.0 EXP2 S4 disabled PXSX S4 disabled EXP3 S4 disabled PXSX S4 disabled EXP4 S4 disabled pci:0000:00:1c.3 PXSX S4 disabled pci:0000:02:00.0 EXP5 S4 disabled PXSX S4 disabled EXP6 S4 disabled PXSX S4 disabled However, the relevant bits seem to be detected from dmesg. [ 0.357628] ACPI: AC Adapter [ACAD] (on-line) [ 0.357749] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0 [ 0.357754] ACPI: Power Button [PWRB] [ 0.357817] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input1 [ 0.359319] ACPI: Lid Switch [LID0] [ 0.359390] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input2 [ 0.359394] ACPI: Sleep Button [SLPB] [ 0.359475] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input3 [ 0.359479] ACPI: Power Button [PWRF] Not quite sure what to do next.

    Read the article

  • Disabling Keyboard Wakeup for Ubuntu 10.04 on Acer 1810TZ

    - by sybreon
    My Acer Aspire 1810TZ laptop suspends fine but wakes up on any slight key-press. I would like to disable this behaviour. I read that it involves disabling something in the /proc/acpi/wakeup but SLPB does not seem to be listed at all. root@1810TZ:/etc# cat /proc/acpi/wakeup Device S-state Status Sysfs node UHC0 S3 disabled pci:0000:00:1d.0 UHC1 S3 disabled pci:0000:00:1d.1 UHC2 S3 disabled pci:0000:00:1d.2 UHCR S3 disabled EHC1 S3 disabled pci:0000:00:1d.7 UHC3 S3 disabled pci:0000:00:1a.0 UHC4 S3 disabled UHC5 S3 disabled EHC2 S3 disabled pci:0000:00:1a.7 EXP1 S4 disabled pci:0000:00:1c.0 PXSX S4 disabled pci:0000:01:00.0 EXP2 S4 disabled PXSX S4 disabled EXP3 S4 disabled PXSX S4 disabled EXP4 S4 disabled pci:0000:00:1c.3 PXSX S4 disabled pci:0000:02:00.0 EXP5 S4 disabled PXSX S4 disabled EXP6 S4 disabled PXSX S4 disabled However, the relevant bits seem to be detected from dmesg. [ 0.357628] ACPI: AC Adapter [ACAD] (on-line) [ 0.357749] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0 [ 0.357754] ACPI: Power Button [PWRB] [ 0.357817] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input1 [ 0.359319] ACPI: Lid Switch [LID0] [ 0.359390] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input2 [ 0.359394] ACPI: Sleep Button [SLPB] [ 0.359475] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input3 [ 0.359479] ACPI: Power Button [PWRF] Not quite sure what to do next.

    Read the article

  • Wakeup on LAN script works from Mac, but not Windows 7

    - by illyich
    I have a Linux server on my local network that is set up to use wakeup on lan. I copied this script verbatim, just replacing the MAC address in the example use. When I run this script on a Mac, the server wakes up. When I run it from Windows 7 (32-bit Ultimate) it doesn't do anything (note that the script DOES run, I added a debug raw_input() to confirm).

    Read the article

  • HDD vanished after wakeup from standby

    - by Sam
    In my computer I got two hard drives: One 80GB Intel X25 Postville SSD for the system and a 1,5TB Sata HDD for data. When I put the system into standby, and wake it up again, roundabout 50% of the time the 1,5TB HDD is not found. It just vanished from the system (wreaking havok to all programs running which had open files on it). Even going into the system management and refreshing the drives does not find the lost HDD. There are no messages about this in the event log. After a warm reboot the hdd is found again, just like it should. The system is a Shuttle SP35P2 Pro with 8GB Ram and DualCore CPU, OS is Windows 7 Ultimate. I even set up the OS anew, didn't help. Any ideas what might cause this? How to debug, or maybe even fix it?

    Read the article

  • SSD seems dead after wakeup from Windows Sleep, BIOS stalls but doesn't find it anymore

    - by Abel
    The morning, the following scary scenario happened: I woke up my Windows system Typed in my username and got an error (something like "could not load security xxx", but unsure of exact wording) System auto-restarted after cliking OK It didn't boot up anymore to the SSD with Windows 7 OS (I have another disk I can boot to, but that doesn't see the disk either). Obviously, this happened right after I instantiated a backup procedure, which hasn't succeeded either. The BIOS can't find the drive when I connect to SATA. And it can't find the drive when I connect it to SAS. I have a Dell Workstation T7400, most recent BIOS (version A06), version of SAS Host Bus Adapter BIOS (HBA) is MPTBIOS 6.14.10.00 (2007.09.29) from LSI Logic Corp. Other findings: When connecting to SATA, the DELL Logo screen stays really long (5 minutes) and then at the end of POST it says that a drive is not found When connecting to SAS, the SAS HBA initializing phase takes long (2 minutes, against normally 15 seconds) When running Dell Diagnostics, it doesn't finish and gives the error Exception occurred in module MPCACHE.MDM file "IOAPICSP.ASM" line 1645. I contacted Dell. On their advice I tried different slots and different cables to no avail. I use an APIC battery power, spikes in the power are thus unlikely. My conclusion so far: the disk is dead. I need this disk very badly because it contains the last few days of important development of which not all code was checked in the moment this happened. Are there any ways to recover dead SSD drives? The drive is a new X25-M G2 160GB model SSDSA2M160G2GC 2.5" in an extension bay and has been running without issues for 3 months on SAS.

    Read the article

  • Windows 7 Wakeup from Sleep then Shutdown

    - by Kevin Hua
    Is this caused by low battery? I have an Asus UX31A, and I left it unattended. As usual, in 5 minutes, it went to sleep mode with the lid still open. I came back a couple hours later, and I noticed the laptop was off. I was still able to turn it on by manually pressing the power button (battery was at 2% though), but I don't understand why it shut off. If it was in sleep mode and the battery was near depletion, then wouldn't that result in a "Windows has recovered from an unexpected shutdown" upon boot? Does Windows have a mechanism to wake from sleep from a super critical battery level to shut down all programs and power down the system completely? I noticed that upon booting, firefox didn't give a fit about improper shutdown. Here are my power settings btw, powercfg -h off has been ran, so hibernation is off. And here is the event log: http://www.mediafire.com/download.php?lbfhl21g0nj2adi

    Read the article

  • How to determine the source for wakeup in hibernate

    - by Erik
    I have a big problem with my home theater PC that runs Windows 7 64Bit. Normally, I send that PC to hibernate every evening, but from time to time, it keeps waking up for no obvious reason, and stays on until I realize, which is sometimes half a day later :( I have already checked for Windows update, which is not set to automatical, since I prefer installing updates manually. When I look in the system event log, there is an entry called "Power Troubleshooter" which tells me that my system was reactivated at a specific time, but it also says: Source = Unknown, which is the most annoying part. So how can I actually figure out, which process reactivates the PC? Is it possible to set a group policy which forbidds applications or services from scheduling tasks that allow waking up from hibernate at all?

    Read the article

  • Wake up from sleep with GPIO (I2C)

    - by spambas
    My situation: Ubuntu 10.10 running on an atom driven main board the main board has a GPIO chip integrated (F75111 by Fintek). They communicate through I2C(SMBus). We have a driver running that works, we can send outputs and read inputs. Great! We would like to use the I/O interface to suspend (sleep) and wake up again. Sleep is no problem. On an incoming input: run s2both. Ubuntu goes to sleep and prepares a hibernate state, so when the power-cord is unplugged by accident, it will wake from hibernate. But the big question: how to wake on an input if the OS is already sleeping! You can wake from a lot of devices (lan, usb, ring, etc) but I can't find out how to wake from a I2C card. PLEASE HELP!

    Read the article

  • wake up from suspend to ram problem

    - by Pupizoid
    I have very strange problem. After suspending to ram notebook doesn't wakes up, only leds and fan switches on, no HDD activity and display stays off(without backlights-completly off). If I press numlock- led doesn't switches, all buttons are not warkable. I have installed uswsusp and tryed to use s2ram, but result is exactly similar. I tryed to remove fglrx, but useless. I have HP Pavilion dv6 2055er with Ubuntu 12.04 on board and: 01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV710 [Mobility Radeon HD 4500/5100 Series] How can I solve this problem?

    Read the article

  • Ubuntu won't wake after pm-suspend

    - by Matus
    i have ubuntu 12.04 on my Zotac AD-02. Problem is when i run pm-suspend. zotac goes to sleep (it shows red led, and green light is flashing) but when i send magic packet to WOL it hangs ... it stops flashing and LED is green as its turned on but SSH wont run and it won't react to mouse or anything. I've read that sometimes it has something to do with graphics. It is mainly for DLNA and PLEX so i don't use any graphic component so if there is the problem tell me how to disable it :) is there some log or anything i can post? im fairly good at bash but not at all in ubuntu or debian. so i can't find any log. Thanks EDIT: here is lscpi if it helps

    Read the article

  • Ubuntu 12.04 intermittently fails to wake up from sleep

    - by stacksia
    When I put my Ubuntu 12.04 machine into sleep, sometimes on waking up, it fails, logs me out, and takes me back to login screen. When I log back in, it tells me some unexpected error happened, but it fails to let me report the bug. This has started to happen recently, but I don't know what triggered it. uname -a Linux [name] 3.2.0-30-generic #48-Ubuntu SMP Fri Aug 24 16:52:48 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux The issue seems similar to Xorg intermittently restarts after suspend. But in my case I am not sure if it is a Xorg issue. I looked at xorg logs, but didn't notice anything indicating an error. I know I am not providing a lot of info, but I am not sure where (e.g. which log files) I should seek for more info.

    Read the article

  • Linux Kernel wait_for_completion_timeout not wakeup by complete

    - by Jun Li
    I am working on a strange issue with the i2c-omap driver. I am not sure if the problem happens at other time or not, but it happens around 5% of the time I tried to power off the system. During system power off, I write to some registers in the PMIC via I2C. In i2c-omap.c, I can see that the calling thread is waiting on wait_for_completion_timeout with a timeout value set to 1 second. And I can see the IRQ called "complete" (I added printk AFTER "complete"). However, after "complete" gets called, the wait_for_completion_timeout did not return. Instead, it takes up to 5 MINUTES before it returns. And the return value of wait_for_completion_timeout is positive indicating that there is no timeout. And the whole I2C transaction was successful. In the meantime, I can see printk messages from other drivers. And the serial console still works. It is on Android, and if I use "top" I can see system_server is taking about 95% of the CPU. Killing system_server can make the wait_for_completion_timeout return immediately. So my question is what could a user space app (system_server) do to make a kernel "wait_for_completion_timeout" not being wake up? Thanks!

    Read the article

  • Shutdown and WakeUp Script C#

    - by Stephen Murby
    Hiya I am very new to C#, infact this is basically my first task set by work whilst i learn the language. Yes i am also new to programming, be gentle :). Context: My script needs to query active directory, grab of OU's and put them to a combo box in a form. Next query ActDir for a list of machines in a selected OU (Done this in a vbscript already) Next query the machines in turn for there IP, and MAC addresses.(Done this in a vbscript already) Next needs to shut those machines down(Done this in a vbscript already) and dump all the machine and NIC info to a txt file The other half of the script grabs the info for the machines out of the text file and sends them a magic packet to wake them up. The shutdown section i have already written a VBscript for, but decided it wasn't future prrof, and i was learninc C# at home, so figured it was the best option to start over with. Im not looking for anyone to write this for me, but if anyone had any pointers on where to go for information etc. . . It would be more than appreciated :)

    Read the article

  • How to find the Mac address of a 'shutdown' system on local lan (is it possible?)

    - by pirates-iiita
    hello everyone, Can anyone please tell the way to find out the mac address of a system which is: Shutdown Power plugged in Connected to Lan Nic card ON. Kindly post the solution as i urgently need it in my project... thank you Update I am asking how to find out the mac address of some other system which is already shutdown.... and which is on lan.. I want to find out its mac from my system.... and to be clear... i want to tell that.. arp table can be populated by using ping .. i.e. if 172.16.3.12 is not in arp table then it can be added by just ping 172.16.3.12 but a system can be pinged only if its on ... a shutdown system can't be pinged...

    Read the article

  • How to turn on monitor after wake-up from suspend mode?

    - by alek.sys
    Hi all, I need wake up PC from sleep to perform some actions - from C#. I've used CreateWaitableTimer functions, everything goes fine, at given time PC wakes up - but monitor stays in power save mode (turned off). So i want to know - how possible to turn on monitor after wake up? PS I've tried "Complete Guide on How To Turn A Monitor On/Off/Standby" - with SendMessage (Codeproject) and SetThreadExecutionState(ES_DISPLAY_REQUIRED) - it doesn't work Any ideas?

    Read the article

  • Android ADP1 can't start after first restart [closed]

    - by ufukgun
    My android phone does not boot up correctly. I installed clean firmware from HTC site dmesg shows a flood of request_suspend_state <6>[ 383.721618] request_suspend_state: wakeup (0->0) at 379960770263 (2009-07-18 12:59:03.568511963 UTC) <6>[ 389.309265] request_suspend_state: wakeup (0->0) at 385548416748 (2009-07-18 12:59:09.156158448 UTC) <6>[ 393.880401] request_suspend_state: wakeup (0->0) at 390119553222 (2009-07-18 12:59:13.727294922 UTC) <6>[ 398.465209] request_suspend_state: wakeup (0->0) at 394704392089 (2009-07-18 12:59:18.312103272 UTC) ... ... What's wrong?

    Read the article

  • USB Hub and Ubuntu

    - by aserwin
    I have a powered 7 port hub connected to my Ubuntu box and it does nothing. The devices (zip drive and web cam) work direct, but aren't recognized through the hub. This worked fine in Windows 7. I can't prove it is the OS because this is a new motherboard and processor. Any advice? EDIT : Output from lsusb -v Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 0 Full speed (or root) hub bMaxPacketSize0 64 idVendor 0x1d6b Linux Foundation idProduct 0x0002 2.0 root hub bcdDevice 3.02 iManufacturer 3 Linux 3.2.0-32-generic ehci_hcd iProduct 2 EHCI Host Controller iSerial 1 0000:00:12.2 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 Unused bInterfaceProtocol 0 Full speed (or root) hub iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0004 1x 4 bytes bInterval 12 Hub Descriptor: bLength 9 bDescriptorType 41 nNbrPorts 5 wHubCharacteristic 0x000a No power switching (usb 1.0) Per-port overcurrent protection bPwrOn2PwrGood 10 * 2 milli seconds bHubContrCurrent 0 milli Ampere DeviceRemovable 0x00 PortPwrCtrlMask 0xff Hub Port Status: Port 1: 0000.0100 power Port 2: 0000.0503 highspeed power enable connect Port 3: 0000.0100 power Port 4: 0000.0100 power Port 5: 0000.0100 power Device Status: 0x0001 Self Powered Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 0 Full speed (or root) hub bMaxPacketSize0 64 idVendor 0x1d6b Linux Foundation idProduct 0x0002 2.0 root hub bcdDevice 3.02 iManufacturer 3 Linux 3.2.0-32-generic ehci_hcd iProduct 2 EHCI Host Controller iSerial 1 0000:00:13.2 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 Unused bInterfaceProtocol 0 Full speed (or root) hub iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0004 1x 4 bytes bInterval 12 Hub Descriptor: bLength 9 bDescriptorType 41 nNbrPorts 5 wHubCharacteristic 0x000a No power switching (usb 1.0) Per-port overcurrent protection bPwrOn2PwrGood 10 * 2 milli seconds bHubContrCurrent 0 milli Ampere DeviceRemovable 0x00 PortPwrCtrlMask 0xff Hub Port Status: Port 1: 0000.0100 power Port 2: 0000.0100 power Port 3: 0000.0100 power Port 4: 0000.0100 power Port 5: 0000.0100 power Device Status: 0x0001 Self Powered Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 0 Full speed (or root) hub bMaxPacketSize0 64 idVendor 0x1d6b Linux Foundation idProduct 0x0002 2.0 root hub bcdDevice 3.02 iManufacturer 3 Linux 3.2.0-32-generic ehci_hcd iProduct 2 EHCI Host Controller iSerial 1 0000:00:16.2 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 Unused bInterfaceProtocol 0 Full speed (or root) hub iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0004 1x 4 bytes bInterval 12 Hub Descriptor: bLength 9 bDescriptorType 41 nNbrPorts 4 wHubCharacteristic 0x000a No power switching (usb 1.0) Per-port overcurrent protection bPwrOn2PwrGood 10 * 2 milli seconds bHubContrCurrent 0 milli Ampere DeviceRemovable 0x00 PortPwrCtrlMask 0xff Hub Port Status: Port 1: 0000.0100 power Port 2: 0000.0100 power Port 3: 0000.0100 power Port 4: 0000.0100 power Device Status: 0x0001 Self Powered Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 0 Full speed (or root) hub bMaxPacketSize0 64 idVendor 0x1d6b Linux Foundation idProduct 0x0001 1.1 root hub bcdDevice 3.02 iManufacturer 3 Linux 3.2.0-32-generic ohci_hcd iProduct 2 OHCI Host Controller iSerial 1 0000:00:12.0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 Unused bInterfaceProtocol 0 Full speed (or root) hub iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0002 1x 2 bytes bInterval 255 Hub Descriptor: bLength 9 bDescriptorType 41 nNbrPorts 5 wHubCharacteristic 0x0002 No power switching (usb 1.0) Ganged overcurrent protection bPwrOn2PwrGood 2 * 2 milli seconds bHubContrCurrent 0 milli Ampere DeviceRemovable 0x00 PortPwrCtrlMask 0xff Hub Port Status: Port 1: 0000.0100 power Port 2: 0000.0100 power Port 3: 0000.0100 power Port 4: 0000.0100 power Port 5: 0000.0100 power Device Status: 0x0001 Self Powered Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 0 Full speed (or root) hub bMaxPacketSize0 64 idVendor 0x1d6b Linux Foundation idProduct 0x0001 1.1 root hub bcdDevice 3.02 iManufacturer 3 Linux 3.2.0-32-generic ohci_hcd iProduct 2 OHCI Host Controller iSerial 1 0000:00:13.0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 Unused bInterfaceProtocol 0 Full speed (or root) hub iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0002 1x 2 bytes bInterval 255 Hub Descriptor: bLength 9 bDescriptorType 41 nNbrPorts 5 wHubCharacteristic 0x0002 No power switching (usb 1.0) Ganged overcurrent protection bPwrOn2PwrGood 2 * 2 milli seconds bHubContrCurrent 0 milli Ampere DeviceRemovable 0x00 PortPwrCtrlMask 0xff Hub Port Status: Port 1: 0000.0100 power Port 2: 0000.0100 power Port 3: 0000.0100 power Port 4: 0000.0100 power Port 5: 0000.0100 power Device Status: 0x0001 Self Powered Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 0 Full speed (or root) hub bMaxPacketSize0 64 idVendor 0x1d6b Linux Foundation idProduct 0x0001 1.1 root hub bcdDevice 3.02 iManufacturer 3 Linux 3.2.0-32-generic ohci_hcd iProduct 2 OHCI Host Controller iSerial 1 0000:00:14.5 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 Unused bInterfaceProtocol 0 Full speed (or root) hub iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0002 1x 2 bytes bInterval 255 Hub Descriptor: bLength 9 bDescriptorType 41 nNbrPorts 2 wHubCharacteristic 0x0002 No power switching (usb 1.0) Ganged overcurrent protection bPwrOn2PwrGood 2 * 2 milli seconds bHubContrCurrent 0 milli Ampere DeviceRemovable 0x00 PortPwrCtrlMask 0xff Hub Port Status: Port 1: 0000.0100 power Port 2: 0000.0100 power Device Status: 0x0001 Self Powered Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 0 Full speed (or root) hub bMaxPacketSize0 64 idVendor 0x1d6b Linux Foundation idProduct 0x0001 1.1 root hub bcdDevice 3.02 iManufacturer 3 Linux 3.2.0-32-generic ohci_hcd iProduct 2 OHCI Host Controller iSerial 1 0000:00:16.0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 Unused bInterfaceProtocol 0 Full speed (or root) hub iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0002 1x 2 bytes bInterval 255 Hub Descriptor: bLength 9 bDescriptorType 41 nNbrPorts 4 wHubCharacteristic 0x0002 No power switching (usb 1.0) Ganged overcurrent protection bPwrOn2PwrGood 2 * 2 milli seconds bHubContrCurrent 0 milli Ampere DeviceRemovable 0x00 PortPwrCtrlMask 0xff Hub Port Status: Port 1: 0000.0303 lowspeed power enable connect Port 2: 0000.0100 power Port 3: 0000.0100 power Port 4: 0000.0100 power Device Status: 0x0001 Self Powered Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 1 Single TT bMaxPacketSize0 64 idVendor 0x1d6b Linux Foundation idProduct 0x0002 2.0 root hub bcdDevice 3.02 iManufacturer 3 Linux 3.2.0-32-generic xhci_hcd iProduct 2 xHCI Host Controller iSerial 1 0000:02:00.0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 Unused bInterfaceProtocol 0 Full speed (or root) hub iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0004 1x 4 bytes bInterval 12 Hub Descriptor: bLength 9 bDescriptorType 41 nNbrPorts 2 wHubCharacteristic 0x0009 Per-port power switching Per-port overcurrent protection TT think time 8 FS bits bPwrOn2PwrGood 10 * 2 milli seconds bHubContrCurrent 0 milli Ampere DeviceRemovable 0x00 PortPwrCtrlMask 0xff Hub Port Status: Port 1: 0000.0100 power Port 2: 0000.0100 power Device Status: 0x0001 Self Powered Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 3.00 bDeviceClass 9 Hub bDeviceSubClass 0 Unused bDeviceProtocol 3 bMaxPacketSize0 9 idVendor 0x1d6b Linux Foundation idProduct 0x0003 3.0 root hub bcdDevice 3.02 iManufacturer 3 Linux 3.2.0-32-generic xhci_hcd iProduct 2 xHCI Host Controller iSerial 1 0000:02:00.0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 31 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 Unused bInterfaceProtocol 0 Full speed (or root) hub iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0004 1x 4 bytes bInterval 12 bMaxBurst 0 Hub Descriptor: bLength 12 bDescriptorType 42 nNbrPorts 2 wHubCharacteristic 0x0009 Per-port power switching Per-port overcurrent protection bPwrOn2PwrGood 10 * 2 milli seconds bHubContrCurrent 0 milli Ampere bHubDecLat 0.0 micro seconds wHubDelay 0 nano seconds DeviceRemovable 0x00 Hub Port Status: Port 1: 0000.02a0 5Gbps power Rx.Detect Port 2: 0000.02a0 5Gbps power Rx.Detect Binary Object Store Descriptor: bLength 5 bDescriptorType 15 wTotalLength 15 bNumDeviceCaps 1 SuperSpeed USB Device Capability: bLength 10 bDescriptorType 16 bDevCapabilityType 3 bmAttributes 0x00 Latency Tolerance Messages (LTM) Supported wSpeedsSupported 0x0008 Device can operate at SuperSpeed (5Gbps) bFunctionalitySupport 3 Lowest fully-functional device speed is SuperSpeed (5Gbps) bU1DevExitLat 3 micro seconds bU2DevExitLat 2047 micro seconds Device Status: 0x0001 Self Powered Bus 001 Device 002: ID 04a9:1709 Canon, Inc. PIXMA MP150 Scanner Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x04a9 Canon, Inc. idProduct 0x1709 PIXMA MP150 Scanner bcdDevice 1.08 iManufacturer 1 Canon iProduct 2 MP150 iSerial 3 20BC24 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 62 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 2mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 0 bInterfaceProtocol 255 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x07 EP 7 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x88 EP 8 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x89 EP 9 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 11 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 7 Printer bInterfaceSubClass 1 Printer bInterfaceProtocol 2 Bidirectional iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0001 Self Powered Bus 007 Device 002: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x046d Logitech, Inc. idProduct 0xc517 LX710 Cordless Desktop Laser bcdDevice 38.10 iManufacturer 1 Logitech iProduct 2 USB Receiver iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 59 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 98mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 1 Boot Interface Subclass bInterfaceProtocol 1 Keyboard iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 59 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 10 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 1 Boot Interface Subclass bInterfaceProtocol 2 Mouse iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 177 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 10 Device Status: 0x0000 (Bus Powered) This is with the powered hub plugged in.

    Read the article

  • ubuntu: sem_timedwait not waking (C)

    - by gillez
    I have 3 processes which need to be synchronized. Process one does something then wakes process two and sleeps, which does something then wakes process three and sleeps, which does something and wakes process one and sleeps. The whole loop is timed to run around 25hz (caused by an external sync into process one before it triggers process two in my "real" application). I use sem_post to trigger (wake) each process, and sem_timedwait() to wait for the trigger. This all works successfully for several hours. However at some random time (usually after somewhere between two and four hours), one of the processes starts timing out in sem_timedwait(), even though I am sure the semaphore is being triggered with sem_post(). To prove this I even use sem_getvalue() immediately after the timeout, and the value is 1, so the timedwait should have been triggered. Please see following code: #include <stdio.h> #include <time.h> #include <string.h> #include <errno.h> #include <semaphore.h> sem_t trigger_sem1, trigger_sem2, trigger_sem3; // The main thread process. Called three times with a different num arg - 1, 2 or 3. void *thread(void *arg) { int num = (int) arg; sem_t *wait, *trigger; int val, retval; struct timespec ts; struct timeval tv; switch (num) { case 1: wait = &trigger_sem1; trigger = &trigger_sem2; break; case 2: wait = &trigger_sem2; trigger = &trigger_sem3; break; case 3: wait = &trigger_sem3; trigger = &trigger_sem1; break; } while (1) { // The first thread delays by 40ms to time the whole loop. // This is an external sync in the real app. if (num == 1) usleep(40000); // print sem value before we wait. If this is 1, sem_timedwait() will // return immediately, otherwise it will block until sem_post() is called on this sem. sem_getvalue(wait, &val); printf("sem%d wait sync sem%d. val before %d\n", num, num, val); // get current time and add half a second for timeout. gettimeofday(&tv, NULL); ts.tv_sec = tv.tv_sec; ts.tv_nsec = (tv.tv_usec + 500000); // add half a second if (ts.tv_nsec > 1000000) { ts.tv_sec++; ts.tv_nsec -= 1000000; } ts.tv_nsec *= 1000; /* convert to nanosecs */ retval = sem_timedwait(wait, &ts); if (retval == -1) { // timed out. Print value of sem now. This should be 0, otherwise sem_timedwait // would have woken before timeout (unless the sem_post happened between the // timeout and this call to sem_getvalue). sem_getvalue(wait, &val); printf("!!!!!! sem%d sem_timedwait failed: %s, val now %d\n", num, strerror(errno), val); } else printf("sem%d wakeup.\n", num); // get value of semaphore to trigger. If it's 1, don't post as it has already been // triggered and sem_timedwait on this sem *should* not block. sem_getvalue(trigger, &val); if (val <= 0) { printf("sem%d send sync sem%d. val before %d\n", num, (num == 3 ? 1 : num+1), val); sem_post(trigger); } else printf("!! sem%d not sending sync, val %d\n", num, val); } } int main(int argc, char *argv[]) { pthread_t t1, t2, t3; // create semaphores. val of sem1 is 1 to trigger straight away and start the whole ball rolling. if (sem_init(&trigger_sem1, 0, 1) == -1) perror("Error creating trigger_listman semaphore"); if (sem_init(&trigger_sem2, 0, 0) == -1) perror("Error creating trigger_comms semaphore"); if (sem_init(&trigger_sem3, 0, 0) == -1) perror("Error creating trigger_vws semaphore"); pthread_create(&t1, NULL, thread, (void *) 1); pthread_create(&t2, NULL, thread, (void *) 2); pthread_create(&t3, NULL, thread, (void *) 3); pthread_join(t1, NULL); pthread_join(t2, NULL); pthread_join(t3, NULL); } The following output is printed when the program is running correctly (at the start and for a random but long time after). The value of sem1 is always 1 before thread1 waits as it sleeps for 40ms, by which time sem3 has triggered it, so it wakes straight away. The other two threads wait until the semaphore is received from the previous thread. [...] sem1 wait sync sem1. val before 1 sem1 wakeup. sem1 send sync sem2. val before 0 sem2 wakeup. sem2 send sync sem3. val before 0 sem2 wait sync sem2. val before 0 sem3 wakeup. sem3 send sync sem1. val before 0 sem3 wait sync sem3. val before 0 sem1 wait sync sem1. val before 1 sem1 wakeup. sem1 send sync sem2. val before 0 [...] However, after a few hours, one of the threads begins to timeout. I can see from the output that the semaphore is being triggered, and when I print the value after the timeout is is 1. So sem_timedwait should have woken up well before the timeout. I would never expect the value of the semaphore to be 1 after the timeout, save for the very rare occasion (almost certainly never but it's possible) when the trigger happens after the timeout but before I call sem_getvalue. Also, once it begins to fail, every sem_timedwait() on that semaphore also fails in the same way. See the following output, which I've line-numbered: 01 sem3 wait sync sem3. val before 0 02 sem1 wakeup. 03 sem1 send sync sem2. val before 0 04 sem2 wakeup. 05 sem2 send sync sem3. val before 0 06 sem2 wait sync sem2. val before 0 07 sem1 wait sync sem1. val before 0 08 !!!!!! sem3 sem_timedwait failed: Connection timed out, val now 1 09 sem3 send sync sem1. val before 0 10 sem3 wait sync sem3. val before 1 11 sem3 wakeup. 12 !! sem3 not sending sync, val 1 13 sem3 wait sync sem3. val before 0 14 sem1 wakeup. [...] On line 1, thread 3 (which I have confusingly called sem1 in the printf) waits for sem3 to be triggered. On line 5, sem2 calls sem_post for sem3. However, line 8 shows sem3 timing out, but the value of the semaphore is 1. thread3 then triggers sem1 and waits again (10). However, because the value is already 1, it wakes straight away. It doesn't send sem1 again as this has all happened before control is given to thread1, however it then waits again (val is now 0) and sem1 wakes up. This now repeats for ever, sem3 always timing out and showing that the value is 1. So, my question is why does sem3 timeout, even though the semaphore has been triggered and the value is clearly 1? I would never expect to see line 08 in the output. If it times out (because, say thread 2 has crashed or is taking too long), the value should be 0. And why does it work fine for 3 or 4 hours first before getting into this state? This is using Ubuntu 9.4 with kernel 2.6.28. The same procedure has been working properly on Redhat and Fedora. But I'm now trying to port to ubuntu! Thanks for any advice, Giles

    Read the article

  • Wake laptop when lid is opened?

    - by crackout12
    I have a SAMSUNG laptop, which by the experience in the last months, has been a great one. I am actually implementing some functionality to it, and since I noticed, I am able to wake up my laptop from sleep by just opening the lid on Windows 7, however, I need to press to power button to wake up in Ubuntu. Using a program called i-nex, I noted that the kernel DOES dettect a "lid switch", and I am looking forward to use it to wake up function. Any ideas? UPDATE: Thanks @yossile for bringing up some clues! However, output of command cat /proc/acpi/wakeup does not show the LID device. I still tried the second set of commands you gave me with no effect. Then I tried experimenting, guessing that LID should be named by other value, so I tried enabling the others. No victory so far. But I noticed that devices that did not have any pci listings were disabled at all time no matter what I tried. Here is the output of command cat /proc/acpi/wakeup: root@samsung:~# cat /proc/acpi/wakeup Device S-state Status Sysfs node PCE4 S4 *disabled pci:0000:00:04.0 SBAZ S4 *disabled pci:0000:00:14.2 P0PC S4 *disabled pci:0000:00:14.4 GEC S4 *disabled PE20 S4 *disabled pci:0000:00:15.0 PE21 S4 *disabled PE22 S4 *disabled pci:0000:00:15.2 PE23 S4 *disabled PWRB S5 *enabled So maybe it could be that LID is either GEC,PE21, or PE23? Still, there is /proc/acpi/button/lid/LID/state file which shows that LID is opened. Any more ideas?

    Read the article

  • How do I configure WakeOnUSB properly?

    - by wishi
    How do I configure Wake-On-USB properly on a 10.04 or 10.10 Ubuntu (2.6.36 and higher if needed)? (Wake-on-USB is when the computer is asleep and for example a USB Keyboard event wakes up the machine!) The notebook is an Acer Aspire Timeline X 1830T. I don't know in which way the Linux Kernel supports the controllers. There are different ways to approach this, for example /proc/acpi/wakeup... or UDEV... or something with HAL? /proc/acpi/wakeup shows every device in S4, but I need S3. Device S-state Status Sysfs node P0P2 S4 *disabled PEGP S4 *disabled P0P1 S0 *disabled pci:0000:00:1e.0 EHC1 S4 *disabled pci:0000:00:1d.0 USB1 S4 *enabled USB2 S4 *disabled USB3 S4 *disabled USB4 S4 *disabled EHC2 S4 *disabled pci:0000:00:1a.0 USB5 S4 *disabled USB6 S4 *disabled USB7 S4 *disabled HDEF S0 *disabled pci:0000:00:1b.0 RP01 S5 *disabled pci:0000:00:1c.0 PXSX S5 *disabled pci:0000:01:00.0 RP02 S0 *disabled pci:0000:00:1c.1 PXSX S5 *disabled pci:0000:02:00.0 RP03 S0 *disabled PXSX S5 *disabled RP04 S0 *disabled PXSX S5 *disabled RP05 S0 *disabled PXSX S5 *disabled RP07 S0 *disabled PXSX S5 *disabled RP08 S0 *disabled PXSX S5 *disabled GLAN S0 *disabled PEG3 S4 *disabled PEG5 S4 *disabled PEG6 S4 *disabled SLPB S3 *enabled S4, which is Suspend-To-Disk afaik... doesn't seem to work either if I echo USB1 into the wakeup table. It just sets an S4 flag. can I get the USB ports in S3? I want to make the machine wakeup from Suspend-To-Ram (S3, ACPI standard) in case a key on my external keyboard is pressed. It only wakes up if a key on the internal Laptop keyboard is pressed... from Suspend To Ram. It seems if I plug in a USB mouse, that the USB port isn't even powered. I have no BIOS option to change this. Further specific information regarding the device: usb-devices T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 13 Spd=1.5 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=04d9 ProdID=1603 Rev=03.10 S: Manufacturer= S: Product=USB Keyboard C: #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid I: If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid root@underwater-laptop:/# lsusb [...] Bus 001 Device 013: ID 04d9:1603 Holtek Semiconductor, Inc. Bus 001 Device 004: ID 0bda:0138 Realtek Semiconductor Corp. Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub [...] If this doesn't work I have to properly explain why :( - but I think it is very hard to research this kernel internal. Any hints for good information here? I hope it's possible... I'm just looking for any solution. edit: this, waking up on USB, works on Windows! Thanks a lot, Marius

    Read the article

1 2 3 4  | Next Page >