This makes the power, volume down & volume up buttons work in SXMO
on my Samsung Galaxy Note 10.1 (samsung-p4note), the N8010 variant.
Signed-off-by: Anjandev Momi <anjan@momi.ca>
After scratching my head about this hack, I've decided to (1) document
it in a comment and (2) make it run only when configured explicitly and
(3) removed the != modem check. Why was the != modem check there? We
want to do this all the time.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
The current values are not working as of kernel 5.19, so we update the
values.
Signed-off-by: HexagonWin <hexagonwin@disroot.org>
Signed-off-by: Stacy Harper <contact@stacyharper.net>
The currently used scale is far too big. This commit decreases it from
2.0 to 1.5 which looks good on the device.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
This fixes an bug where the system is prevented from suspending by a
stuck "Waiting for cronjob" mutex.
The wakeup_active count doesn't provide information about system
wakeups, so track the amount of time spent in suspend instead. Also make
sxmo_hook_mnc.sh responsible for deciding if the system has time to
suspend before the next cron job. This makes the suspend code a bit
cleaner.
There are two bugs that can cause the mutex to get stuck:
Bug one: The kernel allows multiple applications to request multiple
wakeup times, if anything else does we will get stuck.
Bug two: /sys/class/wakeup/wakeupN/active_count does not count the
number of times the device woke the system from suspend. It counts the
number of times the device prevented the system from suspending.
Periodically the kernel syncs the system clock to the rtc. When doing
this the rtc subsystem takes a wakelock to prevent the system from
suspending until the time has been updated, which increments
active_count. If this happens while resuming we get stuck.
This is a kernel stack trace I captured of this happening while resuming:
wakeup_source_activate+0
pm_stay_awake+68
rtc_set_time+212
sync_hw_clock+436
process_one_work+520
worker_thread+120
kthread+276
ret_from_fork+16
Signed-off-by: Stacy Harper <contact@stacyharper.net>
The current configuration is based on an old devicetree provided with Tow-Boot.
Most (if not all) distributions will be packaging a newer version with a changed gpio name for the power button.
For more information check this issue on PostmarketOS: https://gitlab.com/postmarketOS/pmaports/-/merge_requests/3628#note_1164572571
Signed-off-by: Anjandev Momi <anjan@momi.ca>
I believe these were used in the early days of sxmo to reset the
connection to the modem. eg25-manager now handles this.
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
This scaling value should be specific to devices and screen sizes. I use
sxmo on my destkops and I dont want this value by default from the
swayinitconf that I cant manage.
On sway on ppp the modem got a dedicated device input on sway. It
trigger wake up on some event which break sxmo workflows.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
Hi all,
I just tested SWMO on my new samsung-gt510 [1]. SWMO is displayed but input via
buttons and touchscreen does not work.
With this patch the device is quite usable. Some functionality (like LEDs and
modem) is missing / not tested, but this could already be 80 % of the port.
Greetings and thank you for your great work
xengineering
[1] https://wiki.postmarketos.org/wiki/Samsung_Galaxy_Tab_A_9.7_2015_(samsung-gt510)
Signed-off-by: Anjandev Momi <anjan@momi.ca>
We might need to add more logic to control other modem managers in the
future but I think pinephone is the only one that requires eg25-manager
so lets do this for now.
This fixes modem support on non eg-25manager devices like the poco f1.
I no longer need to manually switch on the modemmonitor on startup and I
dont get the message that eg25-manager failed to start.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
I see I messed up the first one by not including where it was to go.
This should be better.
Signed-off-by: Newbyte <newbyte@disroot.org>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
Fixed SXMO_TOUCHSCREEN_ID, added SXMO_MONITOR, and made a small change
to sxmo_hook_start so we don't have to make xorg confs for devices. This
ensures that orientation is correct on devices where DSI-1 may not be
the primary monitor by default. It may not be the cleanest fix, but at
minimum, it doesn't hurt anything if SXMO_MONITOR isn't set.
I removed OG pinephone specific sys_files. I am not sure what their
equivalents are on the pro, or if they are necessary, but since they
don't exist on the pro anyway, it doesn't hurt to remove them.
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
There's constant spam about red/blue/green LEDs in logs which simply
cannot be controlled yet, and the white keypad backlight LED only seems
to be able to get controlled by the flashlight toggle in system menu
anyway.
Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
LED_WHITE_TYPE is not a documented variable name and isn't used by
sxmo_led.sh for example; correct it to SXMO_LED_WHITE_TYPE.
Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
Changes in v2:
- correct LED_WHITE_TYPE var to SXMO_LED_WHITE_TYPE for cheeseburger
Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
This updates the file names for enchilada to work with Aren's patch:
b91dd113eb
The enchilada (oneplus 6) compatible string was gotten from:
https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sdm845-oneplus-enchilada.dts#L12
The wileyswift compatibility string was confirmed by travmurav[m] on
\#postmarketos irc channel:
```
anjan
$ tr '\0' '\n' < /proc/device-tree/compatible
longcheer,l8150
qcom,msm8916-v1-qrd/9-v1
qcom,msm8916
```
travmurav[m] said it's important to note that the `-v1-qrd/9-v1` is
shared among at least 3 device models.
This patch makes most things work again on the poco f1. However, volume
up key is broken - this is a regression. Volume up used to work on 1.8.2.
I dont know how to debug or fix this. I have a poco f1 and can provide
logs.
Signed-off-by: Stacy Harper <contact@stacyharper.net>