# XDM won't stop and laptop can't back from sleep

## cliffdover88

Hello!

I'm having some problems with xdm as won't correctly stop and i can't switch to tty's, this will produce black screens. Maybe i just forgot something...

I'm using fglrx and tried to fix this with emerge -ve system but didn't work.

Also, seems like sleep function won't work... seems like the screen won't turn on (this isn't the same 'black screen' from stopping XDM, cause won't even turn on)

```
Feb 20 06:45:48 localhost sudo: mein : TTY=pts/1 ; PWD=/home/mein ; USER=root ; COMMAND=/etc/init.d/xdm stop

Feb 20 06:45:48 localhost sudo: pam_unix(sudo:session): session opened for user root by mein(uid=0)

Feb 20 06:45:48 localhost kernel: [  557.964105] Socket Thread (2648) used greatest stack depth: 4040 bytes left

Feb 20 06:45:48 localhost polkitd[2195]: Unregistered Authentication Agent for unix-session:/org/freedesktop/ConsoleKit/Session1 (system bus name :1.23, object path /org/kde/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)

Feb 20 06:45:48 localhost sudo: pam_unix(sudo:session): session closed for user root

Feb 20 06:45:48 localhost kdm: :0[2296]: pam_unix(kde:session): session closed for user mein

Feb 20 06:45:48 localhost console-kit-daemon[2309]: WARNING: Couldn't read /proc/2438/environ: Failed to open file '/proc/2438/environ': No such file or directory

Feb 20 06:45:48 localhost polkitd[2195]: Error converting subject to JS object: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get PID of name ':1.10': no such name

Feb 20 06:45:49 localhost kernel: [  558.110964] usb 1-1.2: unlink qh1-0601/ffff8801b61ab300 start 0 [1/2 us]

Feb 20 06:45:49 localhost kernel: [  558.169088] X (2270) used greatest stack depth: 3600 bytes left

Feb 20 06:45:49 localhost NetworkManager[2187]: <info> (wlan0): device state change: activated -> disconnected (reason 'connection-removed') [100 30 38]

Feb 20 06:45:50 localhost NetworkManager[2187]: <info> (wlan0): deactivating device (reason 'connection-removed') [38]

Feb 20 06:45:50 localhost kernel: [  559.104568] wlan0: deauthenticating from 00:23:cd:de:32:48 by local choice (reason=3)

Feb 20 06:45:50 localhost kernel: [  559.119921] ieee80211 phy0: brcmsmac: brcms_ops_bss_info_changed: disassociated

Feb 20 06:45:50 localhost kernel: [  559.119933] ieee80211 phy0: brcms_ops_bss_info_changed: arp filtering: enabled false, count 1 (implement)

Feb 20 06:45:50 localhost kernel: [  559.119938] ieee80211 phy0: brcms_ops_bss_info_changed: qos enabled: false (implement)

Feb 20 06:45:50 localhost kernel: [  559.133422] cfg80211: All devices are disconnected, going to restore regulatory settings

Feb 20 06:45:50 localhost kernel: [  559.133429] cfg80211: Restoring regulatory settings

Feb 20 06:45:50 localhost kernel: [  559.133434] cfg80211: Calling CRDA to update world regulatory domain

Feb 20 06:45:50 localhost NetworkManager[2187]: <info> Clearing nscd hosts cache.

Feb 20 06:45:50 localhost dbus[2173]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)

Feb 20 06:45:50 localhost NetworkManager[2187]: <info> (wlan0): supplicant interface state: completed -> disconnected

Feb 20 06:45:50 localhost dbus[2173]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'

Feb 20 06:45:56 localhost shutdown[2766]: shutting down for system reboot

Feb 20 06:45:56 localhost init: Switching to runlevel: 6

Feb 20 06:45:58 localhost acpid: exiting

Feb 20 06:45:58 localhost syslog-ng[2157]: Termination requested via signal, terminating;

Feb 20 06:45:58 localhost syslog-ng[2157]: syslog-ng shutting down; version='3.2.5'   
```

Thanks in advance

----------

## eyoung100

```
shutdown[2766]: shutting down for system reboot 

Feb 20 06:45:56 localhost init: Switching to runlevel: 6
```

If you want your laptop to stay up this needs to say something like shutting down for logout

Localhost: Init: Switching to runlevel: 3

What is the output of:

```
rc-update show
```

----------

## cliffdover88

Sorry i didn't see your answer before:

                acpid | boot                         

             bootmisc | boot                         

                 dbus |      default                 

                devfs |                       sysinit

                dmesg |                       sysinit

                 fsck | boot                         

             hostname | boot                         

              hwclock | boot                         

              keymaps | boot                         

            killprocs |              shutdown        

                local |      default                 

           localmount | boot                         

              modules | boot                         

             mount-ro |              shutdown        

                 mtab | boot                         

               net.lo | boot                         

             netmount |      default                 

               procfs | boot                         

                 root | boot                         

            savecache |              shutdown        

                 swap | boot                         

            swapfiles | boot                         

               sysctl | boot                         

                sysfs |                       sysinit

            syslog-ng |      default                 

         termencoding | boot                         

       tmpfiles.setup | boot                         

                 udev |                       sysinit

           udev-mount |                       sysinit

              urandom | boot                         

                  xdm |      default

----------

## eyoung100

```
emerge -C sys-apps/sysvinit && rm -v /etc/inittab && emerge sys-apps/sysvinit
```

This must be done before rebooting.

----------

## cliffdover88

 *eyoung100 wrote:*   

> 
> 
> ```
> emerge -C sys-apps/sysvinit && rm -v /etc/inittab && emerge sys-apps/sysvinit
> ```
> ...

 

rm: cannot remove '/etc/inittab': No such file or directory

Files with "init*" in /etc/:

init.d/           initramfs.mounts

----------

## eyoung100

 *cliffdover88 wrote:*   

>  *eyoung100 wrote:*   
> 
> ```
> emerge -C sys-apps/sysvinit && rm -v /etc/inittab && emerge sys-apps/sysvinit
> ```
> ...

 

```
emerge -C sys-apps/sysvinit && rm -vR /etc/init.d/* && emerge sys-apps/sysvinit
```

This must be done before rebooting

----------

## khayyam

 *eyoung100 wrote:*   

> 
> 
> ```
> emerge -C sys-apps/sysvinit && rm -vR /etc/init.d/* && emerge sys-apps/sysvinit
> ```
> ...

 

eyoung100 ... I don't understand why you are suggesting to remove the contents of /etc/init.d/* some of these files are provided by packages other than sysvinit and so will be lost unless the user really knows which particular rc file belongs to which particular package when prompted. To overwrite the files protected by CONFIG_PROTECT one should use --noconfmem.

best ... khay

----------

## eyoung100

I believe cliffdover clobbered the runlevel order, and the only way to make sure the default runlevel are reinstalled is to re emerge sysvinit.

----------

## khayyam

 *eyoung100 wrote:*   

> I believe cliffdover clobbered the runlevel order, and the only way to make sure the default runlevel are reinstalled is to re emerge sysvinit.

 

eyoung100 ... that doesn't explain why all the files in /etc/init.d/* should be removed. If there is a cache issue then 'rc-update --update' can be called and the cache regenerated.

best ... khay

----------

