Black screen login

o.k.:
only something totally optional:

Why would you want to have your swap file below /mnt ?

Just create it directly below /
but that is just aesthetics and affects only the /etc/fstab entry

I’d do it like this - and this is how I actually did it as well :nerd_face: :

sudo mkswap -U clear --size 4G --file /swapfile

Swap - ArchWiki

Then your command, adapted to reflect the swap file location directly under /

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

to find out the start of the file

the result of which then goes into /etc/default/grub as the resume_offset= parameter


The corresponding line in /etc/fstab looks like this:
/swapfile none swap sw 0 0


@Fangdrasil explained it very well - I just adapted it a little

1 Like

This looks very interesting so I am going to give it a try.
I had already done this:

So I will assume my Swapfile is just under / Right?

6639616…
PIPE|0|0|0 4s

I did the other stuff and ended up with this in grub:

GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=hidden
GRUB_DISTRIBUTOR=“Manjaro”
GRUB_CMDLINE_LINUX_DEFAULT=“quiet udev.log_priority=3 resume=UUID=7533dbda-0310-4048-bf30-4effd60c8a69 resume_offset=6639616”
GRUB_CMDLINE_LINUX=“”

If you want to enable the save default function, uncomment the following

line, and set GRUB_DEFAULT to saved.

GRUB_SAVEDEFAULT=true

Odd to me that the line I was looking for is repeated with “” but I will ignore.

BTW, Is this where I would put the

drive=amdgpu

which was recommended elsewhere?

Then I get here:

The corresponding line in /etc/fstab looks like this:
/swapfile none swap sw 0 0

But @Fangdrasil did not have this. What do you mean corresponding?

I edited what was shown anyway…
It had in there:

/swapfile none swap defaults 0 0

Lastly, @Fangdrasil says to

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

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

But that scares me and @Nachlese does not state to do it or why his way is different.

I am going to hold on here, hoping someone will explain and tell me if I can use the same commands on MY system. Otherwise I changed all of this but I guess it will be lost? Or the system will try to sleep again and I will get screwed with more fsck manual fixes again!

Exciting!

@soundofthunder
That was a really good post of why. And I DO love choice.
I have heard many many times the almost political stances of linux over Windows. I get it. And I enjoy Linux.
But I am FORCED to use Windows all of the time in every day I work. It is the standard and I will not change that for my company, nor am I allowed to use a Linux OS there. Complete lockdown…

So, yes! complete User. And IT rarely pushes policies that make a healthy system in our large environment. I am forever getting “rebooted” because there just is no other option! There goes my work… *that was supposed to be protected from loss… whatever.

All of that said, Makking an OS more defiant to fail with a black screen, does not mean that a savvy user of Linux can’t set up their “choice” as they see fit.
Stupid users are here to stay. It is good (I think) that they might play around with Linux and learn from time to time, like I am now!
So, it seems reasonable to have a redundent approach, given all of the smarts of Linux and Manjaro to have it:
Default… like the setup tried to do with so many other options a newb user wont understand.

  1. If there is no swap such that Hibernation will fail, is there ANY reason to leave that in the default?
  2. If a swap file is needed, why not a little calc to at least set something, based on the most used config? Is that Hibernation? Likely since newbs would be coming from Windows and used to it being there… and if they do not have enough HD, then Warn them, and turn off Hibernation, ,or give them options, like You can’t have this due to HD space, but you could have that… or “You screwed! Go buy bigger HD!”
  3. It seems from this stupid user that the default setup is ALREADY helpful to get new users onto a delightful OS of Manjaro.

Is it counter productive to complete that thought, and set defaults that put some gaurdrails up, as long as they do not hamper those who want to customize and choose other options?

Hey!

I am just talking!

I am not willing to put the work into these things like so many of you all do.
And I enjoy and appreciate your willingness to share and to help. I hope I didn’t bend anyone, especially you, @soundofthunder , after a great deal of thought and formatting so that I could understand.

Please don’t take my response as unappreciative… it should be obvious from my questions that I lack understanding of the “WHY” which is why I rhetorically asked.

I will watch for a while… Wife is babysitting and I have a few minutes to get some work done, so I can check back.

Thanks again!

PS-Edit…
@soundofthunder your above links maybe are corrupted?

I went to the first (demystifying) and the last (swap harmful).
The first was WAY over my head as it got into grub stuff… I couldn’t hang. But thank you!
The last one never populated the webpage… lotsa blanks and weird.

Maybe my edits from above are slowly screwing up my machine now, because I did something wrong! Oh no! Hehehehehe.
Just wanted you to know since you graciously gave me your time on those things.

Thank you again!

I’m not even trying to going to read completely through this mess of a … summary with some questions and reservations.

