Announcement

Collapse
No announcement yet.

Weird Power Manager problems

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Weird Power Manager problems

    If I set my laptop to sleep on lid close, everything goes haywire. On waking, it won't connect to wifi or even show the connections window. Sometimes I can't even get the main menu to come up. If it does and I open an app, it might do nothing or it might open the app window but it's filled with my desktop background. Sometimes there are other weird graphical glitches, too. I can't reboot from this state. If I try, it hangs on the Kubuntu splash screen. If I shut down from this state with REISUO (because it won't shut down proplerly, either) I can only boot from bios menu. If I try to suspend from the start menu and not by closing the lid, I get things like this:
    Freezing of tasks failed after 20.12 seconds (12 tasks refusing to freeze, qu-busy
    then it will automatically come back to the desktop in the above state without any input from me. If I uncheck everything in power management and never use suspend, everything seems to work properly again on reboot.

    That's not very convenient for a laptop, though.

    Lenovo Z70 8G ram, Nvidia GeForce 840M using the Nvidia 390 drivers

    #2
    The swap partition (or file) has to be as big or bigger than your total RAM. Is that the case?

    If the battery totally discharges while in the sleep mode problems like what you’ve mentioned can also occur. That is why I wouldn’t use the sleep mode without the power cord being plugged in.

    The time it takes to get to a desktop from a cold boot is so trivial I set my laptop to power down when I close the lid or the battery power drops below 5%.

    Some laptops, and some models within a brand, don’t react favorably to sleeping.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      I usually dual boot so install manually but this time I told it to just use the default full drive install, thinking it would set up the swap file itself, but looking at the partition manager now I don't even see a partition labeled swap. Shouldn't the default install create a swap partition? I had no idea it wouldn't and it didn't ask about one or give me a chance to make one myself. There was one on the drive already from a previous manual install and that is gone and looks like it didn't create one at all. Is that normal? I've never had it happen before.

      Code:
      Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 4096 bytes
      I/O size (minimum/optimal): 4096 bytes / 4096 bytes
      Disklabel type: gpt
      Disk identifier: 223D5212-8EC0-4BF7-9DEE-E2DAC60680E5
      
      Device       Start        End    Sectors  Size Type
      /dev/sda1     2048    1050623    1048576  512M EFI System
      /dev/sda2  1050624 1953523711 1952473088  931G Linux filesystem
      My power cord has been plugged in constantly since install, and usually stays plugged in, so the battery hasn't been discharging.

      Comment


        #4
        You will have to boot from a LiveUSD and then umount the HD in your laptop, if it got automatically mounted.

        Then locate the KDE Partition Manager in the System menu and run it.
        Select the HD from the choices of mediums. Once selected and highlighted in the right panel then “Resize” option can be selected. If it is grayed out that means that the HD is mounted. Umount it and refresh left panel.

        With the Kubuntu partition highlighted and selected left click on the “Resize” option. Free up enough space to Exceed your RAM size by 10%
        Click the apply button. The partition manager will move any software in the area to be shrunk to the area which will remain. When that operation is complete select the newly created free space and configure it to be a swap file and click the apply button. When it is done close the partition app and shutdown the LiveUSB and remove it.
        Reboot.
        Now the sleep function should work.
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          Thanks, I'll do that when I get home this evening. Is that the way the default install is supposed to work? Not puttiing a swap partition? Because I can't see why anyone would choose it over the manual partioning, if so. I thought it was supposed to be the easy choice that set all that up for you.

          Comment


            #6
            A swap partition is no longer created by the default installation. A swap file is used instead.

            Looking at the output of fdisk is insufficient to determine if you have swap enabled regardless of your setup.

            The only way I know of to determine if you have swap available and that's it is in fact enabled is to open a terminal and type:

            swapon

            This should return a result showing the location of swap (whether a partition or file) and the size, amount currently used, and priority of your swap(s). You can also find out the file name and location or whether or not you have a swap partition in use by reading the /etc/fstab file and looking for the swap mount entry.

            Please Read Me

            Comment


              #7
              Also, since you mentioned the installer, I agree the lack of at least having an option (like a checkbox) to have the installer create a swap partition is a huge oversight. Especially if you select btrfs as your root filesystem. In that case, a swap partition is absolutely mandatory and this condition has been reported as a bug. Manual partitioning is not difficult, but unless you are already aware that Ubiquity (the installer) no longer creates a swap partition without guidance you can be caught unaware as you were.

              Frankly, Ubiquity has always had more than it's share of issues over the 9 years I've been using Kubuntu. IMO, it's high time either we switch to Calamares or the priority of Ubiquity and it's quality and functionality be higher up the list. What good is a great distro with the best DE out there if you have to fumble through installation?

              To put a finer point on it: I am frustrated when a developer makes a poor decision without input from users and then when problems occurs, either drags their feet with the fix or simply refuses to budge on the issue. While I understand it's their right to make determinations of a project they are responsible for, clearly (to me anyway) this changes smacks of a developer that simply decided to have the installer perform the way they prefer without any thought to the bigger picture - that others may not want the artificial limitations of their narrow viewpoint. Specifically to this issue: there is no discernible benefit to using a swap file over a partition and several reasons why a swap partition is a better default setting. The change was apparently made as a whim and for no other reason.
              Last edited by oshunluvr; Apr 22, 2018, 07:28 AM.

              Please Read Me

              Comment


                #8
                Originally posted by oshunluvr View Post
                A swap partition is no longer created by the default installation. A swap file is used instead.

                Looking at the output of fdisk is insufficient to determine if you have swap enabled regardless of your setup.

                The only way I know of to determine if you have swap available and that's it is in fact enabled is to open a terminal and type:

                swapon

                This should return a result showing the location of swap (whether a partition or file) and the size, amount currently used, and priority of your swap(s). You can also find out the file name and location or whether or not you have a swap partition in use by reading the /etc/fstab file and looking for the swap mount entry.
                Thanks! Swapon shows:
                Code:
                $ swapon
                NAME      TYPE SIZE USED PRIO
                /swapfile file   2G   0B   -2
                So, that's not big enough? I have 8G ram. Should I still create the partition the way GreyGeek described or will that be a problem if it is already using this swap file?

                Comment


                  #9
                  Originally posted by oshunluvr View Post
                  Also, since you mentioned the installer, I agree the lack of at least having an option (like a checkbox) to have the installer create a swap partition is a huge oversight. Especially if you select btrfs as your root filesystem. In that case, a swap partition is absolutely mandatory and this condition has been reported as a bug. Manual partitioning is not difficult, but unless you are already aware that Ubiquity (the installer) no longer creates a swap partition without guidance you can be caught unaware as you were.

                  Frankly, Ubiquity has always had more than it's share of issues over the 9 years I've been using Kubuntu. IMO, it's high time either we switch to Calamares or the priority of Ubiquity and it's quality and functionality be higher up the list. What good is a great distro with the best DE out there if you have to fumble through installation?

                  To put a finer point on it: I am frustrated when a developer makes a poor decision without input from users and then when problems occurs, either drags their feet with the fix or simply refuses to budge on the issue. While I understand it's their right to make determinations of a project they are responsible for, clearly (to me anyway) this changes smacks of a developer that simply decided to have the installer perform the way they prefer without any thought to the bigger picture - that others may not want the artificial limitations of their narrow viewpoint. Specifically to this issue: there is no discernible benefit to using a swap file over a partition and several reasons why a swap partition is a better default setting. The change was apparently made as a whim and for no other reason.
                  I've used Calamares on other distros and it is so much easier and clearer to use for the less geeky like me.

                  Comment


                    #10
                    A 2GB swap file is too small for 8GB of memory. The swap should be 8.8GB to give enough room to hold ALL of the memory contents.

                    And, to the best of my knowledge a swap file or partition is not necessary when using Btrfs. Btrfs does not use it even if you make it.

                    I haven’t used a swap file for over 5 years, and did not create one when I installed Btrfs 3 years ago.

                    As far as Calamares is concerned this is the first I’ve heard of it and I know nothing more about it than what I just read on its home page.

                    So, what do you have to do to use it?
                    Create a LiveUSB and install it from the repository or a ppa after you boot into the USB?
                    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                    – John F. Kennedy, February 26, 1962.

                    Comment


                      #11
                      Is there a way to increase the size of the existing swap file or do I still need to make a swap partition?

                      Comment


                        #12
                        https://support.rackspace.com/how-to...nux-swap-file/

                        To be clear when reading this post - either install fallocate and attempt to enlarge your swap or create a new one using dd.

                        PLEASE be sure you turn swap off before doing either. While it's unlikely that you'er using it at the moment, the only way to be sure is to turn it off while doing either of these commands.

                        sudo swapoff -a


                        The advantage of enlarging the current swapfile is you won't have to do anything else except turn swap back on. However, if you wanted to relocate your swapfile somewhere other than it's current location, creating a new one in the preferred location, deleting the old one, and then editing /etc/fstab, makes the most sense.
                        Last edited by oshunluvr; Apr 22, 2018, 07:43 AM.

                        Please Read Me

                        Comment


                          #13
                          Originally posted by GreyGeek View Post
                          A 2GB swap file is too small for 8GB of memory. The swap should be 8.8GB to give enough room to hold ALL of the memory contents.
                          And another reason why this is a failure of Ubiquity. Generally speaking, if you have 8GB of RAM, the primary reason - and maybe only reason - to have swap is to sleep or hibernate.

                          Please Read Me

                          Comment


                            #14
                            True.
                            For me, the time for a powerup from a cold boot is insignificant. If time is so important then one is money ahead to leave the box plugged in and on all the time
                            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                            – John F. Kennedy, February 26, 1962.

                            Comment


                              #15
                              Originally posted by oshunluvr View Post
                              https://support.rackspace.com/how-to...nux-swap-file/

                              To be clear when reading this post - either install fallocate and attempt to enlarge your swap or create a new one using dd.

                              PLEASE be sure you turn swap off before doing either. While it's unlikely that you'er using it at the moment, the only way to be sure is to turn it off while doing either of these commands.

                              sudo swapoff -a


                              The advantage of enlarging the current swapfile is you won't have to do anything else except turn swap back on. However, if you wanted to relocate your swapfile somewhere other than it's current location, creating a new one in the preferred location, deleting the old one, and then editing /etc/fstab, makes the most sense.
                              Thanks! I really appreciate the help.

                              Comment

                              Working...
                              X