LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to start lightdm after switching graphics provider (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-start-lightdm-after-switching-graphics-provider-4175642561/)

LMtheCat 11-17-2018 12:02 PM

Unable to start lightdm after switching graphics provider
 
Hello again everyone.

Recently my video card got busted so I had to switch to using onboard graphics from my cpu/motherboard. Back when the video card worked, it was connected using an HDMI cable. I'm now using DVI cable to connect to the motherboard, but it's still the same monitor.

During boot, Manjaro says it is now unable to start lightdm. It goes to a loop of starting lightdm and unable to start lightdm, and then at some point later it tries to download a mirror list or something. It's probably trying to download a solution to the problem, but I press the power off switch at that point because
a.) I'm not very comfortable with allowing network usage during the boot process, and
b.) my gut feeling is that this is a problem that can be fixed from a live usb and it might be a good opportunity to get down and dirty on a Linux system so to speak.

Any ideas on how I can fix the issue? I don't think it's a driver problem because iirc the package manager even updates radeon drivers even if I don't have a single piece of AMD hardware on this computer, but I'm not 100% certain on that. Even if it is a driver issue, it still sounds like something I can fix by booting a live usb and doing a little fiddling, I just have no idea what exactly am I supposed to do.

Thanks for your time.

mrmazda 11-18-2018 01:03 AM

Are you sure the video card "got busted" and not Manjaro? What model was that card? It may be that you had special video configuration for that card and need to remove it. Likely you don't need a live USB boot. Likely you can hit the e key when a boot menu appears, and edit the linux line by appending " 3", then proceeding to boot in text mode, where you can login and collect data for troubleshooting. You should post here the content of /var/log/Xorg.0.log if it exists, otherwise in ~/.local/share/xorg/Xorg.0.log, plus /etc/X11/xorg.conf it if exists, and the output from
Code:

inxi -Gxx
dmesg | grep -i failed


LMtheCat 11-18-2018 03:00 AM

Quote:

Are you sure the video card "got busted" and not Manjaro? What model was that card? It may be that you had special video configuration for that card and need to remove it. Likely you don't need a live USB boot. Likely you can hit the e key when a boot menu appears, and edit the linux line by appending " 3", then proceeding to boot in text mode, where you can login and collect data for troubleshooting.
Well, the symptoms were
-crashing to a single color randomly while the computer is in use (usually white for Manjaro, purplish for Windows 7). Curiously, it usually crashes while idle on desktop or when I'm on the browser, rather than 3d games which I think are much higher loads.
-on Windows it would sometimes reboot by itself after the previously mentioned screen
-if audio was playing at the moment of crash, it would keep repeating the last second or half-second of audio until reboot
-one time after automatically rebooting, there were squiggly purplish/rainbow lines at the POST screen
-my first hunch was loose or bad cable, so I switched from HDMI to DVI, but at that point, I was never able to get any video when connected from the card again after powering on. Both HDMI and DVI connections were okay when connected to the motherboard, though. I'm only sticking to DVI because I don't like how the HDMI cable "snaps" in like it might break.

My own personal non-expert opinion thinks that's a busted graphics card, although it's an Nvidia 750ti with dual fans that are still working so I'm also not convinced that it failed by toasting itself. I'll try your solution when I get back to the problem machine. Thanks in advance for the response.

ondoho 11-18-2018 03:28 AM

so did you take the card out?

Quote:

Originally Posted by LMtheCat (Post 5927083)
It's probably trying to download a solution to the problem, but I press the power off switch at that point

this is likely to make matters worse.
and your fears ("not comfortable") are completely unfounded.

you need to boot to a command line and start investigating the problem.
i believe mrmazda already provided some commands to start troubleshooting with.

LMtheCat 11-18-2018 03:48 AM

Quote:

so did you take the card out?
Yeah, I already pulled the card out. Actually, before pulling it out, I've tried connecting to the motherboard while leaving the card there with nothing connected to it, but just as I thought things were going smoothly, I got blue screens on Windows. I wanted to check if Manjaro would have similar problems, but at this point, it was failing at lightdm already. I haven't had any incidents so far after the card is out of the computer.