How can someone make it be so difficult to create a simple swap file …?

  • you create a file with a certain size
  • you make it known to the system by declaring it in /etc/fstab
  • you also use it to store the system state when you suspend your system … you tell the system where the file is by giving it the location where it starts: resume_offset= …

it’s not rocket surgery :man_shrugging:

2 Likes

Guesing you are a rocket scientist.

My first go through this and trying to learn, and understand, and get back to a system that has worked well for a long time until the last update.

But, I learned soem things. So thank you.

Since you responded… can you just say…
Should I execute the command shown in one place but not another?

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

Or do I just reboot or shutdown, since I have saved the edits to fstab and grub.

that command is just doing what it’s name suggests:
it creates the boot loader configuration file - the items you see when you see the boot menu on system start-up

omit that and end up with a not current boot menu :man_shrugging:

Thank you very much.

I also, went over to an AI to see if I would ignorantly destroy things. For others maybe reading and too timid to ask, here is what it said:

The command sudo grub-mkconfig -o /boot/grub/grub.cfg is not inherently dangerous in Manjaro Linux. In fact, it’s a standard command used to update the GRUB configuration file. Here’s what you need to know:

Purpose and Function

This command generates a new GRUB configuration file (grub.cfg) based on the current system state and installed kernels. It’s commonly used after:

  • Kernel updates
  • Changes to GRUB settings
  • Adding or removing operating systems

Thank you @Nachlese .

Sorry I complicated things on you.

Time to reboot! I will come back if it works, so others see it can be accomplished!

No worries - you didn’t complicate things on me.
You may have done that, but only to yourself. :man_shrugging:

Be very careful with “AI”.
All it is is summarized content from every intelligent being as well as every moron on the interwebs …
packaged as “knowledge”.

AI will argue with you on trivial truths until you, based upon real knowledge, convince it to give in …

it’s not “intelligent” at all



I really do wonder what your “problem” is - or whether you even have one.

I have not even tried to launch Coke bottles -
not a literal rocket scientist here :man_shrugging:

Its the same as update-grub.

If you do have update-grub installed you can see this;

cat $(which update-grub)

It didn’t work out so well. :frowning:

And I tried this @cscs .

Got:

cat $(which update-grub)  :heavy_check_mark:
#! /bin/sh
set -e
grub-mkconfig -o /boot/grub/grub.cfg “$@”

workaround for disk/cryptodisk: Allows UUIDs to be compared in a dash-insensitive manner - grub.git - GNU GRUB

if grub is not updated in MBR/EFI dashes still won’t work, hence we remove them

