You are not logged in.

#1 2011-12-22 18:13:11

drrossum
Member
From: Chicago
Registered: 2009-02-24
Posts: 83

[Slvd] What to restart after system upgrade? When to restart X server?

Hi all,

After a system upgrade, what should be restarted? The following actions I know about:
kernel (linux): reboot
daemon (sshd, cups, iptables, etc.): rc.d restart ...
application (fvwm, mutt, etc.): restart application

But what will require restarting X server?  Can the current X server continue to run after upgrading one the following:
1. xorg-server
2. libx11 or other libraries xorg-server depends on
3. anything else?

I want to keep the system up-to-date but avoid restarting the X server to maintain my X session (>100 windows carfully spread and grouped over 22 workspaces).  Unfortunately, there is no xsm anymore and, no, I don't like gnome/kde/thelike.

Thanks,
Daan

Last edited by drrossum (2012-03-26 15:37:37)

Offline

#2 2011-12-22 18:28:17

GERGE
Member
From: Turkey
Registered: 2008-09-29
Posts: 157
Website

Re: [Slvd] What to restart after system upgrade? When to restart X server?

Restart the system for the kernel. For DE updates restarting X might be needed but you can also restart DE itself like Gnome 3 does it.

Offline

#3 2011-12-22 20:09:04

n0stradamus
Member
Registered: 2010-11-08
Posts: 94
Website

Re: [Slvd] What to restart after system upgrade? When to restart X server?

drrossum wrote:

I want to keep the system up-to-date but avoid restarting the X server to maintain my X session (>100 windows carfully spread and grouped over 22 workspaces).  Unfortunately, there is no xsm anymore and, no, I don't like gnome/kde/thelike.

Some window managers implement xsm functionality, i3 being one of them. Until now it is able to save the layout for restarts of itself (e.g. after an update). The possibility to save whole layouts between X restarts is planned. It's definitely worth a look, I'm using it too smile

Offline

#4 2011-12-22 20:48:50

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [Slvd] What to restart after system upgrade? When to restart X server?

Openbox e.g. allows for a restart from within a running session.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2011-12-22 21:39:10

drrossum
Member
From: Chicago
Registered: 2009-02-24
Posts: 83

Re: [Slvd] What to restart after system upgrade? When to restart X server?

Yes, many WM do.  I use Xmonad and fvwm which both do too.  But my question is about X, not the WM.

When is one _required_ to restart _X server_?

Can one update glibc, xorg-server, etc. and just keep X server running?  Or will things start to break within the session?

Perhaps, I should just give it a try, once, and see what happens.  But there must be fundamental guidelines for what to restart when updating the system...

Thanks,
Daan

Offline

#6 2011-12-22 21:42:54

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [Slvd] What to restart after system upgrade? When to restart X server?

You don't need to restart it, just logging in and out is enough. That should restart the X server. I have never seen a running X server break after an upgrade.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#7 2011-12-22 23:07:20

drrossum
Member
From: Chicago
Registered: 2009-02-24
Posts: 83

Re: [Slvd] What to restart after system upgrade? When to restart X server?

.:B:. wrote:

That should restart the X server

But that's exactly what I'd like to avoid.

.:B:. wrote:

I have never seen a running X server break after an upgrade.

Is the X server that static?  Will it never access any dynamically linked libraries after it has started?  That'd be cool.

Can anyone confirm whether that is true?

Offline

#8 2012-03-24 05:59:57

drrossum
Member
From: Chicago
Registered: 2009-02-24
Posts: 83

Re: [Slvd] What to restart after system upgrade? When to restart X server?

I've tested "no-restart after upgrade" for a few months:

1) No, X server doesn't break after upgrades - no X restart required!
2) Kernel upgrade doesn't break the system either (except you can no longer modprobe kernel modules) - so no reboot required.
3) Applications/daemons: same thing.

My conclusion so far:
Upgrades are pretty harmless and restarts/reboots are only needed to start using the new version.

