I have to log in twice - Hardware

This is a discussion on I have to log in twice - Hardware ; I asked about this on comp.os.linux.misc and didn't really find out anything. Now that I think it might be a hardware problem, I'd like to try here. I created a new account on my laptop running RH 7.2. When I ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: I have to log in twice

  1. I have to log in twice

    I asked about this on comp.os.linux.misc and didn't really find out anything.
    Now that I think it might be a hardware problem, I'd like to try here.

    I created a new account on my laptop running RH 7.2. When I log in with
    that account, the userid and password are not rejected but, instead of
    going into Gnome, an error message appears too quickly to read on a black
    screen and then the login screen appears again and I have to log in again.
    I sometimes have to log in three times before it works right.

    I think this might be a hardware problem. What can I do to determine
    whether that is the case?

    In /var/log/messages, here is what happens when it rejects the login
    (with the userid changed):

    Sep 19 16:33:04 localhost gdm(pam_unix)[951]: session opened for user
    syzygy by (uid=0)
    Sep 19 16:33:04 localhost gdm[951]: gdm_slave_session_start: syzygy on :0
    Sep 19 16:33:06 localhost gdm(pam_unix)[951]: session closed for user syzygy
    Sep 19 16:33:06 localhost gdm[951]: gdm_auth_user_remove: /home/syzygy is
    not owned by uid 0.
    Sep 19 16:33:06 localhost gdm[951]: gdm_auth_user_remove: Ignoring
    suspiciously looking cookie file /home/syzygy/.Xauthority

    Here is what happens when it accepts the login:

    Sep 19 16:33:09 localhost kernel: xircom cardbus adaptor found,
    registering as eth0, using irq 11
    Sep 19 16:33:09 localhost kernel: spurious 8259A interrupt: IRQ15.
    Sep 19 16:33:17 localhost gdm(pam_unix)[1026]: session opened for
    user syzygy by (uid=0)
    Sep 19 16:33:17 localhost gdm[1026]: gdm_slave_session_start: syzygy on :0

    The line about the xircom cardbus adaptor usually occurs as part of the normal
    boot, followed by a lot of other stuff. It looks to me as though it is first
    accepting the login, then immediately logging syzygy out and then repeating
    whatever it did with the xircom cardbus adaptor during boot before accepting
    the second attempt to log in.

    Since gdm(pam_unix) is closing the session for syzygy, it presumably has a
    reason. How can I find out what that reason might be? The message that
    appears on the black screen too quickly to read: is there a way to freeze
    it so I can read it or is there a way to cause it to be saved to a file?

    Well, one thing I can try, just to hopefully separate the issue of the
    xircom from the issue of logins, is to change the level from 5 to 3, so
    that I log in in text mode. That might also cause the error message to
    stick around if there still is one.
    --
    Ignorantly,
    Allan Adler
    * Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
    * comments do not reflect in any way on MIT. Also, I am nowhere near Boston.

  2. Re: I have to log in twice

    Allan Adler writes:
    > Well, one thing I can try, just to hopefully separate the issue of the
    > xircom from the issue of logins, is to change the level from 5 to 3, so
    > that I log in in text mode. That might also cause the error message to
    > stick around if there still is one.


    OK, I changed the runlevel to 3 in /etc/inittab and rebooted. I got the
    login prompt in text mode but waited a moment before logging in. While I
    was waiting, the prompt

    localhost login:

    got completed to the line

    localhost login: spurious 8259 interrupt: IRQ7

    I hit return and got another login prompt and logged in with no difficulties.
    Then I executed startx, which crashed with lots of remarks, ending in the
    following:
    _IceTransSocketUNIXCreateListener:...SocketCreateL istener() failed
    _IceTransMakeAllCOTSServerListener: server already running
    ** WARNING **: Cannot establish any listening sockets
    Waiting for X server to shut down (II) NEOMAGIC(0):
    Not programming shadow registers.

    When I executed startx again, it crashed again. The third time it worked.

    So, it seems that my problem logging in with runlevel 5 is caused by
    startx crashing.

    I had a problem on another machine with startx crashing and asked about it
    here several months ago, maybe almost a year. It started after I had tried
    to connect my machine to a router and changed some network configuration
    in order to enable the machine to talk to the router. When I undid whatever
    I had done, the problem went away. A respondent on this group acknowledged
    that such a network configuration could cause startx to be flaky. I'm not sure
    but I think it had to do with writing eth0 twice or something in some
    configuration file. Actually, at that time I also tried to connect the
    laptop which is the subject of the present thread to the router, but didn't
    have any problems at the time. So, I just looked at
    /etc/sysconfig/network-scripts/ifcfg-eth0
    and I see the line
    BOOTPROTO=dhcp
    whereas it was formerly
    BOOTPROTO=static
    and the file does seem to date from when I tried to connect the router
    to this laptop.

    So, it appears that the solution to the problem of having to log in twice
    when I log in at runlevel 5 is to modify ifcfg-eth0 so that BOOTPROTO
    is set to static.

    Now, in Aug. of this year, I posted here about another problem having to
    do with being unable to access a flash drive after booting with it. The
    relevant part of /var/log/messages included the lines:

    Aug 17 04:06:40 localhost kernel: Attached scsi removable disk sda at
    scsi0, channel 0, id 0, lun 0
    Aug 17 04:06:40 localhost kernel: SCSI device sda: 129440 512-byte hdwr
    sectors (66 MB)
    Aug 17 04:06:40 localhost kernel: sda: Write Protect is off
    Aug 17 04:06:40 localhost kernel: sda: sda1
    Aug 17 04:06:41 localhost dhcpcd[1200]: timed out waiting for a valid
    DHCP server response
    Aug 17 04:08:05 localhost kernel: usb.c: USB disconnect on device 2

    and was told by sam@email-scan.com that it showed that everything was
    perfectly normal. But in the present context it might be correct to
    conclude that it is showing that the line BOOTPROTO=dhcp might be causing
    that problem too.

    So, after I change BOOTPROTO back to static, and confirm that I can login
    normally at runlevel 5, I am going to go back to this other problem and
    see if I can access the flash drive after booting with it plugged in.

    I think Floyd L. Davidson said he had the same problem. So, if this
    solution works for me, it might also work for him.
    --
    Ignorantly,
    Allan Adler
    * Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
    * comments do not reflect in any way on MIT. Also, I am nowhere near Boston.

  3. Re: I have to log in twice

    Allan Adler writes:

    > I just looked at /etc/sysconfig/network-scripts/ifcfg-eth0
    > and I see the line
    > BOOTPROTO=dhcp
    > whereas it was formerly
    > BOOTPROTO=static

    [snip]
    > So, it appears that the solution to the problem of having to log in twice
    > when I log in at runlevel 5 is to modify ifcfg-eth0 so that BOOTPROTO
    > is set to static.


    It is not the solution. As soon as a restored runlevel 5, I had the
    same problem as before.

    > Now, in Aug. of this year, I posted here about another problem having to
    > do with being unable to access a flash drive after booting with it. [snip]
    > So, after I change BOOTPROTO back to static, and confirm that I can login
    > normally at runlevel 5, I am going to go back to this other problem and
    > see if I can access the flash drive after booting with it plugged in.


    It is not the solution to this problem either.

    Furthermore, when I got these two negative results, I said to myself,
    "Wait till the guys on comp.os.linux.* hear about this!" and tried to
    go online. I was able to connect to my ISP but the verbose output
    contained some mention of dhcp. When I tried to connect to anything
    on the internet, I couldn't do it, not even google. So, I've changed
    it back to BOOTPROTO=dhcp.

    I don't know what's going on.
    --
    Ignorantly,
    Allan Adler
    * Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
    * comments do not reflect in any way on MIT. Also, I am nowhere near Boston.

  4. Re: I have to log in twice

    Allan Adler writes:

    > Allan Adler writes:
    >
    > > I just looked at /etc/sysconfig/network-scripts/ifcfg-eth0
    > > and I see the line
    > > BOOTPROTO=dhcp
    > > whereas it was formerly
    > > BOOTPROTO=static

    > [snip]
    > > So, it appears that the solution to the problem of having to log in twice
    > > when I log in at runlevel 5 is to modify ifcfg-eth0 so that BOOTPROTO
    > > is set to static.

    >
    > It is not the solution. As soon as a restored runlevel 5, I had the
    > same problem as before.


    Problems with startx are still there. However:

    > > Now, in Aug. of this year, I posted here about another problem having to
    > > do with being unable to access a flash drive after booting with it. [snip]
    > > So, after I change BOOTPROTO back to static, and confirm that I can login
    > > normally at runlevel 5, I am going to go back to this other problem and
    > > see if I can access the flash drive after booting with it plugged in.

    >
    > It is not the solution to this problem either.


    Maybe not, but changing the line
    ONBOOT=yes
    to
    ONBOOT=no
    *is* the solution. I no longer have any problem using the flash drive
    when I boot with the drive plugged in. I can mount it and unmount it
    as often as I like, no muss, no fuss.

    > Furthermore, when I got these two negative results, I said to myself,
    > "Wait till the guys on comp.os.linux.* hear about this!" and tried to
    > go online. I was able to connect to my ISP but the verbose output
    > contained some mention of dhcp. When I tried to connect to anything
    > on the internet, I couldn't do it, not even google. So, I've changed
    > it back to BOOTPROTO=dhcp.
    >
    > I don't know what's going on.


    I guess I know a little more now. I haven't given up on the idea that the
    problem with startx is related to eth0, especially now that I've fixed the
    problem with the flash drive.
    --
    Ignorantly,
    Allan Adler
    * Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
    * comments do not reflect in any way on MIT. Also, I am nowhere near Boston.

  5. Re: I have to log in twice

    I've done a little more experimenting. Here are results and questions:
    (0) The laptop is running RH 7.2.
    (1) One can definitely boot with the flash drive plugged in and mount the
    flash drive and unmount it as often as one likes. All that is required
    is that in the file /etc/sysconfig/network-scripts/ifcfg-eth0 the
    value of ONBOOT be set to no. This works no matter whether BOOTPROTO
    is set to dhcp or to static.
    (2) If, however, BOOTPROTO is set to static, it becomes impossible to connect
    to the anything on the network, even though it is possible to connect to
    my ISP by dialup. The fact that I am able to post this message shows that
    BOOTPROTO is currently set to dhcp.
    (3) The laptop is not on a network and is not connected to a router. I think
    that means it is incorrect for anything connected with eth0 to be set
    to dhcp. That suggests that either I should not have a value for BOOTPROTO
    or I should have a value different from dhcp. In view of (2), that value
    should also be different from static. What, then, should it be?
    (4) Should the value of IPADDR be set in
    /etc/sysconfig/network-scripts/ifcfg-eth0
    if the laptop is not on a network?
    (5) I looked at .xsession-errors. It is dated from Sept.19, even though
    startx has been crashing since then. Here is what is in .xsession-errors:
    SESSION_MANAGER=local/localhost.localdomain:/tmp/.ICE-unix/1086
    aumix: error opening mixer
    Xlib: extension "XINERAMA" missing on display ":0.0".
    subshell.c: couldn't get terminal settings: Inappropriate ioctl for device
    ICE default IO error handler doing an exit(), pid = 1150, errno = 0
    ICE default IO error handler doing an exit(), pid = 1146, errno = 0
    Gdk-ERROR **: X connection to :0.0 broken (explicit kill or server shutdown).
    Gdk-ERROR **: X connection to :0.0 broken (explicit kill or server shutdown).
    Gdk-WARNING **: GdkWindow 0x1c00027 unexpectedly destroyed
    Gdk-WARNING **: GdkWindow 0x1c00026 unexpectedly destroyed
    Gdk-WARNING **: GdkWindow 0x1c00025 unexpectedly destroyed
    Gdk-WARNING **: GdkWindow 0x1c00014 unexpectedly destroyed
    Gdk-WARNING **: GdkWindow 0x1a00077 unexpectedly destroyed
    Gdk-WARNING **: GdkWindow 0x1a0006e unexpectedly destroyed
    Gdk-WARNING **: GdkWindow 0x1a00013 unexpectedly destroyed
    Gdk-ERROR **: X connection to :0.0 broken (explicit kill or server shutdown).
    Gdk-ERROR **: X connection to :0.0 broken (explicit kill or server shutdown).
    Gdk-ERROR **: BadWindow (invalid Window parameter)
    serial 6213 error_code 3 request_code 20 minor_code 0
    Gdk-ERROR **: X connection to :0.0 broken (explicit kill or server shutdown).

    What sense can one make of this?
    --
    Ignorantly,
    Allan Adler
    * Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
    * comments do not reflect in any way on MIT. Also, I am nowhere near Boston.

  6. Re: I have to log in twice

    I did a google search for IceTransSocketUNIXCreateListener and was led to
    some postings by other people who have had similar problems. For example:
    http://www.redhat.com/archives/valha.../msg02670.html
    http://www.linux.com.pl/forum/index....7ef890c114a28a
    http://www.linuxquestions.org/questi...d.php?t=312876

    As nearly as I can tell, no one ever figured out what was wrong.

    I've noticed that if I wait a while before starting X, then it starts the
    first time I try. E.g. I'll typeset something in emacs for 15 minutes or
    half an hour and then execute startx. That could mean that something needs
    to warm up or it could mean that some resource is being used at the beginning
    of a session and it can't support both that resource and X for some reason.

    I also did a google search for SocketCreateListener and found that there
    are also similar complaints on OpenBSD3.3 forums. For example:
    http://www.bsdforums.org/forums/arch...p/t-10011.html

    I also found, in the same search, some source file Xtranssock.c at

    http://cvsweb.xfree86.org/cvsweb/xc/...ock.c?rev=3.74

    which explicitly contains what seems to be very close to some of these
    error messages. I'm not very talented at reading stuff like this, but I'll
    take a look and see if I can figure out what the program is doing when
    this error message occurs. There is no file Xtra* on my system, but maybe
    the compiled object file is in some X library.

    Here is one declaration that might be relevant, although it is hard to tell
    since it has so many #ifdef's.
    #ifdef TRANS_SERVER

    static int
    TRANS(SocketCreateListener) (XtransConnInfo ciptr,
    struct sockaddr *sockname,
    int socknamelen, unsigned int flags)

    At least it contains SocketCreateListener in it. But I don't know what
    the TRANS is. I didn't find it explicitly defined in the files or in the
    included header files, but maybe I did it wrong. Any idea what it is?
    --
    Ignorantly,
    Allan Adler
    * Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
    * comments do not reflect in any way on MIT. Also, I am nowhere near Boston.

  7. Re: I have to log in twice

    Allan Adler writes:

    > I've noticed that if I wait a while before starting X, then it starts the
    > first time I try. E.g. I'll typeset something in emacs for 15 minutes or
    > half an hour and then execute startx. That could mean that something needs
    > to warm up or it could mean that some resource is being used at the beginning
    > of a session and it can't support both that resource and X for some reason.


    It finally occurred to me that, if this theory has any merit, I should try
    to find out what my machine is doing after I log in. I just took a wild
    guess and assumed that it is running cron jobs and found that there are
    log files /var/log/cron. I don't know yet how to make sense of them, but
    maybe there is some way to decide which actions are most likely to be
    in competition with startx. Any ideas?
    --
    Ignorantly,
    Allan Adler
    * Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
    * comments do not reflect in any way on MIT. Also, I am nowhere near Boston.

  8. Re: I have to log in twice

    In comp.os.linux.x Allan Adler wrote:
    >
    > I've noticed that if I wait a while before starting X, then it starts the
    > first time I try. E.g. I'll typeset something in emacs for 15 minutes or
    > half an hour and then execute startx. That could mean that something needs
    > to warm up or it could mean that some resource is being used at the beginning
    > of a session and it can't support both that resource and X for some reason.


    This is a total shot in the dark, but if you're relying on automount to
    mount directories as required, then maybe there might be a problem if X
    doesn't have some required directory soon enough. You can try running
    'mount' to see what's mounted before starting X with root the first
    time, and then running 'mount' afterwards when everything is working.
    If there are new directories mounted afterwards (like, say, tmpfs), then
    maybe you can mount them directly at bootup and avoid using automount.

    Rob Komar

+ Reply to Thread