Gentoo Archives: gentoo-user

From: Devrin Talen <dct23@×××××××.edu>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Tablet rotation button broken in <=sys-apps/systemd-226-r2
Date: Sat, 27 Aug 2016 00:25:32
1 Hey all,
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.
9 This issue on Github [1] explains the problem and the patch that fixes it:
11 [1]:
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.
19 So (as root):
21 # mkdir -p /etc/portage/patches/sys-apps/systemd # then copy the patch
22 here
23 # emerge --oneshot sys-apps/systemd
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.
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:
34 diff --git a/ b/
35 index 8646e55..e3e07b8 100644
36 ---
37 +++
39 But in the raw git diff they were:
41 diff --git a/ b/
42 index 8646e55..e3e07b8 100644
43 --- a/
44 +++ b/
46 If I don't delete those prefixes then portage complains when applying the
47 patch:
49 ERROR: prepare
50 Failed Patch: fix-keymap-aliases.patch !
51 ( /etc/portage/patches//sys-apps/systemd/fix-keymap-aliases.patch )
53 But existing patches in the /usr/portage/sys-apps/systemd/files directory
54 have the a/ and b/ prefixes. So what gives?
56 Thanks,
57 Devrin


File name MIME type
fix-keymap-aliases.patch text/x-patch


Subject Author
Re: [gentoo-user] Tablet rotation button broken in <=sys-apps/systemd-226-r2 Stroller <stroller@××××××××××××××××××.uk>