Please post any exceptions you encounter!

Offline

#9 2012-03-24 06:43:37

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: [Slvd] What to restart after system upgrade? When to restart X server?

.:B:. wrote:

You don't need to restart it, just logging in and out is enough. That should restart the X server. I have never seen a running X server break after an upgrade.

If logging in and out restarts the X server, why the PID  doesnt change after the restart?
Or am I missing something?

Last edited by hadrons123 (2012-03-24 07:32:32)

Offline

#10 2012-03-24 07:30:09

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: [Slvd] What to restart after system upgrade? When to restart X server?

drrossum wrote:

I've tested "no-restart after upgrade" for a few months:

1) No, X server doesn't break after upgrades - no X restart required!
2) Kernel upgrade doesn't break the system either (except you can no longer modprobe kernel modules) - so no reboot required.
3) Applications/daemons: same thing.

My conclusion so far:
Upgrades are pretty harmless and restarts/reboots are only needed to start using the new version.

Please post any exceptions you encounter!

http://xpra.org/, you could use this if you hate loosing some of your X windows so much smile

Offline

#11 2012-03-24 08:25:21

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,954
Website

Re: [Slvd] What to restart after system upgrade? When to restart X server?

Cloudef wrote:

http://xpra.org/, you could use this if you hate loosing some of your X windows so much smile

Wow. Just wow. Thank you!


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#12 2012-03-24 08:30:35

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [Slvd] What to restart after system upgrade? When to restart X server?

.:B:. wrote:

I have never seen a running X server break after an upgrade.

I have, but it's surprisingly rare.

A useful command is:

lsof | grep 'DEL.*lib'

I put this line in a script called stalelibs. Helps to see which services should be restarted. Or whether I'll just take the easy option and reboot smile

Can everyone please learn the difference between "lose" and "loose"? kthx.

Offline

#13 2012-03-24 09:09:04

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,954
Website

Re: [Slvd] What to restart after system upgrade? When to restart X server?

brebs wrote:

Can everyone please learn the difference between "lose" and "loose"? kthx.

I lose when I'm too loose. smile
Thanks for that one-liner.

Last edited by SanskritFritz (2012-03-24 09:09:53)


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#14 2012-03-25 02:44:38

drrossum
Member
From: Chicago
Registered: 2009-02-24
Posts: 83

Re: [Slvd] What to restart after system upgrade? When to restart X server?

brebs wrote:

A useful command is:

lsof | grep 'DEL.*lib'

I put this line in a script called stalelibs. Helps to see which services should be restarted. Or whether I'll just take the easy option and reboot :)

This is very helpful!

Also, in the link that you sent it is explained why programs don't break when their shared libraries are removed:

Existing programs (that are already loaded) have pointers to the old version, as Naib says, in RAM as code or an inode location as a file handle to the deleted version. Once all handles are gone/programs terminated, the file will then truly be "removed" from the disk and space reclaimed. Until then you'll see shared libraries still eating disk space and RAM, despite them being removed.

This is why it's good to reboot the machine after certain upgrades such as libc, so programs like init can pick up a new copy of libc.

@brebs: Thanks for the great contribution!

Offline

#15 2012-03-25 08:36:08

Blµb
Member
Registered: 2008-02-10
Posts: 224

Re: [Slvd] What to restart after system upgrade? When to restart X server?

Rather than rebooting you usually want to just kexec into the new kernel - this will only restart the system, without going over the bios etc.
Except rather than parsing grub confs, like in the wiki, I'd just use /proc/cmdline like this (it is also mentioned on the side in the wiki, but whatever):

/sbin/kexec -l \
        --append="`cat /proc/cmdline`" \
        --initrd=/boot/initramfs-linux.img \
        /boot/vmlinuz-linux \
&& init 6

Last edited by Blµb (2012-03-25 08:37:24)


You know you're paranoid when you start thinking random letters while typing a password.
A good post about vim
Python has no multithreading.

Offline

Board footer

Powered by FluxBB