Quote:

this is likely to make matters worse.
and your fears ("not comfortable") are completely unfounded.
I don't know, but it's just not my style letting the computer do anything with the network until I have some control over it. If it presented me with a Y/N prompt I might reconsider, but as it is, I'd prefer to do it "manually".

zeebra 11-18-2018 05:28 AM

You need to reconfigure X to work with the new graphic card! Provided the new graphic card works and is used by Linux.

That is step 1.. After that you might check if the old graphic card might still work.. But as of now, reconfigure X to work with your CURRENT graphic card.

I'm not aware of special things applying to Manjaro nor Arch, but perhaps you can try something like this (from Arch manual):
Code:

# Xorg :0 -configure
It says in the manual this will create a new Xorg config file in arch and use this as default. As I am not familiar with Arch or Manjaro, there could also be some kind of included command tools in the system to configure Xorg in the CLI with some ncurses interface or something similar. Perhaps tab on "x" in the CLI and see what you find available.

Or try "mhwd --help" as this seems like a multitool in Manjaro and could contain alot of important tools, including the one you need.

If nothing else helps, you can always configure your xorg.conf file manually.

mrmazda 11-19-2018 03:24 AM

Xorg -configure at least 99.99% of the time is a complete waste of time, assuming it doesn't segfault, which is common. What it does is create a skeleton xorg.conf that matches the default configuration provided by the automagic configuration template. The xorg.conf it creates is loaded with non-video configuration that serves only to conflate the file and confuse someone trying to escape from gfx trouble. The limited video config it includes is no different from what automagic tries to use.

The place to start when using a new video card is to strip all manual configuration from /etc/X11/ and elsewhere so as to give Xorg's automagic configuration system that works 99+% of the time with FOSS drivers a chance to do its magic. The required stripping isn't necessarily easy if the old configuration was created by installing proprietary drivers, such s NVidia's. For that, following the NVidia installation driver section on uninstallation is the least that is usually necessary. NVidia driver installation typically includes changes in Grub configuration that need to be reverted, removal of nomodeset from the kernel cmdline in particular, since all the most popular FOSS drivers require KMS to be enabled in order to function.

LMtheCat 11-19-2018 03:58 AM

Quote:

The place to start when using a new video card is to strip all manual configuration from /etc/X11/ and elsewhere so as to give Xorg's automagic configuration system that works 99+% of the time with FOSS drivers a chance to do its magic. The required stripping isn't necessarily easy if the old configuration was created by installing proprietary drivers, such s NVidia's. For that, following the NVidia installation driver section on uninstallation is the least that is usually necessary. NVidia driver installation typically includes changes in Grub configuration that need to be reverted, removal of nomodeset from the kernel cmdline in particular, since all the most popular FOSS drivers require KMS to be enabled in order to function.
Does this mean getting to the command line and telling the package manager to uninstall the Nvidia driver won't be enough?

mrmazda 11-19-2018 04:14 AM

Quote:

Originally Posted by LMtheCat (Post 5927595)
Does this mean getting to the command line and telling the package manager to uninstall the Nvidia driver won't be enough?

The driver uninstallation process certainly should be enough, but things happen in the interim, and it might not. Sometimes reinstalling NVidia driver, then running its uninstallation script will work when it didn't the first try. Sometimes grub isn't fixed. Sometimes blacklisting needs to be undone manually. Sometimes an extra reboot more more is required.

LMtheCat 11-20-2018 03:23 AM

Okay, I tried the easiest solution first which was to uninstall Nvidia drivers. The boot messages are no longer looping lightdm errors, so I guess this is progress. However, it's still not booting to anything graphical. After a bunch of green success messages, it just sits there at the blinking "_" cursor (if it just cleared a full screen of messages, it would be a blank screen with nothing but the cursor, but sometimes some previous messages are left on the screen). In any case, I don't think it crashed because pressing the power button will flood the screen with routine shutdown messages.

