Announcement

Collapse
No announcement yet.

Weird Power Manager problems

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

  • jlittle
    replied
    Originally posted by oshunluvr View Post
    .. maybe only reason - to have swap is to sleep or hibernate.
    A few years ago there was a recommendation to make the swap size the square root of RAM size, rounded up, maybe to a power of 2. I haven't been able to find where that formula came from other than "experience". These days I make it equal to my RAM size, just in case I want to hibernate. (That's rare, but if I want to keep what I'm doing without saving, and the cleaners are coming... they often unplug randomly, so my usual suspend is not good.)

    A post in an Ubuntu forum suggested that having a small swap might speed up booting, because the OS might waste time looking for swap, spinning up sundry drives. That sounds like it wouldn't apply to systemd.

    Regards, John Little

    Leave a comment:


  • LNXlady
    replied
    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.

    Leave a comment:


  • GreyGeek
    replied
    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

    Leave a comment:


  • oshunluvr
    replied
    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.

    Leave a comment:


  • oshunluvr
    replied
    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.

    Leave a comment:


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

    Leave a comment:


  • GreyGeek
    replied
    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?

    Leave a comment:


  • LNXlady
    replied
    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.

    Leave a comment:


  • LNXlady
    replied
    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?

    Leave a comment:


  • oshunluvr
    replied
    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.

    Leave a comment:


  • oshunluvr
    replied
    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.

    Leave a comment:


  • LNXlady
    replied
    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.

    Leave a comment:


  • GreyGeek
    replied
    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.

    Leave a comment:


  • LNXlady
    replied
    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.

    Leave a comment:


  • GreyGeek
    replied
    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.

    Leave a comment:

Users Viewing This Topic

Collapse

There are 0 users viewing this topic.

Working...
X