Black Screen after login

Hi there!

So today, out of nowhere, my primary computer started giving me a black screen after logging in. Not sure how that happened - the computer worked fine the entire day, then I went away for an hour and then it just refused to work. I get to the login screen normally, I am able to write my password in and it reacts to wrong passwords how it should. However, when it should give me my user desktop, I just get a black screen.

After a mental breakdown, I searched for help and didn’t find much (apologies if I overlooked something), so at least I gathered some data and tried some things, that could perhaps be useful. I am running Fedora Linux (5.19.16-200.fc.x_86_64) 36 on Gnome XORG (EDIT: tried Gnome and Gnome Classic as well - no change). All there is to know about my PC is here: Intel Core i7 6700 @ 3700.89 MHz - CPU-Z VALIDATOR , I use dualboot with Windows 10, which works just fine.

I got to a TTY with CTRL+ALT+F6, and while it mostly worked like it should, I was met with this line when I logged in:

Last login: Mon Oct 24 18:49:15 on tty2
 -- onegen: /home/onegen: change directory failed: Permission denied
Logging in with home = "/".


I was able to execute cd ~/, which worked as expected, and I could read and write files in my home dir, all without any chmod-s or sudo-s. After I pressed CTRL+ALT+F1, it brought me back to the login screen, and after entering my password, I was met with a screen saying “Oh no! Something has gone wrong.”, forcing me to log out - this screen was frozen, and I couldn’t click or press anything, and had to do a hard restart.

I reinstalled GPU drivers, since I read that it’s a common cause. I used sudo dnf remove kernel-headers* *nvidia and sudo dnf install kernel-headers akmod-nvidia. No effect. sudo dnf update did nothing as well. EDIT: I then just straight-up removed the nVidia drivers - no change.

That’s pretty much it, I’d be very happy for any help I can get. Please…I am really desperate and feeling hopeless right now…

Last thing, here are a bunch of command outputs I saw some people asked for on related questions:

dnf list installed \*nvidia*

Installed Packages
akmod-nvidia.x86_64                        3:520.56.06-1.fc36 @rpmfusion-nonfree-updates
kmod-nvidia-5.19.16-200.fc36.x86_64.x86_64 3:520.56.06-1.fc36 @@commandline             
nvidia-gpu-firmware.noarch                 20221012-141.fc36  @updates                  
nvidia-settings.x86_64                     3:520.56.06-1.fc36 @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia.x86_64                 3:520.56.06-1.fc36 @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.x86_64       3:520.56.06-1.fc36 @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-kmodsrc.x86_64         3:520.56.06-1.fc36 @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.i686              3:520.56.06-1.fc36 @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.x86_64            3:520.56.06-1.fc36 @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-power.x86_64           3:520.56.06-1.fc36 @rpmfusion-nonfree-updates

inxi -Fzx

  Kernel: 5.19.16-200.fc36.x86_64 arch: x86_64 bits: 64 compiler: gcc v: 2.37-36.fc36
    Console: tty 6 Distro: Fedora release 36 (Thirty Six)
  Type: Desktop System: Gigabyte product: Z270X-Ultra Gaming v: N/A serial: <superuser required>
  Mobo: Gigabyte model: Z270X-Ultra Gaming-CF v: x.x serial: <superuser required>
    UEFI: American Megatrends v: F8 date: 10/27/2017
  Info: quad core model: Intel Core i7-6700 bits: 64 type: MT MCP arch: Skylake-S rev: 3 cache:
    L1: 256 KiB L2: 1024 KiB L3: 8 MiB
  Speed (MHz): avg: 3544 high: 3993 min/max: 800/4000 cores: 1: 3400 2: 3400 3: 3400 4: 3400
    5: 3966 6: 3993 7: 3400 8: 3400 bogomips: 54398
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Device-1: NVIDIA GP107 [GeForce GTX 1050] vendor: Micro-Star MSI driver: nvidia v: 520.56.06
    arch: Pascal bus-ID: 01:00.0
  Display: server: v: 1.20.14 with: Xwayland v: 22.1.3 driver: X: loaded: nvidia
    unloaded: fbdev,modesetting,nouveau,vesa gpu: nvidia,nvidia-nvswitch tty: 128x48
    resolution: 1920x1080
  Message: GL data unavailable in console. Try -G --display
  Device-1: Intel 200 Series PCH HD Audio vendor: Gigabyte driver: snd_hda_intel v: kernel
    bus-ID: 1-4:2 bus-ID: 00:1f.3
  Device-2: NVIDIA GP107GL High Definition Audio vendor: Micro-Star MSI driver: snd_hda_intel
    v: kernel bus-ID: 01:00.1
  Device-3: Trust GXT 258 Microphone type: USB driver: hid-generic,snd-usb-audio,usbhid
  Sound Server-1: ALSA v: k5.19.16-200.fc36.x86_64 running: yes
  Sound Server-2: PulseAudio v: 15.0 running: no
  Sound Server-3: PipeWire v: 0.3.59 running: yes
  Device-1: Intel Ethernet I219-V vendor: Gigabyte driver: e1000e v: kernel port: N/A
    bus-ID: 00:1f.6
  IF: enp0s31f6 state: up speed: 100 Mbps duplex: full mac: <filter>
  Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) type: USB driver: btusb v: 0.8
    bus-ID: 1-12:4
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
  Local Storage: total: 2.69 TiB used: 161.47 GiB (5.9%)
  ID-1: /dev/sda vendor: Samsung model: SSD 870 QVO 1TB size: 931.51 GiB
  ID-2: /dev/sdb vendor: Western Digital model: WD1003FZEX-00K3CA0 size: 931.51 GiB
  ID-3: /dev/sdc vendor: SanDisk model: EMTEC X150 960GB size: 894.25 GiB
  ID-1: / size: 85.95 GiB used: 41.11 GiB (47.8%) fs: ext4 dev: /dev/sda6
  ID-2: /boot/efi size: 96 MiB used: 43.1 MiB (44.9%) fs: vfat dev: /dev/sda2
  ID-3: /home size: 136.45 GiB used: 120.31 GiB (88.2%) fs: ext4 dev: /dev/sda8
  ID-1: swap-1 type: partition size: 4.66 GiB used: 0 KiB (0.0%) dev: /dev/sda7
  ID-2: swap-2 type: zram size: 8 GiB used: 0 KiB (0.0%) dev: /dev/zram0
  System Temperatures: cpu: 38.0 C mobo: N/A gpu: nvidia temp: 31 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 35%
  Processes: 311 Uptime: 4m Memory: 15.58 GiB used: 1.94 GiB (12.5%) Init: systemd
  target: graphical (5) Compilers: gcc: 12.2.1 Packages: 18 note: see --rpm Shell: Bash v: 5.2.2
  inxi: 3.3.21

