Lubuntu 14.04: how to avoid lock screen on closing laptop lid?











up vote
4
down vote

favorite












I upgraded my OS from Lubuntu 13.10 to Lubuntu 14.04 a few days ago, and now my screen locks when the lid is closed, while I want nothing to happen when lid is closed.



I have already set the right option in the Xfce power manager ("When laptop lid is closed: Nothing") and, as of https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1307545 and Closing laptop lid suspends Lubuntu, since upgrade , I tried editing /etc/systemd/logind.conf; but when I close the lid, the screen still locks and asks for a password. Note that this doesn't happen every time I close the screen; sometimes it stay closed for a few minutes and can be reopened without having been locked, and sometimes it locks as soon as I close the lid.



For reference, here's the content of my /etc/systemd/logind.conf:



#  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.
#
# See logind.conf(5) for details

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#Controllers=
#ResetControllers=cpu
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
LidSwitchIgnoreInhibited=no
#IdleAction=ignore
#IdleActionSec=30min


Is there's something wrong with what I'm doing? What can I do to be able to close the lid without anything happening?



EDIT: Possible pointers would be about what exactly happens when I close my lid; I tried investigating in that direction, but I don't know where to start. If a script or something is called on lid closing, I might even be content with modifying it to do nothing.










share|improve this question




























    up vote
    4
    down vote

    favorite












    I upgraded my OS from Lubuntu 13.10 to Lubuntu 14.04 a few days ago, and now my screen locks when the lid is closed, while I want nothing to happen when lid is closed.



    I have already set the right option in the Xfce power manager ("When laptop lid is closed: Nothing") and, as of https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1307545 and Closing laptop lid suspends Lubuntu, since upgrade , I tried editing /etc/systemd/logind.conf; but when I close the lid, the screen still locks and asks for a password. Note that this doesn't happen every time I close the screen; sometimes it stay closed for a few minutes and can be reopened without having been locked, and sometimes it locks as soon as I close the lid.



    For reference, here's the content of my /etc/systemd/logind.conf:



    #  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.
    #
    # See logind.conf(5) for details

    [Login]
    #NAutoVTs=6
    #ReserveVT=6
    #KillUserProcesses=no
    #KillOnlyUsers=
    #KillExcludeUsers=root
    #Controllers=
    #ResetControllers=cpu
    #InhibitDelayMaxSec=5
    #HandlePowerKey=poweroff
    #HandleSuspendKey=suspend
    #HandleHibernateKey=hibernate
    HandleLidSwitch=ignore
    #PowerKeyIgnoreInhibited=no
    #SuspendKeyIgnoreInhibited=no
    #HibernateKeyIgnoreInhibited=no
    LidSwitchIgnoreInhibited=no
    #IdleAction=ignore
    #IdleActionSec=30min


    Is there's something wrong with what I'm doing? What can I do to be able to close the lid without anything happening?



    EDIT: Possible pointers would be about what exactly happens when I close my lid; I tried investigating in that direction, but I don't know where to start. If a script or something is called on lid closing, I might even be content with modifying it to do nothing.










    share|improve this question


























      up vote
      4
      down vote

      favorite









      up vote
      4
      down vote

      favorite











      I upgraded my OS from Lubuntu 13.10 to Lubuntu 14.04 a few days ago, and now my screen locks when the lid is closed, while I want nothing to happen when lid is closed.



      I have already set the right option in the Xfce power manager ("When laptop lid is closed: Nothing") and, as of https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1307545 and Closing laptop lid suspends Lubuntu, since upgrade , I tried editing /etc/systemd/logind.conf; but when I close the lid, the screen still locks and asks for a password. Note that this doesn't happen every time I close the screen; sometimes it stay closed for a few minutes and can be reopened without having been locked, and sometimes it locks as soon as I close the lid.



      For reference, here's the content of my /etc/systemd/logind.conf:



      #  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.
      #
      # See logind.conf(5) for details

      [Login]
      #NAutoVTs=6
      #ReserveVT=6
      #KillUserProcesses=no
      #KillOnlyUsers=
      #KillExcludeUsers=root
      #Controllers=
      #ResetControllers=cpu
      #InhibitDelayMaxSec=5
      #HandlePowerKey=poweroff
      #HandleSuspendKey=suspend
      #HandleHibernateKey=hibernate
      HandleLidSwitch=ignore
      #PowerKeyIgnoreInhibited=no
      #SuspendKeyIgnoreInhibited=no
      #HibernateKeyIgnoreInhibited=no
      LidSwitchIgnoreInhibited=no
      #IdleAction=ignore
      #IdleActionSec=30min


      Is there's something wrong with what I'm doing? What can I do to be able to close the lid without anything happening?



      EDIT: Possible pointers would be about what exactly happens when I close my lid; I tried investigating in that direction, but I don't know where to start. If a script or something is called on lid closing, I might even be content with modifying it to do nothing.










      share|improve this question















      I upgraded my OS from Lubuntu 13.10 to Lubuntu 14.04 a few days ago, and now my screen locks when the lid is closed, while I want nothing to happen when lid is closed.



      I have already set the right option in the Xfce power manager ("When laptop lid is closed: Nothing") and, as of https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1307545 and Closing laptop lid suspends Lubuntu, since upgrade , I tried editing /etc/systemd/logind.conf; but when I close the lid, the screen still locks and asks for a password. Note that this doesn't happen every time I close the screen; sometimes it stay closed for a few minutes and can be reopened without having been locked, and sometimes it locks as soon as I close the lid.



      For reference, here's the content of my /etc/systemd/logind.conf:



      #  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.
      #
      # See logind.conf(5) for details

      [Login]
      #NAutoVTs=6
      #ReserveVT=6
      #KillUserProcesses=no
      #KillOnlyUsers=
      #KillExcludeUsers=root
      #Controllers=
      #ResetControllers=cpu
      #InhibitDelayMaxSec=5
      #HandlePowerKey=poweroff
      #HandleSuspendKey=suspend
      #HandleHibernateKey=hibernate
      HandleLidSwitch=ignore
      #PowerKeyIgnoreInhibited=no
      #SuspendKeyIgnoreInhibited=no
      #HibernateKeyIgnoreInhibited=no
      LidSwitchIgnoreInhibited=no
      #IdleAction=ignore
      #IdleActionSec=30min


      Is there's something wrong with what I'm doing? What can I do to be able to close the lid without anything happening?



      EDIT: Possible pointers would be about what exactly happens when I close my lid; I tried investigating in that direction, but I don't know where to start. If a script or something is called on lid closing, I might even be content with modifying it to do nothing.







      lubuntu laptop xfce lock-screen lid






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 13 '17 at 12:23









      Community

      1




      1










      asked Aug 29 '14 at 13:45









      gcali

      123116




      123116






















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          6
          down vote



          accepted










          You're on the right track with logind.conf, but you only need to change this line from the default configuration:



          HandleLidSwitch=ignore


          (i.e. you don't need LidSwitchIgnoreInhibited=no).



          In addition, you need to configure xfce4-power-manager to handle the lid switch. I found that the reliable way was to Quit it from the power manager icon menu before configuring it with



          $ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s true


          You'll then need to restart (unless there's another way to get logind to pick up its configuration, in which case I'd love to hear it!).



          After this, the lid switch should operate according to the settings in the power manager.



          I found this solution thanks to a comment on a bug linked by a helpful person in #xubuntu.



          Note that this breaks screen locking on suspend.






          share|improve this answer

















          • 1




            as for getting logind to read its config: $ restart systemd-logind
            – x29a
            Jun 9 '15 at 14:33










          • This is the right answer. I can't believe there is no other way to accomplish this in Xubuntu.
            – Ali
            Feb 13 '16 at 5:33










          • Since 15.04, sudo service systemd-logind restart to reload logind configuration. See askubuntu.com/a/372616
            – phils
            Dec 13 '16 at 4:28


















          up vote
          1
          down vote













          I solved uninstalling xfce4-power-manager and rebooting. It could work because systemd and xfce4-power-manager are in conflict






          share|improve this answer





















          • It works, but I'd prefer to keep xfce4-power-manager... I'm going to see if I can look in the matter a little further, otherwise yours is the best solution as far as I can see
            – gcali
            Sep 2 '14 at 13:53


















          up vote
          0
          down vote













          sudo /etc/UPower/UPower.conf



          change: ignorelid=false to ignorelid=true



          ctrl o (save/write)
          crlt W (exit



          no need for reboot-should work right away.



          Not sure what all that other stuff is...complicated for sure...



          Cheers






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f517581%2flubuntu-14-04-how-to-avoid-lock-screen-on-closing-laptop-lid%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            6
            down vote



            accepted










            You're on the right track with logind.conf, but you only need to change this line from the default configuration:



            HandleLidSwitch=ignore


            (i.e. you don't need LidSwitchIgnoreInhibited=no).



            In addition, you need to configure xfce4-power-manager to handle the lid switch. I found that the reliable way was to Quit it from the power manager icon menu before configuring it with



            $ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s true


            You'll then need to restart (unless there's another way to get logind to pick up its configuration, in which case I'd love to hear it!).



            After this, the lid switch should operate according to the settings in the power manager.



            I found this solution thanks to a comment on a bug linked by a helpful person in #xubuntu.



            Note that this breaks screen locking on suspend.






            share|improve this answer

















            • 1




              as for getting logind to read its config: $ restart systemd-logind
              – x29a
              Jun 9 '15 at 14:33










            • This is the right answer. I can't believe there is no other way to accomplish this in Xubuntu.
              – Ali
              Feb 13 '16 at 5:33










            • Since 15.04, sudo service systemd-logind restart to reload logind configuration. See askubuntu.com/a/372616
              – phils
              Dec 13 '16 at 4:28















            up vote
            6
            down vote



            accepted










            You're on the right track with logind.conf, but you only need to change this line from the default configuration:



            HandleLidSwitch=ignore


            (i.e. you don't need LidSwitchIgnoreInhibited=no).



            In addition, you need to configure xfce4-power-manager to handle the lid switch. I found that the reliable way was to Quit it from the power manager icon menu before configuring it with



            $ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s true


            You'll then need to restart (unless there's another way to get logind to pick up its configuration, in which case I'd love to hear it!).



            After this, the lid switch should operate according to the settings in the power manager.



            I found this solution thanks to a comment on a bug linked by a helpful person in #xubuntu.



            Note that this breaks screen locking on suspend.






            share|improve this answer

















            • 1




              as for getting logind to read its config: $ restart systemd-logind
              – x29a
              Jun 9 '15 at 14:33










            • This is the right answer. I can't believe there is no other way to accomplish this in Xubuntu.
              – Ali
              Feb 13 '16 at 5:33










            • Since 15.04, sudo service systemd-logind restart to reload logind configuration. See askubuntu.com/a/372616
              – phils
              Dec 13 '16 at 4:28













            up vote
            6
            down vote



            accepted







            up vote
            6
            down vote



            accepted






            You're on the right track with logind.conf, but you only need to change this line from the default configuration:



            HandleLidSwitch=ignore


            (i.e. you don't need LidSwitchIgnoreInhibited=no).



            In addition, you need to configure xfce4-power-manager to handle the lid switch. I found that the reliable way was to Quit it from the power manager icon menu before configuring it with



            $ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s true


            You'll then need to restart (unless there's another way to get logind to pick up its configuration, in which case I'd love to hear it!).



            After this, the lid switch should operate according to the settings in the power manager.



            I found this solution thanks to a comment on a bug linked by a helpful person in #xubuntu.



            Note that this breaks screen locking on suspend.






            share|improve this answer












            You're on the right track with logind.conf, but you only need to change this line from the default configuration:



            HandleLidSwitch=ignore


            (i.e. you don't need LidSwitchIgnoreInhibited=no).



            In addition, you need to configure xfce4-power-manager to handle the lid switch. I found that the reliable way was to Quit it from the power manager icon menu before configuring it with



            $ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s true


            You'll then need to restart (unless there's another way to get logind to pick up its configuration, in which case I'd love to hear it!).



            After this, the lid switch should operate according to the settings in the power manager.



            I found this solution thanks to a comment on a bug linked by a helpful person in #xubuntu.



            Note that this breaks screen locking on suspend.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Sep 5 '14 at 22:55









            threedaymonk

            21111




            21111








            • 1




              as for getting logind to read its config: $ restart systemd-logind
              – x29a
              Jun 9 '15 at 14:33










            • This is the right answer. I can't believe there is no other way to accomplish this in Xubuntu.
              – Ali
              Feb 13 '16 at 5:33










            • Since 15.04, sudo service systemd-logind restart to reload logind configuration. See askubuntu.com/a/372616
              – phils
              Dec 13 '16 at 4:28














            • 1




              as for getting logind to read its config: $ restart systemd-logind
              – x29a
              Jun 9 '15 at 14:33










            • This is the right answer. I can't believe there is no other way to accomplish this in Xubuntu.
              – Ali
              Feb 13 '16 at 5:33










            • Since 15.04, sudo service systemd-logind restart to reload logind configuration. See askubuntu.com/a/372616
              – phils
              Dec 13 '16 at 4:28








            1




            1




            as for getting logind to read its config: $ restart systemd-logind
            – x29a
            Jun 9 '15 at 14:33




            as for getting logind to read its config: $ restart systemd-logind
            – x29a
            Jun 9 '15 at 14:33












            This is the right answer. I can't believe there is no other way to accomplish this in Xubuntu.
            – Ali
            Feb 13 '16 at 5:33




            This is the right answer. I can't believe there is no other way to accomplish this in Xubuntu.
            – Ali
            Feb 13 '16 at 5:33












            Since 15.04, sudo service systemd-logind restart to reload logind configuration. See askubuntu.com/a/372616
            – phils
            Dec 13 '16 at 4:28




            Since 15.04, sudo service systemd-logind restart to reload logind configuration. See askubuntu.com/a/372616
            – phils
            Dec 13 '16 at 4:28












            up vote
            1
            down vote













            I solved uninstalling xfce4-power-manager and rebooting. It could work because systemd and xfce4-power-manager are in conflict






            share|improve this answer





















            • It works, but I'd prefer to keep xfce4-power-manager... I'm going to see if I can look in the matter a little further, otherwise yours is the best solution as far as I can see
              – gcali
              Sep 2 '14 at 13:53















            up vote
            1
            down vote













            I solved uninstalling xfce4-power-manager and rebooting. It could work because systemd and xfce4-power-manager are in conflict






            share|improve this answer





















            • It works, but I'd prefer to keep xfce4-power-manager... I'm going to see if I can look in the matter a little further, otherwise yours is the best solution as far as I can see
              – gcali
              Sep 2 '14 at 13:53













            up vote
            1
            down vote










            up vote
            1
            down vote









            I solved uninstalling xfce4-power-manager and rebooting. It could work because systemd and xfce4-power-manager are in conflict






            share|improve this answer












            I solved uninstalling xfce4-power-manager and rebooting. It could work because systemd and xfce4-power-manager are in conflict







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Sep 1 '14 at 9:11









            internetuser

            111




            111












            • It works, but I'd prefer to keep xfce4-power-manager... I'm going to see if I can look in the matter a little further, otherwise yours is the best solution as far as I can see
              – gcali
              Sep 2 '14 at 13:53


















            • It works, but I'd prefer to keep xfce4-power-manager... I'm going to see if I can look in the matter a little further, otherwise yours is the best solution as far as I can see
              – gcali
              Sep 2 '14 at 13:53
















            It works, but I'd prefer to keep xfce4-power-manager... I'm going to see if I can look in the matter a little further, otherwise yours is the best solution as far as I can see
            – gcali
            Sep 2 '14 at 13:53




            It works, but I'd prefer to keep xfce4-power-manager... I'm going to see if I can look in the matter a little further, otherwise yours is the best solution as far as I can see
            – gcali
            Sep 2 '14 at 13:53










            up vote
            0
            down vote













            sudo /etc/UPower/UPower.conf



            change: ignorelid=false to ignorelid=true



            ctrl o (save/write)
            crlt W (exit



            no need for reboot-should work right away.



            Not sure what all that other stuff is...complicated for sure...



            Cheers






            share|improve this answer

























              up vote
              0
              down vote













              sudo /etc/UPower/UPower.conf



              change: ignorelid=false to ignorelid=true



              ctrl o (save/write)
              crlt W (exit



              no need for reboot-should work right away.



              Not sure what all that other stuff is...complicated for sure...



              Cheers






              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                sudo /etc/UPower/UPower.conf



                change: ignorelid=false to ignorelid=true



                ctrl o (save/write)
                crlt W (exit



                no need for reboot-should work right away.



                Not sure what all that other stuff is...complicated for sure...



                Cheers






                share|improve this answer












                sudo /etc/UPower/UPower.conf



                change: ignorelid=false to ignorelid=true



                ctrl o (save/write)
                crlt W (exit



                no need for reboot-should work right away.



                Not sure what all that other stuff is...complicated for sure...



                Cheers







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 30 '17 at 17:54









                yodamin

                1




                1






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f517581%2flubuntu-14-04-how-to-avoid-lock-screen-on-closing-laptop-lid%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                    Mangá

                     ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