Announcement

Collapse
No announcement yet.

Systemd 203 Is A Good Release, Brings New Features

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by Nuc!eoN View Post
    @eric: SLiM for instance, is still seriously broken.
    Hmm? I'm using SLiM on my HTPC, which is running Gentoo, and using systemd (even if some Gentoo devs are very unfriendly towards it). And it's working fine for me. Allows choosing a session, logs in, parses files that launch X applications. Though I'm not sure about log out (since I only have one user on that machine) or shut down (I just use `sudo systemctl poweroff`, or most often a button on the remote that puts it in suspend-to-RAM).

    If anything, LightDM was causing me problems, as it didn't have integration with systemd last time I checked, and thus pulled all the obsolete login things with it when trying to install it.
    Last edited by GreatEmerald; 08 May 2013, 02:09 AM.

    Comment


    • #32
      Originally posted by Ericg View Post
      I will agree that auto-enabling services is less KISS and minimal than Arch usually does, but I kind of feel like its the same argument that got used about the new auto keyword in C++...
      It can destroy your PC. Seriously:
      I have one of those beautiful rotating mass-storages from that manufactoror that falls into sleep after 5 (?) seconds (WD Caviar Blue). I need to turn APM off (hdparm -B 255). With openrc I just had to adjust one value in one file in pm-utils and all was fine. Rebooting, resuming, unplugging AC-Adaptor - all went fine.
      Then a bug in KDEs powerdevil forced me to use systemd (powermanagement did not switch profile when (un)plugging AC while sleeping) - and my WD started to increase Load_Cycle_Count, again. As I had problems to correctly setup an own service to simply set the desired APM-value, I installed laptop-mode-tools, which ships a service file. But configuring was hell - instead of asking me to simply enter a value I want to set for APM there are so many settings, I just did not know how it would end up (every value lower then 255 will burn up my hdd).
      So I ended up with an own service file (there is no After=Resume - it's After=suspend - intuitive, isn't it?). With one of the recent systemd-updates, I automatically got APM_level=1 on battery, again - wtf?!? My service was running, working, ... I looked further. the pm-utils-settings were fine, too (but not used). Then I remembered I still had laptop-mode-tools installed. But the service was neither running nor active - just off.
      After searching and testing I simply uninstalled laptop-mode-tools - and the issue was solved.

      laptop-mode-tools was started (or just used...) automatically and systemd did NOT tell me about it. It took me hours to initially fix my HDD and fixing it after systemd automatics. I will probably never get that time back by the faster boot speed of systemd

      I, and LP and Kai
      "Der Esel nennt sich immer zuerst" my mother told me :P

      Comment


      • #33
        Originally posted by Ericg View Post
        Hey, stqn, I meant to ask you this earlier.... why aren't you using fstab for the sshfs mount? It would let you do _netdev (and not have to use that slightly-hackish unit file) and if you didnt want it mounted automatically then adding noauto should (in theory) let you keep the benefits of _netdev without it being done 24/7
        I don?t know what to answer? It?s working now and I wasted way too many hours on this. I don?t see how I could not use noauto, since network is probably not up when the disks are mounted, and someone said in this thread that _nevdev in fstab didn?t work. systemd should just not freeze forever trying to unmount a volume that is not mounted anymore. I?m looking for a distribution that doesn?t use systemd but it?s hard to find something similar to Arch.

        Comment


        • #34
          Originally posted by stqn View Post
          I don?t know what to answer? It?s working now and I wasted way too many hours on this. I don?t see how I could not use noauto, since network is probably not up when the disks are mounted, and someone said in this thread that _nevdev in fstab didn?t work. systemd should just not freeze forever trying to unmount a volume that is not mounted anymore. I?m looking for a distribution that doesn?t use systemd but it?s hard to find something similar to Arch.
          You can test if _netdev gets recognized for fstab mounts like this:

          $ systemctl show path-of-your-mount.mount | grep network

          It should yield some output similar to this:

          Wants=network-online.target
          After=remote-fs-pre.target network.target network-online.target systemd-journald.socket -.mount

          Those network* rules must be present when _netdev is specified.

          An example taken from my fstab:

          root@cerberus:/ /mnt/cerberus fuse.sshfs _netdev,reconnect,x-systemd.device-timeout=5s,allow_other

          This is an Arch Linux machine as well, systemd-202-2.

          Comment


          • #35
            Originally posted by stqn View Post
            I don?t know what to answer? It?s working now and I wasted way too many hours on this. I don?t see how I could not use noauto, since network is probably not up when the disks are mounted, and someone said in this thread that _nevdev in fstab didn?t work. systemd should just not freeze forever trying to unmount a volume that is not mounted anymore. I?m looking for a distribution that doesn?t use systemd but it?s hard to find something similar to Arch.
            Well its not that systemd is hanging trying to unmount it, its because the process (as far as systemd knows) is a zombie. Systemd has a built in time-out of I think 300 seconds for any service that fails to respond before it just force kills the operation and moves on because of situations like that.
            All opinions are my own not those of my employer if you know who they are.

            Comment


            • #36
              Originally posted by schmalzler View Post
              It can destroy your PC. Seriously:
              I have one of those beautiful rotating mass-storages from that manufactoror that falls into sleep after 5 (?) seconds (WD Caviar Blue). I need to turn APM off (hdparm -B 255). With openrc I just had to adjust one value in one file in pm-utils and all was fine. Rebooting, resuming, unplugging AC-Adaptor - all went fine.
              Then a bug in KDEs powerdevil forced me to use systemd (powermanagement did not switch profile when (un)plugging AC while sleeping) - and my WD started to increase Load_Cycle_Count, again. As I had problems to correctly setup an own service to simply set the desired APM-value, I installed laptop-mode-tools, which ships a service file. But configuring was hell - instead of asking me to simply enter a value I want to set for APM there are so many settings, I just did not know how it would end up (every value lower then 255 will burn up my hdd).
              So I ended up with an own service file (there is no After=Resume - it's After=suspend - intuitive, isn't it?). With one of the recent systemd-updates, I automatically got APM_level=1 on battery, again - wtf?!? My service was running, working, ... I looked further. the pm-utils-settings were fine, too (but not used). Then I remembered I still had laptop-mode-tools installed. But the service was neither running nor active - just off.
              After searching and testing I simply uninstalled laptop-mode-tools - and the issue was solved.

              laptop-mode-tools was started (or just used...) automatically and systemd did NOT tell me about it. It took me hours to initially fix my HDD and fixing it after systemd automatics. I will probably never get that time back by the faster boot speed of systemd


              "Der Esel nennt sich immer zuerst" my mother told me :P

              Few points...

              1) Well, yeah, there's no After=Resume because im 90% sure that there is no "Resume.target" in /usr/lib/systemd/system. You have to look at the targets listed and read the documentation in order to be able to write correct service files.
              2) if you remove "quiet" from your kernel line, assuming you dont use plymouth, it will print what services are being started on boot so you could've seen laptop-mode-tools
              3)Regarding the systemd update. Did you edit the laptop-mode-tools service file? Or dump the service file in /usr/lib/systemd/system? If you edited the service file, it would've been replaced by the default service file the next time laptop-mode-tools got an update. If you dropped it in /usr/lib/systemd/system thats just incorrect to begin with and who knows what happened. Custom or edited services files belong under /etc/ because they override /usr/
              4) You've got buddy or broken hardware, that was buggy or broken from the get-go, dont blame systemd for your manufacture's hardware. Personally, i would've returned it.
              All opinions are my own not those of my employer if you know who they are.

              Comment


              • #37
                Originally posted by Ericg View Post
                Few points...

                1) Well, yeah, there's no After=Resume because im 90% sure that there is no "Resume.target" in /usr/lib/systemd/system. You have to look at the targets listed and read the documentation in order to be able to write correct service files.
                2) if you remove "quiet" from your kernel line, assuming you dont use plymouth, it will print what services are being started on boot so you could've seen laptop-mode-tools
                3)Regarding the systemd update. Did you edit the laptop-mode-tools service file? Or dump the service file in /usr/lib/systemd/system? If you edited the service file, it would've been replaced by the default service file the next time laptop-mode-tools got an update. If you dropped it in /usr/lib/systemd/system thats just incorrect to begin with and who knows what happened. Custom or edited services files belong under /etc/ because they override /usr/
                4) You've got buddy or broken hardware, that was buggy or broken from the get-go, dont blame systemd for your manufacture's hardware. Personally, i would've returned it.
                1) Yeah, RTFM... I did it and even the manual does not say that if I would run a service after Resume I need to run it After suspend.target. I found it by accident reading wikis on other systemd-related stuff. Anything but intuitive...
                2) No plymouth, no quiet - verbose output. which is quite a lot, so many messages don't show up when switching back to TTY1. And as I said I did not expect it. I just realised after uninstalling laptop-mode that it somehow interferd. And I won't install it again to see f there was a message.
                3) No, I did not edit anything. Just started reading the config files and decided not to use laptop-mode.
                4) The hardware is NOT buggy/broken. It just does not play well with linux. Suse even has an own package to fix those HDDs (and that are quite a lot!) - storage-fixup. And returning the disk is no option. It already was in the laptop, I used it for 2 months before I noticed the issue. Noone will take back that HDD...

                Comment


                • #38
                  Originally posted by schmalzler View Post
                  1) Yeah, RTFM... I did it and even the manual does not say that if I would run a service after Resume I need to run it After suspend.target. I found it by accident reading wikis on other systemd-related stuff. Anything but intuitive...
                  2) No plymouth, no quiet - verbose output. which is quite a lot, so many messages don't show up when switching back to TTY1. And as I said I did not expect it. I just realised after uninstalling laptop-mode that it somehow interferd. And I won't install it again to see f there was a message.
                  3) No, I did not edit anything. Just started reading the config files and decided not to use laptop-mode.
                  4) The hardware is NOT buggy/broken. It just does not play well with linux. Suse even has an own package to fix those HDDs (and that are quite a lot!) - storage-fixup. And returning the disk is no option. It already was in the laptop, I used it for 2 months before I noticed the issue. Noone will take back that HDD...
                  1) Really wasn't meant as "RTFM" Which i personally see as unhelpful, but to a certain extent its true. Thats the point of "targets" they're continuous. When the target ends, it means the opposite condition has arrived. Suspend.target or sleep.target means that while its active, the laptop is asleep. And when it ends, then run all the After=sleep.target. Network.target means "While the network is up and active." I'm glad you were able to figure it out, and im not saying systemd DOESNT have a bit of a learning curve, but the documentation is there so that the learning curve can be handled.

                  2) If you still want power management, but maybe with a simpler interface / config file, check TLP.
                  All opinions are my own not those of my employer if you know who they are.

                  Comment


                  • #39
                    @Ericg:
                    1) It is sort of logical after you know about it. But "Resume" is such common term for the state "After suspend", I absolutely expected that.
                    2) I don't need powermanagement for my disk Everything just works now (again). But thx for your tip.

                    Comment


                    • #40
                      Originally posted by schmalzler View Post
                      @Ericg:
                      1) It is sort of logical after you know about it. But "Resume" is such common term for the state "After suspend", I absolutely expected that.
                      2) I don't need powermanagement for my disk Everything just works now (again). But thx for your tip.
                      Hey, Schmalzler, wasn't this the command you needed to run?

                      hdparm -B 254

                      I was up on the Arch Wiki as I was re-installing it on my laptop and I found this section: https://wiki.archlinux.org/index.php...n_down_problem

                      Documented here

                      To prevent your laptop hard drive from spinning down too often (result of too aggressive APM defaults) do the following:

                      Add the following to /etc/rc.local

                      Code:
                      hdparm -B 254 /dev/sdX where X is your hard drive device
                      If you are using Systemd:

                      Add the following to /etc/udev/rules.d/75-hdparm.rules

                      Code:
                      ACTION=="add", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", RUN+="/sbin/hdparm -B 254 /dev/$kernel"
                      You can also set it to 255 to completely disable spinning down. You may wish to set a lower value if you move your laptop around as lower values park the heads more often and reduce the chance of damage to your hard disk while it is being moved. If you do not move your laptop at all when you are using it, then 255 or 254 is probably best. If you do, then you might want to try a lower value. A value like 128 might be a good middle-ground.

                      Add the following to /etc/pm/sleep.d/50-hdparm_pm

                      Code:
                      #!/bin/sh
                       
                      if [ -n "$1" ] && ([ "$1" = "resume" ] || [ "$1" = "thaw" ]); then
                      	hdparm -B 254 /dev/your-hard-drive > /dev/null
                      fi
                      and run chmod +x /etc/pm/sleep.d/50-hdparm_pm to make sure it resets after suspend. Again, you can change the value 254 as you see fit.

                      Now the APM level should be set for your hard drive.

                      For some laptops, the option -S to hdparm can also be relevant (sets the spindown time for the drive). Note that all these options can also be configured using the laptop-mode tools. This will allow you to set a high value when on AC and a lower value when you are running on battery power.
                      I know you did it with a systemd unit file, but the above is more platform agnostic since it just hooks into udev and pm-utils
                      All opinions are my own not those of my employer if you know who they are.

                      Comment

                      Working...
                      X