[SOLVED] Reinstalled xorg after it was accidentally uninstalled: now get weird error in Xorg.0.log
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
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.
Reinstalled xorg after it was accidentally uninstalled: now get weird error in Xorg.0.log
This is about a friend's machine, not mine. I've been messing about with it all morning at her place and have reached a dead end. I'm typing this on my own machine at home.
She's running AntiX, which I installed for her. The trouble started when her weekly update went wrong. Of course she can't describe to me retrospectively exactly what she did, but the upshot was that synaptic began deleting packages. Including, as it happens, xorg. And then of course, she couldn't get the gui to come up. My guess is that she inadvertently deleted some desktop metapackage and a lot of dependencies got scrubbed. Apt does that unfortunately.
I realised pretty quickly that X was actually gone and not just misbehaving, so I reinstalled xorg via apt-get, and assumed that would fix it. But it still wouldn't run and I got a very uninformative message at the end of Xorg.0.log:
Fatal server error:
AddScreen/Screeninit failed for driver 0
Google shows a lot of very old posts on this, dating back to the days when you needed a detailed configuration file for X; misconfiguration was then the usual cause of this message. But modern Xorg is self-configuring and none of the hardware has changed. It's an Intel card btw but it's using the modesetting driver (the recommended driver nowadays).
Xorg is a metapackage in Debian-based distros, and it's supposed to bring over with it everything you need for a basic desktop except a window manager: server, X-libraries, fonts and so on. And we should still have fluxbox installed (though I can't remember now if I actually checked on that).
I've tried launching the slim DM, startx, even raw X.The result is always the same: there is a momentary shift to a new console but it returns almost at once. And that weird message in the log.
We could always reinstall the system of course. But I'm loath to do that on principle. When things go wrong in Linux, I like to fix them, not give up on them. Still, if someone can't give me a hint soon, that's what we'll have to do.
Fatal server error:
AddScreen/Screeninit failed for driver 0
First guess - more missing software. Seeing as it's apt-get, have you tried
--fix-broken
--dist-upgrade (to the same or later distro)
I found the --fix-broken fairly useful. I'm going to install Mint on my obsolete HP Laptop. I got fairly fond of Mint. Mind you, I'm still a slacker on my main machine.
Thanks, both of you! It's always good to have another perspective on these things. I've just spoken to my friend and we can reconvene on Friday morning at her place to try out your suggestions.
Believe it or not, I didn't realise that apt has a separate log, and I've been using Debian for years! I've just been looking at it on my Debian system on Bigboy and it is beautifully detailed.
When you're dealing with someone who isn't computer literate and who has screwed up her system, it's often impossible to find out by interrogation exactly what she did that caused all the trouble. My guess is that she accidentally uninstalled a top-level metapackage. If so, I will now be able to see what it was, whereas up till now I have been working blind. But I'll try the apt-get -f option first as that is at least simple to do.
For info, apt actually has another log as well - /var/log/apt/term.log - which keeps a record of everything output to the terminal during apt commands. It might also prove useful for you.
I am typing this on my friend's machine; we are up and running again! Business_kid was right; it was missing software.
When I looked at the log for the delete, I saw a slew of specialised video drivers including the Intel one. When I reinstalled xorg, it didn't put these back because nowadays it prefers to use the built-in modesetting driver. But this is an old machine and seemingly modesetting doesn't work on it. I reinstalled the Intel driver and we had our gui!
I have also reinstalled a few other things that got deleted in error (gimp, sane...).
I am marking this solved, but I couldn't have solved it without some community input!
I am typing this on my friend's machine; we are up and running again! Business_kid was right; it was missing software.
When I looked at the log for the delete, I saw a slew of specialised video drivers including the Intel one. When I reinstalled xorg, it didn't put these back because nowadays it prefers to use the built-in modesetting driver. But this is an old machine and seemingly modesetting doesn't work on it. I reinstalled the Intel driver and we had our gui!
I have also reinstalled a few other things that got deleted in error (gimp, sane...).
I am marking this solved, but I couldn't have solved it without some community input!
If you google that error message that I got, most of the posts seem to be about using the wrong modelines for your monitor. I didn't see the relevance of that before, but now I have at least an inkling. Maybe the modesetting driver chose the wrong mode for this card/monitor combination. If anyone can recommend an entry-level guide on modes, what they actually are, and how the kernel/X driver sets them, please drop me a link.
In the meantime, I have impressed three useful lessons on my friend:
1) If a program that you use regularly proposes to do something it has never done before, assume something is wrong and say no. Especially if you are working as root.
2) Even after things have gone wrong in Linux, you can usually fix them.
3) When you get to the stage where you are going round and round, doing the same things over and over, ask for help from the community.
According to the definition, your friend is an intermediate user.
BEGINNER: Is afraid to do anything in case he screws up the whole thing
INTERMEDIATE: Doesn't know what to do when he has screwed the whole thing.
EXPERT: Screws up on other people's computers.
As for Modelines, if it doesn't have an ISA bus, I'd hardly bother unless X won't boot. It sets 640x480 @ 31.5 Khz as an absolute last resort. All it means is that the modes it doesn't like can come out. The limits on Horizontal & Vertical refresh are important. Man xorg.conf has a bit on them, but there is/was a modeline generator online somewhere.
If you get teetotally stuck, post again and we'll cobble you up something. Distros throw in every conceivable modeline. I think it's
"name", dot clock, horizontal (4), vertical (4), options. Here's an example
The dot clock is in Mhz; Now X can multiply better than I can. The 4 are right visible, right invisible, left invisible, and left visible, which is also 0 of the next line, and similarly on the vertical, bottom visible etc. The dot clock sets the refresh (by my calculations 1688x1066x60 = 104,126,880 which is close, but wrong) This stuff was for analogue monitors.
Modelines are like that. I rolled my own back in the day.
In the bad old days of CRT Tubes, width was guesswork, and adjustable, and horizontal frequency was potentially lethal to the hardware. Modelines mimicked the way these worked. You needed over scan, with an invisible area to the left and right of each horizontal line. Ditto top and bottom. Then there was 'fly back' where the dot was driven from right to left by an inductive pulse. Monitors just tvs without the reception bit.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.