yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Android Development] matusala:
after digging the internet i found solution to this problem.

here in Nexus 4 source code

https://github.com/mer-hybris/lge-kernel-mako/blob/hybris-10.1/fs/timerfd.c

diff --git a/fs/timerfd.c b/fs/timerfd.c
index b94fa6c..8ec3aeb 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -134,7 +134,7 @@ static void timerfd_setup_cancel(struct timerfd_ctx *ctx, int flags)
{
if ((ctx->clockid == CLOCK_REALTIME ||
ctx->clockid == CLOCK_REALTIME_ALARM) &&
- (flags & TFD_TIMER_ABSTIME) && (flags & TFD_TIMER_CANCEL_ON_SET)) {
+ (flags & TFD_TIMER_CANCEL_ON_SET)) {
if (!ctx->might_cancel) {
ctx->might_cancel = true;
spin_lock(&cancel_lock);

and in systemd source

diff --git a/src/core/manager.c b/src/core/manager.c
index a1f37bb..d444539 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -343,7 +343,7 @@ static int manager_setup_time_change(Manager *m) {
if (m->time_change_fd < 0)
return log_error_errno(errno, "Failed to create timerfd: %m");

- if (timerfd_settime(m->time_change_fd, TFD_TIMER_ABSTIME|TFD_TIMER_CANCEL_ON_SET, &its, NULL) < 0) {
+ if (timerfd_settime(m->time_change_fd, TFD_TIMER_CANCEL_ON_SET, &its, NULL) < 0) {
log_debug_errno(errno, "Failed to set up TFD_TIMER_CANCEL_ON_SET, ignoring: %m");
m->time_change_fd = safe_close(m->time_change_fd);
return 0;

Solution was found here!

https://github.com/systemd/systemd/issues/1143

It's not my work. I could not find systemd source code for mako. Whoever makes Sailfish OS for nexus 4 please take a look at this post. It can fix this problem.
[Nexus 4 Android Development] rinigus:
I can see that your phone does get some sleep, now the question is just when does it do it. you could use collectd and its GUI to get overview of the sleep (when phone sleeps and when it does not in addition to several other aspects of the device performance) or run mcetool --get-suspend-stats once in a while and see if you get increase in suspend_time.

For wakelock monitoring I wrote a small python script that was uploaded in this thread earlier. Or you could write your own and see when the wakelocks are active for longer time.
[Nexus 4 Android Development] matusala:
At last i updated my nexus 4 to Sailfish OS 2.0.2.48. I found my old nexus 4 (It does not have screen) i replaced it's motherboard in my working one installed 2.0.2.48 on that too. Now my working phones motherboard is in that phone and it's is in my phone. Everything works fine, just one problem:

On every reboot when i want to connect to my password protected wifi i have to enter password. Can you help me with this? Strange thing is that my other nexus 4 (Without screen) connects to my wifi automatically (i can ssh into it anytime) but other nexus 4 does not.
[Nexus 4 Android Development] matusala:
2.0.2.48 has big problems with battery life so i updated it to 2.0.3.14 and i'll check how this works.

My test phone (also nexus 4) is still on 2.0.2.48 and it drains too fast. It does not have sim card, does not have display everything is off only wifi is on and connected and in 18 hours it came from 100% to 70% :(
[Nexus 4 Android Development] rinigus:
Let's remember that 2.0.2/3 are beta versions, bugs are expected.

What I have seen on 2.0.2.48 is that some process locks a wakelock when there is no network connection (see https://together.jolla.com/question...a-1-and-jolla-c/?answer=142264#post-id-142264 ). With network connection, I don't see any excessive battery drain when compared to 2.0.1. However, I have a somewhat different setup that is used to test a different base.

Since you are on 2.0.2 (or .3), would you mind to check one thing: does a front camera work in your case? For me, the back camera acquires images/video, but, in 2.0.2, the front camera does not. I use Jolla-provided camera app.

As for WiFi, I don't have to reenter passwords in 2.0.2
[Nexus 4 Android Development] matusala:
Do not know about 2.0.2.48 but in 2.0.3.14 both camera work perfectly with default app.

I updated to 2.0.3.14 today and it seams it works as 2.0.1.11. Just have that "time has changed" and "Rfkill wlan unblocked"
[Nexus 4 Android Development] rinigus:
Thank you for testing. I had no problem on 2.0.1.11, but it appeared later on 2.0.2 (if I remember correctly). Those messages i have as well. While N4 porters can patch kernel and use that, we are probably stuck with systemd from Jolla's distro - its not a part of porting to introduce new packages unless its required for some hw functionality .

Thanks again for testing
[Nexus 4 Android Development] Kubino:
I had 2.0.3.14 and there was some issues - can't login to Jolla account after one logout, only few apps in Jolla Store... I reflash gamma 6 today but there is same issue with the Jolla Store so this issue isn't in version of SFOS but somewhere else. Now I back on Android after half year :(. I want to compare battery consuption, SOT with SFOS. I also wanted to test USB OTG but there isn't kernel which support USB OTG on N4 for Android 6.

On SFOS when I connect headphone to jack on N4 there is a little noise which isn't on Android.
[Nexus 4 Android Development] matusala:
Yesterday i needed mobile data. I activated it on my sim card and set apn as my service provider told me, but still i could not activate mobile data. Strange thing is 3G connection did not activate either. Mobile data switch did not work. I tested with 3 different sim cards. One from which is specifically for internet connection (You can't make a call from that sim card) and only that sim card could turn on mobile data and make 3G connection on my N4. It was on 2.0.3.14 version.

I am on expedition and thank god i had my second (without screen) nexus 4 with me with 2.0.2.48 Sailfish version. I quickly changed main board and 2.0.2.48 worked on all sim cards. It showed 3G connection and i could use mobile data too.

And one thing i can't use mobile hot spot in both versions. 2.0.2.48 and 2.0.3.14. When i try to connect from the laptop to my phone with wifi it can't connect. I did not checked USB internet sharing. I'll check it and report later.
[Nexus 4 Android Development] matusala:
I have 2.0.2.48 version. I do not know if it's bug or something but when my phone can't connect to 3G cell it does not give me an option to enable mobile data. also it can't connect to 3G cell after disconnecting from it. I have enabled automatic cell selection, but it seams this option does not work. Please check on your Nexus 4 ports if this problem is on other versions of Sailfish os port.
[Nexus 4 Android Development] Kubino:
Is there some flashlight app (torch) working on Nexus 4? One was at Jolla Store but it's not available anymore.

I'm still can't log to my Jolla account on N4 so I can't go to Jolla Store. I also can't create new one.
[Nexus 4 Android Development] matusala:
It's in openrepoes "Torch plugin for Jolla settings" Works on my Nexus 4 with 2.0.2.48 and worked on 2.0.1.11 too.

I have it in upper dropdown menu beside wifi toggle so i can turn on torch fast.
[Nexus 4 Android Development] deshmukhrb2000:
New release is out

https://together.jolla.com/question/139603/release-notes-202aurajoki-released/?sort=votes&page=1
[Nexus 4 Android Development] matusala:
I updated and it fixed my problem. When my phone was not on 3G it could not turn on mobile data. Now on 2.0.2.51 it works great. Nice to see improvements in this OS. This OS must take off!!! It's a great OS and modern phones must run on this OS too.
[Nexus 4 Android Development] ddaggebi:
Can I update my nexus 4 to new version of sailfish, while I am on gamma 6? If so, how can I do it?
[Nexus 4 Android Development] matusala:
Yes you can upgrade to any version.

Make sure you disable all patches in your system and also disable openrepoes reposytories with this command:

"for i in $(ssu lr 2>&1 | grep openre | cut -d" " -f3); do ssu dr $i ; done"

You can enable them after update with this command:

"for i in $(ssu lr 2>&1 | grep openre | cut -d" " -f3); do ssu er $i ; done"

I went too far on my nexus 4 and upgraded to 2.0.3.14 and it had many problems. It was my other nexus 4 just for testing. On main i had 2.0.2.48 and now i updated to 2.0.2.51 and it's fine. Fixed some problems i had on 2.0.2.48.

Here is the script for upgrade, just change first line with release number e.g. 2.0.2.51

last line is commented which could reboot the phone after upgrade process. restart manually or uncomment that line.

RELEASE=2.0.0.10
devel-su sed -i -e 's#^adaptation=.*$#adaptation=http://repo.merproject.org/obs/nemo:/testing:/hw:/lge:/mako/sailfish_latest_armv7hl/#' /usr/share/ssu/repos.ini
ssu dr adaptation0
ssu release $RELEASE
ssu dr extra
ssu dr mw
ssu ar mw http://repo.merproject.org/obs/nemo:/testing:/hw:/common/sailfish_latest_armv7hl/
ssu er mw
ssu ar dhd http://repo.merproject.org/obs/nemo:/testing:/hw:/lge:/mako/sailfish_latest_armv7hl/
ssu lr
devel-su zypper clean -a
devel-su zypper ref -f
version --dup
sync
#reboot
[Nexus 4 Android Development] ddaggebi:
[MENTION=6098003]matusala[/MENTION]

Wow...Thank you! It's been a long time since I've ever seen a person kind as you!

Going to install right away. Thanks!
[Nexus 4 Android Development] syedyasin:
Can we upgrade, with the above steps even if sfos is installed as secondary ROM..?
[Nexus 4 Android Development] bolek1337:
gamma7 image

I released a new gamma7 image. The OTA between gamma6 and gamma7 (2.0.1.11 -> 2.0.2.51) is also available.

Please follow https://wiki.merproject.org/wiki/Adaptations/libhybris/Install_SailfishOS_for_mako for OTA and/or new image installation.

Changelog:

- New SailfishOS release 2.0.2.51. For a complete list of changes, please see the SailfishOS release notes for more information: https://together.jolla.com/question/139603/release-notes-202aurajoki-released/?sort=votes&page=1

- Mixer paths are linked from Android. Practical effects of the change are yet to be revealed.

Side note: this image is based on the CM11 image, just like all of the gamma series. Yes, cm12.1 is on the agenda (mostly thanks to the efforts of [MENTION=7078096]rinigus[/MENTION]), but it does not bring SailfishOS any benefits, aside sfdroid. Patience, my friends :)

---------- Post added at 03:53 PM ---------- Previous post was at 03:46 PM ----------

Most likely, yes. The Multi-ROM setup shown in https://wiki.merproject.org/wiki/Adaptations/libhybris/Install_SailfishOS_for_mako is known to update correctly through OTA. As usual, it doesn't hurt to back things up before doing an upgrade.

Could you check if you experience the same noise with the gamma7 image? If you updated before to 2.0.2.51, make sure to do that again - I updated the droid-config-mako package only today. You're supposed to have version 0.0.9 of that package.
[Nexus 4 Android Development] matusala:
Yes! I have done that too.
[Nexus 4 Android Development] Kubino:
So I have version 0.0.9 now and the noise after connect headphones is gone but I hear it when playing music (when I put volume down on first level or mute, so the noise is drowned out on higher levels of volume) and few seconds after pause/stop music.
[Nexus 4 Android Development] matusala:
Do you mean device adaptation version 0.0.9? I updated again now and i got 0.0.1.11 why is that?
[Nexus 4 Android Development] Kubino:
No, I mean version of droid-config-mako package. Device adaptation version is 0.0.1.11.
[Nexus 4 Android Development] bolek1337:
I bumped upon this bug yesterday. It seems that 2.0.2.51 attempts to use LTE even on devices that don't support it (like our Nexus 4 here). Again, thanks to [MENTION=7078096]rinigus[/MENTION] for finding the reason.

To fix this behaviour, I modified the configuration file /etc/ofono/ril_subscription.conf and pushed an updated package. If somebody has a "special" Nexus4 with radio firmware that supports it, he may want to adjust the config file. I'd recommend against that, though. Nexus4 is not certified for LTE.

So - if anyone reading this experiences the same problem, please follow the OTA for 2.0.2.51 again or install a bugfix gamma7.1 release available, as usual in https://wiki.merproject.org/wiki/Adaptations/libhybris/Install_SailfishOS_for_mako
[Nexus 4 Android Development] vetzki:
set kernel parameters at boot time (e.g. to change "gamma" values of the display):

File 1 (e.g. setKernel.py)

import subprocess

"""
Gamma Default:
"gamma_kcal":["/sys/devices/platform/kcal_ctrl.0/kcal","255 255 255"],
"gamma_b":["/sys/devices/platform/mipi_lgit.1537/kgamma_b","108 32 35 116 0 31 16 80 51 3"],
"gamma_r":["/sys/devices/platform/mipi_lgit.1537/kgamma_r","76 64 68 118 1 0 0 48 32 1"],
"gamme_g":["/sys/devices/platform/mipi_lgit.1537/kgamma_g","76 64 68 118 1 0 0 48 32 1"]
"""

class Main:
def __init__(self):
self.setto = {
# your vaulues here, you can also add new
"gov": ["/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor","ondemand"],
"iob":["/sys/devices/system/cpu/cpufreq/ondemand/io_is_busy","1"],
"gamma_kcal":["/sys/devices/platform/kcal_ctrl.0/kcal","255 255 255"],
"gamma_b":["/sys/devices/platform/mipi_lgit.1537/kgamma_b","108 32 35 116 0 31 16 80 51 3"],
"gamma_r":["/sys/devices/platform/mipi_lgit.1537/kgamma_r","76 64 68 118 1 0 0 48 32 1"],
"gamme_g":["/sys/devices/platform/mipi_lgit.1537/kgamma_g","76 64 68 118 1 0 0 48 32 1"]
}
for i in self.setto:
cmd = subprocess.getstatusoutput( "echo "+self.setto[i][1]+" > "+self.setto[i][0] )
if cmd[0] != 0:
print("Error Code %i\nCommand was %s" %(cmd[0],cmd[1]))

if __name__ == "__main__":
Main()

File2 (systemd service file)

e.g. setkernel.service (copy as root to /etc/systemd/system/setkernel.service)

[Unit]
Description=Set kernel at boot

[Service]
Type=oneshot
ExecStart=/usr/bin/python3 /home/nemo/setKernel.py

[Install]
WantedBy=multi-user.target

enable with systemctl enable setkernel.service (as root) or without setkernel.service execute as root (devel-su python3 setKernel.py).
[Nexus 4 Android Development] deshmukhrb2000:
SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview

http://talk.maemo.org/showthread.php?t=96932

is this happening for Nexus 4 as well? any idea?
[Nexus 4 Android Development] carepack:
Mmmmhhhm. Havre you tried different modems / baseband? And if which one?

ahoi
[Nexus 4 Android Development] jcbjoe:
Thanks for the reply [MENTION=2977728]carepack[/MENTION]

How or where do i get a list of basebands or modems for the nexus 4 ? is there a list somehwere ?

Thanks
[Nexus 4 Android Development] carepack:
Hi jcbjoe,

can't send you the link atm. But look in n4 general section. There is a thread "original modem firmware list" or so. there you'll find the modem images...

ahoi :)
[Nexus 4 Android Development] jcbjoe:
Thanks [MENTION=2977728]carepack[/MENTION]

I found a lot of your stuff

For example .. This is where you Talk about doing all the Steps

http://xdaforums.com/showpost.php?p=52725532&postcount=5

And i found the list of modems

http://xdaforums.com/nexus-4/general/ref-mako-modem-collection-t2087227

Thanks Again
[Nexus 4 Android Development] deshmukhrb2000:
[MENTION=2977728]carepack[/MENTION]

I am with the sailfish since version 6.

last time when i upgrade from the 7 to 8, it install fresh, and i lost all my apps which are installed through jolla app store as well as from the warehouse. Also i have to again log in into the jolla store.

So just want to ask that, if i upgrade with the version u provided will it take care of the my installed app or it will be a fresh installment again.

i mean the updater script will take care of these thing.

Thanks for the new life for the N4 with sailfish OS
[Nexus 4 Android Development] carepack:
hi [MENTION=5605826]deshmukhrb2000[/MENTION],

sorry, haven't good news for you. Yes all apps and settings are going to be deleted. I don't know if you can modify the updater script to achieve the goal. Maybe it's possible. But if you get it to work I don't know how the behaviour of the device will be. Sorry for that....

ahoi
[Nexus 4 Android Development] carepack:
for all sailors out there,

I would like to recommend you the jolla blog:

https://blog.jolla.com/

You'll find there new information about jolla, devices and sailfishOS, tutorials and many other interesting things. If you're interested about the jolla stuff take a look on the webpage!

Happy christmas sailors. AHOI :angel:
[Nexus 4 Android Development] asuperpig:
I flashed this os yesterday. Camera works without problem. But I can not change input from English to Chinese no matter what I do, failing to type any words in daily use. I don't install JDQ39 as primary rom but install CM 10.1.3 and Sailfish OS as second rom by Multirom and set .84 modem. After that, there is no sound and failure to connect wifi. In my opinion, sailfish is not bad, I glad to use it if you, great developers, can make it successful to install and enjoy Android apps or provide more apps in its own store on Nexus 4. Actually development is hard, I wish you must get it!:fingers-crossed:
[Nexus 4 Android Development] carepack:
Hi [MENTION=5175956]asuperpig[/MENTION],

I think you're problem with wifi is because you set the modem option in multirom. I don't know if this is really implemented for sailfish. know the option for ubuntu. If you flash the 0.84 modem in recovery downloaded from the link provided two posts earlier it should work. The problem in general ist the gap between current android versions and the little old cm version we're usin' in the sailfish port. With every update we have to checkout which modem version is usable for both worlds. Android & sailfish. With my last multirom try on android 4.4.4 with the 0.84 modem I was able to get all supported parts working in android & sailfish.

Hope this helps you out to get the device parts working. Especially wlan and sound. :good:

ahoi
[Nexus 4 Android Development] jcbjoe:
1.1.1.27

[MENTION=2977728]carepack[/MENTION]

Any word on 1.1.1.27 for nexus4 ? or is it still in the works ..

Thanks
[Nexus 4 Android Development] carepack:
Hi [MENTION=3972011]jcbjoe[/MENTION]

last days I wasn't workin' on it. Got other things to do. I have to look what's coming next first. I want to get the port on a newer cm version. this would improve the modem compatibility to newer android version. Also we hope to get more hardware parts working. ;)

ahoi
[Nexus 4 Android Development] deshmukhrb2000:
[MENTION=2977728]carepack[/MENTION]s

It's good that you are trying to port it on new CM, means more features from the CM.

Keep it up :good::good::good::good:
[Nexus 4 Android Development] carepack:
Great news! If you haven't you're jolla phone already, a special offer is waiting for you. You can buy the phone for 249€ and will get two new other halfs with it. that's a great deal. offer is time limited. So hurry up and press the submit button ;)

the other great thing is that we will get a native whatsapp client called whatsup. people who came from meego will know the app already. So stay tuned.

ahoi
[Nexus 4 Android Development] sledges:
You might find this useful:

It's possible to backup your data/messages/settings and restore them on a freshly flashed version of SailfishOS without SD card: see FAQ item #13 http://xdaforums.com/jolla-sailfish/general/qa-sailfish-n4-thread-devices-t2727330
[Nexus 4 Android Development] deshmukhrb2000:
[MENTION=2977728]carepack[/MENTION]

Wonderful information for backup, waiting for it.

Thanks [MENTION=3234690]sledges[/MENTION] for pointing to the update done by [MENTION=2977728]carepack[/MENTION].

:good::good::good:

You Can Now View MeeCast Widget on Your Jolla Lockscreen

http://www.jollausers.com/2015/01/you-can-now-view-meecast-widget-on-your-jolla-lockscreen/
[Nexus 4 Android Development] ddaggebi:
Hello!

First, thanks for the great work! I really love SFOS.

I have a question. It might be a noob question(if it is, I'm sorry.)...

I am currently on LP 5.0.1 with all the stock bootloader and radio.

I want to go to sailfishOS, but I don't have time to flash the 4.2.2 through my computer:(

So can I just flash stock 4.2.2's radio image and bootloader image and flash sailfish? Will everything work by this way?

Thank you.
[Nexus 4 Android Development] deshmukhrb2000:
You can use MultiROM Manager to flash the Sailfish as a secondary ROM.

Also MultiROM has a facility in recovery to flash Sailfish ROM if u provide CM and Sailfish zip file while installation.

I am running Sailfish as a secondary ROM. No problem. Everything is working properly.

You just need a latest MultiROM manager and have a two zip files CM + Sailfish.

Just sure the your primary ROM has a contemptible radio to support Sailfish i have .84.
[Nexus 4 Android Development] ddaggebi:
Oh, thanks! So I need a .84 radio... I want to use Sailfish as a primary rom.(not using Multirom, don't have much space for 2 OS because my n4 is 8gb model) Would it be okay if I flash .84 radio -> cm ->sailfish in order to use sailfish as my primary rom?
[Nexus 4 Android Development] deshmukhrb2000:
If you want to use it as primary ROM,

Then you can follow the guide line given in

[MENTION=1556538]http://forum.xda-develope[/MENTION]rs.com/nexus-4/development/rom-sailfish-os-adopter-t2861054
[Nexus 4 Android Development] syedyasin:
hi [MENTION=3972011]jcbjoe[/MENTION], did u find anything which will help call volume on nexus 4 with SFOS ??
[Nexus 4 Android Development] rinigus:
I think krnlyng had been working on it, when he got time for it. in addition, we tried a bit with krnlyng in the end of summer using latest dev build for mako. I managed to build sfdroid for that base and somethings worked (starting apps, cameras), but there were multiple issues and its not ready yet. haven't had time to work on it since. it may happen if we all get time for it, but cannot promise at this stage yet.
[Nexus 4 Android Development] deshmukhrb2000:
Thanks for the update. Just wanted to know, if you guys are aware of those thing.

Good to hear from you that, you people are working on it. Keep it up guys as per your convenience. NO ETA required.

Once again, thanks for the SailFish
[Nexus 4 Android Development] matusala:
I deleted this OS to take a look at android 7.0 and Yesterday i made fresh install of SFOS gamma 7.1 and it feels like battery drain is fixed. My nexus 4 lasts MUCH longer then on 2.0.2.48/2.0.1.11. I was using that cronjob which was posted several pages back but now even without it i have MUCH better battery life. When i updated from 2.0.2.48 to 2.0.2.51 it was still eating my battery, so i guess you need to make fresh install of 2.0.2.51. Try doing it you won't regret.

I had too many tweaks to the os in previous installation. customized many things and did not want to make these changes again and again. So i started writing bash script which will restore my tweaks in fresh installations. It's work in progress.
[Nexus 4 Android Development] Kubino:
Maybe I will try it same way over android 7 :) (I want to try some things with NFC which isn't supported even in sfdroid). I think there is little improvement in 2.0.4.13 but still I think that I will need new battery after almost 3 years (last few months I can't get over cca 2,5-3h SOT without mobile data)
[Nexus 4 Android Development] radbme:
I've done a full device wipe and reinstalled Gamma 7.1 to check the progress. Battery drain does indeed seem solved. Now I'm back to fighting MMS settings. I followed my own screenshots from here http://xdaforums.com/showpost.php?p=66951158&postcount=499. But every time I send an MMS I immediately get a message in the top banner that there's a problem with the connection. I have data. The browser and all other web services work fine. Here's what I've tried:

-data connection is tested working

-used both IP address and host name for proxy

-checked the MMS Logger app but it only errors out when the connection drops (likely the culprit)

-I was on the 1.07 radio but reflashed .84 to no avail

-wifi is off

Any other ideas?
[Nexus 4 Android Development] radbme:
I used MMS logger and sent Jolla the logs and was contacted by Slava their MMS specialist. There's a newer version of MMS logger in warehouse so he had me install that. In the process of me testing I found that with wifi connected MMS send and receives. If wifi is disabled, no dice. We'll see what Slava has to say now that he has the logs. If anyone else is on ATT and can test that'd be great.