Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
startx fails (black screen) after emerge --update and reboot
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
froosh
n00b
n00b


Joined: 10 Jul 2014
Posts: 29

PostPosted: Thu Jul 10, 2014 6:25 am    Post subject: startx fails (black screen) after emerge --update and reboot Reply with quote

Hi everyone,

After a fresh install where I used
Code:
genkernel all
to compile, I tried installing the X11 server using nvidia as my graphics driver. Essentially, I followed the advice from the wiki articles Xorg and nvidia and ran the following commands:

Code:

echo "VIDEO_CARDS=\"nvidia\"" >> /etc/make.conf
echo "INPUT_DEVICES=\”evdev\”" >> /etc/make.conf
echo "x11-base/xorg-server udev" >> /etc/portage/package.use
emerge --ask xorg-server
emerge twm xterm xclock
env-update
source /etc/profile
modprobe nvidia
eselect opengl set nvidia
nvidia-xconfig
startx


And everything worked like it should have. I was able to see three xterm windows and a small clock. I was testing this prior to installing a desktop environment. I then ran the emerge update full command
Code:
 --update --deep --with-bdeps=y --newuse @world
and restarted my computer. Now when I type
Code:
startx
it opens a black screen with a non-blinking cursor in the left corner and is unresponsive requiring a hard reset. Now nothing I do seems to load back the X server. Also noteworthy is that I cannot completely replicate the commands when it comes to the nvidia module. Attempting to rmmod nvidia returns an error that it's in use, despite having no X session open and within the initial bash terminal.

I checked my /var/log/Xorg.0.log files and I noticed that there were two: Xorg.0.log and Xorg.0.log.old. The first is completely empty, and the latter must be the log file from when everything worked (its a full log file and at the end it says successfully terminated).

Does anyone have any idea why this would happen?
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Thu Jul 10, 2014 7:10 am    Post subject: Reply with quote

I don't have a Nvidia card, but since that doesn't seem to be your problem,

First, what was updated? Did your update any config files? Did you run depclean? If so, did it remove twm, xterm, and xclock?