sed -i -e ‘/cryptomount -u/ {s/-//g;s/ u/ -u/g}’ /boot/grub/grub.cfg

Tried this again and it did something more reaosnable looking than the first time when I went to a black screen.

Feels like there are ghosts in the machine now… alomst like back when a spinner drive woudl be going bad… But this is an SSD. I didn’t think they acted quite this way!

I am going to let it run and see what it does over time. Leaving for tonight but will be back in the mornning.

Thank you all!

While the formatting is broken …

That simply shows what I was trying to explain.

The executable /usr/bin/update-grub (found by which update-grub) contains

 grub-mkconfig -o /boot/grub/grub.cfg “$@”

So… I am sorry. What does that mean?

Does it mean this wont work?

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

because it shows “$@” at the end?

No.

$@ in bash means something like ‘all arguments’.
Its just there for if someone used update-grub --option1 --option2 or similar.
In the example of no flags (update-grub) … it is the same as just grub-mkconfig -o /boot/grub/grub.cfg.

It just means that

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

and

sudo update-grub

are essentially the same thing. That is all.

1 Like

It’s… rocket science, I think you were trying for. :wink:

I’ve seen that question posed a few times, in different forms. As I mentioned earlier, it would likely take another long discussion to argue the merits of the open-source ethos and how it affects practical Linux application; versus user expectation (or demand).

I’ve seen many lengthy articles over the years on similar topics. Suffice it to say that the inherent openness of Linux isn’t always compatible with closed (or proprietary) mindsets.

Regarding swap selection in the aforementioned erase disk scenario, my comments with regard choice still stand; however, it would be nice to see at least a warning if a user tries to continue installation without having selected a swap option.

Of course the purists would likely insist a user should have done their homework in the first place; and, in fairness, it’s difficult to argue with that logic.

This thread is meandering far from the original topic, however, here’s something you might find of interest:

There is another edition of Manjaro in the pipeline that aims to simplify many aspects, with newer users in mind.

For the time being it’s called Manjaro Immutable (but that might change before it’s officially released):


They seem fine here.


…or Pepsi bottles… :sunglasses:

My problem is… And maybe when the admins moved my initial post it was lost, so sorry…

That if I leave my computer for a long time, like overnight, and come in, I see the GUI login screen asking for my password.
I put in the password and it is not accepted and some weird characters showup.

I finally try to get out to a terminal with CTRL-ALT F3 to tell it to reboot, because I have no other option but that!

But when I do that I end up with a black screen, sometimes a cursor but it will not take any keystrokes.

I finally resort to a hardpress of power which forces a manual fsck, and I am afraid at some point she wont come back!
But tankfully she always does.

I can just shutdown everynight I guess, but like so many other users, I can have a bunch of tabs up looking for info on parts and other things on the net, and would like to continue when I return.

Anyway, I would say THAT is my issue.

To date I have learned how to get system info from the terminal and paste it.
I have learned to not answer each poster, but use ONE post and answer everyone.
I have learned I shouldn’t have driver-radeon but should be drive=amdgpu, but no one told me what to do with that.
I learned some were surprized about my system and said “How did he even do that?!” Just stupid user tricks, really… I am never trying to mess things up, I just use it and try to be smart when doing updates, etc…
I learned that I should be on a BREEZE theme. So I changed it as shown.
I learned that I should NOT have a … um… try to recover to where I was, thing. I changed that based on a main post for the latest update that seemed to give me a black screen.
I saw that several thought my OS was messed up because I did not have a SWAP on, so I put one on as a swapfile, because I could not figure out how to do it on a partition, and I got the impression it would work.
I then found out that it DOES work for swap, but not for Hibernation…

So, I have learned a lot. Didn’t mean to upset anyone.

But I have noticed often the new users who ask questions and try to do what they are told are often harassed and addressed as though they are a waste of time, for this reason or that. NOT THAT YOU DID THAT…

I just get the impression that if someone new is not willing and ready to devote much time and effort into becoming very knowledgable about Linux and Manjaro, they just are not made to feel welcome.

I can deal with that!
It;s not what I had hoped for.
But here we are…

I hope that helps you understand what my problem actually is. If I knew I woudl not waste anyone’s time. Nor my own.

Thsi is a simple system and I do not have much on it.
It has probably been running here for 2 years without issue in my workshop. It is handy and fun, but it is NOT where I will be able o spend much time, so I may resort to what many do and just reload the OS.

But for now, I am still learning, and that seems to be one of the respectable actions not met here with irritation, so…

If you think it is even worth me doing something else, I will try it… and I will be very thankful for your expertise and time.

I think cscs is also trying tonight to help me.
I had just gotten to reloading my grub, but he is trying to explain something to me and I do not quite yet understand.

At 60 I have noticed I cannot absorb what I once could.

Have a good night. And thanks for asking.
If you take any thing which I have stated as more than an attempt to give you info and comment on how things look from my ignorant perspective of this process, then just accept my appology and ignore.

I may be gone after the next sleep or reboot anyway!!! LOL

Thank you.

All very cool.
Since meandering, I will limit response.

the purists would likely insist a user should have done their homework in the first place; and, in fairness, it’s difficult to argue with that logic.

I stated somewhere that I did do my homework, as best I could and I decided to NOT have a swap file. It was long ago now, but it had to do with "most newer OSes don’t need it, and with an SSD it might not be good… something to that affect.

Note that until the last update, I didn’t have an issue, so I am starting to think something else may be amiss here.

But to your point, now the arguement becomes what LEVEL of homework is satisfactory. Eyes of the beholder?

You have helped. Thank you.
I hate that I saw your “meandoring” after a lengthy answer to what my problem is. Sorry.

Maybe you all have options to just delete this all so others are not put off by my inability to fix this.
Letting it sit for tonight. and maybe the updated grub and swap steps, will have fixed it.

I will look for immutable. Thank you!
I am not going back to Ubuntu, or Mint, etc. Been on Manjaro happily for years!

Thank you all.

… way too much irrelevant information about what you learned

and you might have even “learned” the wrong things …

I will be only watching this here as of now - like watching a TV show …

… my comments / arguments seem to not fall on fertile ground :man_shrugging:

I dont know enough to say what the solution was, but the system this morning acted much like it used to. Here are the things I feel had an impact.

Stop the sleep
Stop the hibernation
Change to Breeze Theme
Create a Swap
Update the grub with changes to use the swap

You will have to look throught to find particulars for each thing, as I am pressed to understand what specifics did what, and why , and how.

Thank you to all that helped.

@cscs , I look forward to Immutable, but I don’t typically want to go tinkering to make better, or start over because something looks even easier!
But it does look really nice!

Thanks!

I’m sure there are some who might learn from your posts. :smile_cat:

Perhaps a reboot is all that was needed after correcting the problem. This is something that even experienced users might often insist on ignoring.

Cheers.

The problem has persisted.
I believe the best course now is to do a wipe and a fresh install.
I will try to repost if I get to a stable understanding of what has happened.

Thank you all.