kitakar5525 / chromeos-kernel-linux-surface

linux-surface kernel for chromiumos.
GNU General Public License v3.0
18 stars 1 forks source link

Taking a screenshot using Pow+VolDown not working #7

Closed kitakar5525 closed 4 years ago

kitakar5525 commented 4 years ago

Not working at least on SB1 and Surface 3.

kitakar5525 commented 4 years ago

While that function not working, you can take a screenshot without keyboard by

and in the stylus tools, choose "Capture screen". However, if you "Autohide shelf", the screenshot is taken before the shelf is completely hidden.

kitakar5525 commented 4 years ago

When I was looking into auto-rotation issue, I happened to enable taking a screenshot with tablet buttons.

From 1c0bad677808993d0039b7e015fc4c858d289a7c Mon Sep 17 00:00:00 2001
From: kitakar5525 <34676735+kitakar5525@users.noreply.github.com>
Date: Thu, 12 Dec 2019 21:38:09 +0900
Subject: [PATCH 1/2] sensors: rename to accel_3d, gyro_3d and als

---
 etc/init/cros-ec-accel.conf             | 2 +-
 lib/udev/rules.d/99-cros-ec-accel.rules | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/etc/init/cros-ec-accel.conf b/etc/init/cros-ec-accel.conf
index 01e89c5b..1f475c0f 100644
--- a/etc/init/cros-ec-accel.conf
+++ b/etc/init/cros-ec-accel.conf
@@ -24,6 +24,6 @@ script
     --sysname-match="*cros_ec*"
   # Use attr-match to trigger the iio accelerometer devices.
   udevadm trigger --action=add --subsystem-match=iio \
-    --attr-match="name=cros-ec-accel*"
+    --attr-match="name=accel_3d"
   exec udevadm settle
 end script
diff --git a/lib/udev/rules.d/99-cros-ec-accel.rules b/lib/udev/rules.d/99-cros-ec-accel.rules
index 79c58674..cf3b89c4 100644
--- a/lib/udev/rules.d/99-cros-ec-accel.rules
+++ b/lib/udev/rules.d/99-cros-ec-accel.rules
@@ -1,4 +1,4 @@
-ACTION=="add", ATTR{name}=="cros-ec-accel*", RUN+="/lib/udev/accelerometer-init.sh %k accel"
-ACTION=="add", ATTR{name}=="cros-ec-gyro", RUN+="/lib/udev/accelerometer-init.sh %k anglvel"
-ACTION=="add", ATTR{name}=="cros-ec-light", RUN+="/lib/udev/light-init.sh %k illuminance"
-ACTION!="remove", ATTR{name}=="cros-ec-accel*", SYMLINK+="cros-ec-accel/%n", MODE="640", GROUP="chronos"
+ACTION=="add", ATTR{name}=="accel_3d", RUN+="/lib/udev/accelerometer-init.sh %k accel"
+ACTION=="add", ATTR{name}=="gyro_3d", RUN+="/lib/udev/accelerometer-init.sh %k anglvel"
+ACTION=="add", ATTR{name}=="als", RUN+="/lib/udev/light-init.sh %k illuminance"
+ACTION!="remove", ATTR{name}=="accel_3d", SYMLINK+="cros-ec-accel/%n", MODE="640", GROUP="chronos"
-- 
2.24.1

(I can't enable auto-rotation yet.)

Now, question is:

kitakar5525 commented 4 years ago

This issue should be resolved via fixing #5 and when in tablet_mode (#6) (thanks to sebanc for resolving #5 and #6)