[SOLVED] Disabling Bluetooth on boot with systemd

I'm having a nasty-won't-go-away problem with the disabling of the bluetooth module in my Thinkpad X200s.
Resorting to the old Arch way of disabling bluetooth on boot, I added this to my rc.local:
/bin/echo 0 > /sys/devices/platform/thinkpad_acpi/bluetooth_enable
The thing is, this somehow made my boots hit'n'miss: kernel panics every two boots. As soon as I commented that line from my rc.local... no more kernel panics at boot.
I was still using an rc.conf just with daemons, and in troubleshooting the kernel panics got rid of it and used the systemd way of enabling/disabling services. My problem here is that the bluetooth service seems to be impossible to disable.
I first tried the good ol'
systemctl disable bluetooth.service
Which supposedly disabled bluetooth... but didn't. Even
systemctl stop bluetooth.service
Does not work.
Digging around the interwebs, I found that there are "stronger" ways to disable services with systemd, meaning "masking" services - basically links them to /dev/null
So, I tried masking the bugger...
systemctl mask bluetooth.service
Reboot and... the damn bluetooth is still enabled. Only way that works is to echo 0 > /sys/devices/platform/thinkpad_acpi/bluetooth_enable... but I can't do it at boot with rc.local, otherwise I'll get the kernel panics again.
Any ideas?
Last edited by Onyros (2012-08-15 13:10:35)

Onyros wrote:
I'm having a nasty-won't-go-away problem with the disabling of the bluetooth module in my Thinkpad X200s.
Resorting to the old Arch way of disabling bluetooth on boot, I added this to my rc.local:
/bin/echo 0 > /sys/devices/platform/thinkpad_acpi/bluetooth_enable
The thing is, this somehow made my boots hit'n'miss: kernel panics every two boots. As soon as I commented that line from my rc.local... no more kernel panics at boot.
I was still using an rc.conf just with daemons, and in troubleshooting the kernel panics got rid of it and used the systemd way of enabling/disabling services. My problem here is that the bluetooth service seems to be impossible to disable.
I first tried the good ol'
systemctl disable bluetooth.service
Which supposedly disabled bluetooth... but didn't.
It disables the bluetooth service which is very different from what your write to sysfs accomplishes. Don't you really just want to blacklist the bluetooth module? Your post is a bit hard to follow...

