LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   My xserver is broken and I don't know how to fix it (https://www.linuxquestions.org/questions/linux-software-2/my-xserver-is-broken-and-i-dont-know-how-to-fix-it-4175708457/)

Gold_Thing 02-23-2022 05:43 AM

My xserver is broken and I don't know how to fix it
 
I've tried asking on the Ubuntu forums in this thread but they stopped responding. I cannot open the display manager, use graphical programs or use a desktop environment. Before it happened I suspended the Network Manager service which needed a root password because I was testing something. The next time I booted into Linux, I couldn't login to any desktop environments I have installed. I can only get to the SDDM login screen and I have to use ctrl+alt+F2 and use the tty to do things.

I have tried to troubleshoot this for 4 days and none of the solutions work. All of their solutions work for a different type of problem. Their graphics not displaying had something to do with SSH which I'm not doing, my computer is a normal desktop computer. When I echo the $DISPLAY variable, it's empty ('''') unless I export 0.0. xhost + fixed it for most people that have my problem, but it doesn't work. I just get
Code:

Invalid MIT-MAGIC-COOKIE-1 keyxhost: unable to open display ":0.0"
But when I start X with superuser privelleges, it actually starts up. I don't know why I'm getting this message or what it was that was changed.

rayfward 02-24-2022 02:17 PM

So is it your personal login? If so I may have a solution.:study:

mrmazda 02-25-2022 12:37 AM

Are all the files and directories in your homedir owned by your username?

suramya 02-25-2022 04:17 AM

what do the logs say?
Check in /var/log, the Xorg.0.log, messages, or syslog files should have an error message that can point to the problem.

Try creating a new user and see if they can log in, if so then the issue is with the current user, else it could be a different issue.

hazel 02-25-2022 04:39 AM

I wonder if you have inadvertently transferred your X authentication file to the ownership of root. If so, you will no longer be able to access it as an unprivileged user. You say you had to do something as root and that started the problem. How did you become root? Did you use gksu or sudo or su? gksu and similar programs are supposed to protect your environment from root so that this can't happen, but sudo and su usually leave you in the same environment.

Try deleting .Xauthority at the console, then logging in again

pan64 02-25-2022 11:36 AM

the most important thing is to post what you have tried exactly and the respond you got exactly.
Telling "it doesn't work" or dropping in a single line from the error message is not enough. Also telling us you found something in dmesg is insufficient. Most probably post #5 is correct.
You can try to create a new user and try X with that - without root.

Gold_Thing 03-03-2022 07:08 AM

Deleting Xauthority file and creating a new one and using chmod 600 on it didn't fix it. When I read the message after startx fails, the log file goes to xorg.1.log rather than xorg.0.log.

For the log file, should I just copy it to a txt file and attatch it to a post?

Gold_Thing 03-03-2022 07:12 AM

Quote:

Originally Posted by hazel (Post 6333044)
You say you had to do something as root and that started the problem. How did you become root? Did you use gksu or sudo or su?

I opened the system monitor (Ksysguard) and suspended Network Manager. I was prompted for the root password to suspend it.

smallpond 03-03-2022 08:06 AM

Xorg.1.log is for the X server on display 1. If you don't have multiple displays, then something is wrong in your configuration.

You can grep for lines starting with EE and post them.

Edit: most likely you have started 2 X servers, so the second one is logging to 1.
See https://askubuntu.com/q/951260/1030912

mrmazda 03-03-2022 05:29 PM

Quote:

Originally Posted by Gold_Thing (Post 6334689)
Deleting Xauthority file and creating a new one

Delete it and do not create a new one. Creating an Xauthority file is for the system to do, not the user.

Gold_Thing 03-05-2022 10:32 AM

2 Attachment(s)
These are the Xorg logs. I only use one monitor so there shouldn't be two of them.

TB0ne 03-05-2022 12:22 PM

Quote:

Originally Posted by Gold_Thing (Post 6335370)
These are the Xorg logs. I only use one monitor so there shouldn't be two of them.

Right; a new one gets created when the X server starts a second time. One thing you may try is by logging in (on a terminal) as your 'regular' user, and deleting the Xorg log files like the ones you noted here, along with any files in the the $HOME/.local/share/xorg directory. Had a nagging X issue, and just removing those log files and typing in "startx" brought things up.

suramya 03-05-2022 05:55 PM

Looking at the Xorg.1.log I see entries stating that all of the ati, vesa and fbdev modules failed to load. That could be what is causing the issue. You can try installing xf86-video-fbdev or xf86-video-vesa . (Not sure about the package for ati)

mrmazda 03-05-2022 06:24 PM

Fbdev and vesa are crude, unaccelerated, fallback drivers. Installing them is optional. When not installed, they cannot be loaded. As long as an optimal driver is loaded and working properly, their failure to load is a non-issue. Their most significant use is to enable any X at all for the purpose of diagnosis and/or reconfiguration, to get X working the way it's supposed to work using KMS-supported drivers modesetting, amdgpu, intel, nouveau, and several others for uncommon GPUs. Ati is not an actual driver, but a driver selector, available for determining which among 3 old drivers to load for ancient ATI GPUs. Optimal driver for OP's CPU is most likely the amdgpu DDX display driver, with competent fallback to modesetting DIX display driver if the amdgpu is not available.

suramya 03-06-2022 03:14 PM

Quote:

Originally Posted by mrmazda (Post 6335500)
Fbdev and vesa are crude, unaccelerated, fallback drivers. Installing them is optional. When not installed, they cannot be loaded. As long as an optimal driver is loaded and working properly, their failure to load is a non-issue. Their most significant use is to enable any X at all for the purpose of diagnosis and/or reconfiguration, to get X working the way it's supposed to work using KMS-supported drivers modesetting, amdgpu, intel, nouveau, and several others for uncommon GPUs. Ati is not an actual driver, but a driver selector, available for determining which among 3 old drivers to load for ancient ATI GPUs. Optimal driver for OP's CPU is most likely the amdgpu DDX display driver, with competent fallback to modesetting DIX display driver if the amdgpu is not available.

Thanks for the clarification and details. I will try to do a bit more research over the next few days to learn more about this topic as I now know that I need to learn a lot more :)


All times are GMT -5. The time now is 07:01 PM.