Black screen login

I am not sure this is where I shoudl put this, but I am now having trouble booting and shutting down.

I did do a few of the things listed link open blank session, so that might fix it but I am new enough that I do not know what I do not know and barely can get in after it happens. So I want to post what I see in terminal here.

First I did one command that has this at the top:

[    0.029880] PM: hibernation: Registered nosave memory: [mem 0xcb7b2000-0xcb7fffff]
[    0.029882] PM: hibernation: Registered nosave memory: [mem 0xccef8000-0xccffffff]
[    0.029884] PM: hibernation: Registered nosave memory: [mem 0xce3c1000-0xcefc0fff]
[    0.029885] PM: hibernation: Registered nosave memory: [mem 0xcefc1000-0xcf003fff]
[    0.029887] PM: hibernation: Registered nosave memory: [mem 0xcf2ca000-0xcf7effff]
[    0.029889] PM: hibernation: Registered nosave memory: [mem 0xcf800000-0xfebfffff]
[    0.029890] PM: hibernation: Registered nosave memory: [mem 0xfec00000-0xfec00fff]
[    0.029891] PM: hibernation: Registered nosave memory: [mem 0xfec01000-0xfecfffff]
[    0.029892] PM: hibernation: Registered nosave memory: [mem 0xfed00000-0xfed03fff]
[    0.029893] PM: hibernation: Registered nosave memory: [mem 0xfed04000-0xfed1bfff]
[    0.029893] PM: hibernation: Registered nosave memory: [mem 0xfed1c000-0xfed1ffff]
[    0.029894] PM: hibernation: Registered nosave memory: [mem 0xfed20000-0xfedfffff]
[    0.029895] PM: hibernation: Registered nosave memory: [mem 0xfee00000-0xfee00fff]
[    0.029896] PM: hibernation: Registered nosave memory: [mem 0xfee01000-0xffffffff]
[    0.029898] [mem 0xcf800000-0xfebfffff] available for PCI devices
[    0.029900] Booting paravirtualized kernel on bare hardware
[    0.029902] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370452778343963 ns
[    0.036412] setup_percpu: NR_CPUS:320 nr_cpumask_bits:8 nr_cpu_ids:8 nr_node_ids:1
[    0.037016] percpu: Embedded 66 pages/cpu s233472 r8192 d28672 u524288
[    0.037023] pcpu-alloc: s233472 r8192 d28672 u524288 alloc=1*2097152
[    0.037026] pcpu-alloc: [0] 0 1 2 3 [0] 4 5 6 7 
[    0.037048] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.11-x86_64 root=UUID=7533dbda-0310-4048-bf30-4effd60c8a69 rw quiet udev.log_priority=3
[    0.037123] Unknown kernel command line parameters "BOOT_IMAGE=/boot/vmlinuz-6.11-x86_64", will be passed to user space.
[    0.037132] random: crng init done
[    0.037998] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[    0.038465] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.038603] Fallback order for Node 0: 0 
[    0.038607] Built 1 zonelists, mobility grouping on.  Total pages: 2081596
[    0.038608] Policy zone: Normal
[    0.038898] mem auto-init: stack:all(zero), heap alloc:on, heap free:off
[    0.038908] software IO TLB: area num 8.
[    0.077473] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1
[    0.077506] Kernel/User page tables isolation: enabled
[    0.077547] ftrace: allocating 50840 entries in 199 pages
[    0.086289] ftrace: allocated 199 pages with 5 groups
[    0.086373] Dynamic Preempt: full
[    0.086431] rcu: Preemptible hierarchical RCU implementation.
[    0.086432] rcu:     RCU restricting CPUs from NR_CPUS=320 to nr_cpu_ids=8.
[    0.086433] rcu:     RCU priority boosting: priority 1 delay 500 ms.
[    0.086434]  Trampoline variant of Tasks RCU enabled.
[    0.086435]  Rude variant of Tasks RCU enabled.
[    0.086436]  Tracing variant of Tasks RCU enabled.

Now I will do the system info from this:
inxi --full --admin --filter --width

