SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Just to make sure, you should check from within the same X session before and after the problem comes. However, we can already see that one row for localhost is missing when X is broken. One thing to also look for is if those xxxx are the same numbers for all 3 rows and if they are still exactly the same numbers when X stops working. I can't say for sure if that localhost row is of any importance, I don't have that row on my Slackware 14.2 system with working X.
One more thing to compare might be the output of:
ls -al ~/.Xauthority*
Before and after X stops working. Did something tamper with that file?
But there is a always this message after I execute startx...
Code:
tpbox> startx
xauth: file /home/tpbox/.serverauth.xxxx does not exist
In my previous message I wrote you should look for files called ~/.Xauthority* but maybe you should look for files called ~/.serverauth* instead.
The "program" /usr/bin/startx is only a simple script and it removes that file before calling xauth so the warning from xauth about the file missing is probably harmless.
Code:
# create a file with auth information for the server. ':0' is a dummy.
xserverauthfile=$HOME/.serverauth.$$
trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM
xauth -q -f "$xserverauthfile" << EOF
add :$dummy . $mcookie
EOF
One more thing to check before and after X stops working:
ls -al /tmp/.X*
Maybe you have something running as root which cleans up stuff from the /tmp directory? That could case X to stop working.
regards Henrik
Hi,
I saved the files .serverauth.xxxx and the output to "xauth list", before the problem occurred.
They are the *.pre files. The *.post files are output immediately after I discovered the problem (before quiting X).
The tmp.pre and tmp.post are outputs to "ls -al /tmp/.X*"
I notice now the error message is different. In my 1st post, I showed I was getting a "no protocol specified" error. Now I am getting a "Invadid MIT-MAGIC-COOKIE-1 key Error".
Code:
$ xclock
Invalid MIT-MAGIC-COOKIE-1 keyError: Can't open display: :0
$
$ xev
Invalid MIT-MAGIC-COOKIE-1 keyxev: unable to open display ':0'
$
$
$ xterm
Invalid MIT-MAGIC-COOKIE-1 keyxterm: Xt error: Can't open display: :0
$
The problem is happening alot today (3 times already today).
I am suspecting it has something to do with my laptop today being on only battery-power.
And I closed the lid with power-on (sleep mode) a few times.
Usually, I am near a wall-outlet, in charging mode.
Can the laptop's power management mess with the X authority?
p.s. I have not installed any software.
Last edited by Alfred-Augustus; 05-17-2022 at 05:29 AM.
The problem is happening alot today (3 times already today).
I am suspecting it has something to do with my laptop today being on only battery-power.
And I closed the lid with power-on (sleep mode) a few times.
Usually, I am near a wall-outlet. So most of the time, it is in charging mode.
Can the laptop's power management mess with the X authority?
p.s. I have not installed any software.
Well, it's difficult to understand why this happens. But perhaps it would be interesting to see if anything would change if you start xorg and your desktop with a display manager instead of using startx. Like SDDM or something like that.
Things normally shouldn't interfere with MIT-MAGIC-COOKIE/Xauthority, but it's possible in theory.
Quote:
Originally Posted by Alfred-Augustus
But there is a always this message after I execute startx...
Code:
$ startx
xauth: file /home/tpbox/.serverauth.xxxx does not exist
I actually noticed I also have a message like this in my startx, and my X session/desktop works just fine. So that's not relevant to the problem.
Well, it's difficult to understand why this happens. But perhaps it would be interesting to see if anything would change if you start xorg and your desktop with a display manager instead of using startx. Like SDDM or something like that.
I was looking at the installation documentation again, and I saw that I missed one step during post-install of Slackware. The documentation says I might need to do a
Code:
$ X -configure
, but I never did. When I execute this command just now, I get an error.
Code:
$ X -configure
X.Org X Server 1.20.14
X Protocol Version 11, Revision 0
Build Operating System: Slackware 15.0 Slackware Linux Project
Current Operating System: Linux slacktp 5.15.38 #1 SMP PREEMPT Mon May 9 15:36:07 CDT 2022 x86_64
Kernel command line: BOOT_IMAGE=generic-5.15.38 ro root=805
Build Date: 26 December 2021 04:51:07PM
Current version of pixman: 0.40.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue May 17 18:36:17 2022
List of video drivers:
amdgpu
apm
ark
ast
ati
chips
cirrus
dummy
glint
i128
i740
intel
mach64
mga
neomagic
nouveau
nv
openchrome
r128
radeon
rendition
s3
s3virge
savage
siliconmotion
sis
sisusb
tdfx
tga
trident
tseng
v4l
vboxvideo
vmware
voodoo
modesetting
vesa
(++) Using config file: "/root/xorg.conf.new"
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Xorg detected your mouse at device /dev/input/mice.
Please check your config if the mouse is still not
operational, as by default Xorg tries to autodetect
the protocol.
Your xorg.conf file is /root/xorg.conf.new
To test the server, run 'X -config /root/xorg.conf.new'
(EE) Server terminated with error (2). Closing log file.
Does this mean anything?
Last edited by Alfred-Augustus; 05-17-2022 at 05:47 AM.
I was looking at the installation documentation again, and I saw that I missed one step during post-install of Slackware. The documentation says I might need to do a
Code:
$ X -configure
, but I never did. When I execute this command just now, I get an error.
Code:
$ X -configure
Does this mean anything?
No. You don't have to and probably shouldn't run that unless you need to and know why you need it.
I don't know how you start X with SDDM, but you should give it a try. I'm sure someone here knows how to correctly start X through SDDM. It would help narrow down the issue if you did. Check if you have the same issue if you launch X (correctly) with SDDM.
Perhaps starting SDDM is as simple as switching to runlevel 4.
Hi,
I saved the files .serverauth.xxxx and the output to "xauth list", before the problem occurred.
They are the *.pre files. The *.post files are output immediately after I discovered the problem (before quiting X).
The tmp.pre and tmp.post are outputs to "ls -al /tmp/.X*"
That difference is OK, it only shows that the directory above (your home directory) has changed. The important thing is that any files in that directory has not been modified.
Again, this looks fine. You have the same xauth settings before and after the problem occurs.
Quote:
Originally Posted by Alfred-Augustus
Code:
$ cat tmp.pre
-r--r--r-- 1 root users 11 May 17 10:42 /tmp/.X0-lock
/tmp/.X11-unix:
total 8
drwxrwxrwt 2 root root 4096 May 17 10:42 .
drwxrwxrwt 15 root root 4096 May 17 10:42 ..
srwxrwxrwx 1 root users 0 May 17 10:42 X0
$
$
$ cat tmp.post
-r--r--r-- 1 root users 11 May 17 10:42 /tmp/.X0-lock
/tmp/.X11-unix:
total 8
drwxrwxrwt 2 root root 4096 May 17 10:42 .
drwxrwxrwt 16 root root 4096 May 17 10:50 ..
srwxrwxrwx 1 root users 0 May 17 10:42 X0
$
Again, this looks fine. The socket X0 is still there and the time stamps are still the same.
It is a little sad that everything looks so good, because none of these outputs explains your problems.
Instead of guessing about causes we could make an attempt to debug the problem with strace. For this, we should use some program which opens the display but does not put a window on the display as those window events might give a lot of noise in the strace output. One good example of such a program is xdpyinfo, but xdpyinfo in itself does give a lot of noise as output. For that reason I think that the command of choice will be "xrdb -query" which only gives a few rows as output and does not open any window.
Could you try:
strace xrdb -query >& /tmp/xrdb.log.pre
and
strace xrdb -query >& /tmp/xrdb.log.post
before and after X fails? My guess is that the command before will result in a log file with about 200 lines and after failure a shorter log file. Maybe the differences between these logs can give some clue about what fails.
It seems as if your machine somehow has lost its name. Initially, when X is started, your machine is named slacktp and in your xauth list you get magic cookies which you can use to connect to slacktp. After some time, for some unknown reason, your machine has lost its name slacktp and is only called localhost. You don't have any magic coookies to connect to localhost.
To verify this theory you could try to run the following commands before and after X hangs:
Code:
uname -n
Code:
hostname -v
But why did it happen? I have no idea. Files to study before and after should be /etc/HOSTNAME and /etc/hosts. If you have a public IP adress you might not want to share the unmodified contents of /etc/hosts here.
The output of...
Code:
grep slacktp /etc/hosts
...would be interesting to compare before and after X hangs, but again, you might want to alter the IP adress before posting here.
It would also be interesting to compare the output of:
Code:
/sbin/ifconfig
Maybe, if you lost your IP address asigned to the hostname that could explain why you lost your hostname.
If you somehow lost your IP address I would look for clues for that in the output from:
It seems as if your machine somehow has lost its name. Initially, when X is started, your machine is named slacktp and in your xauth list you get magic cookies which you can use to connect to slacktp. After some time, for some unknown reason, your machine has lost its name slacktp and is only called localhost. You don't have any magic coookies to connect to localhost.
regards Henrik
Hi, during the installation, it asked for "Enter Hostname:". I typed "slacktp".
Then it asked for "Enter domain name:". I typed "localhost".
Fully qualified hostname would be in the format (example) "slacktp.host.net" where the simple hostname would then be "slacktp". In the example, the qualifier "host.net" can be in any desired 2 part naming, like home.net, house.us, flat.uk, etc. The fully qualified name really shouldn't be "foo.localhost" since the template is IIRC "localhost.host.foo". It could be that the order swap is confusing to the system. In any case it is easily solved by an explicit declaration in the fully qualified "/etc/HOSTNAME" file.
If you use ssh, you should enter both the fully qualified and the simple in the appropriate "/etc/hosts*" and "/etc/exports" files.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.