[SOLVED] Custom udev rule only working when triggered manually

I have the following rule created for a USB gamecube controller adapter:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", MODE="0666"
This rule only takes effect when I run udevadm trigger AFTER my device is plugged in. If I then unplug the device, and plug it back in, my device no longer works. My device also doesn't work on boot. I have to plug my device in and then trigger the rules manually.
Any ideas why this is happening? I don't want to have to run udevadm trigger every time I turn my computer on.
Last edited by Exershio (2015-04-15 23:01:19)

I tried reloading the configuration but it doesn't affect the issue. As for monitoring udev, this appears when I plug the device in:
KERNEL[3439.476646] add /devices/pci0000:00/0000:00:12.0/usb4/4-5 (usb)
KERNEL[3439.478441] add /devices/pci0000:00/0000:00:12.0/usb4/4-5/4-5:1.0 (usb)
KERNEL[3439.486155] add /devices/pci0000:00/0000:00:12.0/usb4/4-5/4-5:1.0/0003:057E:0337.0009 (hid)
KERNEL[3439.492319] add /class/usbmisc (class)
KERNEL[3439.492497] add /devices/pci0000:00/0000:00:12.0/usb4/4-5/4-5:1.0/usbmisc/hiddev0 (usbmisc)
KERNEL[3439.492602] add /devices/pci0000:00/0000:00:12.0/usb4/4-5/4-5:1.0/0003:057E:0337.0009/hidraw/hidraw0 (hidraw)
UDEV [3439.493842] add /class/usbmisc (class)
UDEV [3439.494832] add /devices/pci0000:00/0000:00:12.0/usb4/4-5 (usb)
UDEV [3439.496365] add /devices/pci0000:00/0000:00:12.0/usb4/4-5/4-5:1.0 (usb)
UDEV [3439.498256] add /devices/pci0000:00/0000:00:12.0/usb4/4-5/4-5:1.0/usbmisc/hiddev0 (usbmisc)
UDEV [3439.498378] add /devices/pci0000:00/0000:00:12.0/usb4/4-5/4-5:1.0/0003:057E:0337.0009 (hid)
UDEV [3439.499567] add /devices/pci0000:00/0000:00:12.0/usb4/4-5/4-5:1.0/0003:057E:0337.0009/hidraw/hidraw0 (hidraw)
So it seems udev is detecting the GC adapter being plugged in, but it doesn't apply permissions 0666 to it until I manually run udevadm trigger.
See what happens below, directly after plugging it in:
$ ls -l /dev/bus/usb/004/005
crw-rw-r-- 1 root root 189, 388 Apr 15 16:59 /dev/bus/usb/004/005
$ sudo udevadm trigger
$ ls -l /dev/bus/usb/004/005
crw-rw-rw- 1 root root 189, 388 Apr 15 17:03 /dev/bus/usb/004/005
Okay this is weird. So I appended my udev rule with GROUP="users" to see if that would help, and after reloading the rules, this happens after my device is plugged in:
$ ls -l /dev/bus/usb/004/005
crw-rw-r-- 1 root users 189, 393 Apr 15 17:32 /dev/bus/usb/004/005
$ sudo udevadm trigger
$ ls -l /dev/bus/usb/004/005
crw-rw-rw- 1 root users 189, 393 Apr 15 17:34 /dev/bus/usb/004/005
So it appears the device is taking on GROUP="users" immediately after being plugged in, but it wont set MODE="0666" until after running udevadm trigger
Anyone have any ideas?
Last edited by Exershio (2015-04-15 21:38:15)

