Can't login as my user after abruptly stopped (hibernation-)resume (GNOME)

The current situation

I am writing this post on the affected machine as the root user (in Firefox), because when I try to log in as my own user, I get nothing but a black screen (I let it run for 10 minutes and: nothing).
When I click on "other user" and then enter root (followed by its password) the desktop of the root user presents itself (from which I am writing this post).
I believe to have caused this by hard-resetting (holding down the power button for about 5 seconds until the power went out and then turning my PC back on) my PC while I thought that it froze during login.

How I got here

Prior to this incident my PC completed several hibernations (and the subsequent resumptions) successfully.

However, coming from Windows 10, I am used to the hibernation state being lost when the PC gets powered off (in any way which is not hibernation) or when it gets restarted.

This meant hard-resetting (holding down the power button for about 5 seconds until the power went out and then turning my PC back on) my PC whenever logging in after hibernation took to long. I did this to intentionally lose the hibernation state so I could log in again.

This practice had proven itself to work right until it didn't anymore, leading to the creation of this topic.

My previous attempts at resolving this issue

  • Discard resumption
    • Procedure
      • Shut down (hard reset)
      • Start up
      • Wait through the BIOS and the GRUB screen
      • Click on my user
      • Type password
    • What actually happened
      • The screen just stays black
    • Reasoning
      • Windows discards the hibernation state when a startup/login procedure is interrupted by an unexpected power outage, and boots/logs in normally
  • Non-persistent GRUB edit
    • Procedure
      • Start up
      • Await the GRUB screen and press E
      • Remove all resumption-related parameters from the linux line
      • Press ctrl+X (to boot)
      • See error message (cannot find resume... or something like that)
      • Click on my user
      • Type password
    • What actually happened
      • I got an error message after starting the boot
      • The screen just stays black (after typing my password)
    • Reasoning
      • When I remove all resume instructions, surely it wouldn't try to resume anyways

Some questions arise

  • How would I go about removing the (probably corrupted) hibernation state?
  • Can I log in to my user without hibernation (some commands or holding down shift during login perhaps)?
  • Is my user somehow corrupted (root works fine in GNOME)

The goal

  • Log in to my own user
  • Avoid an infinitely long black-screen
  • (Follow-up) Hibernate properly (according to the best practices)

Hardware

[bernd-pc ~]# inxi -Fxz
System:    Host: bernd-pc Kernel: 4.19.56-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.1.0 Desktop: Gnome 3.32.2 
           Distro: Manjaro Linux 
Machine:   Type: Desktop Mobo: MSI model: something from MSI v: 1.0 serial: <filter> UEFI: American Megatrends v: 2.00 
           date: <filter>/2016 
CPU:       Topology: Quad Core model: Intel Core i5-7600 bits: 64 type: MCP arch: Kaby Lake rev: 9 L2 cache: 6144 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 28040 
           Speed: 800 MHz min/max: 800/4100 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 
Graphics:  Device-1: NVIDIA GP104 [GeForce GTX 1080] vendor: Micro-Star MSI driver: nvidia v: 430.26 bus ID: 01:00.0 
           Display: x11 server: X.org 1.20.5 driver: nvidia resolution: <xdpyinfo missing> 
           OpenGL: renderer: GeForce GTX 1080/PCIe/SSE2 v: 4.6.0 NVIDIA 430.26 direct render: Yes 
Audio:     Device-1: Intel 200 Series PCH HD Audio vendor: Micro-Star MSI driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           Device-2: NVIDIA GP104 High Definition Audio vendor: Micro-Star MSI driver: snd_hda_intel v: kernel bus ID: 01:00.1 
           Sound Server: ALSA v: k4.19.56-1-MANJARO 
Network:   Device-1: Intel Ethernet I219-V vendor: Micro-Star MSI driver: e1000e v: 3.2.6-k port: f000 bus ID: 00:1f.6 
           IF: enp0s31f6 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-2: NetGear WNDA4100 802.11abgn 3x3:3 [Ralink RT3573] type: USB driver: rt2800usb bus ID: 1-9:4 
           IF: wlp0s20f0u9 state: down mac: <filter> 
Drives:    Local Storage: total: 9.10 TiB used: 4.97 TiB (54.6%) 
           ID-1: /dev/sda vendor: Seagate model: ST2000DL003-9VT166 size: 1.82 TiB 
           ID-2: /dev/sdb vendor: Samsung model: SSD 850 EVO 1TB size: 931.51 GiB 
           ID-3: /dev/sdc vendor: Seagate model: ST6000VN0033-2EE110 size: 5.46 TiB 
           ID-4: /dev/sdd type: USB vendor: Western Digital model: WD My Passport 25E1 size: 931.48 GiB 
Partition: ID-1: / size: 278.20 GiB used: 75.70 GiB (27.2%) fs: ext4 dev: /dev/sda7 
Sensors:   System Temperatures: cpu: 55.0 C mobo: N/A gpu: nvidia temp: 59 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 38% 
Info:      Processes: 233 Uptime: 56m Memory: 15.62 GiB used: 2.07 GiB (13.2%) Init: systemd Compilers: gcc: 9.1.0 
           clang: 8.0.0 Shell: bash v: 5.0.7 inxi: 3.0.34

Thanks for reading!

Setup a new user, can you log into it? Then copy files across. This is probably the quickest route (if it works).

Thanks for the reply.

Can I also just remove the hibernation state?

Please note that I'm currently logged in as the root user (which works).
Thus I assume another (newly created) user would work as well.

Don't know, hibernation is really slow compared to suspend, I use suspend. I haven't used hibernation in years. Sorry.

