Systemd service at the end of boot (login prompt)

hi guys..
i'm trying to start a script using systemd..
in my script the first thing i want to start is jack server on usb audio sound card..
the problem is that jack service is started before module is loaded so it gives error that sound card does nit exist..
is there a way to start the servuce at the end of boot process or after module is loaded..?
thanks

I'm back..
I tried to use:
Requires=systemd-modules-load.service
After=sound.target systemd-modules-load.service
But it loads it before dbus and some other stuff and it does not work..i still have an error no device found..
Then i added
Type=idle
And now it starts..but if i want to add more services dependent of this one..it starts them before this one loads..

Similar Messages

  • [Solved] Disable screen clearing at the end of boot process?

    During the boot process Arch shows some messages on the computer screen while the system services are started. Then it clears the screen just before showing the login prompt, which means that you have to be a really quick reader to be able to catch the final boot messages before they disappear.
    I'd prefer that Arch wouldn't clear the screen at all, so that the final boot messages would stay visible even when the login prompt appears (and I could scroll the framebuffer to see all the boot messages if I wanted to). Any idea how I could tell Arch not to clear the screen before the login prompt?
    Last edited by darkglow (2009-08-12 19:28:48)

    Pressing Shift and PageUp at the same time should scroll the framebuffer up, and Shift+PageDown scrolls it down. But if you've switched to another virtual terminal and then come back, the scrolling doesn't work any more.
    I just tried scroll lock, it doesn't seem to make any difference?

  • [SOLVED] systemd : services failing to start on boot

    I have removed sysvinit completely as per the systemd wiki pages.
    I don't usually re-boot very often so I'm not sure exactly when the problem started.
    I only noticed this problem about 4 or 5 days ago.
    But now whenever I reboot my machine 2 services fail consistently.
    adsl.service
    colord.service
    They both start flawlessly once I can log in at a console.
    I'm using kde and in the last couple of days, while trying to fix my problem, the kdm service has failed to start a couple of times too - saying there is no X server.
    Before switching to systemd I never had any of these problems using the old rc.conf method. My DAEMONS array had the adsl service start after the network service.
    I need some help and advice to find out what is causing the problem and how to fix it.
    Last edited by bhrgunatha (2012-10-25 05:44:22)

    Thanks. That seems plausible. So I've been snooping at the journal.
    journalctl -ab
    Oct 25 17:06:13 starch systemd[1]: Started Trigger Flushing of Journal to Persistent Storage.
    Oct 25 17:06:14 starch systemd[1]: Started Recreate Volatile Files and Directories.
    Oct 25 17:06:14 starch systemd[1]: Starting System Initialization.
    Oct 25 17:06:14 starch systemd[1]: Reached target System Initialization.
    Oct 25 17:06:14 starch systemd[1]: Starting CUPS Printing Service Sockets.
    Oct 25 17:06:14 starch systemd[1]: Listening on CUPS Printing Service Sockets.
    Oct 25 17:06:14 starch systemd[1]: Starting Console System Startup Logging...
    Oct 25 17:06:14 starch systemd[1]: Starting Restore Sound Card State...
    Oct 25 17:06:14 starch systemd[1]: Starting CUPS Printer Service Spool.
    Oct 25 17:06:14 starch systemd[1]: Started CUPS Printer Service Spool.
    Oct 25 17:06:14 starch systemd[1]: Starting D-Bus System Message Bus Socket.
    Oct 25 17:06:16 starch ntpd[381]: ntpd [email protected] Tue Aug 21 15:06:24 UTC 2012 (1)
    Oct 25 17:06:16 starch ntpd[413]: proto: precision = 0.156 usec
    Oct 25 17:06:17 starch ntpd[413]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
    Oct 25 17:06:17 starch ntpd[413]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
    Oct 25 17:06:18 starch ntpd[413]: Listen and drop on 1 v6wildcard :: UDP 123
    Oct 25 17:06:18 starch ntpd[413]: Listen normally on 2 lo 127.0.0.1 UDP 123
    Oct 25 17:06:18 starch ntpd[413]: Listen normally on 3 lo ::1 UDP 123
    Oct 25 17:06:18 starch ntpd[413]: peers refreshed
    Oct 25 17:06:18 starch ntpd[413]: Listening on routing socket on fd #20 for interface updates
    Oct 25 17:06:18 starch dbus[384]: [system] Activating systemd to hand-off: service name='org.freedesktop.ColorManager' unit='colord.service'
    Oct 25 17:06:18 starch dbus[384]: [system] Successfully activated service 'org.freedesktop.systemd1'
    Oct 25 17:07:03 starch dbus[384]: [system] Successfully activated service 'org.freedesktop.ColorManager'
    Oct 25 17:07:03 starch dbus[384]: [system] Activating via systemd: service name='org.freedesktop.ColorManager' unit='colord.service'
    Oct 25 17:07:03 starch dbus[384]: [system] Successfully activated service 'org.freedesktop.ColorManager'
    Oct 25 17:07:04 starch kernel: r8169 0000:02:00.0: eth0: link down
    Oct 25 17:07:03 starch systemd[1]: Starting Manage, Install and Generate Color Profiles...
    Oct 25 17:07:03 starch systemd[1]: Started Manage, Install and Generate Color Profiles.
    Oct 25 17:07:03 starch systemd[1]: colord.service: main process exited, code=killed, status=6
    Oct 25 17:07:03 starch systemd[1]: Unit colord.service entered failed state.
    Oct 25 17:07:04 starch kernel: r8169 0000:02:00.0: eth0: link down
    Oct 25 17:07:04 starch kernel: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    Oct 25 17:07:04 starch kernel: PPP generic driver version 2.4.2
    Oct 25 17:07:04 starch cupsd[380]: Unknown directive DefaultAuthType on line 26.
    Oct 25 17:07:04 starch kernel: r8169 0000:02:00.0: eth0: link up
    Oct 25 17:07:04 starch kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    Oct 25 17:07:04 starch pppoe-start[382]: TIMED OUT
    Oct 25 17:07:04 starch kernel: NET: Registered protocol family 24
    Oct 25 17:07:04 starch pppoe-start[382]: /usr/sbin/pppoe-start: line 193: 394 Terminated $CONNECT "$@" > /dev/null 2>&1
    That seems to confirm your theory.
    eth0 link is not up when attempting to start colord and adsl
    So the $64,000 question:
    How do I defer them until eth0 is ready?
    Or how can I force the eth0 link to be up before colord or adsl try to use it?
    Last edited by bhrgunatha (2012-10-25 01:33:36)

  • [solved] systemd services not starting at boot (or at all)

    On my router, some systemd services fail to start at boot.
    The services are :
    adsl (pppoe connetction on the wan interface)
    shorewall (funny again for a router)
    logind (brings up only tty1, and not the others with a 'timeout' error)
    adsl starts fine manually after booting up
    the others don't work, I have to launch shorewall with the old sysvinit rc script (and it works)
    I really don't know, what happened to logind...
    Last edited by scar (2012-11-30 10:20:44)

    cups: avahi client failed
    adsl: timeout (ppp0 running on eth0, the service did not found eth0)
    shorewall: did not work by the systemctl command, only with the old rc script
    I'm not sure if there was an error with logind, but I've had only tty1, not all the others (I have not touched /etc/inittab)
    since this was a very old install (but up to date), I've decided to reinstall the whole thing,
    Everything works
    (But reinstalling does not solve any problem, it erases the problems...)
    Last edited by scar (2012-11-30 10:21:20)

  • Run custom systemd service before NetworkManager

    Hi, I am trying to write a systemd service that runs and completes before NetworkManager.service starts.
    I tried this:
    [Unit]
    Description=Custom service test
    Before=NetworkManager.service
    [Service]
    Type=oneshot
    ExecStart=/usr/bin/echo Custom service test 1
    ExecStart=/usr/bin/sleep 5
    ExecStart=/usr/bin/echo Custom service test 2
    [Install]
    WantedBy=network.target
    While the custom service does start, I got this rather strange output:
    Jan 22 00:12:46 localhost echo[1166]: Custom service test 1
    Jan 22 00:12:48 localhost kernel: NVRM: GPU at 0000:02:00: GPU-(snip)
    ... some unrelated messages (acpid, kdm, etc) ...
    Jan 22 00:12:49 localhost systemd-logind[1170]: Linked /tmp/.X11-unix/X0 to /run/user/1000/X11-display.
    Jan 22 00:13:13 localhost echo[1254]: Custom service test 2
    Jan 22 00:12:50 localhost systemd[1]: Started Custom service test.
    Jan 22 00:12:50 localhost systemd[1]: Starting Network Manager...
    As you can see, while everything appears in the expected order in the log, the timestamps look very wrong. The "Custom service test 2" says "00:13:13", yet it is in the middle of "00:12:49" and "00:12:50". What gives?
    Also, notice that the first echo was at 00:12:46, but NetworkManager started at 00:12:50, which is only 4 seconds later. The "sleep" in the custom services should have made it start at 00:12:51 at the earliest. I don't understand why things are not being respected.
    The output I'd expect to see is something like this:
    Jan 22 00:12:46 localhost echo[1166]: Custom service test 1
    Jan 22 00:12:51 localhost echo[1254]: Custom service test 2
    Jan 22 00:12:51 localhost systemd[1]: Started Custom service test.
    Jan 22 00:12:51 localhost systemd[1]: Starting Network Manager...
    I have also made sure that it shows up in NetworkManager.service's After list:
    $ systemctl show -p After NetworkManager.service
    After=mycustomservice.service syslog.target systemd-journald.socket dbus.socket basic.target

    falconindy wrote:Sooooo this begs the question: what are you really trying to do?
    I'm trying to write a script that changes the interface's MAC address before NetworkManager gets a chance to take over the network interface. I'm aware that there's a page about exactly that on the wiki. I started with the systemd service from the bottom of the page, which says "Before=dhcpcd@%i.service". I changed that line to use "NetworkManager.service", and I changed the ExecStart line to "/usr/bin/macchanger -A myinterface" in order to get a random MAC address, instead of setting a fixed one like the example shows. Then I saw that macchanger's output was being mixed with NetworkManager's output in the journal, so I decided to try and write a custom service just for testing, making it start before NetworkManager, in order to see if it really was systemd's fault or if it was something macchanger-specific. Then I noticed the strange behavior described in the OP, didn't really know what to do about it, so I posted this topic. That's the story so far...
    Last edited by WindPower (2013-01-23 00:13:22)

  • BeX Analyzer Login Prompt

    Hello All,
    Does anyone know of a way of using windows authentication (via Active Directory) to automate the login prompt in the BeX Excel Analyzer?  I have found a solution for the BI portal via SPNego, but have not been able to find any discussion or documentation about automating the BeX Excel Analyzer login prompt. Any help is greatly appreciated.
    Thanks, --Matt

    Hi,
    Please check the following thread.It may be hepful.
    Re: SAP R/3 Authentication with Active Directory on Win2k server.
    Regards.

  • How can I recover from Windows login failure: User Profile Service failed the login

    I have Boot Camp installed on a separate partition on a MacBook Pro, late 2011 model. I have Mavericks installedd (10.9.1). I use, variously, both Parallels and VM Fusion to access the BootCamp installation of Windows 7.
    Except for having recently installed updates of both VMFusion and Parallels, I got this failure message when trying to login to Windows:: The User Profile Service failed the logon. User profile cannot be loaded.
    I had just been on Windows a few moments previously to access a business site that only accepts IE. Appreciate any useful insight on dealing with this issue without having to totally replace the BootCamp installation. A lot of the suggestions on Microsoft Windows repair sites are either incomprehensible or don't seem applicable.

    Same problem here. Windows 7 support gives several so-called fixes (including regedit tweaks, eliminating the blocked user account), but all require access to that partition. So far as I know, I have only one user, since this is my personal computer -- unless there is some sort of default "administrator" logon.
    Windows support says the problem might be caused by antivirus software running while we try to logon, but this problem has never happened to me before, and I have not made anti-virus changes (maybe AVG or Avast did so automatically)
    I tried to access regedit through Finder, but get a garbled text-edit with the message that regedit cannot be opened by DOS.
    So I wonder (a) is there a default admin logon? (b) Can we tinker with the settings inside Windows from Finder, or (c) how else can we get into Windows?
    My setup: Macbook Pro (Fall 2010), 10.6.8, boot camp, Windows 7.

  • MDT 2012 - Auto login settings were gone at the end of the deployment

    I need to make some PC for public use (Has a local user account that no need to login)
    There's no problem for me to created the local user account and and its profile folder by using custom tasks.
    The auto login settings also successfully set by modify the registry or use Sysinternals - Autologon.exe
    But after the last restart of th PC (I set to restart at the end of the deployment), Windows stuck at the login screen.
    Then I found that all the auto login settings were gone (Both in the registry and netplwiz).
    Since this custom task is place near the end in the Task sequence (which means there should be no other task that can influence it). So, I suspect may be the Group Policy reset all those settings.

    I had the same problem, and these were my solutions:
    Comment out the relevant lines in LTICleanup. I tried to avoid this, in case any updates to MDT reversed the change. Also even if I documented it, it might not be apparent to another technician years down the line. I prefer to leave the MDT files unchanged.
    Create a script that runs after the task sequence has completed. This is the option I chose, and it was a bit more complicated than it appeared.
    What I did was as follows:
    Create a new AutoLogon Script application.
    The "application" must consist of two script files: install and autologon.
    The "install" script does the following:
    Copy the "autologon" script to a temporary folder on the local drive
    Create a new scheduled task which runs on startup, as the SYSTEM user, and runs the "autologon" script (using schtasks.exe)
    The "autologon" script does the following:
    Create the relevant registry keys to enable automatic logon.
    Delete the above scheduled task.
    Reboot the workstation.
    In the MDT task sequence, create a new task at the very end, which installs a single application. Choose the AutoLogon Script application.
    In your CustomSettings.ini, set FinishAction=REBOOT
    So at the end of your task sequence, the workstation will reboot. It will then run the autologon script after boot up, but will not autologon. When the script finishes, it will reboot again, at which point it will autologon with the details you specified.
    It's a little fiddly, but works for me.
    Johan Arwidmark has another method here, which might be even easier - http://www.deploymentresearch.com/Research/tabid/62/EntryId/122/Final-Configuration-for-MDT-2013-Lite-Touch-now-with-Autologon-support.aspx

  • The user profile service failed the logon. User profile cannot be loaded, WIN7 dual boot

    Hi all,
    I just got a new x201, which I installed ubuntu on a second partition. For a while the two systems were getting along fine, and I was able to switch between them without problems. on my last login it won't accept my credentials (pw or biometric) and says "The user profile service failed the logon. User profile cannot be loaded" and then returns to the login screen. Any ideas on how to fix this without nuking the system?

    Hi, I'm having the exact same problem as little_teapot , I cannot get past the login screen. I went onto the Toshiba support site which asked me to do a system recovery using the F8 key on start up. So I tried this but the problem I'm having is when I turn on the computer holding in the F8 key, nothing happens, it just goes through start up as normal and then it just ends up at the login screen telling me that the user profile cannot be loaded. I've tried it a couple of times and I don't know if I'm doing something wrong with the safe mode start up? Also the notebook is a P500/020 and is only 2 months old running Windows 7? if anyone can help I would greatly appreciate it.
    Thanks

  • [solved]Trying to insert a blocking systemd unit into the boot process

    What i'm trying to do is to start (and *wait* for it to complete) a unit before starting another.
    In particular, i need to create and mount a partition on the fly before any filesystem gets mounted.
    My unit file is:
    # cat /etc/systemd/system/early-boot-koko.service
    [Unit]
    Description=Configurazione ottimale per il boot da rete
    [Service]
    Before=systemd-remount-fs.service
    #Nice=19
    #IOSchedulingClass=3
    #IOSchedulingPriority=7
    Type=oneshot # is forking instead of oneshot needed here?
    ExecStart=/root/scripts/early-boot.sh
    TimeoutSec=0
    #StandardInput=tty
    RemainAfterExit=yes
    I created even created an override to systemd-remount-fs.service and added early-boot-koko.service to the "After" array:
    ]# cat /etc/systemd/system/systemd-remount-fs.service
    # This file is part of systemd.
    # systemd is free software; you can redistribute it and/or modify it
    # under the terms of the GNU Lesser General Public License as published by
    # the Free Software Foundation; either version 2.1 of the License, or
    # (at your option) any later version.
    [Unit]
    Description=Remount Root and Kernel File Systems
    Documentation=man:systemd-remount-fs.service(8)
    Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
    DefaultDependencies=no
    Conflicts=shutdown.target
    After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-fsck-root.service early-boot-koko.service
    Before=local-fs-pre.target local-fs.target shutdown.target
    Wants=local-fs-pre.target
    ConditionPathExists=/etc/fstab
    [Service]
    Type=oneshot
    RemainAfterExit=yes
    ExecStart=/usr/lib/systemd/systemd-remount-fs
    But when i boot, i notice that early-boot-koko.service is still running while systemd-remount-fs has exited :
    # systemctl |grep 'early\|remount'
    early-boot-koko.service loaded active running Configurazione ottimale per il boot da rete
    systemd-remount-fs.service loaded active exited Remount Root and Kernel File Systems
    ...but i need  early-boot-koko.service to complete before systemd-remount-fs is started.
    What am i doing wrong?
    Thanks.
    Last edited by kokoko3k (2014-10-09 12:14:23)

    ...it was the comment on the same line:
    Type=oneshot # is forking instead of oneshot needed here?
    solved...

  • [SOLVED] Running Systemd service on login (encrypted home partition)

    Hi,
    I have a dm-crypt/LUKS encrypted home partition that's mounted via PAM on login. I'm trying to use a systemd service (profile-sync-daemon), but the service tries to start and access the home partition before the partition is mounted. The service does seem to start successfully, but it doesn't gain access to necessary files on the home partition and malfunctions later on. Is there a sane hack to somehow delay the start of the service until the relevant partition gets mounted (basically after login)? Manually starting the service after login works just as intended in this case - I'm just looking for a way to automate this process.
    I have an idea of starting the service via Openbox autostart, but I've currently failed in my attempts.
    Last edited by ggg377 (2015-05-28 18:31:10)

    Things got quite complicated and hacky as I researched this so I went out of the box a bit (or took the easy way out, whichever you prefer) and reinstalled Arch with a full disk encryption. All is fine now and I also expect to see less problems overall in the future. If anyone wants to continue researching this it would probably be a good idea to start a new thread.

  • I booted up this morning to find my voice over feature active. A black bar was at the lower left corner of my screen. When I began to click on the users in my login window it would not respond. All that I saw was the black bar saying authentication busy.

    I booted up this morning to find my voice over feature active. A black bar was at the lower left corner of my screen. When I began to click on the users in my login window it would not respond. All that I saw was the black bar saying authentication busy. I was not able to restart, I was not able to switch users, I was not able to shut down. I decided to manually shut down my Mac.  when it booted back up I was looking at the disk utility screen. When I clicked on repair or race it indicated that my hard drive had already been arranged. I was looking at completely formatted drive and I was having to either restore from Time Machine or reinstall lion. I had a back up but why did this happen?

    A possible workaround could be to have the horizontal scroll bar visible all the time.
    <pre><nowiki>body { overflow-x: scroll !important; }</nowiki></pre>
    * Stylish: https://addons.mozilla.org/firefox/addon/stylish/

  • Im trying to install iTunes on my friend's Dell XPS, running windows vista ultimate (32-bit), but whenever I reach the end of the install, it pops up with an error telling me:   "Service 'Apple Mobile Device' (Apple Mobile Device) could not be instal

    Trying to install iTunes on my Laptop, running windows 7 (64-bit), but whenever I reach the end of the install, it pops up with an error telling me:
    "Service 'Apple Mobile Device' (Apple Mobile Device) could not be installed. Verify that you have sufficient privileges to install system services"

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    The further information area has direct links to the current and recent builds in case you have problems downloading, need to revert to an older version or want to try the iTunes for Windows (64-bit - for older video cards) release as a workaround for performance issues or compatibility with third party software.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    tt2

  • Will not boot up. Apple shows, spinning wheel shows, a bar comes up on the bottom. It gets to the end of the bar and shuts down.

    Will not boot up. Apple shows, spinning wheel shows, a bar comes up on the bottom. It gets to the end of the bar and shuts down.

    Will not boot up. Apple shows, spinning wheel shows, a bar comes up on the bottom. It gets to the end of the bar and shuts down.

  • Windows Server 2012 Login Issue "The User Profile Service service failed the sign-in. User profile cannot be loaded."

    Whenever I try to login to our Exchange Server, I receive the following error:
    "The User Profile Service service failed the sign-in. User profile cannot be loaded."
    The issue affects more than one user.
    Relevant Info:
    Server Version: 2012 Datacenter
    Exchange Version: 2013
    The Exchange server is virtualized.
    What I've tried:
    1) Remote Desktop from a workstation on the network
    2) Remote Desktop from Virtual Machine Manager
    3) Connect via console from Virtual Machine Manager
    4) Accessing the server via Computer Management and adding my user account to Allow Login via Remote Desktop
    5) Creating a new user account for myself by copying the account of a user who can get in
    6) Rebooting
    I'd appreciate any suggestions.

    Hi Aaron,
    I would suggest you to check the event log .
    Maybe this issue due to the permission of profile folder , please refer to the following link :
     http://helgeklein.com/blog/2013/09/error-message-explained-user-profile-service-failed-logon/
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

Maybe you are looking for

  • Can a RAID created by Disk Utility be connected to another Mac?

    Hi There, We're looking to upgrade our workstation storage (4x workstations) and have recently had issues with third-party RAID cards and third-party RAID enclosures. If we were to purchase a JBOD enclosure and use Disk Utility to create the RAID, wo

  • HT4236 Syncing problem

    I have a problem with syncing my photos. Whenever I choose an album to sync photos from, the photos appear in my iPhone in two albums , Photo Library and My Pictures (the name of the folder frow which I have sync the photos). How can I fix that??

  • Magic Trackpad gone wild

    Has anyone seen a Magic Trackpad go wild? It seems to be OK all morning then last two days around now all of a sudden it just seems to scroll over and click on everything on my desktop so fast I cannot really see what is happening. Applications launc

  • Error in Oracle Database Reference 11g Release 2 (11.2) E25513-04

    The V$ASM_FILE view description is probably not correct: In an Automatic Storage Management instance, V$ASM_FILE displays one row for every Automatic Storage Management file in every disk group mounted by the Automatic Storage Management instance. In

  • Reading the serial number of a VXI-MXI-2 through software

    Is there a way to read the serial number of my VXI MXI 2 through software? I can find the model number and manufacturer number in the registers, but no serial number.