Gentoo Archives: gentoo-user

From: Francisco Ares <frares@×××××.com>
To: gentoo-user <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Keyboard is dead after emerge-update
Date: Mon, 21 Mar 2016 13:18:14
Message-Id: CAHH9eM4+DNNJT+MLkzX0WmsdhNRfW+yaz4LO55V1fM3q+O6i6Q@mail.gmail.com
In Reply to: Re: [gentoo-user] Keyboard is dead after emerge-update by Bertram Scharpf
1 2016-03-21 9:59 GMT-03:00 Bertram Scharpf <lists@×××××××××××××××.de>:
2
3 > On Monday, 21. Mar 2016, 12:37:07 +0000, Ian Bloss wrote:
4 > > Did you update your kernel in the process as well?
5 > >
6 > > On Mon, Mar 21, 2016, 07:53 Bertram Scharpf <lists@×××××××××××××××.de>
7 > wrote:
8 > > > since an emerge-update-world on my notebook the keyboard
9 > > > does no longer respond in X. [...]
10 >
11 > No. The emerge-update did not install new kernel sources and
12 > therefore I found no need to reconfigure or to compile the
13 > old ones.
14 >
15 > Bertram
16 >
17 >
18 > --
19 > Bertram Scharpf
20 > Stuttgart, Deutschland/Germany
21 > http://www.bertram-scharpf.de
22 >
23 >
24 For my experience, if the X server was rebuilt (either a new version, or a
25 simple rebuild because of many possible triggers, including USE flags
26 change, for example), then you need to rebuild all X drivers as well.
27
28 After I issue a complete emerge update, I run the following script (I have
29 a nVidia card) as root:
30
31 GentooSystem ~ $ cat ~/bin/xorg_rebuild
32 #! /bin/bash
33 if ! [ -e /root/.working ]
34 then
35 touch /root/.working
36
37 XORG_SERVER=`equery l xorg-server`
38 if [ "$XORG_SERVER" != "`cat /root/xorg-server.txt`" ]
39 then
40 EMERGE_LIST=`equery l --format='$name' xf86*`" "`equery l
41 --format='$name' "xorg*"`" "`equery l --format='$name' nvidia-drivers`
42 # EMERGE_LIST=`equery l --format='$name' xf86*`" "`equery l
43 --format='$name' "xorg*"`
44 emerge -vD --with-bdeps=y --keep-going --quiet-build
45 $EMERGE_LIST && \
46 echo $XORG_SERVER>/root/xorg-server.txt && \
47 echo $NVIDIA_DRVR>/root/nvidia-drvr.txt && \
48 rmmod nvidia 2>/dev/null && modprobe nvidia
49 fi
50
51 DRIVER="nvidia-drivers"
52 MOD="nvidia"
53 VIDEO_DRIVR=`equery l $DRIVER`
54 if [ "$VIDEO_DRIVR" != "`cat /root/video-drv.txt`" ]
55 then
56 EMERGE_LIST=`equery l --format='$name' xf86*`" "`equery l
57 --format='$name' "xorg*"`" "`equery l --format='$name' $DRIVER`
58 emerge -vD --with-bdeps=y --keep-going --quiet-build
59 $EMERGE_LIST && \
60 echo $XORG_SERVER>/root/xorg-server.txt && \
61 echo $VIDEO_DRIVR>/root/video-drv.txt && \
62 rmmod $MOD 2>/dev/null && modprobe $MOD
63 fi
64
65 rm -f /root/.working
66 fi
67
68
69 It uses three files, the first is used to signal to other scripts (that
70 uses emerge for some reason) to not try to do anything while other of those
71 scripts, including this one, is being run. That is "/root/working".
72
73 Another file is "/root/xorg-server.txt", that keeps the output of 'equery l
74 xorg-server', which is compared with up to date result of the same command.
75 If it is different, the script lists all installed drivers and re-emerges
76 them. Finally this same file is updated.
77
78 The same happens with the nVidia proprietary driver, using file
79 "/root/video-drv.txt".
80
81 Hope this helps.
82
83 Best regards,
84 Francisco

Replies

Subject Author
Re: [gentoo-user] Keyboard is dead after emerge-update Bertram Scharpf <lists@×××××××××××××××.de>