"sudo service lightdm stop" will go into a blank screen

1,476

Solution 1

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

If you are using GNOME:

sudo /etc/init.d/lightdm stop

to start again:

sudo /etc/init.d/lightdm start

If you are using GNOME:

sudo /etc/init.d/gdm stop

to start again:

sudo /etc/init.d/gdm start

If you are using kde:

sudo /etc/init.d/kdm stop

to start again:

sudo /etc/init.d/kdm start

Once you stop X, you need to get to virtual terminal. In Ubuntu its Ctrl+Alt+F1 - F7, to login, and gain access to the system.

Solution 2

Try pushing Ctrl+Alt+F1 (or whatever the Mac has) and login to install your drivers

Solution 3

Here is another not so elegant solution that worked for me, I had same problem (still don't know why..): Just start up an ssh server before you kill the X server and do the driver install remotely from another machine.

Solution 4

What others already said Get into tty 1 - 6 first and then sudo service lightdm stop.

My workaround:

Boot into console mode from the beginning. To do that, edit /etc/default/grub file. Make sure you connnect automatically to your home network, you are on wired network, or at least you know how to use nmcli to connect to a network.

Change line 12 from "" to "text" as shown bellow. Save, sudo update-grub, reboot. Once you are presented with console login screen, go ahead and log in, do the installation, edit /etc/default/grub file back the way it was, sudo update-grub and reboot.

enter image description here

BONUS : Get yourself elinks console browser before you edit the grub file, so that in case you funk something up, you can google stuff from the command line.

Other things you could: sudo pkill X

Solution 5

I had the same issue and got it to work with a different workaround.

I had to first reduce the resolution inside X to something low (800x600). Then when I went to tty and stopped lightdm, I didn't get a blank screen.

Share:
1,476

Related videos on Youtube

zduny
Author by

zduny

Updated on September 18, 2022

Comments

  • zduny
    zduny almost 2 years

    In my code I called glGenerateMipmap before actually loading texture data (with glTexImage2D), yet I noticed it still seems to work...

    Why is that? Does calling glGenerateMipmap cause future glTexImage2D calls to create mipmap data as well?

    Code (I use C# and OpenTK):

    int id = GL.GenTexture();
    GL.BindTexture(TextureTarget.Texture2D, id);
    
    GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int) TextureWrapMode.ClampToEdge);
    GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int) TextureWrapMode.ClampToEdge);
    GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (float)TextureMinFilter.LinearMipmapLinear);
    GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (float)TextureMagFilter.Linear);
    
    // if I comment this line it results in triangles being black - suggesting mipmaps are being used
    // (otherwise it works just fine)
    GL.GenerateMipmap(GenerateMipmapTarget.Texture2D);
    
    BitmapData bmpData = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height),
                ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
    
    GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, bmpData.Width, bmpData.Height, 0,
    OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, bmpData.Scan0);
    
    bitmap.UnlockBits(bmpData);
    
    • Stefano Mtangoo
      Stefano Mtangoo about 11 years
      lightdm AFAIK is login Window and its not the Xserver
    • shay.porteous
      shay.porteous about 11 years
      ... but stopping it will also kill your X-session.
    • Yuri
      Yuri over 10 years
      I have the same problem, drivers are installed. It seems to me that my problem is in presence of gdm (I have both lightdm and gdm installed, I am using lightdm). But still not sure how to fix it.
    • Andon M. Coleman
      Andon M. Coleman about 9 years
      It's not supposed to work that way, but anything's possible when you invoke undefined behavior. glGenerateMipmaps (...) takes image LOD 0 and generates the mipchain by downsampling it for all remaining LODs down to 1x1. That of course only makes sense when image LOD 0 is allocated, which it is not until you call glTexImage2D.
  • mbilyanov
    mbilyanov about 11 years
    Thanks, this is another strange part. All my virtual terminals are a blank screen, black, nothing. Then when I go CTRL+ALT+F7, the X Windows comes back. I do not understand.
  • Raphtaliyah
    Raphtaliyah about 11 years
    You can also try to reboot into Recovery Mode and access the terminal If you have the option
  • mbilyanov
    mbilyanov about 11 years
    Non of these commands work :( It just returns command not found.
  • mbilyanov
    mbilyanov about 11 years
    So? Any driver updates etc. I make under Recovery Mode's terminal will have effect on the actual SYS, right?
  • Mitch
    Mitch about 11 years
    Which display manager are you using?
  • mbilyanov
    mbilyanov about 11 years
    Thanks: "sudo /etc/init.d/lightdm stop" kills X Server but I am immediately left with a blank screen, not terminal, just I like I am dropped into a blank screen when I hit CTRL+ALT+F1. Something is fundamentally broken. :(
  • mbilyanov
    mbilyanov about 11 years
    X Server? It is Xubuntu 13.04.
  • Raphtaliyah
    Raphtaliyah about 11 years
    yes, as long as you boot using the Recovery Mode from the SYS
  • Raphtaliyah
    Raphtaliyah about 11 years
    nVidida Drivers need to be installed with no running XServer I think, also it's mostly better to download drivers from nvidia.com because they are newer.
  • GM-Script-Writer-62850
    GM-Script-Writer-62850 about 11 years
    if you add the PPA i linked you can get the latest, only lag a day or 2 behind, stable drivers are in the xswat ppa
  • mbilyanov
    mbilyanov about 11 years
    Hi, thanks for the help. I messed up my Linux badly by installing an Nvidia driver that was not compatible with my Kernel. Then I got a Kernel-Driver mismatch and could not really recover. Just re-installed Xubuntu 13.04 and started from scratch. This is tricky and I do not understand how to do this right.
  • GM-Script-Writer-62850
    GM-Script-Writer-62850 about 11 years
    I assume you want the 319 driver, it will slow up in the xswat ppa soon, atm there is no raring repo there, you can get the beta driver from the xorg edgers ppa (BETA TESTING) if you cant wait sudo apt-add-repository ppa:xorg-edgers/ppa;sudo apt-get update;sudo apt-get dist-upgrade you may need to go into software sources to get the 319 driver
  • mbilyanov
    mbilyanov about 11 years
    Hi, I will start a new question related to this. Could you please help me in understand how to find the right driver? The question will be: askubuntu.com/questions/296168/… Thanks.