System:
  Kernel: 6.11.2-4-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.11-x86_64
    root=UUID=7533dbda-0310-4048-bf30-4effd60c8a69 rw quiet
    udev.log_priority=3
  Desktop: KDE Plasma v: 6.1.5 tk: Qt v: N/A info: frameworks v: 6.6.0
    wm: kwin_x11 vt: 2 dm: SDDM Distro: Manjaro base: Arch Linux
Machine:
  Type: Laptop System: Dell product: Precision M6700 v: 01
    serial: <superuser required> Chassis: type: 9 serial: <superuser required>
  Mobo: Dell model: 096J9P v: A00 serial: <superuser required>
    part-nu: Precision M6700 uuid: <superuser required> UEFI: Dell v: A16
    date: 10/13/2016
Battery:
  ID-1: BAT0 charge: 34.9 Wh (100.0%) condition: 34.9/98.2 Wh (35.5%)
    volts: 12.3 min: 11.1 model: Samsung SDI DELL 1C75X35 type: Li-ion
    serial: <filter> status: full
CPU:
  Info: model: Intel Core i7-3840QM bits: 64 type: MT MCP arch: Ivy Bridge
    gen: core 3 level: v2 built: 2012-15 process: Intel 22nm family: 6
    model-id: 0x3A (58) stepping: 9 microcode: 0x21
  Topology: cpus: 1x dies: 1 clusters: 4 cores: 4 threads: 8 tpc: 2
    smt: enabled cache: L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB
    desc: 4x256 KiB L3: 8 MiB desc: 1x8 MiB
  Speed (MHz): avg: 1200 min/max: 1200/3800 scaling: driver: intel_cpufreq
    governor: schedutil cores: 1: 1200 2: 1200 3: 1200 4: 1200 5: 1200 6: 1200
    7: 1200 8: 1200 bogomips: 44665
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
    vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Unknown: No mitigations
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines; IBPB: conditional; IBRS_FW;
    STIBP: conditional; RSB filling; PBRSB-eIBRS: Not affected; BHI: Not
    affected
  Type: srbds status: Vulnerable: No microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Heathrow XT [Radeon HD 7870M]
    vendor: Dell FirePro M6000 driver: radeon v: kernel alternate: amdgpu
    arch: GCN-1 code: Southern Islands process: TSMC 28nm built: 2011-20 pcie:
    gen: 3 speed: 8 GT/s lanes: 16 ports: active: LVDS-1
    empty: DP-1, DP-2, DP-3, VGA-1 bus-ID: 01:00.0 chip-ID: 1002:6825
    class-ID: 0300 temp: 55.0 C
  Device-2: Microdia Dell Integrated HD Webcam driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-1.5:4
    chip-ID: 0c45:643f class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.13 with: Xwayland v: 24.1.2
    compositor: kwin_x11 driver: X: loaded: radeon unloaded: modesetting
    alternate: fbdev,vesa dri: radeonsi gpu: radeon display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: LVDS-1 mapped: LVDS model: ChiMei InnoLux 0x1720 built: 2011
    res: 1920x1080 hz: 60 dpi: 128 gamma: 1.2 size: 382x215mm (15.04x8.46")
    diag: 438mm (17.3") ratio: 16:9 modes: max: 1920x1080 min: 640x480
  API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
    device: 1 drv: swrast gbm: drv: kms_swrast surfaceless: drv: radeonsi x11:
    drv: radeonsi inactive: wayland
  API: OpenGL v: 4.5 vendor: amd mesa v: 24.2.4-arch1.0.1 glx-v: 1.4
    direct-render: yes renderer: VERDE (radeonsi LLVM 18.1.8 DRM 2.50
    6.11.2-4-MANJARO) device-ID: 1002:6825 memory: 1.95 GiB unified: no
  API: Vulkan Message: No Vulkan data available.
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Dell
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1e20
    class-ID: 0403
  Device-2: Advanced Micro Devices [AMD/ATI] Oland/Hainan/Cape
    Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series] vendor: Dell
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 1002:aab0 class-ID: 0403
  API: ALSA v: k6.11.2-4-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.2.5 status: off with: pipewire-media-session
    status: active tools: pw-cli
  Server-3: PulseAudio v: 17.0 status: active with: pulseaudio-alsa
    type: plugin tools: pacat,pactl
Network:
  Device-1: Intel 82579LM Gigabit Network vendor: Dell driver: e1000e v: kernel
    port: f040 bus-ID: 00:19.0 chip-ID: 8086:1502 class-ID: 0200
  IF: eno1 state: down mac: <filter>
  Device-2: Intel Centrino Ultimate-N 6300 driver: iwlwifi v: kernel pcie:
    gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 03:00.0 chip-ID: 8086:422b
    class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
  Device-3: Dell Wireless 5630 (EVDO-HSPA) Mobile Broadband Mini-Card
    driver: qcserial,qmi_wwan type: USB rev: 2.0 speed: 480 Mb/s lanes: 1
    mode: 2.0 bus-ID: 2-1.6:3 chip-ID: 413c:8194 class-ID: 0000
  IF: wwp0s29u1u6 state: down mac: <filter>
  Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
Bluetooth:
  Device-1: Dell BCM20702A0 Bluetooth Module driver: btusb v: 0.8 type: USB
    rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-1.4:3 chip-ID: 413c:8197
    class-ID: fe01 serial: <filter>
  Report: btmgmt ID: hci0 rfk-id: 4 state: up address: <filter> bt-v: 4.0
    lmp-v: 6 status: discoverable: no pairing: no class-ID: 6c010c
Drives:
  Local Storage: total: 465.76 GiB used: 83.06 GiB (17.8%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 870 EVO 500GB
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 1B6Q scheme: GPT
Partition:
  ID-1: / raw-size: 465.46 GiB size: 457.09 GiB (98.20%)
    used: 83.06 GiB (18.2%) fs: ext4 dev: /dev/sda2 maj-min: 8:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 312 KiB (0.1%) fs: vfat dev: /dev/sda1 maj-min: 8:1
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 53.0 C mobo: 42.0 C sodimm: SODIMM C gpu: radeon
    temp: 55.0 C
  Fan Speeds (rpm): cpu: 0
Info:
  Memory: total: 8 GiB available: 7.7 GiB used: 2.23 GiB (29.0%)
  Processes: 240 Power: uptime: 43m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 3.06 GiB services: org_kde_powerdevil,upowerd
    Init: systemd v: 256 default: graphical tool: systemctl
  Packages: pm: dpkg pkgs: 0 tools: apt,apt-get pm: pacman pkgs: 1505
    libs: 396 tools: pamac pm: flatpak pkgs: 0 Compilers: clang: 18.1.8
    gcc: 14.2.1 Shell: Zsh v: 5.9 default: Bash v: 5.2.37 running-in: konsole
    inxi: 3.3.36

I saw where I could MAYBE edit some systemd things, but that is beyond my ability right now. I can wait for the OS to be fixed through the next update, but everytime I come back to the computer after the screen goes blank, I cannot login because the graphical username system seems to NOT recognize my PW.
So I try to go to a terminal, but that doesnā€™t seem to respond.
I eventually hold the powerbutton down but then I have to go through a lot of fsck fixes which makes me nervous.

So is there some better ways of keeping this from killing my system until a fix happens?

Thank you for a great OS and good support. I will try to get back here to see feedback in the next days. Thank you!

Please donā€™t hi-hack other Topics, create your own Topic, if you canā€™t find the right answer.

Also post your Terminal output as code: crlt+e oder </> after you marked the output.

Edit:
@soundofthunder
This posting above was/is moved from Moderation now.
Thanks to mods.

1 Like

Side note:

should be replaced by amdgpu

What display manager theme are you using? If itā€™s not Breeze, switch to Breeze at least temporary.

I thought they were the OPā€¦ Ah, I seeā€¦
These posts have already been moved to a new thread.

You have no swap space configured.
This might be contributing to your issue.

Initially, I thought the inference would be obvious, however I suppose some further clarification might be warranted as the OP seems likely to be a newer Linux user.

@RatherFly

Basically, your system is trying to hibernate or suspend to disk but the data cannot be saved to swap becauseā€¦ there is no swap configured.

The data to be saved from RAM has nowhere to go, so the system fails to sleep; the black screen is a consequence of that, although other factors might also be in play.

Create a sufficiently sized swap partition, and configure it properly, and that issue should be solved. Please see:

I hope this helps.

Cheers.

1 Like

Its always worth to look first in the Announcement Topic at the second post (few days after release):

The way you describe your problem, it might be related to Energy savings.

But @soundofthunder suggestion to add a swap, could already help here.

This graphical login system called SDDM and KDE has widespread problem right now. That required some work arounds at the moment, hopefully we see some fixes.

But If you face this issue, when your system isnā€™t in hibernating state, then it might be this here:

Since you still a new Linux as you wrote above, i recommend that using Timeshift on a external harddrive (rsync) and activating Reisub, gives you also additional safetynet around Linux.

I donā€™t think that will end well.

2 Likes

Indeed, as these are for Debian and Ubuntu systems, not Arch-based which use Pacman, etc.!

How is that even possible?

1 Like

My thoughts too. Some sort of frankensystem, certainly not to be expected on a regular one.

Edited to add:
APT is available in the repos! pamac search apt reveals this as the last entry in my results:

apt  2.9.8-1                                                                                             extra
    Command-line package manager used on Debian-based systems

Why, is beyond me ā€¦
:man_shrugging:

EDIT 2:
Maybe itā€™s a dependency for alien_package_converter? But thatā€™s presently only in the AUR.

1 Like

Once upon a time, apt (aptitude) was the package manager for Redhat based Linux distributions (yes, a true story). Most package managers can be used on other distributions, albeit sometimes with great effort;

These are currently available for Manjaro:

pacman -Si dpkg # installed
pacman -Si apt
pacman -Si nix
pacman -Si yay
pacman -Si dnf

Donā€™t try this at home.
Well, you can, but donā€™t blame me if something breaks.

1 Like

What display manager theme are you using? If itā€™s not Breeze, switch to Breeze at least temporary.

I went to System Settings , Colors and Themes, and set it to Breeze.
I think that is what it was on, before though.

should be replaced by amdgpu

I am not sure how to do that. I will investigate.

Create a sufficiently sized swap partition, and configure it properly, and that issue should be solved. Please see:

I remember a long time ago I was tryingt to set up the machine and I was looking around and I remember a comment that Swap was not needed anymore!
Maybe it was a bogus comment, maybe it used to be. Who knows! I donā€™t.
I read and try to understand! Just like this:

I will go set a Swap with a ā€œsufficientā€ size, and configure it ā€œproperlyā€ !!!

You do know THOSE comments, as helpful as they are trying to be, are the kind of thing that leaves some new users with a deeper problem than when they started! I guess if I torch it, a pristine new install will solve most of these problems! :slight_smile:

I seem to recall that because I was putting in a SSD, it had some impact on a swap. Does that even make sense?
From what I have read so far, it looks like I woudl do best with a swap FILE versus a Swap Partition. Does anyone have feedback on that?

Well, to start, this is what I gave and got. I think it means I set a 16GB swapfile, based on my 8GB of ram.

sudo dd if=/dev/zero of=/swapfile bs=1M count=16384 status=progress
[sudo] password for jim:
16835936256 bytes (17 GB, 16 GiB) copied, 41 s, 411 MB/s
16384+0 records in
16384+0 records out
17179869184 bytes (17 GB, 16 GiB) copied, 41.9636 s, 409 MB/s
sudo chmod 600 /swapfile
47s
sudo mkswap /swapfile Setting up swapspace version 1, size = 16 GiB (17179865088 bytes)
no label, UUID=1b674291-53a4-440a-95ec-4c0f16d3e6b0
sudo swapon /swapfile sudo bash -c ā€œecho /swapfile none swap defaults 0 0 >> /etc/fstabā€

So, now what should I do?

I donā€™t think that will end well.

But will it be better than where I am now?! LOL

KoboldRegular
How is that even possible?

Never underestimate the power of one stupid user!

Thank you all, in advance for the help.
Fix me in places where I got it wrong please?

1 Like

I went back and looked at some ways to deal with the radeon versus amdgpu, and it seems involved, and I do not know where to start, so I am going to leave that alone until I hear back from someone. Thank you all, again.

The answer to that question really depends on whether or not you wish to hibernate.

If using hibernation, a swap partition should normally be used; sized to at least the amount of system RAM (plus a little more for good measure). So, for example, with 16 GB of RAM a 17 GB swap partition would be ideal.

By default, hibernation cannot work using a swap file.

Although it is possible, a swap file should ideally be greater in size that the amount of system RAM and should be contiguous (no holes, or gaps). For this reason a swap file (if intended to be used for hibernation) should normally be created during installation; or when sufficient contiguous space is available in /.

If you do not intend using hibernation, then a swap partition (or file) equal to half the amount of system RAM (8 GB in this example) would likely be sufficient.

If later you decided that you wish to use hibernation afterall, you would need to resize the swap partition, or (in the event you opted for a swap file) create a new swap partition.

It comes back to the initial choices you make during install (or, reinstall). As an example, I typically create a sufficiently sized swap partition, regardless; this covers all bases.

While this comment remains true, it is also possible to use both a swap partition and file, which can actually enhance performance to some degree. Though I havenā€™t (yet) done this myself I have considered it for a time, and it looks promising. Perhaps I will try it next time I install.

While youā€™re in learning mode you might find these related links of interest. :student: :smile_cat:

Good luck.

1 Like

https://wiki.archlinux.org/title/AMDGPU

1 Like

I have to say it:
that is just not true.

It works just fine.

The setup needs just one more step:
find the start of the swap file in the filesystem (filefrag) and then add that to the kernel command line as resume_offset= parameter

for example: my current system

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mitigations=off nowatchdog audit=0 resume=UUID=e3d59116-1204-4700-b8c4-4f496790d85c resume_offset=4171776"

2 Likes

Thanks.

The wording is now changed to reflect the intended meaning, plus a brief supporting explanation.

Hmmmā€¦
I do not have time to do much on this now, but I would like to point out that I went to the suggested ā€œhelpā€ link for swap. I am sure I missed some things as I donā€™t know what I donā€™t know. But it certainly did not make note of the exception for Hibernation.

Additionally, why wouldnā€™t the system (that doesnā€™t include a usable swap,) not allow Hibernation, if it is only going to crete problems?
Not a complaint, but I am more of a user of the system. I am certainly intrigued and happy to mess around, but this gets into a lot of the weeds of basic current OS expectations, right?
No need to argue, it was meant to be a rhetorical observation. For me, I do not really need Hibernation, I think, so I wont worry about it.

That said, I did my best.
I found I have 8GB Ram, so I gave myself 16GB of swap.
I did make it a swap file, as I described, and now it appears that was not advice that will help much in my overall use of the system.

So, should I remove it? Hmmmm. I didnā€™t see the steps for that!
Well, drats! I was so proud that I made it through the process!

I do appreciate the community interactions and kindnesses.
Thank you for helping me.
Unless someone wants to assist me in the specific steps to assure the system is as stable as possible, I think I will leave it there.

Just keep in mind, New, and Userā€¦ not intending to pursue an in depth knowledge of the OS. Just basics to help me avoid too much in rebuilds and lost efforts to have a GUI laptop functioning for basic use.

Thank you again.

PS. I will come back and look in more detail as work allows.

Please? For laterā€¦ where is it that I add that, and how please?
Thank you!

No problem, but as the information might benefit others, Iā€™ll address it as best I can in any case.

Swap is supposed to be a user choice (preferably during installation). The user should ideally decide whether or not they intend to hibernate, and choose to create swap according to their needs.

When installing Manjaro (using the Calamares installer) there are different partitioning methods offered.

When using the erase disk partitioning method there is a clear choice of swap options offered. Regrettably, many newer users seem to ignore this completely:

The following table shows default/recommended swap sizes when performing a Manjaro install using the Erase Disk partitioning method.

Preference Size Description
No Swap 0 If no Swap is defined, and later you need it, a Swap partition or file must be manually configured. It is recommended to configure Swap now; during installation.
Swap (No Hibernate) 8.80 GiB Default swap partition size is approximately half the amount of your system RAM if ā€˜No Hibernateā€™ is selected.
Swap (With Hibernate) 17.18 GiB Default swap partition size is approximately equal to the amount of your system RAM if ā€˜With Hibernateā€™ is selected.
Swap to file dynamic Swap file will be created under / (root) by default.

In this scenario (the erase disk partitioning method) no swap is defined by default.

Swap isnā€™t automatically configured.

These defaults are determined internally depending on the swap preference selected, and the amount of system RAM reported. The (above) figures are based on a system with 16GB of physical RAM. This would change depending on RAM in any given system.

When hibernation is selected, a 16 GB swap partition (plus a little more for overhead) will be created.

When *hibernation is not selected, swap space of half the amount of RAM will instead be configured.

These are generally recognised as sane defaults, and I agree. Some might argue that we donā€™t need that much swap, but erring on the side of caution, I maintain we do.

Itā€™s not really a question of how much swap we think we need, but moreover a what if scenario; for example:

What if I have 16GB RAM and 12GB of data in RAM when the system hibernates; or worse, shuts down unexpectedly?

What if I donā€™t have enough swap defined; or none at all?
What happens to that data from perhaps a copy/move operation if there is nowhere for that data (in RAM) to be safely dumped (stored)?

If the user decides (for whatever reason) that they donā€™t wish to use hibernation, they can certainly get by with less swap; especially if they have an abundance of system RAM. Choosing not to use swap at all; or ignoring the option; is never a wise choice, as sooner or later one finds an application that requires it.

Some choose to configure even greater space for a swap partition in lieu of expanding their system RAM at a future time. That too is a fair choice.

Iā€™d much prefer to have too much swap and rarely need it than to have too little (or none) and suffer the consequences.

But, again, Linux is supposedly all about choice. :smile_cat:

Cheers.


As a new Linux user, you might find these following articles of interest:

And an article about the Microsoft swap counterpart, for comparison; that most Windows users may not even be aware of. These are the types information that M$ generally files under too technical for Windows users.

In Linux, swap is just part of the basics; information that one needs to know as a Linux user; or, at least sufficiently enough to make an informed choice.

2 Likes

@Nachlese, please correct me if I make a mistake on expanding on your swap file comment, which was new information for me.

@RatherFly, assuming you still have a swapfile and not a swap partition, then to do as Nachlese descibed, you would follow these steps:

(1) Determine the UUID for the partition device where your swapfile is located. To do this, and using my machine as an example, since I too have a swapfile, one way is this:

lsblk -o +uuid

That will show you the UUIDs of partition devices on your machine. In my case:

NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS UUID
nvme0n1     259:0    0  3.6T  0 disk             
ā”œā”€nvme0n1p1 259:1    0  300M  0 part /boot/efi   FD1E-CDB6
ā””ā”€nvme0n1p2 259:2    0  3.6T  0 part /           c6d9cb1e-788c-498f-98f1-adc65fbdabb0

The one I want to use is c6d9cb1e-788c-498f-98f1-adc65fbdabb0 because that is the UUID of the partition device where my swapfile, /mnt/swapfile, is located.

(2) The next thing you need is the resume_offset of the swapfile. To get that:

sudo filefrag -v /mnt/swapfile | head -n 4 | tail -n 1 | awk '{print $4}'

For me, that gives 46213120..
Now you have the values for resume and for resume_offset.

(3) Edit the file /etc/default/grub. In that file look for GRUB_CMDLINE_LINUX_DEFAULT and add the resume and resume_offset settings and save your changes. For example, mine would like like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash udev.log_priority=3 nvidia_drm.modeset=1 nvidia_drm.fbdev=1 resume=UUID=c6d9cb1e-788c-498f-98f1-adc65fbdabb0 resume_offset=46213120"

where as you can see I added resume and resume_offset following my existing nvidia_drm option.

(4) Update the grub configuration. For me, that is done like this:

sudo grub-mkconfig -o /boot/grub/grub.cfg

All that said, Iā€™ve never set up a swapfile to be used for hibernation. I was under the misconception that the system would automagically know how to use my swapfile for hibernate, and this thread shed light on why hibernate does not work for me. Very informative. You might want to wait until Nachlese or someone more experienced than me validates what Iā€™ve written here.

p.s. last edit to fix typo in command (thanks @Nachlese!)

1 Like