UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a remote work computer where I can connect by ssh and by remote desktop (GUI). It has Ubuntu 18.04 (with XFCE which I installed later, after another person left it for me). Everything worked fine for years until about two months ago. The login manager (which was gdm3) simply stopped functioning. I installed lightdm and started it, and it worked. But when entering login and password, lightdm just returns the login screen and doesn't go to the user's GUI. I tried creating another user and log in its freshly created environment - no luck, the same problem. I tried to run startx in the remote terminal and send it into background, and the following appeared:
"xinit: Connection to X server lost"
(some googling and actions)
"dev/dri/card0 failed to set DRM interface: permission denied"
(some googling and actions)
"Xorg.wrap: only console users are allowed"
"xf86OpenConsole: Cannot open virtual console 2 (Permission denied)"
"AddScreen/ScreenInit failed for driver 0"
"xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)"
I changed the owner of /dev/tty2 to my username (where I ran startx from) - no result.
I completely reinstalled Xorg - no result.
So I cannot use the user's GUI - the graphical desktop is stuck at login (lightdm); when I stop lightdm and start gdm, it says it's running in low-mode graphics, and offers options which don't even work. I don't reboot because I don't want to risk losing its current network config and ssh access to it.
Could it be a hardware issue? Before there were strange things with the hard drive (sudden appearance of "read-only file system"), which don't seem to appear anymore, but if from what I posted it is very likely, then configuring software probably won't work.
Everything worked fine for years until about two months ago.
One thing this can translate to is an absence of freespace on the / filesystem, leading to boot failing to mount the / filesystem rw. Check available freespace on /.
Code:
> sudo mount | grep " / "
/dev/sda17 on / type ext4 (rw,noatime,errors=remount-ro,data=ordered)
> sudo df -h | grep -B1 " /$"
Filesystem Size Used Avail Use% Mounted on
/dev/sda17 7.7G 6.5G 817M 90% /
If little to none exists, try removing the largest files from /var/cache/apt/archives/ to create some freespace, then rebooting. If this allows mounting the / filesystem rw instead of ro, you can do some housecleaning, starting with sudo apt clean. If your normal user(s) can login, and /home/ is not a separate filesystem, they should be sure to start by emptying their trash folders. If snapshotting is enabled, remove obsolete old snapshots.
Distribution: Ubuntu based stuff for the most part
Posts: 1,174
Rep:
I think the free space on / is the problem. I recall that EXT filesystems will reserve %5 of / for root. https://chiaforum.com/t/ext4-users-r...ed-blocks/1972
You can reduce that amount from the above link, or clear out some files to free up space.
Most GUIs will write files to /tmp and /var/tmp, which are most likely on / unless separate partitions were made for them.
Update on this: the computer is still in the same situation, I cannot reboot because of possible loss of ssh and remote desktop connection (it has manual network configuration).
The problem persists: cannot login from GUI. Login manager is lightdm. Tried the following (in addition to the things mentioned before):
- Purged and reinstalled xfce and xfce4-session.
- Restarted various services (could not restart dbus without reboot and I cannot reboot), some of them many times
- Deleted ~/.Xauthority and ~/.ICEauthority
- Checked permissions on /tmp
- Checked sessions in xauth and did DISPLAY=:0; export DISPLAY; xauth add $DISPLAY . <hex key from xauth list>
- Check free space (seems good)
- Created another user and tried to login as him.
- Copied /etc/xdg/xfce4/xinitrc to ~/.config/xfce4
Nothing helped so far.
One thing that changed: after copying xinitrc (the last attempt above), xfce gives the dialog: "Unable to load a failsafe session: Unable to determine a failsafe session name. Possible causes: xfconfd isn't running (D-Bus setup problem); environment variable $XDG_CONFIG_DIRS is set incorrectly (must include /etc), or xfce4-session is installed incorrectly." After answering the dialog, it takes me back to the login screen of lightdm.
Restarting xfconfd gives no result either. I also noticed that I (as a user) do not have permissions to execute/open /etc/xdg/xfce4, if that matters.
Reinstalling software in linux generally doesn't change existing configuration. Software needs to be (apt) purged before installing again to get rid of configs that may be broken, and possibly the problem. If /etc/X11/xorg.conf exists, please try renaming it something else, then restarting your DM. Also, show here input/output from ls -gG /etc/X11/xorg.conf.d/, which could contain (a) thwarting .conf file(s).
Running in low-mode graphics suggests something got misconfigured, or required graphics firmware or driver disappeared, or linux-modules-extra didn't get installed on the kernel you are running. Does your currently running kernel have linux-image, linux-modules and linux-modules-extra comprising it/installed? What is output from cat /proc/cmdline from a normal boot attempt?
/var/log/ and/or ~/.local/share/xorg/ should contain Xorg.#.lo* file(s) that may have clues. Pastebinning them could be helpful.
I wonder if a significant LTS upgrade caused a GDM greeter/X move from tty7 or 8 to tty1 or 2, and that's where the problem started. All my Ubuntu's use either KDM or TDM, which still run on tty7, never GDM or LightDM, which upstream moved I know not when off of 7/8 to 1/2, at least in more recent distros.
The most recent file is /var/log/Xorg.0.log (other files are of last year), here are its contents:
[Cannot post contents because the site takes me to "check if the connection is secure" page and after that gives a blank page. Attempted to attach the log file to this post.]
Also, I was surprised to find the files /.Xauthority and /.xsession-errors (yes, in the root folder); I renamed them just in case, which did not fix the issue.
When you have had a Debian-based system running for years, sometimes your root partition gets filled up with generations of downloaded packages. You can clear them with
Hopefully it's reasonably similar. In fact on first X open here all went fine only until I tried to log out. It was very resistant. When it finally brought me back to the login greeter, it was in a lower than normal screen resolution, and the Xorg.0.log generated was nearly 6X a normal size, with lots of repeats indicative of mode support failures with one of the displays. Something is or wasn't right with X handling of my displays. I note that the kernel I am running is 6 months old, even though I just did apt-get full-upgrade to get to that kernel.
First thing that jumped at me in your log is (EE) open /dev/fb0: No such file or directory. (EE) lines are always bad news. Next thing that got my attention is you're booted to a 49 month old kernel. There have been a lot of bug fixes since then, both in kernel, and in the rest of the OS, likely including multiple X components. (WW) modeset(0): Unable to find connected outputs - setting 1024x768 initial framebuffer is another problem. X must be able to identify connected outputs to work properly.
Have you been installing updates over the past 4 years and just not rebooting to use the updated kernels, or are you still running as originally installed, free of updates? If you've been updating without rebooting, something in the X stack may have grown incompatible with your ancient kernel, or some bug exposed by it, causing a newer to be required to fix this. I'm doubtful there's much likelihood a solution exists and can be found absent getting up-to-date and rebooting, likely meaning upgrading at least to 20.04. 22.04 will soon be 2 years old, at which time 24.04 will be released, and 18.04 should be stone dead to the FOSS world.
Without updating and rebooting, I don't know of much to suggest. You might try modprobe -r i915 && modprobe i915, and/or same with other loaded graphics modules, assuming I'm right that you're using an Intel GPU. Ordinarily I would suggest use of xrandr's tools mode, but it needs to be able to ID connected outputs to work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.