1 |
Hey all, |
2 |
|
3 |
I noticed recently that the screen rotation button on my Lenovo X201T |
4 |
tablet was no longer working, whereas it had been working some time ago. |
5 |
Long story short, there was a change around version 226 of systemd that |
6 |
broke this. I wanted to document how I got it working again and send it |
7 |
out in case it helps anyone else. |
8 |
|
9 |
This issue on Github [1] explains the problem and the patch that fixes it: |
10 |
|
11 |
[1]: https://github.com/systemd/systemd/issues/1151 |
12 |
|
13 |
Rather than unmask a newer version of systemd I decided to try applying the |
14 |
pull request to the current stable version in gentoo, which is |
15 |
systemd-226-r2. I created /etc/portage/patches/sys-apps/systemd and saved |
16 |
the patch from the PR (cleaned up for 226-r2 and attached) there. I then |
17 |
rebuilt systemd, rebooted, and - voila - the rotate button is working again. |
18 |
|
19 |
So (as root): |
20 |
|
21 |
# mkdir -p /etc/portage/patches/sys-apps/systemd # then copy the patch |
22 |
here |
23 |
# emerge --oneshot sys-apps/systemd |
24 |
|
25 |
That took a fair amount of googling around to root cause since I had no |
26 |
idea where to begin, but ended up being a pretty simple fix. When a newer |
27 |
version of systemd gets stabilized I'll probably be able to drop that patch. |
28 |
|
29 |
I do have a question though for anyone that can explain it: in the |
30 |
patchfile I ended up putting in /etc/portage/patches I had to delete the |
31 |
first slash in the filenames. So for instance lines 27-31 of the patchfile |
32 |
that works are this: |
33 |
|
34 |
diff --git a/Makefile.am b/Makefile.am |
35 |
index 8646e55..e3e07b8 100644 |
36 |
--- Makefile.am |
37 |
+++ Makefile.am |
38 |
|
39 |
But in the raw git diff they were: |
40 |
|
41 |
diff --git a/Makefile.am b/Makefile.am |
42 |
index 8646e55..e3e07b8 100644 |
43 |
--- a/Makefile.am |
44 |
+++ b/Makefile.am |
45 |
|
46 |
If I don't delete those prefixes then portage complains when applying the |
47 |
patch: |
48 |
|
49 |
ERROR: prepare |
50 |
Failed Patch: fix-keymap-aliases.patch ! |
51 |
( /etc/portage/patches//sys-apps/systemd/fix-keymap-aliases.patch ) |
52 |
|
53 |
But existing patches in the /usr/portage/sys-apps/systemd/files directory |
54 |
have the a/ and b/ prefixes. So what gives? |
55 |
|
56 |
Thanks, |
57 |
Devrin |