Near the start of the boot process, it says failed to start Load Kernel Modules, which I think was also there before I uninstalled the drivers (it's hard to notice because it gets flooded too fast by the next messages). There was no nomodeset argument on the linux line, the arguments there after the long target strings are rw \ quiet. I remove quiet since I think it only prevents some messages from displaying, but I didn't touch the rest of the arguments although I think \ stands for the command continuing to the next line.

zeebra 11-20-2018 03:45 AM

This is where you probably need to blacklist a kernel module. Alternatively you can use the tools in your distro to build a new kernel, or you can build one manually.

To blacklist a kernel module create a file named nameofmodule.conf under /etc/modprobe.d and add a single line in the file, like "blacklist nameofmodule".

For further info of the problematic issue, inspect your dmesg file or journalctl -b.

mrmazda 11-20-2018 04:01 AM

Blacklisting is for use of proprietary NVidia drivers. The apparent current (posts 9 & 10) objective is eradicating all traces of NVidia drivers, to give one of the FOSS drivers (nouveau or modesetting) a chance to work. They can't if either remains blacklisted after a failed attempt to undo NVidia driver installation.

ondoho 11-21-2018 02:24 AM

Quote:

Originally Posted by LMtheCat (Post 5927924)
The boot messages are no longer looping lightdm errors, so I guess this is progress. However, it's still not booting to anything graphical. After a bunch of green success messages, it just sits there at the blinking "_" cursor (if it just cleared a full screen of messages, it would be a blank screen with nothing but the cursor, but sometimes some previous messages are left on the screen). In any case, I don't think it crashed because pressing the power button will flood the screen with routine shutdown messages.

good.
can you now switch to another tty?
by pressing e.g. Ctrl+Alt+F2?
then login with your usual credentials?

from there you should start collecting some information & show it to us.
on a wild guess, i'd say lightdm or even X is still trying to start but fails, so you might want to disable that and see if you can get a normal command line boot.

zeebra 11-21-2018 04:06 AM

Quote:

Originally Posted by mrmazda (Post 5927933)
Blacklisting is for use of proprietary NVidia drivers. The apparent current (posts 9 & 10) objective is eradicating all traces of NVidia drivers, to give one of the FOSS drivers (nouveau or modesetting) a chance to work. They can't if either remains blacklisted after a failed attempt to undo NVidia driver installation.

But a removed driver does not recompile the Kernel and modules.. Or I guess that depends on the distro and package manager system etc. Anyways, I never really had to deal with Nvidia so I know very little about how such a proprietary driver works. I just assumed it loaded into the Kernel somehow, and once removed, you'd need to recompile the Kernel. But that might be wrong yes.. I guess it uses DKMS, and that is me getting on thin ice for sure.

LMtheCat 11-21-2018 08:35 AM

I think I got it back working now, assuming it's not about to hit me with another error somewhere, although it looks fine so far.

When I said I uninstalled the Nvidia driver, I meant I ran the pacman command. I checked the Manjaro wiki going from the advice:

Quote:

Or try "mhwd --help" as this seems like a multitool in Manjaro and could contain alot of important tools, including the one you need.
Luckily, the Nvidia driver is still listed when I ran "mhwd -li" despite removing it from pacman. I ran the corresponding "mhwd -r" on the Nvidia driver and now I'm back in the graphical desktop after reboot.

Before I mark the thread solved, I wanna ask if there's any universal/common denominator way to do this across distros. I got lucky since Manjaro has mhwd, but can I expect other beginner friendly distros to have something similar? It feels to me like the more mature distros won't have such a tool because their answer to that is on the user's knowhow.

Also, is there any way to set the system up to use whichever graphics provider is available when the previous hardware is no longer present? This may sound spoiled, but I'm only asking because this wasn't an issue with Windows and I'm not familiar enough with Linux to distinguish between "it can't do that because it's different" and "it can do that, but you have to x, y, z...".

Thanks for all the responses, everyone. It would have taken me forever to get things done by myself.

mrmazda 11-21-2018 11:18 AM

Quote:

Originally Posted by LMtheCat (Post 5928362)
Also, is there any way to set the system up to use whichever graphics provider is available when the previous hardware is no longer present? This may sound spoiled, but I'm only asking because this wasn't an issue with Windows and I'm not familiar enough with Linux to distinguish between "it can't do that because it's different" and "it can do that, but you have to x, y, z...".

When automagic hasn't been mucked up with proprietary driver blacklisting and manual configuration, automagic usually does the job automagically. IOW, put an AMD card in a previously empty PCIe slot in an Intel gfx motherboard, and the system can be expected to use an appropriate AMD driver without any user input. Same goes for removing an AMD card and putting in a GeForce card, as long as it isn't too new to be supported by an installed modesetting or nouveau driver.

273 11-21-2018 01:07 PM

Sorry to be a bit slow but I see that a graphics card was installed, followed by drivers, then the lead to the monitor was plugged into the motherboard? Did I miss where this is a laptop?

ondoho 11-21-2018 01:07 PM

Quote:

Originally Posted by LMtheCat (Post 5928362)
Before I mark the thread solved, I wanna ask if there's any universal/common denominator way to do this across distros.

yes, the manual way where one actually understands what's going on through troubleshooting & taking appropriate measures.

zeebra 11-21-2018 02:29 PM

Quote:

Originally Posted by LMtheCat (Post 5928362)
Before I mark the thread solved, I wanna ask if there's any universal/common denominator way to do this across distros. I got lucky since Manjaro has mhwd, but can I expect other beginner friendly distros to have something similar? It feels to me like the more mature distros won't have such a tool because their answer to that is on the user's knowhow.

Nah, there is not a cross distro way to do this, because some distroes are more or less fully dependent on the distro management tools to do anything. But in real life, everything is actually very simple and works the same way in any distro, regardless of the weirdnesses of any distro.

You have to understand the core of what is going on, and then adapt your approach to whatever distro you are using. This is one reason I do not like distroes like Ubuntu or Fedora, where everything is pretty much done in their own way, and if you do things manually, there is a big risk you will break the system even if you do it correctly.

I don't like this integrated type of approach. For me (both practically and philosophically) the disadvantages far outweigh the advantages.

LMtheCat 11-21-2018 06:49 PM

Quote:

Sorry to be a bit slow but I see that a graphics card was installed, followed by drivers, then the lead to the monitor was plugged into the motherboard? Did I miss where this is a laptop?
It's a desktop computer. By plugging into the motherboard I meant the ports for integrated graphics at the back panel. Sorry about the confusion.

Quote:

When automagic hasn't been mucked up with proprietary driver blacklisting and manual configuration, automagic usually does the job automagically. IOW, put an AMD card in a previously empty PCIe slot in an Intel gfx motherboard, and the system can be expected to use an appropriate AMD driver without any user input. Same goes for removing an AMD card and putting in a GeForce card, as long as it isn't too new to be supported by an installed modesetting or nouveau driver.
What I'm getting from this is that the proprietary Nvidia driver does not conform with how the built-in drivers (not sure if drivers is the correct term, but I'll call them that because that's the only word I got) do their thing, and instead imposes its own way of doing things by blacklisting etc. Okay, let's give them that. But is there any way like for example have 2 different configurations, 1 for defaults and another for Nvidia, and maybe on the grub menu allow me to pick between them so Linux can do a boot process for the appropriate driver+hardware?

Again, I'm only asking because I didn't encounter this problem on Windows. Even now, I still haven't bothered to uninstall the Nvidia driver there, but it was still able to get to the graphical desktop anyway. That makes my pov default to "Linux can also do something like that", unless someone who knows better tells me it's not possible because such and such. If it is indeed doable, I want to ask here how, so if it happens to be within my ability, I bother to do it on my computer. Sorry for the long winded post.


All times are GMT -5. The time now is 10:00 PM.