You are not logged in.
Edit:
For everyone reading this thread: Initially I thought the problem is with the partitioning. Afterwards, I found out the problem was actually with nvidia drivers and changed thread name. This post might therefore be confusing, so keep in mind that in this stage I thought the problem was with my partitions.
Hi. During Arch installation, I made one swap partition and two linux partitions. The partitions looked like this:
# Some windows partitions
/dev/...5 -> Linux filesystem (the one I used) - 20G
/dev/...6 -> Swap parition - 8G
/dev/...7 -> Linux filesystem (the unused one) - 44G
Eventually I ran out of the 20G I had, so I did this. I verified /dev/...7 is empty (via df and then by mounting it -> ls shown just the lost+found directory). Then, I ran cfdisk, and removed partitions 6 and 7. Afterwards I extended the ...5 partition to 64G and created new swap parition.
So it looks like this now:
/dev/...5 -> Linux filesystem (that one I used, enlarged)
/dev/...6 -> New swap partition
I rebooted. At reboot, some error shown that swap couldn't be mounted or something.
When I logged in into my personal account (that runs `startx` after login), I saw just a black screen. Nothing worked. Thankfully, I was able to switch to tty2 (so i3 didn't load at all - if it loaded, I wouldn't be able to do it), and logged in as root (which I didn't setup to run startx after login).
Running startx as root shows the usual black screen.
I don't understand what went wrong - I just removed the empty partition, moved swap (which was not used - not even mounted, when I was moving it), and extended the used one.
I can login, I can browse my files, I just cannot start Xorg.
Here is xorg log: https://pastebin.com/mrX41W8z
Thank you. Using Lenovo ideapad 330s (Nvidia GTX 1050).
Edit: There is one other thing that might cause the issue (and is more probable that it caused it).
About half an hour before playing with partitions, I was installing different Nvidia drivers. I had nvidia-340xx, but I found, that I should be using nvidia (as the 1050 isn't at the unsupported card list, so I should be using the latest drivers). So I installed the nvidia drivers (just nvidia, not nvidia-340xx) and it still worked (note that I didn't reboot until after I moved the partitions).
# pacman -Qs nvidia
lib32-nvidia-utils 418.43-2
libvdpau 1.2-1
nvidia 418.43-2
nvidia-utils 418.43-2
Last edited by Soptik (2019-03-17 14:36:09)
Offline
some error shown that swap couldn't be mounted or something.
Either update /etc/fstab with the correct UUID for the new swap partition or remove the swap line if the disk has a GUID partition table.
About half an hour before playing with partitions, I was installing different Nvidia drivers.
Did you regenerate the initramfs after installing the new NVIDIA driver?
Offline
That's weird, /etc/fstab is empty. There are just the default comments:
# Static information about the filesystem.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
Anyway, I rebooted and I quickly read the swap message. It "failed to activate swap partition" and told me about service "dev-nvme0n1p6.swap" (which is the swap partition).
systemctl status on the service shown, that it failed with result 'exit-code' and it failed to activate swap Swap Partition.
I did mkswap and swapon and it fixed the swap. I forgot to do it after making the new swap partition.
I did not regenerate initramfs.
Should I now run
# mkinitcpio
?
Last edited by Soptik (2019-03-17 13:25:09)
Offline
The ArchWiki page about mkinitcpio has the instructions you need.
EDIT: and check the NVIDIA page, that details a pacman hook that can automate the process.
Last edited by Head_on_a_Stick (2019-03-17 11:14:04)
Offline
I ran
# mkinitcpi -p linux
with this output:
After this I rebooted. It didn't work. So I ran nvidia-xconfig according to the wiki. After reboot, the problems changed a bit.
Here's new xorg log:
The acpi error can be ignored according to this: https://bbs.archlinux.org/viewtopic.php?id=115834
Now, after running startx, the black screen doesn't show, but it freezes.
Running startx shows the few lines that show every time, even if xorg works. Than, nothing does anything. I switch to another tty. This works. After pressing ctrl+alt+f1 (switch to tty1 where the xorg runs), I don't see any change on the screen - but I did change the tty, because I don't see anything while typing.
Last edited by Soptik (2019-03-17 11:35:02)
Offline
Offline
I tried all solutions listed there and it didn't work.
Here is stderr from launching startx (I had to transfer stderr into file, as I didn't see anything after the (==) Using system config directory "...").
I tried:
- adding xrandr --auto to my .xinitrc file (which looks like this:)
#!/bin/bash
xrandr --auto
exec i3
- Adding rcutree.rcu_idle_gp_delay=1
- Adding nvidia module to mkinitcpio and regenerating it
# Modules in mkinitcpio.conf:
MODULES=(nvidia)
- Using both rcutree and mkinitcpio solution, together with reinstalling nvidia and nvidia-utils, and using modprobe nvidia
One more thing: Even after resizing the partition, there is still the old limit of 20G, even though the cfdisk tells me it's way bigger. I had to remove some packages to actually reinstall the drivers.
Could this be solved by simply installing the old 340xx drivers? It worked even that I was supposed to use the nvidia drivers, but I don't want to ruin all the progress here.
Last edited by Soptik (2019-03-17 13:25:37)
Offline
One more thing: Even after resizing the partition, there is still the old limit of 20G, even though the cfdisk tells me it's way bigger. I had to remove some packages to actually reinstall the drivers.
What tool did you use to expand the partition? You could have a 20G filesystem on a 64G partition.
Edit:
Please post the contents of /etc/X11/xorg.conf
Last edited by loqs (2019-03-17 12:58:07)
Offline
/bin/sh: i3status: command not found [../i3-4.16.1/../i3-4.16.1/i3bar/src/child.c:366] ERROR: stdin: received EOF [../i3-4.16.1/../i3-4.16.1/i3bar/src/child.c:490] ERROR: Child (pid: 761) unexpectedly exited with status 127
So does this get you to a basic desktop:
mv ~/.xinitrc{,.bak}
startx
If so then check your i3{,status,bar} configuration (then move ~/.xinitrc.bak to ~/.xinitrc again).
How exactly did you resize your partition? Which command(s) did you use?
Have you checked the root partition for filesystem corruption?
Offline
I used cfdisk. I used it to do partitioning when installing Arch as well, so I know the tool works.
I'm browsing disk /dev/nvme0n1. There are six devices (/dev/nvme0n1p1 - ...p6).
p1 is EFI System, p2, p3, p4 are something for Windows.
p5 is the Linux filesystem (ext4), that is mounted at /. It has size 64.4G, df -h shows that /dev/nvme0n1p5 mounted at / has size only 20G (which was before the resize).
Do I need to use the mkfs.ext4 to be able to use rest of the space on the partition? If so, I'll probably lose everything and will have to start with everything from scratch, right?
I'm confused, as when I was using gparted to extend partition on ubuntu, I never had to do something like this.
Edit: xorg.conf is here: https://pastebin.com/HVxbSpZ5
It was generated automatically via nvidia-xconfig. The file wasn't there before I ran nvidia-xconfig.
Last edited by Soptik (2019-03-17 13:06:44)
Offline
Do I need to use the mkfs.ext4 to be able to use rest of the space on the partition?
No, use resize2fs(8) instead.
Or gparted.
Offline
Did you run nvidia-xconfig to create /etc/X11/xorg.conf? I suspect even if X stops crashing it will produce a black screen.
Edit:
cross-post. Please remove /etc/X11/xorg.conf nvidia-xconfig breaks hybrid graphics setups.
Last edited by loqs (2019-03-17 13:09:47)
Offline
Renaming the .xinitrc:
The classical lines were printed again (that it started, which kernel parameters, ...).
After the line that said which config file was used, it printed new output and quit (so no freeze, no black screen). Here's stderr:
# fsck /
fsck from util-linux 2.33.1
e2fsck 1.45.0 (6-Mar-2019)
fsck.ext2: Is a directory while trying to open /
The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem. If the device is valid and it really contains an ext2/ext3/ext4 filesystem (and not swap or ofs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
Edit: after removing the xorg.conf, the screen went black for about half a second before xorg quit. Stderr from startx didn't change.
Edit 2: resize2fs did help, now I have the expected 64G. Thanks.
Last edited by Soptik (2019-03-17 13:26:03)
Offline
/etc/X11/xinit/xinitrc: line 51: twm: command not found
/etc/X11/xinit/xinitrc: line 52: xclock: command not found
/etc/X11/xinit/xinitrc: line 53: xterm: command not found
/etc/X11/xinit/xinitrc: line 55: exec: xterm: not found
/etc/X11/xinit/xinitrc: line 54: xterm: command not found
Without xterm installed xinitrc exited. See Xinit
# fsck /
/ is the filesystem not the block device behind it that you would want to check. Also I would recommend doing a readonly fsck on a mounted filesystem.
Please use code tags for commands and their outputs and go back and fix the rest of your posts to also use them.
Offline
I installed xorg-twm, xorg-xterm and xorg-xclock. Now xorg doesn't exit, but there is again the black screen. Here's stderr from startx:
X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
Build Operating System: Linux Arch Linux
Current Operating System: Linux arstotzka 5.0.2-arch1-1-ARCH #1 SMP PREEMPT Thu Mar 14 18:47:49 UTC 2019 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=00ee6ae0-47dc-4606-ba0d-828f0888cf0c rw quiet rcutree.rcu_idle_gp_delay=1
Build Date: 27 February 2019 04:04:00PM
Current version of pixman: 0.38.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.4.log", Time: Sun Mar 17 14:32:33 2019
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(II) modeset(G0): Initializing kms color map for depth 24, 8 bpc.
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Unsupported high keycode 372 for name <I372> ignored
> X11 cannot support keycodes above 255.
> This warning only shows for the first high keycode.
> Internal error: Could not resolve keysym XF86MonBrightnessCycle
Errors from xkbcomp are not fatal to the X server
Warning: locale not supported by C library, locale unchanged
Warning: locale not supported by C library, locale unchanged
Warning: locale not supported by C library, locale unchanged
Warning: locale not supported by C library, locale unchanged
Warning: Unable to load any usable ISO8859 font
Edit: Xorg.4.log: https://pastebin.com/heBWcA36
Last edited by Soptik (2019-03-17 13:38:16)
Offline
The default .xinitrc does not contain
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
If you copy across the default to your home directory and add the two lines above at the start of .xinitrc does that resolve the issue?
Edit:
After this issue is resolved I suggest investigating (in a new thread if you need help)
Warning: locale not supported by C library, locale unchanged
Last edited by loqs (2019-03-17 13:41:28)
Offline
Thank you, it works! Here is the final .xinitrc:
I'll rename the thread to "Xorg stopped working after installing nvidia drivers", let me know if you think I should rename it differently.
Edit: This is actually the minimum that needs to be in the .xinitrc to work:
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
exec i3
Edit 2:
It acutally solved another three problems I had as well.
The first one was not really a problem, but it's definitelly better now. Before, it took like half a minute or more from running startx to actually seeing the gui. Now, it works immediatelly.
The second one was that compton didn't work ("failed to get gtx content").
And the third one was that I wasn't able to reboot/shutdown my computer without physically holding the power button. It was saying "running stop job for ..." (sessions, login service), ... and never stopped. Even those issues are solved now.
Edit 3: added the session parsing block to working minimum (see V1del's comment below).
Last edited by Soptik (2019-03-17 14:43:27)
Offline
You should keep the session file parsing block
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
otherwise you will have other issues down the line.
Offline