If you updated your kernel or xorg your going to need to rebuild something. Nvida must be built against the running kernel and xorg drivers need to be built against the current version of xorg. Use emerge -1av $(qlist -IC x11-drivers/*) to rebuild them.


If this fails then more information is needed. Emerge wgetpaste and post the urls returned by wgetpaste /var/log/Xorg.0.log where you post a log showing the failure.
Quote:
it opens a black screen with a non-blinking cursor in the left corner and is unresponsive requiring a hard reset.
This may not be the case. You should be able to use ctl+alt+F1 to return to a terminal line. F1 probably corresponds to the TTY you logged in on and you can kill X using ctl+c to return to your shell. On Gentoo, by default xorg displays on F7 and there is a running log on F12.

Failing that, you can also use a kill switch in your test. Use something like
Code:
startx & sleep 10; killall X
This will allow startx to run for 10 seconds and then terminate it no matter what.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
froosh
n00b
n00b


Joined: 10 Jul 2014
Posts: 29

PostPosted: Thu Jul 10, 2014 7:38 am    Post subject: Reply with quote

Thanks for the fast reply!

The Doctor wrote:
First, what was updated? Did your update any config files? Did you run depclean? If so, did it remove twm, xterm, and xclock?


After the three xterm windows popped up and I ran the emerge --update command, there were 39 new installs so something must have changed. I did install twm and xterm again, which should have prevented the black according to the internet.

The Doctor wrote:
If you updated your kernel or xorg your going to need to rebuild something. Nvida must be built against the running kernel and xorg drivers need to be built against the current version of xorg. Use emerge -1av $(qlist -IC x11-drivers/*) to rebuild them.


I ran this command and typed:
Code:
startx & sleep 10; killall X
.

This time a black screen appeared that engaged the backlight of the monitory (as opposed to a dull black screen with the cursor). However, it did not quit after 10 seconds... I'm unable to ctrl+C, or ctrl+alt+F__ and get back into a terminal either. My keyboard looks as though it's not longer working as the lights for "num lock" and "caps lock" don't do anything anymore. Probably why I cannot quit this; although, why would it not quit automatically after 10 seconds?

The Doctor wrote:
If this fails then more information is needed. Emerge wgetpaste and post the urls returned by wgetpaste /var/log/Xorg.0.log where you post a log showing the failure.


Returns "No input read. Nothing to paste.". This is after a hard reset of my computer. I looked at this file to make sure it exists, and less and nano both show this as empty.
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Thu Jul 10, 2014 7:56 am    Post subject: Reply with quote

It would be really helpful to know what packages where updated. It seems trying to run X is really locking up the system, not just failing to display anything. You can find an explicit list in /var/log/emerge.log or you can emerge genlop and run something like genlop -l --date 2014/07/10 Which will list everything merged on July 10, 2014. You can paste the output by appending | wgetpaste to it.

Quote:
Probably why I cannot quit this; although, why would it not quit automatically after 10 seconds?
This indicates to me that it isn't just a display problem. Running X is locking up your entire system.

I'm tired, so I'll be loging off soon. Just one more wild guess. Try running revdep-rebuild. Portage has gotten good at avoiding breakages during updates, but it still isn't perfect.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2508
Location: Silver City, NM

PostPosted: Thu Jul 10, 2014 9:33 pm    Post subject: Re: startx fails (black screen) after emerge --update and re Reply with quote

froosh wrote:
Now when I type startx it opens a black screen with a non-blinking cursor in the left corner and is unresponsive requiring a hard reset.

I had this problem earlier today and was able to fix it by downgrading nvidia-drivers from 337.25 to 334.21-r3. YMMVG
Back to top
View user's profile Send private message
froosh
n00b
n00b


Joined: 10 Jul 2014
Posts: 29

PostPosted: Fri Jul 11, 2014 3:23 am    Post subject: Re: startx fails (black screen) after emerge --update and re Reply with quote

BitJam wrote:
froosh wrote:
Now when I type startx it opens a black screen with a non-blinking cursor in the left corner and is unresponsive requiring a hard reset.

I had this problem earlier today and was able to fix it by downgrading nvidia-drivers from 337.25 to 334.21-r3. YMMVG


I have a feeling it is in the nvidia driver as well. I used
Code:
VIDEO_CARDS="nouveau"
instead in my make.conf file, and startx complains about missing a screen, but that's preferable at this stage than crashing my computer.

I'll try the the other drivers and report back later this evening. Thanks for the tip!
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2508
Location: Silver City, NM

PostPosted: Fri Jul 11, 2014 3:34 am    Post subject: Reply with quote

The latest Nvidia driver (the one that didn't work) uses the dreaded KMS (modeset) which can cause difficulties booting the computer even without starting X.
Back to top
View user's profile Send private message
froosh
n00b
n00b


Joined: 10 Jul 2014
Posts: 29

PostPosted: Fri Jul 11, 2014 4:31 am    Post subject: Reply with quote

BitJam wrote:
The latest Nvidia driver (the one that didn't work) uses the dreaded KMS (modeset) which can cause difficulties booting the computer even without starting X.


So I masked out the the nvidia-drivers-337.25 package and after the new module has been loaded my X environment loads up. Rebooted my computer and it's still working on my root and user profile.

I thank-you so much! I could not find this solution anywhere on the internet. For future reference, how would I have figured to roll back the driver? Experience or is there a place where I could have read about the issues?

Thanks again to both of you. I had my old Ubuntu disk ready to install again!
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2508
Location: Silver City, NM

PostPosted: Fri Jul 11, 2014 4:42 am    Post subject: Reply with quote

froosh wrote:
I could not find this solution anywhere on the internet.
Welcome to Gentoo!
Quote:
For future reference, how would I have figured to roll back the driver?
I was fooled this time around because they added the KMS stuff and it only really screwed up when I rebooted. Normally, whenever the nvidia driver gets updated, I shutdown X, unload the driver and then start X again to see if there are any problems. Also, probably because of the KMS stuff, this failure mode was different from the failures I normally get with Nvidia. In fact, Nvidia has been relatively stable (for me) over the past few years.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum