# [SOLVED] Ubuntu freezes after login in normal mode but not in recovery mode + Gnome



## JKR (Jan 28, 2007)

Dear all,

I am working on Ubuntu Karmic.
During boot, the login screen comes up and shows some graphic problems (several thin horizontal lines, making the monitor look like scratched. Choosing the user and login to Gnome work OK. The desktop shows graphic problems, too. After some seconds, Ubuntu will freeze. Only the mouse is still moving (sometimes with difficulties), but you cannot use it anymore (no click recognized), no key combinations seem to be recognized either. Neither memory nor CPU usage seem to be too high (looking at system monitor). System clock is not updated anymore, the freeze will not go away after some time. In the end, I have to switch off the computer to reboot.
This is a dual boot system, and the problem does not occur under "the other major operating system".

Workaround:
When I start Ubuntu into recovery mode and choose "drop to root shell with network", followed by gdm start, I can use Gnome normally, the screen looks nice and fresh, no freeze will happen.

So I wonder what I could do to make it work as normal again? There must be an important difference between normal mode and recovery mode + Gnome?

System: Dual boot Windows / Ubuntu 9.10 (Karmic)
ATI RV380 Radeon X600 (0x350) using radeon driver


----------



## wmorri (May 29, 2008)

*Re: Ubuntu freezes after login in normal mode but not in recovery mode + Gnome*

Hi,

I am not at my linux computer at the moment, but a little later I will work on this problem for you. It sounds like you just need to change the runlevel that your computer start up in. It isn't that hard but i want to test it on my computer first.

Cheers!


----------



## JKR (Jan 28, 2007)

*Re: Ubuntu freezes after login in normal mode but not in recovery mode + Gnome*

Hi wmorri,

thank you for being willing to help! To be more precise, in recovery mode, I run without problems in runlevel S. The problems occur when I startup normally. I am in runlevel 2 then, the standard Ubuntu runlevel. To me, that sounds pretty normal so far, but something must be wrong in runlevel 2. Running in runlevel S all the time can't really be the solution, can it?

Cheers!


----------



## wmorri (May 29, 2008)

*Re: Ubuntu freezes after login in normal mode but not in recovery mode + Gnome*

Hi,

I think that I have the answer for you. Or at least a fix for a little while until we can fix the boot screen so that it doesn't give you the lines on top. 

I need you to find out what runlevel you are running in when you are in the gdm or gnome desktop manager. To find this out you will need to open a terminal session and type:

```
runlevel
```
This will spit out a letter and a number. If you could post those in your next reply that would be great. I will working on how to change the login manager so that you can login from terminal to see if that will fix the issue.

Cheers!


----------



## JKR (Jan 28, 2007)

*Re: Ubuntu freezes after login in normal mode but not in recovery mode + Gnome*

Hi,

Oh, I don't have any problem to run my computer in any runlevel, with or without graphical support. It's just that browsing the internet is so much more fun when you don't do it with a text only console browser... This computer runs just fine in console mode. So it does in recovery mode (which gives me a root shell from which I can start X using the command gdm start). It runs without problems whith X started at this point. Here is another interesting piece of information: when I change the runlevel at this point to runlevel 2 using the command telinit 2, it will continue working without problems.

Just to get things straight: as far as I know, and please correct me if I'm wrong here, the default runlevel in Ubuntu and Debian systems is 2 (and not 5 as it is on other Linux distributions). Runlevels 2 to 5 should be all the same (and this is what happens when you use the update-rc.d command). Right? Now, on this particular machine, I messed up the runlevel links in rcX.d directories, with X in 3,4,5. If you wish, I'll recreate all the symbolic links in rc5.d as they are in runlevel 2. Shoud I? And yes, of course, I would be more than willing to have my computer start up in runlevel 5.


----------



## wmorri (May 29, 2008)

*Re: Ubuntu freezes after login in normal mode but not in recovery mode + Gnome*

Hi, 

I rewrote my pervious post please see the above, as I was giving the wrong information.


----------



## JKR (Jan 28, 2007)

*Re: Ubuntu freezes after login in normal mode but not in recovery mode + Gnome*

When the problems orccur:

runlevel N 2

When I boot in recovery mode, then start x, no problems:

runlevel N S

After telinit 2

runlevel S 2, still no problems.


----------



## JKR (Jan 28, 2007)

*Re: Ubuntu freezes after login in normal mode but not in recovery mode + Gnome*

To narrow down on the problem, I have purged my runlevel 2 down to the following:

ls -l rc2.d
total 4
-rw-r--r-- 1 root root 677 2009-11-09 10:00 README
lrwxrwxrwx 1 root root 24 2009-11-07 10:24 S05screen-cleanup -> ../init.d/screencleanup
lrwxrwxrwx 1 root root 19 2009-11-07 10:25 S06policykit -> ../init.d/policykit
lrwxrwxrwx 1 root root 13 2009-11-07 10:25 S07gdm -> ../init.d/gdm

The problems still persist.

Look how similar it looks now to runlevel S:

ls -l rcS.d
total 4
-rw-r--r-- 1 root root 447 2009-09-08 02:58 README
lrwxrwxrwx 1 root root 24 2008-07-28 05:37 S70screen-cleanup -> ../init.d/screen-cleanup
lrwxrwxrwx 1 root root 19 2009-11-03 18:02 S75policykit -> ../init.d/policykit
lrwxrwxrwx 1 root root 27 2008-07-28 05:37 S90console-screen.sh -> ../init.d/console-screen.sh

This one runs without any problems. Even if the first command issued on the root shell is gdm start. Can anyone tell me what's the difference between the two, except the little menu to choose the boot option from? It looks as if the script console-screen.sh repaired my freeze. How could that be?


----------



## wmorri (May 29, 2008)

*Re: Ubuntu freezes after login in normal mode but not in recovery mode + Gnome*

Hi,

I will have to do a little searching but I am curious as to how this is working for you. I will get back to you when I have adequete information for you on this.

Cheers!


----------



## JKR (Jan 28, 2007)

*Re: Ubuntu freezes after login in normal mode but not in recovery mode + Gnome*

Hi wmorri,

thanks for the continued support!

Now that I have removed the S07gdm symlink in rc2.d, I have learned something more: to my utter surprise, I still get a graphical login. So something else than the well known runlevels must be going on here. After ruling out magics and extraterrestrial intervention, and some more reading, I found out that the startup process has been changed in Ubuntu 9.10 Karmic Koala. A mechanism called upstart is used now, running scripts in /etc/init when some events occur. And I suppose that different events occur when I startup into recovery mode or into normal mode, which would explain why I have the problems in one case and not in the other one. A lot more reading seems to be required here. I am more and more curious to learn what you will dig up on this!

Thanks again for your willing support!


----------



## JKR (Jan 28, 2007)

*Re: Ubuntu freezes after login in normal mode but not in recovery mode + Gnome*

To narrow things down a bit, I installed KDM to have a look. Here is what I got:

Normal boot with KDM: same problems as with GDM.

Boot to recovery mode, drop to root shell with network. At the root promt type
kdm start. No problems.

So, to me, the problems come neither from GDM nor from KDM, but they are somewhere further upstream in the boot process.


----------



## JKR (Jan 28, 2007)

*Re: Ubuntu freezes after login in normal mode but not in recovery mode + Gnome*

My computer uses the Windows bootloader, as configured in the boot.ini file. Boot.ini calls Linux to start. Linux's bootloader Grub takes over and presents me with a menu giving me the choice of different Linux kernels in normal or recovery modes as well as a last opportunity to choose to continue booting Windows.
During the update from Ubuntu 9.04 to 9.10, which worked as planned, this did not change. So I am still with Grub as opposed to the newer Grub2 which would have been installed on a fresh installation (as well as with ext3 file systems and not ext4).
Now, this Grub has a configuration file called menu.list . In here, you can change the options quiet and splash to noquiet and nosplash. This will turn off the usplash screen (which is the first graphical part during the boot process) and let you see a lot of text flying by describing the progress of your boot process. Basically, I did this to be able to see the difference between recovery mode and normal mode, as there is no boot.log to be found and demsg looks alike in the two cases as far as I could tell. By the way, it took me quite a while to figure out how to switch off usplash, because so many sites state that usplash has been replaced by xsplash in Karmic. Well, this is not the case, Karmic uses both, hence the confusion.

And, hi day, yippy yeah!!! All my problems are gone! Just switched off the usplash screen, and Karmic will not freeze anymore and have no more graphics problems. I can even use the pretty desktop effects without problems now.

To make a long story short, on my system configuration, there seems to be a bug either in usplash, or the radeon driver, or some incompatibility between the two. Turn off usplash (which you don't need anyways), and my system doesn't freeze anymore!

wmorri, thanks for your willingness to help!


----------



## wmorri (May 29, 2008)

*Re: Ubuntu freezes after login in normal mode but not in recovery mode + Gnome*

Glad that you were able to fix this on your own.

Cheers!


----------