dmesg | grep -iE 'secure|nvidia'

[    0.000000] Command line: BOOT_IMAGE=(hd0,gpt6)/boot/vmlinuz-5.19.16-200.fc36.x86_64 root=UUID=82e09d3d-a866-4df9-88f8-02ffb1a311f4 ro resume=UUID=3ea78bd0-4a83-493e-a02d-92643a2236ea rhgb quiet initcall_blacklist=simpledrm_platform_driver_init rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1
[    0.000000] secureboot: Secure boot disabled
[    0.007021] secureboot: Secure boot disabled
[    0.082886] Kernel command line: BOOT_IMAGE=(hd0,gpt6)/boot/vmlinuz-5.19.16-200.fc36.x86_64 root=UUID=82e09d3d-a866-4df9-88f8-02ffb1a311f4 ro resume=UUID=3ea78bd0-4a83-493e-a02d-92643a2236ea rhgb quiet initcall_blacklist=simpledrm_platform_driver_init rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1
[    5.697691] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input20
[    5.697927] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input21
[    5.697984] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input22
[    5.698033] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input23
[    5.698086] input: HDA NVidia HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input24
[    5.698136] input: HDA NVidia HDMI/DP,pcm=11 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input25
[    7.172186] nvidia: loading out-of-tree module taints kernel.
[    7.172198] nvidia: module license 'NVIDIA' taints kernel.
[    7.188950] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    7.258970] nvidia-nvlink: Nvlink Core is being initialized, major device number 235
[    7.259828] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
[    7.473911] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  520.56.06  Thu Oct  6 21:38:55 UTC 2022
[    7.562046] nvidia_uvm: module uses symbols nvUvmInterfaceDisableAccessCntr from proprietary module nvidia, inheriting taint.
[    7.588156] nvidia-uvm: Loaded the UVM driver, major device number 511.
[    7.639382] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  520.56.06  Thu Oct  6 21:22:53 UTC 2022
[    7.645140] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    8.540245] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0

After doing the cd command what is the result of pwd?
What is the result of echo $USER?
Try these commands in this order and post the result like this

$ cd
$ pwd
$ echo $USER

If all of those are as expected then try startx to see if the desktop will start as expected and let us know the results.

Last login: Mon Oct 24 18:49:15 on tty2
 -- onegen: /home/onegen: change directory failed: Permission denied
Logging in with home = "/".


This part is unexpected, and may potentially indicate a file system error or an SELinux problem. To rule out the selinux problem, while logged in as your regular user to the tty please do sudo touch /.autorelabel. Then when you reboot allow it to fully relabel everything on the system with the proper selinux context.

Since you are using ext4 file systems you might boot to a live media and run fsck /dev/sda6 and fsck /dev/sda8 just to rule out file system errors.

It is also possible that /home had not yet been mounted when you logged in, which could have caused the login with / for the home directory

Hi! First off, thanks a lot for helping me out!

The two commands worked as expected:

$ cd
$ pwd
$ echo $USER

and startx actually got me to my account! So yeah, thanks a lot!

After I opened the terminal, I saw some npm-related time-out errors. My uni’s network required me to login every time I start the computer, but I never had a problem like this. I searched around for the error, and I quickly found the command systemctl disable NetworkManager-wait-online.service. I rebooted the system right after pasting it and the problem seems have been resolved! I am able to normally log into my account without any problems!

No idea how this problem started, and I still get this when I open the terminal for the first time after login:

curl: (6) Could not resolve host:

  Error: failed to download version index (

But it doesn’t really bother me at all.

To prevent some future error, I did the sudo touch /.autorelabel and let it do its work. It was done in about 20 minutes or so without printing any errors, but after I opened the terminal when already logged in, this was printed there several times:

avc:  denied  { open } for  scontext=system_u:system_r:openvpn_t:s0 tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file permissive=0

Everything seemed to work fine, so not sure what that’s about…

I will also do the fsck-s.

Once again, thank you and have a great day! ^^