Similar Messages

  • Ipw3945 only working when modprobing manually / not on startup

    The last kernel update broke my wireless.
    When booting, the ipw3945d daemon will tell me "ERROR: Could not find Intel PRO/Wireless 3945ABG Network Connection". After it finishes booting, I can rmmod the ipw3945 module and modprobe it again. Starting the daemon after that works flawlessly. Even if I try to start the daemon manually after the booting sequence, I'll get that error. I first need to rmod and modprobe ipw3945 for it to work. So...:
    [21:32:40 | shapeshifter@Tachycineta ~]$ sudo /etc/rc.d/ipw3945d start
    :: Starting IPW3945d                                                                                                [BUSY]
    2008-03-01 21:32:47: ERROR: Could not find Intel PRO/Wireless 3945ABG Network Connection
                                                                                                                                  [DONE]
    [21:32:48 | shapeshifter@Tachycineta ~]$ sudo rmmod ipw3945
    [21:32:50 | shapeshifter@Tachycineta ~]$ sudo modprobe ipw3945
    [21:32:53 | shapeshifter@Tachycineta ~]$ sudo /etc/rc.d/ipw3945d start
    :: Starting IPW3945d                                                                                                [DONE]
    [21:32:57 | shapeshifter@Tachycineta ~]$
    And I have no idea why it only works when modprobing manually.
    Anyone?
    Last edited by TB2 (2008-03-01 23:05:33)

    zenlord wrote:
    Are you sure it's driver-related? I have never heard anyone complain about deassociating wireless networks unless they were using networkmanager or wicd or something like that. In the various threads about netcfg2 I have never seen anyone with this problem.
    Zl.
    I don't know if it's driver-related, but it could be power-related: iwl3945 isn't able to retrieve my ap essid everytime, since on the other hand ipw3945 is able to do, with the laptop in the SAME position.
    Last edited by uastasi (2008-03-13 20:10:18)

  • [SOLVED] Is there a way to create this kind of custom udev rule?

    Hi!
    Sorry if title doesn't say it all!
    I only would like to create a custom udev rule to handle lid close/open for my laptop. Is there a way to achieve this?
    I'd like to run "systemctl suspend" when lid is closed...but i can't figure how to reach this.
    No, i do not want to use acpid only for this little thing, while i'm pretty sure udev can handle it.
    So, please, any help is appreciate!
    Thanks!
    Last edited by nierro (2012-09-02 16:06:27)

    nierro wrote:Hi!
    Sorry if title doesn't say it all!
    I only would like to create a custom udev rule to handle lid close/open for my laptop. Is there a way to achieve this?
    I'd like to run "systemctl suspend" when lid is closed...but i can't figure how to reach this.
    No, i do not want to use acpid only for this little thing, while i'm pretty sure udev can handle it.
    So, please, any help is appreciate!
    Thanks!
    HandleLidSwitch in /etc/systemd/logind.conf
    https://wiki.archlinux.org/index.php/Sy … th_systemd

  • My Airport Time Capsule only works when I turn off and turn on, but I think this may end up with the unit. What can this happening and how to solve?

    Time Capsule Airport
    Hello to all, good day, sorry my english google, but it is the tool I have at the moment. I'm having trouble with my Time Capsule Airport, I made all the settings according to the manual, but there has been a connection problem with my iMac. When I finish my work I turn off the imac and then again when they return to work and care, it can not connect to Time Capsule Airport, making it impossible to remove the files and make back up by Time Machine only works when I turn off and turn on the Airport Time Capsule , but I think this may end up with the unit. What can this happening and how to solve? Thank you.
    Olá a todos, bom dia, desculpe meu inglês google, mas é a ferramenta que tenho no momento. Estou tendo dificuldades com a minha Airport Time Capsule, fiz todas as configurações de acordo com o manual, mas tem existido um problema de conexão com meu iMac. Quando termino meus trabalhos desligo o imac e depois quando retorno pra trabalhar novamente e ligo, ele não se conecta a Airport Time Capsule, impossibilitando retirar os arquivos e fazer o back-up pelo Time Machine, só funciona quando desligo e ligo a Airport Time Capsule, mas acho que isso pode acabar com o aparelho. O que pode esta acontecendo e como resolver? Obrigado.

    This is easier to do with pictures perhaps.. since we do not share a common language and machine translation leaves a lot to be desired.
    In the airport utility bring up your Time Capsule.
    Simply post the screenshots here.
    So here is mine.
    Click on the Edit button and give us the Internet and Wireless and Network tab..
    eg.
    Please also make sure you are set to ipv6 in your wireless or ethernet .. whichever is used.. and do tell which.
    This is wifi in your computer.
    The following are important..
    DO not use long names with spaces and non-alphanumeric names.
    Use short names, no spaces and pure alphanumeric.
    eg TC name. TCgen5
    Wireless name TCwifi
    Use WPA2 Personal security with 10-20 character pure alphanumeric password.
    read apple instructions to help with TM and TC.. they did finally admit it has issues in Mavericks.
    OS X Mavericks: Time Machine problems
    Mount the TC manually in finder.
    AFP://TCgen5.local
    When asked for the password .. that is the disk access password and save it in the keychain.
    Reset Time Machine
    See A4 here. http://pondini.org/TM/Troubleshooting.html

  • AppleScript-based rule only works manually

    Greetings,
    I have set up numerous Rules to automatically move messages to specific folders, based on Subject headers. These work automatically, as new mail comes in.
    However, one of my Rules is set up to "Run Applescript." The script deals with a single file that gets e-mailed to me by one of my webservers at 11:00 each night. It deletes the previous night's file from the HD, grabs the new attachment, saves it to the HD, and deletes the message in Mail. The script works correctly, but the Rule (which is set as Active) only works when I select the message and do it manually (Command-Option-L) -- not automatically when the message arrives.
    Why is this?
    The script, which lives in /Library/Scripts/Mail Scripts/Rule Actions, is below.
    Thanks!
    DM
    <hr>
    using terms from application "Mail"
        on perform mail action with messages theMessages for rule theRule
            tell application "Mail"
                repeat with thisMessage in theMessages
                    set theAttachment to first item of thisMessage's mail attachments
                    set theAttachmentFile to theAttachment's name
                    tell application "Finder"
                        if exists "iBook:Users:me:Documents:" & theAttachmentFile then
                            delete "iBook:Users:me:Documents:" & theAttachmentFile
                        end if
                    end tell
                    save theAttachment in "iBook:Users:me:Documents:" & theAttachmentFile
                    delete thisMessage
                end repeat
            end tell
        end perform mail action with messages
    end using terms from

    I would start by verifying that the rule is in fact firing - add a set color of background action before the run applescript action.
    Next I would try a few magic incantations:
    change the script location to ~/Library/Scripts/Applications/Mail/
    remove the "for rule theRule" from the on perform
    add an on run handler after the end of the existing script
    using terms from application "Mail"
    on run
    tell application "Mail" to set sel to selection
    tell me to perform mail action with messages (sel)
    end run
    end using terms from
    Why? 'cos any scripts that I have successfully run from a rule are like that! The 3rd one has the advantage that you can apply your script to selected messages, which can be useful (though not in the present case).
    If none of this works, it is time to try some serious debugging. You could consider putting in an try ... on error with a display dialog for the error message, or simply a display dialog on script entry to verify that it is running.
    Let me know ...
    AK

  • My snapchat won`t work if i use wifi, its only working when im useing 3g

    my snapchat won`t work if i use wifi, its only working when im useing 3g

    Since this is an app-related issue, you may get better results solving your problem by contacting the app developer, or searching their help/FAQ pages.

  • Torch 9800 touch screen only works when slid open.

    Hello everyone, this is my 1st post but I've been lurking the forum for some time. I'm running a Torch 9800 on AT&T right now on v6.0.0.600
    This is what's happened with my phone: as the subject notes, my touch screen only seems to work when I slide open the phone.
    What I've tried so far that doesn't work: rolling back software, rolling the software forward again, hard resets, soft resets, adjusting intervals for the touch screen.
    The weird part is that I saw an older thread that had the exact opposite problem(touch screen only worked when the phone was slid closed). I have a level/ruler app for my phone and it's showing that the phone knows when it's tilted/angle/orientation. I've also closed the phone, opened it slightly (about the width of my thumb) and it stays horizontally oriented + I'm able to use the touch keyboard that way.
    Anybody have a suggestion as to what I can try next to fix this? I haven't gone so far as to just go and get a 9810 yet, but i'm considering it.

    Thanks for the post.
    Has it in anyway fallen or pressed hard at any point? It could be the belt, which would just need you to go with it to a certified repair center and get it secured.
    Twitter: @IAmBenGiey | Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.
    Try my apps:
    The Ultimate Currency Converter and T2G - BloGFeed

  • My Imessage will only work when I have WiFi... right when I leave my house it stops working?

    My Imessage will only work when I have WiFi.. right when I leave my house my Imessage stops working? HELP

    Since this is an app-related issue, you may get better results solving your problem by contacting the app developer, or searching their help/FAQ pages.

  • IPod 5 sound only works when head phones are pluged in

    Sound only works when ear phones are pluged in

    - Try cleaning out/blowing out the headphone jack. Try inserting/removing the plug a dozen times or so. There is a little switch in the headphone jack that disconnects the speaker when the headphone jack is inserted.
    Try the following to rule out a software problem
    - Reset the iPod. Nothing will be lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup
    - Restore to factory settings/new iPod.
    - Make an appointment at the Genius Bar of an Apple store. Seems you have a bad headphone jack.
    Apple Retail Store - Genius Bar

  • Left USB port only works when entering BIOS

    Hi all -- I have a Toshiba Satellite C855D-S5106, the LEFT USB port only works when I enter the BIOS at boot-time. If I disconnect the drive, i.e. eject it and then remove it, the port stops working. The other two ports at the right work fine. I've tested this with known good flash drives and Kensington USB trackball that work fine on four other computers, and the other two USB ports. I'm thinking its software/BIOS because hardware would fail intermittently, I could not get the port to work if there was a failing connection. As stated, this work-around succeeds EVERY time. I have not upgraded the bios. Has anyone had this problem?

    If you can't solve your issue and no one in the community can help, contact support to speak with a tech support agent at (800) 457-7777.
    - Peter

  • Siri only works when "Raise to Speak" option is activated

    Hello:
    I have iOS 7 installed in my iPhone 5 and I have the following problem:
    Siri only works when "Raise to Speak" option is activated. When I change this option and I try to talk with siri I do not receive any answer.
    Please, could someone give me an idea to solve this problem!
    All the best
    jc

    I am having this same problem.  The problem appears to be related to the microphone and must be a softwear issue.  The microphone works with other apps, and works when making and receiving calls.  It also works when I "raise to speak" to Siri, but it does not pick up any sound when I attempt to talk to Siri by holding the home button, or when pressing the microphone button on screen when in the Siri interface.  Is it possible that holding the home button to talk to Siri is somehow not activating the microphone?
    I should also note that I have tried turning the phone off and back on.  I have tried the reset by holding the home button and the sleep/wake button, and I have even restored the phone in iTunes, although I did not set it up as a new iPhone, because I am not interested in losing app data, call history, messeges, etc.

  • Iphone 4: Home Button Not Working. The home button only works when it is connected to iTunes, once i disconnet it does not work, i have tried a restore to factory settings but it still is not working. Any suggestions?

    iphone 4: Home Button Not Working. The home button only works when it is connected to iTunes, once i disconnet it does not work, i have tried a restore to factory settings but it still is not working. Any suggestions?

    Apple, as I said, does not repair your iPhone. All hardware service issues are handled by replacing the unit. So they can't handle the home-button issue without also addressing the issue of the cracked screen, for which they'll almost certainly charge you. But you can make an appointment at an Apple Store or call Apple tech support and plead your case.
    Regards.

  • My macbook wont start the screen turn blue and stay like that for hrs. It only work when i use safe mode, i try to use disk utilities to fix it but the disk utilities keep saying error and a bunch of other stuff. I dont the cds the comp came with, help.

    my macbook wont start the screen turn blue and stay like that for hrs. It only work when i use safe mode, i try to use disk utilities to fix it but the disk utilities keep saying error and a bunch of other stuff. I dont the cds the comp came with, help. i've tried the command s command p command v but nothing i've tried to the safe mode then a quick restart but nothing
    disk utility give me this:
    Process:         Disk Utility [371]
    Path:            /Applications/Utilities/Disk Utility.app/Contents/MacOS/Disk Utility
    Identifier:      com.apple.DiskUtility
    Version:         11.5.2 (298.4)
    Build Info:      DiskUtility-2980400~60
    Code Type:       X86-64 (Native)
    Parent Process:  launchd [86]
    Date/Time:       2013-11-05 03:29:41.247 -0500
    OS Version:      Mac OS X 10.6.8 (10K549)
    Report Version:  6
    Interval Since Last Report:          9522 sec
    Crashes Since Last Report:           29
    Per-App Interval Since Last Report:  981 sec
    Per-App Crashes Since Last Report:   25
    Anonymous UUID:                      F6B8E263-76C8-4C7D-AA58-48134BF4BA78
    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000020
    Crashed Thread:  0  Dispatch queue: com.apple.main-thread
    Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
    0   libobjc.A.dylib                         0x0000000100c62fbc _read_images + 312
    1   libobjc.A.dylib                         0x0000000100c79721 map_images_nolock + 1266
    2   libobjc.A.dylib                         0x0000000100c62761 map_images + 115
    3   dyld                                    0x00007fff5fc039c5 dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) + 853
    4   dyld                                    0x00007fff5fc0c849 ImageLoader::link(ImageLoader::LinkContext const&, bool, bool, ImageLoader::RPathChain const&) + 201
    5   dyld                                    0x00007fff5fc04d54 dyld::link(ImageLoader*, bool, ImageLoader::RPathChain const&) + 118
    6   dyld                                    0x00007fff5fc08f7c dlopen + 490
    7   libSystem.B.dylib                       0x0000000100a14e40 dlopen + 61
    8   com.apple.CoreFoundation                0x0000000100d78ef7 _CFBundleDlfcnLoadBundle + 231
    9   com.apple.CoreFoundation                0x0000000100d77e97 _CFBundleLoadExecutableAndReturnError + 1191
    10  com.apple.Foundation                    0x0000000101008355 _NSBundleLoadCode + 638
    11  com.apple.Foundation                    0x0000000101007c78 -[NSBundle loadAndReturnError:] + 742
    12  com.apple.Foundation                    0x000000010101960c -[NSBundle principalClass] + 38
    13  com.apple.framework.DUSupport           0x0000000100082080 -[DUModuleManager(_private) findDUModules:] + 405
    14  com.apple.framework.DUSupport           0x0000000100081ed9 -[DUModuleManager orderedModuleListOfModules] + 40
    15  com.apple.DiskUtility                   0x0000000100006082 0x100000000 + 24706
    16  com.apple.DiskUtility                   0x0000000100005f59 0x100000000 + 24409
    17  com.apple.AppKit                        0x0000000101444625 -[NSWindowController _windowDidLoad] + 538
    18  com.apple.AppKit                        0x00000001013e1f77 -[NSWindowController window] + 112
    19  com.apple.AppKit                        0x00000001015f61d9 -[NSWindowController showWindow:] + 47
    20  com.apple.AppKit                        0x00000001015c7c5c -[NSDocument showWindows] + 98
    21  com.apple.AppKit                        0x00000001015c64bb -[NSDocumentController openUntitledDocumentAndDisplay:error:] + 340
    22  com.apple.AppKit                        0x00000001014f7b44 -[NSDocumentController(NSInternal) _openUntitled] + 111
    23  com.apple.AppKit                        0x00000001014f79ab -[NSApplication _doOpenUntitled] + 257
    24  com.apple.AppKit                        0x00000001014f733b -[NSApplication(NSAppleEventHandling) _handleAEOpen:] + 185
    25  com.apple.AppKit                        0x00000001014f6fd9 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 77
    26  com.apple.Foundation                    0x0000000100ffd0d6 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 360
    27  com.apple.Foundation                    0x0000000100ffcf06 _NSAppleEventManagerGenericHandler + 114
    28  com.apple.AE                            0x0000000104d7332b aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 162
    29  com.apple.AE                            0x0000000104d73224 dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 32
    30  com.apple.AE                            0x0000000104d7312b aeProcessAppleEvent + 210
    31  com.apple.HIToolbox                     0x00000001028a0619 AEProcessAppleEvent + 48
    32  com.apple.AppKit                        0x00000001013fc095 _DPSNextEvent + 1191
    33  com.apple.AppKit                        0x00000001013fb801 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 155
    34  com.apple.AppKit                        0x00000001013c168f -[NSApplication run] + 395
    35  com.apple.AppKit                        0x00000001013ba3b0 NSApplicationMain + 364
    36  com.apple.DiskUtility                   0x0000000100002009 0x100000000 + 8201
    37  com.apple.DiskUtility                   0x0000000100001db8 0x100000000 + 7608
    Thread 1:  Dispatch queue: com.apple.libdispatch-manager
    0   libSystem.B.dylib                       0x0000000100a27c0a kevent + 10
    1   libSystem.B.dylib                       0x0000000100a29add _dispatch_mgr_invoke + 154
    2   libSystem.B.dylib                       0x0000000100a297b4 _dispatch_queue_invoke + 185
    3   libSystem.B.dylib                       0x0000000100a292de _dispatch_worker_thread2 + 252
    4   libSystem.B.dylib                       0x0000000100a28c08 _pthread_wqthread + 353
    5   libSystem.B.dylib                       0x0000000100a28aa5 start_wqthread + 13
    AND MORE TOO MUCH TO COPY N PASTE HELP PLEASE!!!!!

    Reset the PRAM
    Reinstall the operating system from the dvd (you will not loose your data)

  • My Ipod touch will only work when plugged into a itouch radio.  When I take it out, it goes blank.  Why can I do?

    My Ipod touch will only work when plugged into an Itouch radio.  When I take it out of the charger, it goes blank.  The battery shows fully charged.  It appears that the battery is no longer charging.  What should I do?

    Try a reset: Hold the home and power buttons at the same time until the Apple boot logo appears. No data will be lost. If that fails, the battery may have gone kaput.

  • My ipod nano 4th generation only works when it is plugged into the computer; otherwise, the screen turns black and it is completely unresponsive to any efforts such as pushing buttons, reseting, etc. What should I do?

    My ipod nano 4th generation only works when it is plugged into the computer; otherwise, the screen turns black and it is completely unresponsive to any efforts such as pushing buttons, reseting, etc. What should I do?

    Sounds like the battery is shot and in need of a replacement.  You can have Apple replace the battery for a flat fee or you can send it into a third party repair center for a bit less.
    Not much else you can do for troubleshooting this one.
    B-rock

Maybe you are looking for

  • How can i disable form autocompletion in beta 4?

    Yeha, I ran multiple times through the options of beta 4 but couldn't find any solutions do deactivate the autocompletion in forms. E.g. e-mail addresses or usernames.

  • Safe easy method of changing fonts in a custom template :TIP

    This might have been covered before but here is a tip I have worked out. If you have a custom template and you would like to change the font of any styles do the following: Quit active applications Go to the Library>fonts folder (both user and system

  • My friend and I are having our conversations inter...

    We have contacted skype before (several months back before we gave up) and all they said was that my side was working and her side was working. But nothing was ever done to fix the problem. Now she nor I can get to the help page to report this proble

  • Action or script to move selection to specified layer?

    Hi all, i have a piece of art on "Layer 1" that i need to shrink and duplicate to "Layer 2". I do this many many times a day so i was hoping someone could help me with a script? The two layers are always named the same. I'm working in CS5. Thanks a l

  • Why bridgetalk doesn't work in cycle?

    i save three layers (from forst to third) to EPS and than open it in AI and resave as older EPS version (and some cleaning procedures). ////////////main cycle through layers for (ml=0; ml<mlayersName.length; ml++) { mLayers(mlayersName[ml]); function