Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GUI Applications Intermittendly not Starting Up
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
evagrius
n00b
n00b


Joined: 02 Oct 2021
Posts: 7

PostPosted: Sat Oct 02, 2021 4:44 pm    Post subject: GUI Applications Intermittendly not Starting Up Reply with quote

I have recently installed Gentoo as my main workstation with i3 as window manager. I have used Linux for years, but am still a noob when it comes to many things. So far, everything is working well. However, one problem recently cropped up:

Every few hours/days, no GUI programs will open (not even dmenu). All currently open programs continue working just fine, but nothing new will open.

Possibly helpful information:

- Whenever this happens across reboots, my startup script to stop beep sounds (xset -b) does not seem to work anymore as well.
- The problem seems to have started again after a recent update in which the following packages were updated (however, due to the intermittent nature of the problem, it could have occurred earlier as well without me noticing):
Code:
dev-perl/Text-WrapI18N-0.60.0-r2
app-text/po4a-0.63-r1

- The problem is sometimes restored through suspend/unsuspend and a reboot, but not always.
- After unsuspending/rebooting, programs will sometimes open fine for about 5-10 seconds before it stops working
- If I login on another tty, it will work without any problems on the new tty while still not working on the old tty.
- Apart from these points, this problems appears to occur completely randomly -- often if I wait an hour or two, everything will start working again.

So far, I have managed to solve most problems by reading documentation and forum posts, but this time, I simply do not know where to start. Any ideas?

I hope I have not missed a forum post or documentation section pertaining to this problem. If I have posted this into the wrong category or done something else wrong, please do correct me, as this is my first post.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21489

PostPosted: Sat Oct 02, 2021 5:30 pm    Post subject: Reply with quote

Welcome to the forums. The main thing you did wrong is that you did not provide us with any error messages we can investigate. You say it "does not start up." What does it do instead? What does the application print to stdout/stderr when it fails to start?

If I had to guess based on the limited data, I would say that the failure is that DHCP changes your system hostname, which then causes your xauth data to be inappropriate, so any new X11 applications fail the xauth check, and exit with an error message on stderr and nothing on screen. To check this, record the output of hostname when you can start an X11 application. Wait for the failure. Record the output of hostname again. Are they the same? If yes, I am wrong. If no, I am right. You could also check the output of xauth list before/after. The good result is that it does not change at all. Any changes are suspicious. You should not share the third column of xauth list output publicly. In practice, it's very difficult in modern times to exploit knowledge of someone else's xauth data, but it is a password of sorts.
Back to top
View user's profile Send private message
evagrius
n00b
n00b


Joined: 02 Oct 2021
Posts: 7

PostPosted: Sat Oct 02, 2021 5:49 pm    Post subject: Reply with quote

Thank you for your helpful correction and your quick and thorough response despite my incomplete post. I will post the results as soon as it stops working again; but I do remember that I was confused that when switching the tty, my hostname was different.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sat Oct 02, 2021 6:46 pm    Post subject: Reply with quote

Quote:
If I had to guess based on the limited data, I would say that the failure is that DHCP changes your system hostname

That was also my first thought. The most likely reason is that something is wrong with the network: routing, DNS, etc.

If you use DHCP (do you?), double-check your configuration. Search for messages from the DHCP daemon in the system logs.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21489

PostPosted: Sat Oct 02, 2021 6:49 pm    Post subject: Reply with quote

If you've already seen your hostname be different, then we can speculatively assume that my suggestion is right and begin digging deeper. As mike155 asks, do you use DHCP? If yes, what kind of DHCP server is it? Another Linux system, a home router, your ISP's cable modem, ...? What, if any, configuration can you do with it? How is your DHCP client configured on the system where you run X? For many DHCP clients, you can direct them not to modify the hostname. Hostname updates are arguably useful in data center deployments when many machines are issued addresses and the DHCP server is a good place to centrally name them. They are not helpful in small home deployments where you could as easily, if not more easily (when dealing with limited functionality home routers), manage them all by hand.
Back to top
View user's profile Send private message
evagrius
n00b
n00b


Joined: 02 Oct 2021
Posts: 7

PostPosted: Sat Oct 02, 2021 6:59 pm    Post subject: Reply with quote

Thank you for your quick and helpful replies. I will check the things you mentioned and post my results (it might take a day or two due my schedule).
Back to top
View user's profile Send private message
evagrius
n00b
n00b


Joined: 02 Oct 2021
Posts: 7

PostPosted: Sun Oct 03, 2021 2:41 pm    Post subject: Reply with quote

Thank you again for the responses; after looking at my DHCP setup and searching online, I may have found the problem with my hostname. I use NetworkManager with the dhclient USE flag; according to the Gentoo Wiki (https://wiki.gentoo.org/wiki/NetworkManager#Setting_a_hostname), I have to set the hostname in /etc/dhcp/dhclient.conf:
Code:
send host-name "customhostname";


I had not done this before. Could this be the solution? Is there something else I should check / any configuration I should post? If the problem is gone for a few days, I will post again to say that it worked.

Further information:

- I use a home router
- The day before I noticed the problem, I had updated NetworkManager
- In case it is helpful: A somewhat related problem is detailed in an (old) bug report: https://bugs.gentoo.org/176873
Back to top
View user's profile Send private message
evagrius
n00b
n00b


Joined: 02 Oct 2021
Posts: 7

PostPosted: Tue Oct 05, 2021 7:23 pm    Post subject: Reply with quote

I thought the problem was solved until today it occurred again. For about one hour, whenever I connected to my phone's WiFi hotspot, no GUI applications would open. I thought I had found the culprit only to find that an hour later, connecting to my phone's hotspot worked without any problems. I had not changed anything on my system during that time. It may be important to know that as far as I can remember, the times it broke before did not all involve my phone, although I cannot say this with certainty.

At least I finally managed to get the error message when trying to open a program:
Code:
No protocol specified
Cannot open display


I also saw that the hostname does indeed change whenever the problem occurs. I have already added the following to /etc/dhcp/dhclient.conf as suggested in the Gentoo Wiki:
Code:
send host-name "customhostname";


What else could I do? Am I right in assuming that the problem maybe has to do with NetworkManager, as in some mysterious way the problem seems to be connected to my WiFi connectivity? Is there another configuration file I have to edit? I found the following threads detailing a similar problem, but my settings seem to be correct (although I may very well be mistaken, I know very little about network configuration):

https://forums.gentoo.org/viewtopic-t-1056770-start-0.html

https://forums.gentoo.org/viewtopic-t-1056770-highlight-.html
Back to top
View user's profile Send private message
evagrius
n00b
n00b


Joined: 02 Oct 2021
Posts: 7

PostPosted: Tue Oct 05, 2021 7:24 pm    Post subject: Reply with quote

If nothing else works, my idea would be to simply change my hostname to localhost, as that is what my hostname changes to when applications stop working, although I would really like to know what the actual problem is. Or is that not a good idea?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21489

PostPosted: Wed Oct 06, 2021 1:52 am    Post subject: Reply with quote

I recommend against changing your hostname to localhost. Aside from it confusing some things (notably, the mysql CLI), you are assuming that this rogue renaming will always name you localhost.

I am not familiar with NetworkManager. I use dhcpcd.
Back to top
View user's profile Send private message
evagrius
n00b
n00b


Joined: 02 Oct 2021
Posts: 7

PostPosted: Mon Oct 18, 2021 6:01 pm    Post subject: Reply with quote

Thank you for your reply -- I will not do that then. After waiting a while, the problem seems to occur exclusively with my phone hotspot (although using the phone hotspot does not always result in the hostname being changed). I will post again if I find a solution.
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