Check the permissions of the files in the home directory and maybe something here can help.
https://wiki.archlinux.org/index.php/Power_management/Suspend_and_hibernate

For the record: when I type su bernd I do get the prompt of the user.

SSH works as well. When I get a black screen after trying to log in as myself in the GNOME login screen SSH still works.

Are all the files in the ~/ directory owned by the user?

All its files are there (appart from some python and/or node modules perhaps). I have some mounted NTFS volumes in /mnt/, which have pointers (directory junctions/sym-links (??)) located in ~.

(I just read your question again)
How do I check that (that I own all the files and directories in my ~)?
Notice: It also has sym-links to NTFS paths

Don't know if this will be of any help. In XFCE If after hibernation the screen goes black, do Ctrl+F4, console opens, then enter user login and password and relaunch the desktop typing

Startx

EDIT "solution" to "workaround" (not as clean as I'd like)

Worked around

I learned something about ttys on unix.stackexchange.com. I still don't understand them fully, but this didn't keep me from pressing ctrl+alt+F3 to get to another tty.

Then, I typed all kinds of things (gnome-session and alike). But the only down-voted answer on unix.stackexchange.com of the question I looked at was the only one that worked. I typed startx and hit enter.

Directly after doing so I was greeted with my (at least otherwise) trusty GNOME desktop, its wallpaper and my panel on the left of the screen with all my docked icons.

And while GNOME prompted me to enter my password for "unlocking your keyring" with a popup that also appears when using the GUI package manager, my autostart applications were already opening.

Workaround summary

  1. PC turned on (either on GNOME login screen or logged in as root)
  2. Press ctrl+alt+F3 to get to another tty
  3. Log in with your username and password
  4. Type startx and hit enter

Looking back, this problem was worked around by simply executing "Switch your tty, log in and run startx", which turned out to be rather easy to accomplish.


Anyways, thank you so much for your help & efforts!

See the post below for my continues quest to solve this problem:

1 Like

Guess who's back... (it's me)

As @Gdimoni helpfully stated:

startx does get me my shell back.

However, whenever I press any of the four media keys (Play, Pause, Stop, Next and Previous), GNOME will freeze completely, allowing only for cursor movement. I had to switch to another tty and kill the second one.

For the record: The volume up, down and mute keys work fine; and the problem also appears when using the media keys form my mouse.

I did this by first typing who -la to see which PID was running the desktop and then sudo kill <PID> to kill it.

By doing this, I noticed that only the first entry had a PID lower than 1000 and had (:1) instead of id=tty3. What does this mean?

After a restart the problem described in the initial post still persists. The workaround described in the (my) post above this one works, except for the issue with the media keys. How would one resolve this? Any ideas?

1 Like

You seem to be making far more progress than myself in this issue.
I am not of much help, as I already pointed towards this issue in XFCE in an unresponded thread a few days ago, and I'm an almost ignorant in linux, but I would suggest adjusting well LightDM-GTK. Make sure you host all settings in the root directory and not in the user, seems that might cause misfunctions. To do so, if you use thunar, when editing the root directories use thunar root option to be able to do it. Also I highly recomend backing up your system using timeshift before 'investigating'. It's very easy and it only takes a moment, but saves you if any mishappening occurs. Really a good safeguard. Sorry for not being of much help. I suppose those tty are diferent sessions and with startx you open anotherone but the previous (blocked one) stays active and so you need to kill them, losing what you might be doing in it.
I will follow your thread as it has been interesting. Thanks for sharing and keep it up!

1 Like

I have a heavy suspicion this may have to do with your Display Managers(s) (LightDM, GDM, etc)
i also encountered another user recently who had not dealt with their pacnews (and specifically lightDM was one of them) .. so that is something to look for.
(run pacdiff -o to see if you have any)
This also reminds me of some old DM issues with the wrong graphics or monitor being set.. I dont remember off the top of my head, but there are some threads lying around that detail the issue...

Running pacdiff -o both as a normal user and with sudo just gives me one line: /etc/default/grub.pacnew.

no need for sudo
(and please get rid of the habit of just randomly adding it ... you wil break things)
But I guess that scratches that idea off the list.
Though maybe deal with that one you have - even if its probably just cosmetic.

To recap my current setup/workaround:

  1. Start my PC using the power button
  2. Wait for BIOS to do its thing
  3. Select Manjaro on the GRUB menu
  4. Await the login screen (and ignore it)
  5. Press ctrl+alt+F2 to get to tty2
  6. Login with username & password
  7. Enter startx
  8. Await the GUI
  9. Enter my password when prompted by an "keyring" (or something like that) popup

Are there any better ways of doing this (=getting from turned off PC to GNOME); perhaps fixing the error (presumably) caused by my PC getting its power cut while GNOME was logged in (via the normal login screen) after hibernation?

Also: Does anyone have an idea as to why I cannot log in using the GUI login (please note: Selecting "other user" and logging in as root works from the GUI login prompt)?

And why does pressing my media keys kill (crash/indefinitely freeze; can only move cursor) my Desktop environment (or whatever is causing this); (it worked fine before the incident leading to the creation of this post)?

1 Like

make sure you are updated:
sudo pacman-mirrors -f && sudo pacman -Syyu
then, probably, we are looking at GDM issues ... which I dont use, but there are some other posts lying around ...

Update

I have now installed Manjaro on my SSD (new clean install).
Before that I made myself an alias sx to startx so I could start the X Server quicker after switching to a new tty.

On the newly installed system (from which I'm writing) everything appears to be working again.

But now I'm scared that hibernation could ruin this one as well somehow.

Can someone please explain to me if I can use hibernation without having to fear that my installation will break again? Or to put it in other words:

What are the best practices for hibernation when using Manjaro Gnome?