Similar Messages

  • [Solved] Numlock on boot (with systemd)

    I recently upgraded to systemd. Everything is working extremely well. Except that I am given to understand that systemd no doesn't use /etc/inittab, where I had added the command from the wiki that turns on numlock on each of the virtual terminals. Unfortunately the wiki doesn't have any method to do it with systemd, only the /etc/inittab method.
    This means that for a brief while, I had to live with the onerous task of hitting numlock manually. It was one of the worst weeks of my life. My index finger is still raw.
    I have come up with a somewhat-solution. I just edited /etc/bash.bashrc and added
    if [[ $( tty ) == /dev/tty? ]]; then
        setleds +num
    fi
    to it, which works quite well. It turns on num lock once you're logged in as long as you are on a virtual terminal and not on one of the /dev/pts/* ones.
    My question is, is there a better place to do this? Maybe some way to get it to turn on before you're even logged in? It doesn't really matter all that much, I'm just trying to make things "correct."
    Last edited by scott_fakename (2012-09-06 20:29:46)

    DSpider wrote:
    https://wiki.archlinux.org/index.php/Ac … _on_Bootup
    Set it in Xorg for whatever DE/WM you use and it will be active when you switch to a tty.
    Don't forget to mark it as solved.
    Yes, I tried that. I use lxdm and xfce, and setting the numlock=1 option in /etc/lxdm/lxdm.conf turns on numlock in xfce and the light in the consoles, but not the actual numlock itself in consoles.
    And Kejpi thanks, I was doing that but when I upgraded to systemd it said those would be taken out "at some point" so I was trying to find out if a permanent solution existed yet. Apparently it does not exist yet, which is fine, I was just curious. So I guess I'll stick with the bashrc method for now.
    Thanks for the replies.
    --Scott

  • [SOLVED] RTC and dual booting with Windows 8/8.1

    I am planning ahead of installing Arch on a windows 8.1 laptop, and need to understand whether or not the known Windows registry hack to get windows to use UTC for the RTC is still valid for Windows 8/8.1?  I have been searching via google and the usual sources of information, but it is not clear to me if there are problems doing this, specifically if arch is dual booted with Windows 8/8.1 rather than older versions of the MS OS. Certainly I have used the technique without any problem in the past when dual booting Windows XP with Arch on several different machines.
    Does anyone have personal experience with doing this on a Windows 8 or 8.1 machine and can report here on whether it works successfully or not?
    Thanks for any advice.
    Last edited by mcloaked (2014-02-11 21:16:21)

    Since there were no replies at this point I thought I would just go ahead and implement the registry hack on the Windows 8.1 O/S in the laptop and see if Windows behaves.  It appears to be OK, with the displayed time being correct after reboot, and time synchronisation remaining fine with no problems seen in the displayed time, although I won't be able to read the RTC directly until I have completed the Arch install in the coming week or two.  I now don't foresee any issues with the time synchronisation between booting Arch and Windows 8.1 so I will mark this as solved.
    Since the RTC is now in UTC then normal clock config in Arch using chrony should perform normally once the install is done and the new system set up.
    Last edited by mcloaked (2014-02-11 21:17:11)

  • {Solved} Can not successfully boot into systemd

    I will first start off by saying I have read though the following threads:
    https://bbs.archlinux.org/viewtopic.php?id=151633
    https://bbs.archlinux.org/viewtopic.php?id=151885
    And have tried to follow the Systemd wiki.  I started out by switching to the new initscripts configuration system.  I have the current systemd package installed.  I then installed systemd-sysvcompat which of course had me remove sysvinit.  I then removed initscripts which moved my rc.conf to rc.conf.pacsave.
    I had to manually create /etc/hostname, /etc/locale.conf, and /etc/vconsole.conf as (mentioned in a previous post) I could not do with any "ctl" commands as I had not yet booted into a systemd setup.
    This also caused an issue with trying to set up the timezone as:
    # timedatectl set-timezone America/New_York
    resulted in:
    Failed to issue method call: Launch helper exited with unknown return code 1
    So at this point I decided to try a reboot and I get:
    Welcome to emergency mode! Type "systemctl defualt" or ^D to enter default mode.
    Type "journelctl -b" to view system logs. Type "systemctl reboot" to reboot.
    Give root password for maintenance
    (or typed Control-D to continue): [ 71.520184] radeon_cp: Failed to load firmware
    "radeon/R300_cp.bin"
    [ 71.520205] [drm:r100_cp_init] *ERROR* failed to load firmware!
    [ 71.520224] radeon 0000:01:05.0: failed initializing CP (-2)
    [ 71.520237] radeon 0000:01:05.0: Disabling GPU acceleration
    I entered emergency mode which brought me to the root terminal.  I first attempted to mv rc.conf.pacnew to rc.conf expecting there to possibly be an issue with the daemons I had running or attempted to run but after reboot I got the same thing.  Not sure what is going on with the radeon firmware because it's obviously there.
    So I re-imaged the hard drive and decided to try again.  This time I installed systemd-sysvcompat (removing sysvinit) and DID NOT remove initscripts.  I rebooted and got the exact same thing as above. So at this point I am at a loss of ideas with moving forward.  Why is systemd-sysvcompat causing the failure of the radeon firmware to load? I use Arch on my laptop, desktop as well as my server.  Systemd is coming so I am trying with the laptop first to convert to pure systemd.  If I am just missing a step please let me know and I appologize for posting.  But hopefully others have run into this issue and could possibly give me a nudge in the right direction.  It could be I am reading the wiki wrong or just not interpreting it correctly.
    Thanks in advance for your guidance and assistance,
    All the best,
    Ian
    Last edited by ichase (2012-11-16 16:55:10)

    hiciu,
    Here is what you requested taken from emergency mode:
    /etc/mkinitcpio.conf
    # vim:set ft=sh
    # MODULES
    # The following modules are loaded before any boot hooks are
    # run. Advanced users may wish to specify all system modules
    # in this array. For instance:
    # MODULES="piix ide_disk reiserfs"
    MODULES=""
    # BINARIES
    # This setting includes any additional binaries a given user may
    # wish into the CPIO image. This is run last, so it may be used to
    # override the actual binaries included by a given hook
    # BINARIES are dependency parsed, so you may safely ignore libraries
    BINARIES=""
    # FILES
    # This setting is similar to BINARIES above, however, files are added
    # as-is and are not parsed in any way. This is useful for config files.
    # Some users may wish to include modprobe.conf for custom module options
    # like so:
    # FILES="/etc/modprobe.d/modprobe.conf"
    FILES=""
    # HOOKS
    # This is the most important setting in this file. The HOOKS control the
    # modules and scripts added to the image, and what happens at boot time.
    # Order is important, and it is recommended that you do not change the
    # order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
    # help on a given hook.
    # 'base' is _required_ unless you know precisely what you are doing.
    # 'udev' is _required_ in order to automatically load modules
    # 'filesystems' is _required_ unless you specify your fs modules in MODULES
    # Examples:
    ## This setup specifies all modules in the MODULES setting above.
    ## No raid, lvm2, or encrypted root is needed.
    # HOOKS="base"
    ## This setup will autodetect all modules for your system and should
    ## work as a sane default
    # HOOKS="base udev autodetect pata scsi sata filesystems"
    ## This is identical to the above, except the old ide subsystem is
    ## used for IDE devices instead of the new pata subsystem.
    # HOOKS="base udev autodetect ide scsi sata filesystems"
    ## This setup will generate a 'full' image which supports most systems.
    ## No autodetection is done.
    # HOOKS="base udev pata scsi sata usb filesystems"
    ## This setup assembles a pata mdadm array with an encrypted root FS.
    ## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
    # HOOKS="base udev pata mdadm encrypt filesystems"
    ## This setup loads an lvm2 volume group on a usb device.
    # HOOKS="base udev usb lvm2 filesystems"
    ## NOTE: If you have /usr on a separate partition, you MUST include the
    # usr, fsck and shutdown hooks.
    HOOKS="base udev autodetect pata scsi sata filesystems usbinput fsck"
    # COMPRESSION
    # Use this to compress the initramfs image. By default, gzip compression
    # is used. Use 'cat' to create an uncompressed image.
    #COMPRESSION="gzip"
    #COMPRESSION="bzip2"
    #COMPRESSION="lzma"
    #COMPRESSION="xz"
    #COMPRESSION="lzop"
    # COMPRESSION_OPTIONS
    # Additional options for the compressor
    #COMPRESSION_OPTIONS=""
    The next items due to length are linked to pastebin;
    bsdtar -t -f /boot/initramfs-linux.img
    http://pastebin.com/cZEJHVHm
    dmesg
    http://pastebin.com/MUGs1e9H
    journalctl -b
    http://pastebin.com/xgbfVJP8
    This is a lot to look at so do know that I am very appreciative of you and any one else looking at these files taking your time to help me with this issue.
    All the best,
    Ian
    Edit:  I also wanted to mention that I was able to get rid of the syslog-ng errors previously mentioned by performing:
    systemctl enable syslog-ng.service
    Then rebooting.  Granted I was still put back in emergency mode but was able to fix one issue.
    Last edited by ichase (2012-11-16 03:33:41)

  • [solved] no sound when booting with webcam attached

    Hi everybody,
    hopefully this is the right section to post since I'm not quite sure if the problem is related to KDE or a general hardware thing. ;-)
    Anyway, the problem that I have is that I don't have any sound at all when booting my system while my webcam, a logitech 9000 pro, is attached to the USB port.
    Even when unplugging the webcam afterwards the sound does not work. I need to reboot my system first with the webcam detached and than it'll work again. I also did already manually insert the modules in /etc/rc.conf but no change. Every time it seems that the webcams audio interface will be recognized as the primary audio device.
    When not having the camera plugged in and plugging it in while KDE is up, everything works like a charm.
    But of course it bothers me quite big time to unplug the webcam every time after using it and rebooting the system again after I forgot to unplug it.
    I also checked for other modules to be loaded automatically (compared the output of lsmod before and after plugging in the webcam) but there was no change.
    So does anyone have an idea what to do in order to get the order of the audio devices right?
    Thank you!...
    Last edited by kurisutian (2009-11-23 19:34:10)

    In your /etc/rc.d/modprobe.d/modprobe.conf try to put zero index for your audio driver, so it will load first. In my case it's this line:
    options snd-hda-intel index=0

  • [SOLVED] How to fsck+badblocks with systemd?

    Before systemd I could boot into single mode, then "mount / -o remount,ro" and then "fsck.ext4 -c ...". Now I can't since it says / is in use and I can't remount as read-only. What do I do?
    Last edited by Butcher (2012-10-22 09:54:22)

    Gusar wrote:Two similar targets? Interesting. I just found Fedora's sysvinit to systemd cheat sheet - adding emergency gets you the emergency target. All the others I mentioned get you the rescue target. Now I'll have to go figure out what the difference between those two targets is
    [Unit]
    Description=Emergency Mode
    Documentation=man:systemd.special(7)
    Requires=emergency.service
    After=emergency.service
    AllowIsolate=yes
    emergency.target only launches emergency.service, which is a root shell (sulogin) on your primary console. No udev, no journald, no nothing.
    [Unit]
    Description=Rescue Mode
    Documentation=man:systemd.special(7)
    Requires=sysinit.target rescue.service
    After=sysinit.target rescue.service
    AllowIsolate=yes
    [Install]
    Alias=kbrequest.target
    This launches sysinit.target, thus udev and journal are running and file systems are mounted. Then it launches rescue.service, which is almost identical to emergency.service.
    Last edited by brain0 (2012-10-19 15:21:47)

  • [SOLVED] Netcfg.service not starting with systemd

    I have net-auto-wireless.service enabled and working, but when I try to start netcfg.service, it gives the error:
    Job for netcfg.service failed. See 'systemctl status netcfg.service' and 'journalctl' for details.
    "systemctl status netcfg.service" gives me:
    netcfg.service - Netcfg multi-profile daemon
    Loaded: loaded (/usr/lib/systemd/system/netcfg.service; enabled)
    Active: failed (Result: exit-code) since Thu, 04 Oct 2012 13:43:05 -0400; 5min ago
    Main PID: 1510 (code=exited, status=1/FAILURE)
    CGroup: name=systemd:/system/netcfg.service
    Oct 04 13:43:05 arch systemd[1]: Starting Netcfg multi-profile daemon...
    Oct 04 13:43:05 arch netcfg-daemon[1510]: No recorded netcfg state to restore
    Oct 04 13:43:05 arch systemd[1]: Failed to start Netcfg multi-profile daemon.
    And the output of "journalctl" is:
    Oct 04 13:43:05 arch netcfg-daemon[1510]: No recorded netcfg state to restore
    Oct 04 13:43:05 arch systemd[1]: netcfg.service: main process exited, code=...=1
    Oct 04 13:43:05 arch systemd[1]: Unit netcfg.service entered failed state.
    Am I missing something in setting it up?  I followed the netcfg wiki as closely as I could.
    Last edited by mellowmaroon (2012-10-04 18:46:16)

    Good call, I changed it from "last", to the profile I use in /etc/network.d that net-auto-wireless autoconnects to.  It failed for a different reason after changing the NETWORKS in /etc/conf.d/netcfg, because net-auto-wireless was still running.
    But it works now, thanks for the help!
    I wanted to use netcfg instead of net-auto-wireless because I was unable to find a suitable way to connect to available networks that is non-graphical, and I felt like giving netcfg a try and seeing if it's any easier than running "systemctl restart net-auto-wireless.service" every time I want to reconnect.
    Although my question for this thread is solved, is there any way to have netcfg autoconnect to profiles once I am within range?

  • Slow boot with systemd due to NetworkManager and laptop-mode-tools

    ernestas ~ $ systemd-analyze blame
    25787ms NetworkManager.service
      3440ms laptop-mode-tools.service
      1792ms systemd-logind.service
      1573ms systemd-modules-load.service
      1519ms home.mount
      1305ms polkit.service
       977ms systemd-udevd.service
       903ms systemd-sysctl.servic
    What could be the underlying problem? How do I solve it?

    Okay. I no longer use laptop-mode-tools, but NetworkManager still seems to be slow:
    ernestas ~ $ systemd-analyze blame
      3592ms NetworkManager.service
      3013ms systemd-logind.service
       869ms dev-sda7.swap
       762ms home.mount
       666ms systemd-modules-load.service
       546ms systemd-udev-trigger.service
       523ms systemd-udevd.service
       500ms dev-hugepages.mount
       479ms sys-kernel-debug.mount
    Last edited by ernetas (2012-11-03 16:01:44)

  • MOVED: How to disable numlock on boot with X79A-GD45?

    This topic has been moved to MSI Intel boards.
    https://forum-en.msi.com/index.php?topic=253397.0

    And the reason of duplicating your thread is?

  • Help with systemd problems/reply to closed thread

    @Everyone; as the previopus topic was closed, I am opening a new one here, partly to reply to some things that was said to me in the previous thread/topic (and I do not like to leave people hanging), but mainly to try and get some help with my systemd config (that I was not able to find help with in the wiki or manpages).
    @czubek; eww, that sounds rather similiar to some other operating systems I've heard of (not just, but obviously including, windows)... For me, subjectively, that is not very attractive, as being able to have a single application do a single thing, and then mixing and matching as I personally see fit is a great thing.
    @tomegun: I can indeed see your point, but if I made direct quotes on all the things I reply too, my posts would reach biblical proportions.
    Mmm-hmm, I do indeed know of "the Arch Way"; however, the system that you expose can be of varying complexity as well, and I found that the system that was presented to me by way of Sysvinit/initscripts was a way simpler system than that presented to me by systemd.
    Indeed, and I do like that; I enjoy knowing how my system works and learning more about it; however, the truth is that reading manpages and the wiki isn't always enough. And I use the numbers instead of letters in certain places as a jest, please, do not get offended by that; if you have to, get offended by my opinions.
    Ah, I have now scanned the wiki, the manpages, and have already faced problems. While part of me is saddened by this fact (as I was hoping for a smooth transition to systemd), part of me is glad that I can at least prove that everything isn't quite as simple as some people would make it out to be. More on this later in this post, as I do need help with the problems I have faced.
    And I wouldn't say that the new and old way are equally trivial, as I immediatley faced problems with "the new way". More on this later.
    Ok, I find that if the debate is polarized, then there is nothing wrong with describing it as such. I spell what I see.
    Oh my... Ignored as a matter of principle? I would say that that is an excellent way to stagnate; by that logic, moviemakers, gamemakers etcetera should ignore any and all criticism they recieve, as the critics are not contributing.... Wouldn't that lead to a complete halt in development? Isn't criticism (so long as it is constructive, obviously) a key component of (media/software) evolution?
    Ah, I see, then I  misunderstood the current state of the install media
    "Some adjustements"... Well, I guess we'll have to see how that goes, then. Hopefully it'll be smooth.
    @Everyone; Awebb possesses stunning accuracy as far as his observations go.
    @zb3; My point exactly.
    @tomegun; I believe you to be wrong; complaining (but not whining) is the first step towards improvement, as I think that I and zb3 has shown.
    Further, your last point (where you talk about "deep understanding of Y" and whatnot) is basically saying that only devs and programmers can contribute, so zb3's observation would be correct.
    Also, making suggestions is part of constructive criticism; you can do that even if you can't code, e.g. by saying "X works badly because it makes Y crash; couldn't we replace X with something akin to Z?". This is a valid point even if you have no intricate understanding of X, Y or Z, and if it is impossible to replace X for one reason or the other, it's not hard to reply with "Replacing X is impossible because of reason Q", and then see if someone can solve reason Q etcetera.
    zb3's example is obviously helping; for one, it would allow people to know taht they can't boot with systemd in certain cases, or that installing/runing systemd can break their system. I would consider that rather important information.
    @Everyone; Now then, to see if I can (or rather, if I can get help to) shed some light on some problems I've been having.
    My transition to systemd went pretty smooth (besides the fact that I couldn't use 'systemctl' to set anything, and neither duckduckgo nor any posts in the forums could help me (the error I continously got was "Failed to issue method call: Launch helper exited with unknown return code 1") and that there are no manpages/tips on how to configure the files for "localtime" and "adjtime", which would've been good considering some syntax have changed) to about halfway through, to the point where I was supposed to start using systemd for my daemons.
    Now then, to the main problem; first, I tried running
    "systemctl enable syslog-ng.service"
    and got the following message;
    "ln -s '/usr/lib/systemd/system/syslog-ng.service' '/etc/systemd/system/syslog.service'
    ln -s '/usr/lib/systemd/system/syslog-ng.service' '/etc/systemd/system/multi-user.target.wants/syslog-ng.service'"
    Since it doesn't exclusively say that something went wrong (at least as far as I can understand), I pondered the message a bit, but moved on to try and start dbus by issuing
    "systemctl enable dbus.service",
    to which I got the reply
    "The unit files have no [Install] section. They are not meant to be enabled using systemctl."
    This I can only assume is an error message of some sort, especially seeing as it says "not meant to be enabled using systemctl", but the wiki rather explicitly states that that is what I am supposed to do.
    I dare not move on (or attempt to start other daemons) without further advice, as I fear I might break my system. Any ideas as to how to solve this would be greatly appreciated.

    tcmdvm wrote:
    The message;
    "ln -s '/usr/lib/systemd/system/syslog-ng.service' '/etc/systemd/system/syslog.service'
    ln -s '/usr/lib/systemd/system/syslog-ng.service' '/etc/systemd/system/multi-user.target.wants/syslog-ng.service'"
    indicates that running "systemctl enable syslog.service" is now enabled.
    If you try running sytemtctl enable <whatever>.service and get
    "The unit files have no [Install] section. They are not meant to be enabled using systemctl." means there is no <whatever>.service file available to enable.
    The dbus.service as far as I know is already enabled when installing systemd and doesn't require any action.
    Ah, right, systemd is chatty (I'm of the old skool; if nothing is/goes wrong, a program should keep quiet).
    Oh ok, then I should dare more on.
    ZekeSulastin wrote:To be a bit more precise, it means the service is there but it's only used as a dependency for something else; the [Install] section of the file is what tells systemctl where to link it and such.  Also, where exactly in the wiki were you told explicitly to 'systemctl enable dbus.service'?  I can easily point you to the sections in both installation guides that tell you how to set things like /etc/localtime et. al (also `man 7 archlinux`), but not the one that said to manually enable dbus.
    Ah, I see; and well, I was told right here, going from the top, to "Enable Daemons formerly listed in rc.conf [...] For a translation of the daemons from /etc/rc.conf to systemd services, see: List of Daemons and Services.", and, using the list, dbus is mentioned there, as you can see. Since I started from the top, I did not know that you didn't need to enable that service. Perhaps it could be added to the descriptions of the relevant services in the Wiki which ones are autostarted?
    ZekeSulastin wrote:Lastly, I don't think trying to continue conversations from a closed thread is a very good idea, let alone doing it in a giant undivided wall of text that makes it quite difficult to pick out much any single topic.
    Meh, I directly refer to the relevant people, they can easily see their own old posts in the previous thread, etcetera... I think te ones who have something to say will be able to find my replies to their previous statements (or so I hope). For now, as everyone can see, I quote stuff (but man might I make some huge posts if I ever post again in the future, if I quote what I reply to).
    fsckd wrote:This is not really a technical support subforum. Moving from Arch Discussion to Newbie Corner.
    Ah ok, thanks (or perhaps a cautious thanks? Moving it to "newbie corner" might, after all, be a subtle insult...).
    tomegun wrote:It is not really possible to follow your message as you don't quote what you are replying to. Moreover, as the thread was closed I think that means we should stop the discussion ;-)
    Hmm, I think it means cop-out for lack or proper arguments/responses... But ok, I'll let it slide, for now (mainly as I can't do much else).
    tomegun wrote:You are not meant to enable dbus.service as it is enabled unconditionally. To check the enabled/disabled state of your services try "systemctl list-unit-files". "static" means that you are not supposed to enabled/disable it.
    Ah ok, thank you. Now, having abandoned all hope, I'll start configuring again and see how it goes... May the void protect me. If I die, grieve not for me, but remember me in the fight against hard-to-configure applications.
    (edit/addon)
    Actually, what am I supposed to do with "hwclock"? the List of Daemons only says that I shouldn't run that in tandem with ntpd, but I'm not running ntpd, so... How do I get hwclock with systemd?
    Edited for additional question.
    Last edited by incassum (2012-11-07 08:44:42)

  • [Solved] Can't add boot entry with efibootmg

    After the last gnome update broke my system I decided to reinstall grub (It's a long story).
    I'm booting from a live usb and after chrooting to my system I issue the efibootmgr command to add
    new bios entry, but no entry is being added. I've loaded the efivars module and the efibootmgr command is
    Executed without errors.
    Its already the second day I'm trying to solve this issue, so any help will be greatly appreciated.
    Last edited by Greed1sGood (2013-04-27 15:10:55)

    But it sounds like you did not actually solve the original problem... no?
    So you say that you booted from a live media, and then tried to run an efibootmgr command from there.  Are you sure that you are booting the live media via UEFI?  If you do not boot with UEFI, you are not able to write boot manager entries.  It is kind of a chicken -> egg thing.
    But if you use the \EFI\boot\bootx64.efi method to get your systemd running, you should now be able to successfully use efibootmgr.  To test to make sure that efibootmgr is working, see if running just "efibootmgr" (as root obviously) outputs all of your boot manager entries.
    Also, if you are using an Arch live media that is at all recent, modprobing efivars is not necessary, as it is now built into the kernel.
    Last edited by WonderWoofy (2013-04-27 15:31:27)

  • [Solved] postgresql with systemd

    Hello Guys,
    I'm having problems starting the postgres with systemd.
    Following errors:
    Running systemctl start postgresql
    k@archK ~ % sudo systemctl start postgresql
    Job for postgresql.service failed. See 'systemctl status postgresql.service' and 'journalctl -xn' for details.
    1 k@archK ~ %
    Running systemctl status postgresql.service got the message below:
    k@archK ~ % systemctl status postgresql.service
    postgresql.service - PostgreSQL database server
    Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled)
    Active: failed (Result: exit-code) since Sáb, 2012-12-29 19:09:19 BRT; 1min 19s ago
    Process: 1746 ExecStart=/usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120 (code=exited, status=1/FAILURE)
    Process: 1741 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data (code=exited, status=0/SUCCESS)
    CGroup: name=systemd:/system/postgresql.service
    3 k@archK ~ %
    and journalctl -xn this:
    k@archK ~ % sudo journalctl -xn
    [sudo] password for k:
    -- Logs begin at Sáb, 2012-12-29 03:47:42 BRT, end at Sáb, 2012-12-29 19:11:49 BRT. --
    Dez 29 19:09:19 archK systemd[1]: postgresql.service: control process exited, code=exited status=1
    Dez 29 19:09:19 archK systemd[1]: Failed to start PostgreSQL database server.
    -- Subject: Unit postgresql.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    -- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
    -- Unit postgresql.service has failed.
    -- The result is failed.
    Dez 29 19:09:19 archK systemd[1]: Unit postgresql.service entered failed state
    Dez 29 19:09:19 archK sudo[1738]: pam_unix(sudo:session): session closed for user root
    Dez 29 19:11:27 archK udisks-daemon[430]: **** Refreshing ATA SMART data for /sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda
    Dez 29 19:11:27 archK udisks-daemon[430]: helper(pid 1781): launched job udisks-helper-ata-smart-collect on /dev/sda
    Dez 29 19:11:28 archK udisks-daemon[430]: helper(pid 1781): completed with exit code 0
    Dez 29 19:11:28 archK udisks-daemon[430]: **** EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda
    Dez 29 19:11:49 archK sudo[1786]: k : TTY=pts/0 ; PWD=/home/k ; USER=root ; COMMAND=/usr/bin/journalctl -xn
    Dez 29 19:11:49 archK sudo[1786]: pam_unix(sudo:session): session opened for user root by k(uid=0)
    Here is the postgresql.service
    [Unit]
    Description=PostgreSQL database server
    After=network.target
    [Service]
    Type=forking
    TimeoutSec=120
    User=postgres
    Group=postgres
    Environment=PGROOT=/var/lib/postgres
    SyslogIdentifier=postgres
    PIDFile=/var/lib/postgres/data/postmaster.pid
    ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data
    ExecStart= /usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120
    ExecReload=/usr/bin/pg_ctl -s -D ${PGROOT}/data reload
    ExecStop= /usr/bin/pg_ctl -s -D ${PGROOT}/data stop -m fast
    # Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in
    # killing Postgres, so adjust it downward
    OOMScoreAdjust=-200
    [Install]
    WantedBy=multi-user.target
    and /etc/conf.d/postgresql
    ## Parameters to be passed to postgresql
    ## Default data directory location
    PGROOT="/var/lib/postgres"
    ## Passed to initdb if necessary
    INITOPTS="--locale en_US.UTF-8"
    ## Default log file location
    #PGLOG="/var/log/postgresql.log"
    ## Additional options to pass via pg_ctl's '-o' option
    #PGOPTS=""
    Does anyone have any idea how to fix this?
    Thanks.
    Last edited by kleitonkk (2013-01-03 23:51:41)

    Sorry for the delay, was traveling and just returned yesterday.
    lothar_m was followed as described in the post, since removed the packages twice and did the install again but the same error.
    [root@archK conf.d]# systemctl start postgresql
    Job for postgresql.service failed. See 'systemctl status postgresql.service' and 'journalctl -xn' for details.
    [root@archK conf.d]#
    systemctl status postgresql.service
    ➜ ~ systemctl status postgresql.service
    postgresql.service - PostgreSQL database server
    Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled)
    Active: failed (Result: exit-code) since Thu, 2013-01-03 18:14:43 BRT; 9min ago
    Process: 10897 ExecStart=/usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120 (code=exited, status=1/FAILURE)
    Process: 10892 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data (code=exited, status=0/SUCCESS)
    CGroup: name=systemd:/system/postgresql.service
    ➜ ~
    [root@archK conf.d]# journalctl -xn
    -- Logs begin at Wed, 2013-01-02 16:50:57 BRT, end at Thu, 2013-01-03 18:34:41 BRT. --
    Jan 03 18:25:28 archK su[11082]: pam_unix(su:session): session opened for user root by k(uid=1000)
    Jan 03 18:34:36 archK systemd[1]: Starting PostgreSQL database server...
    -- Subject: Unit postgresql.service has begun with start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    -- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/7d4958e842da4a758f6c1cdc7b36dcc5
    -- Unit postgresql.service has begun starting up.
    Jan 03 18:34:36 archK postgres[11127]: LOG: could not translate host name "localhost", service "5432" to address: Name or service not known
    Jan 03 18:34:36 archK postgres[11127]: WARNING: could not create listen socket for "localhost"
    Jan 03 18:34:36 archK postgres[11127]: FATAL: could not create any TCP/IP sockets
    Jan 03 18:34:41 archK postgres[11127]: pg_ctl: could not start server
    Jan 03 18:34:41 archK postgres[11127]: Examine the log output.
    Jan 03 18:34:41 archK systemd[1]: postgresql.service: control process exited, code=exited status=1
    Jan 03 18:34:41 archK systemd[1]: Failed to start PostgreSQL database server.
    -- Subject: Unit postgresql.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    -- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
    -- Unit postgresql.service has failed.
    -- The result is failed.
    Jan 03 18:34:41 archK systemd[1]: Unit postgresql.service entered failed state
    /usr/lib/systemd/system/postgresql.service
    [Unit]
    Description=PostgreSQL database server
    After=network.target
    [Service]
    Type=forking
    TimeoutSec=120
    User=postgres
    Group=postgres
    Environment=PGROOT=/var/lib/postgres
    SyslogIdentifier=postgres
    PIDFile=/var/lib/postgres/data/postmaster.pid
    ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data
    ExecStart= /usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120
    ExecReload=/usr/bin/pg_ctl -s -D ${PGROOT}/data reload
    ExecStop= /usr/bin/pg_ctl -s -D ${PGROOT}/data stop -m fast
    # Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in
    # killing Postgres, so adjust it downward
    OOMScoreAdjust=-200
    [Install]
    WantedBy=multi-user.target
    ➜ ~ pacman -Q |grep postgres
    postgresql 9.2.2-2
    postgresql-libs 9.2.2-2
    ➜ ~
    /etc/conf.d
    ## Parameters to be passed to postgresql
    ## Default data directory location
    PGROOT="/var/lib/postgres"
    ## Passed to initdb if necessary
    INITOPTS="--locale en_US.UTF-8"
    ## Default log file location
    #PGLOG="/var/log/postgresql.log"
    ## Additional options to pass via pg_ctl's '-o' option
    #PGOPTS=""
    /usr/lib/systemd/system/postgresql.service
    [Unit]
    Description=PostgreSQL database server
    After=network.target
    [Service]
    Type=forking
    TimeoutSec=120
    User=postgres
    Group=postgres
    Environment=PGROOT=/var/lib/postgres
    SyslogIdentifier=postgres
    PIDFile=/var/lib/postgres/data/postmaster.pid
    ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data
    ExecStart= /usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120
    ExecReload=/usr/bin/pg_ctl -s -D ${PGROOT}/data reload
    ExecStop= /usr/bin/pg_ctl -s -D ${PGROOT}/data stop -m fast
    # Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in
    # killing Postgres, so adjust it downward
    OOMScoreAdjust=-200
    [Install]
    WantedBy=multi-user.target
    I'm still looking for how to solve.
    Thank you.

  • [SOLVED] Activate bluetooth controller on boot

    I've recently finished setting up my computer for server and htpc use. Everything is working fine except bluetooth support. As of now, bluetooth pairing, connection and auto-connection is working fine, as soon as the adapter has been turned on (by user intervention over ssh). For some odd reason though, the bluetooth adapter is always turned off on boot. I have bluez 5.7 and bluez-utils installed; therefore I can either do
    bluetoothctl
    bluetooth> power on
    via ssh, or
    hciconfig hci0 up
    After turning bluetooth on with these commands, everything is working fine. I couldn't manage to autorun these commands on boot (with root permissions). Already tried to write a service file, which didn't work. I also kinda got it semi-working with connman installed and autostarted at boot. The problem with connman is, that it correctly activates the controller on boot, but does then go to sleep / power saving mode after some time and also gives me some errors (which are irrelevant for this issue, but still not good) in /var/log/errors.log. So, I just uninstalled connman, because it has no use for me and I want to keep everything as simple and lightweight as possible. I already have all the tools to start up, pair and connect my bluetooth devices, I just need a way to run the commands above at boot.
    rfkill list
    tells me, that everything is unblocked. The controller itself is recognized with "lsusb" command, but the link is down at boottime (via "hciconfig" command). Is a udev rule an option for this kind of task or do I need to write a service file (in which I failed until now)?
    Any help is welcome!
    Last edited by tolga9009 (2013-07-07 22:11:33)

    You may as well try _native_ method of bluez5 via dbus, something like
    dbus-send --system --type=method_call --print-reply=literal --dest=org.bluez /org/bluez/hci0 org.freedesktop.DBus.Properties.Set string:org.bluez.Adapter1 string:Powered variant:boolean:true
    It doesn't really mater how you will synchronize it but most proper way I think would have been through systemd, since udev reacts to hardware interface (i.e. rfkill enabled hardware and kernel layer created interface) while it is bluetoothd who is expected to make all the proper initialization. But systemd lacks start/stop service hooks (like in upstart) so it renders it pretty useless (or inconvenient in the least) in tasks like tracking service/system state.
    So either adding ENV{SYSTEMD_WANTS}+=bluetooth to udev rule or create a pure systemd service/target which will be dependent on device and service and will do proper initialization/checks - smth like
    [Unit]
    Description=Bluetooth power keeper
    Requires=sys-subsystem-bluetooth-devices-%i.device bluetooth.service
    PartOf=sys-subsystem-bluetooth-devices-%i.device
    After=bluetooth.service sys-subsystem-bluetooth-devices-%i.device suspend.target
    Conflicts=shutdown.target systemd-sleep.service
    [Service]
    Type=oneshot
    RemainAfterExit=yes
    ExecStart=/usr/bin/dbus-send --system --type=method_call --dest=org.bluez /org/bluez/%I org.freedesktop.DBus.Properties.Set string:org.bluez.Adapter1 string:Powered variant:boolean:true
    ExecStop=/usr/bin/dbus-send --system --type=method_call --dest=org.bluez /org/bluez/%I org.freedesktop.DBus.Properties.Set string:org.bluez.Adapter1 string:Powered variant:boolean:false
    [Install]
    WantedBy=bluetooth.target
    But most probably you would want to reset hci state after sleep - otherwise bluez5 just becomes useless memory stuffing. And systemd is useless for that, unless you write a separate service for each state transition with own weird set of targets... *sigh* So back to the old school - pm-utils/acpid hacks... was it worth it?

  • [Solved] Running mpd as user mpd with systemd without using mpd.conf

    Maybe this is tivial, but I searched about an hour without any results. I want to run mpd as user mpd. I cant use the mpd config file since mpd set the UID and GID explicitely resulting in mpd not having the necessary supplementary groups to access the locally shared music on my pc. Well I tried to run mpd with systemd by
    # systemctl start mpd
    and  the systemd contains the user mpd
    $ cat /etc/systemd/system/default.target.wants/mpd.service
    [Unit]
    Description=Music Player Daemon
    After=network.target sound.target
    [Service]
    User=mpd
    ExecStart=/usr/bin/mpd --no-daemon
    # allow MPD to use real-time priority 50
    LimitRTPRIO=50
    LimitRTTIME=-1
    # move MPD to a top-level cgroup, as real-time budget assignment fails
    # in cgroup /system/mpd.service, because /system has a zero real-time
    # budget; see
    # http://www.freedesktop.org/wiki/Software/systemd/MyServiceCantGetRealtime/
    ControlGroup=cpu:/mpd
    # assign a real-time budget
    ControlGroupAttribute=cpu.rt_runtime_us 500000
    [Install]
    WantedBy=default.target
    but it did not run as mpd.
    Well how can I run mpd as mpd? Is there a way to do it like with dropbox: dropbox@<user>.service
    Last edited by manuelschneid3r (2015-03-25 12:52:52)

    Glad you solved it. Was just typing a response and I'll still add two remarks:
    The ps|grep output showed that you run grep as root, not mpd itself (which won't have a space in the command -- the second time it only worked because the mpd group is preceded by a space).
    It sounds like it took you a while to find the drop-in configuration snippet in the mpd.service.d directory. These drop-in are shown in `systemctl status`, which is something you'd normally check in situations like these, and that might help to discover them more quickly.
    Last edited by Raynman (2015-03-25 12:58:36)

  • [SOLVED] [no] Problem [at all] with NTFS after switch to systemd

    Hi.
    I've recently switched to systemd (thanks for this great Wiki page!). All is right except automount of NFTS partions. In old config, I don't have any entry in fstab, but there is a rule for udev:
    KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"
    # Import FS infos
    IMPORT{program}="/sbin/blkid -o udev -p %N"
    # Get a label if present, otherwise specify one
    ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
    ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"
    # Global mount options
    ACTION=="add", ENV{mount_options}="relatime"
    # Filesystem-specific mount options
    #ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"
    ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,uid=fran,umask=000"
    # Mount the device
    #ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"
    ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -t ntfs-3g -o $env{mount_options} /dev/%k /media/%E{dir_name}"
    # Clean up after removal
    ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"
    # Exit
    LABEL="media_by_label_auto_mount_end"
    I think this rule should work with systemd. It seems to work, because:
    [root@HermesT rules.d]# systemctl list-units | grep 'media'
    media-Almacen.mount loaded active mounted /media/Almacen
    media-COMPAQ.mount loaded active mounted /media/COMPAQ
    media-SYSTEM.mount loaded active mounted /media/SYSTEM
    But:
    [root@HermesT media]# ls
    ls: cannot access COMPAQ: Transport endpoint is not connected
    ls: cannot access Almacen: Transport endpoint is not connected
    ls: cannot access SYSTEM: Transport endpoint is not connected
    Almacen COMPAQ MIO SYSTEM almacen hdusb usbhd-sda3 usbhd-sda4 usbhd-sdb1 usbhd-sdb2 usbhd-sdb5 usbhd-sdb6 usbhd-sdc1 usbhd-sdc2 usbhd-sdc5 usbhd-sdc6
    ¿some ideas?
    Thanks.
    Last edited by HermesT (2012-10-27 20:20:41)

    Thanks aking9:
    It seems there is no difference whether  fstab entry (a very old one, comented a long time ago) is active or not. None of both below helps to solve it.
    /dev/sda5 /media/Almacen ntfs-3g defaults,users,umask=002 0 0
    #/dev/sda5 /media/Almacen ntfs-3g defaults,users,locale=es_ES.UTF-8,umask=002 0 0
    Despite of great work done by Arch team, systemd is an "esoteric" world for me.
    Where can I now configure such thing?
    Added:
    journalctl log for ntfs-3g.
    First, fstab with locale (deprecated?). Second fstab with nls. Third, no fstab entry:
    Oct 26 18:30:04 HermesT ntfs-3g[700]: Unmounting /dev/sda5 (Almacen)
    Oct 26 18:30:31 HermesT ntfs-3g[225]: Version 2012.1.15 external FUSE 29
    Oct 26 18:30:31 HermesT ntfs-3g[225]: Mounted /dev/sda5 (Read-Write, label "Almacen", NTFS 3.1)
    Oct 26 18:30:31 HermesT ntfs-3g[225]: Cmdline options: rw,noexec,nosuid,nodev,locale=es_ES.UTF-8,umask=002,users
    Oct 26 18:30:31 HermesT ntfs-3g[225]: Mount options: rw,noexec,nosuid,nodev,users,allow_other,nonempty,relatime,fsname=/dev/sda5,blkdev,blksize=4096,default_permissions
    Oct 26 18:30:31 HermesT ntfs-3g[225]: Global ownership and permissions enforced, configuration type 7
    Oct 26 19:10:41 HermesT ntfs-3g[225]: Unmounting /dev/sda5 (Almacen)
    Oct 26 19:57:45 HermesT ntfs-3g[229]: [101B blob data]
    Oct 26 20:06:53 HermesT ntfs-3g[229]: Unmounting /dev/sda5 (Almacen)
    Oct 26 20:07:15 HermesT ntfs-3g[279]: Version 2012.1.15 external FUSE 29
    Oct 26 20:07:15 HermesT ntfs-3g[279]: Mounted /dev/sda5 (Read-Write, label "Almacen", NTFS 3.1)
    Oct 26 20:07:15 HermesT ntfs-3g[279]: Cmdline options: rw,noexec,nosuid,nodev,nls=utf8,umask=002,users
    Oct 26 20:07:15 HermesT ntfs-3g[279]: Mount options: rw,noexec,nosuid,nodev,nls=utf8,users,allow_other,nonempty,relatime,fsname=/dev/sda5,blkdev,blksize=4096,default_permissions
    Oct 26 20:07:15 HermesT ntfs-3g[279]: Global ownership and permissions enforced, configuration type 7
    Oct 26 20:08:37 HermesT ntfs-3g[279]: [101B blob data]
    Oct 26 20:24:30 HermesT ntfs-3g[279]: Unmounting /dev/sda5 (Almacen)
    Oct 26 20:26:05 HermesT ntfs-3g[795]: Version 2012.1.15 external FUSE 29
    Oct 26 20:26:05 HermesT ntfs-3g[795]: Mounted /dev/sda5 (Read-Write, label "Almacen", NTFS 3.1)
    Oct 26 20:26:05 HermesT ntfs-3g[795]: Cmdline options: rw,nodev,nosuid,uid=1002,gid=100,dmask=0077,fmask=0177,uhelper=udisks
    Oct 26 20:26:05 HermesT ntfs-3g[795]: Mount options: rw,nodev,nosuid,uhelper=udisks,allow_other,nonempty,relatime,fsname=/dev/sda5,blkdev,blksize=4096,default_permissions
    Oct 26 20:26:05 HermesT ntfs-3g[795]: Global ownership and permissions enforced, configuration type 7
    None of them solved the problem.
    Last edited by HermesT (2012-10-26 18:58:02)

Maybe you are looking for

  • MPEG4 video from imovie is sluggish and audio out of sync

    Hi y'all, I am new to this. So I need some hand holding here. I am working with video that was exported in MPEG4 video from imovie on a mac. The Camera I used is a Sony FX7 HD camera with SD tape. So Now I am trying to edit the video using Premiere P

  • How do I change the color of text in iTunes store?

    I can't read the prices!! This is in the just-released iTunes version 11.0.

  • Creating images and automation

    Hello, I wanted to automate the creation of montages for my work.  They work by having a black background with four numbered images per page.  We have multiple pages and the image numbers increase.   Ex:  Page 1 - images 1-4; Page 2 - Images 4-8; et 

  • Query Caused no record

    dear all I have database block with two list items. I am populating that list from record group. it is ok. one in country and second is city when i try to query record it is not. frm-40350 query caused no records to be retrieved frm-40301 query cause

  • 2 iphones, 1 itunes/laptop

    I have an iphone & itunes account on our laptop, my wife just got an iphone. Can i "share" my itunes account or is there a way to set her up a seperate account, we only have one laptop with itunes installed? Thanks for any advice.