maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Some packages need reinstall after every reboot, usb socket broken (https://talk.maemo.org/showthread.php?t=83412)

jgbreezer 2012-04-03 12:57

Some packages need reinstall after every reboot, usb socket broken
 
For several months now, I've had an issue where my audio player and video player stop working. The video player would start but stay a completely black screen, no errors and I didn't even get the 4 animated circles while it loads bits to play it. Tapping the screen brings up the buttons and progress bar at bottom as normal but the timeline says 0:00 into playing it and pressing the pause button brings a yellow banner "Unable to perform operation". The audio player would behave similarly.

After a while of this and finding that reboots, and any other reset method wouldn't fix it including restarting the daemon processes, I eventually fixed it by after searching on here by reinstalling packages. But every reboot or battery-swap reverts to the same broken state. File-system issue? Its almost like there's a union fs and the base underlying fs never gets updated when I do the installs, just a (hypothetical) user-presented one which is kept in memory! Or could some process at boot be breaking things?

For others reference, it was reinstalling the following select codec/streamer packages (command-line apt-get with the --reinstall switch) that fixed playing both sound and video:

mafw-gst-renderer
decoders-support

There were also other odd and seemingly random issues. At this point you might suggest backup and reflash, but A) my usb port is one of the broken ones and B) the backup app doesn't work either. It seems random apps have various things missing (files not there) that stops them using either dbus or something else, or config. The player issues are just one example of this, but one of my most commonly used/most annoying ones to be broken. Btw, I can still play videos using kmplayer or sound via a command-line player util (aplay? gplay? player? I forget the program name) and other sounds for alarms etc. work fine.

I forget whether this is expected and approved behaviour, but my SD memory card also always seems to fail to mount read-write mode, and if I want to save anything to it I always need to do a quick "mount -o rw,remount /media/mmc1" in the terminal as its mounted but only read-only.

My fstab for /opt btw, just in case:
/home/opt on /opt type none (bind)

I think these are all perhaps symptoms of a deeper underlying filesystem issue or corruption that could have occurred (I can't remember the details that happened just before these things stopped working but there might have been a lock-up and reset required, or /home getting a bit full - root ('/') was fine, dont think I ever filled that up). Some dbus objects (or python libs for) also seem to have stopped working and files disappeared to support them, but it would take a lot of effort to find out exactly what needs replacing and the basic priority stuff is working again.

Maybe relevant(?): my internal battery has stopped having enough power in between battery changes to keep the time and date on the phone, unless I switch the old one out and the new one in very quickly in a seamless pop and slide I've got used to doing every day and a half or so on average. Is the internal one a rechargeable battery and the charging has broken, or is that for the life of the phone unless I can replace it (can you get at it to do that)?

I started copying files via network elsewhere to manually backup, or manually onto the SD card, but that just was being too time consuming and killing the battery when I needed to use the phone; I have a recharger and a couple of spare batteries to keep me going at present (my internal battery seems to have died a bit too). I have the original usb port which I might consider trying to fix again, but worries about breaking the whole phone and lack of serious focussed time for it recently again held off that plan (have the soldering iron and a <little> bit of experience with them).

Is it time for a new phone already with all this (bought sim-free)? :( Has been tempting, but budget disallows that at present - just got married, that kinda expense bubble kills any idea like this.

Its taken a while to write this up here to see if anyone has ideas, to maybe help someone with similar symptoms (or for who the package reinstall works permanently) or who hasn't got as far, as trying to include good relevant info..

Probably crosses lots of topics, and I could have posted this in hardware too or as separate posts but the issues may depend/be related.

Please anyone who can help or who understands the filesystem better and could suggest why the reinstall doesn't stick after reboot? I've got a fair few things installed on it but I can't think if anything might cause this; I used to have smscon but after a previous reflash back when the usb socket existed it never got reinstalled (by saying no to it from the backup's restore process) I'm sure.

jgbreezer 2012-04-03 13:03

Re: Some packages need reinstall after every reboot, usb socket broken
 
PS I don't have any alternate-system software installed or in use eg. power-kernel or others, and I haven't upgraded to any community CSSU yet; still on the last official Nokia-provided one (the regular upgrade app is also partly broken too... though the notification of upgrades available works, I can't upgrade them through that or via faster-app-manager). I've been doing all upgrades manually in the terminal, but I'm a capable Linux sys admin and happy with the terminal (one of the reasons I love the N900 still so much, with its real keyboard.. what do I go to after this? not that I'll be able to for a while)

jgbreezer 2012-10-10 10:56

Re: Some packages need reinstall after every reboot, usb socket broken
 
Well I figured out the simplest way to fix my audio issue after a clean boot; after a while reinstalling (on command-line using dpkg with --reinstall option) the decoders-support package on every boot, I extracted the debian package and looked at the pre/post install scripts.

Turns out that a mafw start command fixes it, so something isn't running or is dieing that shouldn't be, just at/after system boot.
So now I have a simple command that lets gpodder start and the builtin audio player to work, so as root/via su or sudo I run (in a terminal):

/usr/bin/mafw.sh start mafw-gst-renderer

I don't know why this dies on boot or isn't started - it seems to run fine after I start it, I never need to do it again until the next reboot. So hard to find/trace the process that would normally start it at boot though! Anyone know anything?

reinob 2012-10-10 11:12

Re: Some packages need reinstall after every reboot, usb socket broken
 
mafw is normally started with Xsession
(/etc/X11/Xsession.post/32mafw).

It runs the plugins found on /usr/lib/mafw-plugin/*.so.

Check if you have the 32mafw in place. Otherwise you may want to --reinstall mafw-dbus-daemon

Good luck!

Hurrian 2012-10-10 12:48

Re: Some packages need reinstall after every reboot, usb socket broken
 
If your USB socket is b0rked, I recommend immediately installing BackupMenu and downloading the rootfs and eMMC images to SD and internal storage.

This way, you will be able to reflash your system to clean PR1.3 without using a USB port, should you ever brick Maemo.

Just a reminder, in case you break Maemo's fragile internals and want to start fresh.

jgbreezer 2012-10-10 16:46

Re: Some packages need reinstall after every reboot, usb socket broken
 
Quote:

Originally Posted by Hurrian (Post 1278795)
If your USB socket is b0rked, I recommend immediately installing BackupMenu and downloading the rootfs and eMMC images to SD and internal storage.

Thanks lots for that; yes, I had been worried what I would do if it somehow got bricked; and not able to re-flash stuff as I've been able to do after the PR1.2 upgrade broke it (back when I had working usb). My regular (builtin) backup app is also a bit broken for some other reason (happened same time as this audio system breakdown) and not due to a lack of drive space, so backupmenu seems like a good tool to have. I haven't researched enough what to re install to fix this and a couple of other minor things though.

jgbreezer 2012-10-10 16:55

Re: Some packages need reinstall after every reboot, usb socket broken
 
Quote:

Originally Posted by reinob (Post 1278764)
mafw is normally started with Xsession
(/etc/X11/Xsession.post/32mafw).

It runs the plugins found on /usr/lib/mafw-plugin/*.so.

Check if you have the 32mafw in place. Otherwise you may want to --reinstall mafw-dbus-daemon

Good luck!

Interesting.. I have a Xsession.post/32mafw-gst-renderer - is that the one you meant or should there be just a "32mafw" instead? I do have a mafw-gst-renderer.so plugin in the mafw-plugin dir too.

That dir looks like a run-parts type sorted runlist of things, I'm a little familiar with Xsession and X init/shutdown scripts but maemo's also a little non-standard in places.

reinob 2012-10-10 18:06

Re: Some packages need reinstall after every reboot, usb socket broken
 
I have 32mafw (owned by mafw-dbus-daemon) as well as 32mafw-gst-renderer (owned by mafw-gst-renderer).

Can you check with dpkg if you have both packages installed?

Re. Xsession, etc.: yes, Maemo is weird in some (many) aspects, but luckily there's a more-or-less-standard Unix/Linux underneath..

lorul2 2012-10-10 19:12

Re: Some packages need reinstall after every reboot, usb socket broken
 
Sorry please go slowly... You can reflash your n900 with a broken USB port?

jgbreezer 2012-10-11 12:54

Re: Some packages need reinstall after every reboot, usb socket broken
 
Quote:

Originally Posted by reinob (Post 1278934)
I have 32mafw (owned by mafw-dbus-daemon) as well as 32mafw-gst-renderer (owned by mafw-gst-renderer).

Can you check with dpkg if you have both packages installed?

I do indeed have both mafw-dbus-daemon and mafw-gst-renderer packages installed "Status: install ok installed", so dpkg says.

mafw-gst-renderer owns a /etc/X11/Xsession.post/32mafw-gst-renderer files, but the mafw-dbus-daemon package (version 0.3.2010.36-1+0m5) installed doesn't own any files in there; only (from dpkg -L) in /usr/bin, /usr/share, /etc/sudoers.d, /etc/osso-* dirs.

reinob 2012-10-11 13:10

Re: Some packages need reinstall after every reboot, usb socket broken
 
weird,

My version of mafw-dbus-daemon is 0.3.2010.36-1+0m5 (like yours) and when I list the package-owned files (with dpkg -L) the very last file (after /etc/osso-*) is /etc/X11/Xsession.post/32mafw

Can you do a apt-get --reinstall install mafw-dbus-daemon and see if 32mafw shows up?

Otherwise I could send you the file.

Could other people do the same and confirm/deny whether the 32mafw script is present on their system?

foobar 2012-10-11 13:36

Re: Some packages need reinstall after every reboot, usb socket broken
 
I have the same version of mafw-dbus-daemon installed, though there is no 32mafw file in /etc/X11/Xsession.post/ (and it's not listed in dpkg -L output). I have no sound problems, though.

reinob 2012-10-11 14:17

Re: Some packages need reinstall after every reboot, usb socket broken
 
OK. I found bug #5637 (https://bugs.maemo.org/show_bug.cgi?id=5637).

Apparently originally all mafw plugins were run by the 32mafw plugin. The bug was fixed by starting the plugins separately and removing 32mafw.

But 32mafw is NOT removed if it was there and you upgraded OTA. Which was my case (I originally had PR1.2 and upgraded to 1.3 OTA). I have never reflashed this particular N900.

So in theory I could go now and delete 32mafw. But this is what @jgbreezer has, and he has a problem.

[EDIT: I have deleted 32mafw after checking that, in theory, it shouldn't change anything. Have yet to reboot, but not now]

I don't really have much time to continue looking into this (music and video works for me, even though I rarely listen/watch anything on the N900).

jgbreezer 2012-10-11 18:37

Re: Some packages need reinstall after every reboot, usb socket broken
 
1 Attachment(s)
Well could someone send me their 32mafw and I'll see if that helps me. Interested to know if your next reboot works too, after you removed it.

Yes, I definitely have a daemon package without the file and reinstalling doesn't put it there (attached a txt file listing info).

reinob 2012-10-12 08:33

Re: Some packages need reinstall after every reboot, usb socket broken
 
@jgbreezer,

Could you try to reboot, and, before running your mafw.sh start .. command type "ps ax | grep render"

You should see "/usr/bin/mafw-dbus-wrapper mafw-gst-renderer"

If NOT, it means that either the script was never run or that it stopped (shortly) after starting.

If YES, go to the media player and play something. Then go back to the terminal and check if the process is still there. I suppose that if the media player doesn't work (as you report in the first post) then the process will have died.

You might also want to have a look at /var/lib/dsme/stats/lifeguard_restarts
It lists how many times each dsme-controlled program has been restarted. In my case it says "1" time for mafw-gst-renderer. Check if you have a big number there.

jgbreezer 2012-10-12 13:19

Re: Some packages need reinstall after every reboot, usb socket broken
 
In the restart counting file under /var/lib/..., I have no entries for gst-renderer! Not in that file or in the ".bak" suffixed version of it in the same dir either. Other processes have various no. of restarts; from systemui (1), hildon-home(8)/desktop(9), the camera-ui(591!).

"/usr/bin/mafw-dbus-wrapper mafw-dbus-wrapper" has an entry in there though at 10. I might have manually run the mafw start command twice at most on this boot, and on average a bit under once per boot for the last few weeks.

After a fresh boot, I see no render processes running (from the "ps ax") so it either died or never got started. I might try putting some debug log echo output into the other mafw x-session start script to a temporary/user-dir file and test it, but at this point I'd like to see what the "old" 32mafw command had in it that isn't on my phone anymore.

As usual, the media player doesn't work after a boot; but I did install Backupmenu and tried to create a backup of all filesystems on the SD card. Thought I'd fsck the drives while at it, they came up with a few errors and I presume that created some FSCK<nnnn>.REC files I now see on my SD card root dir in /media/mmc1

I don't see the backup systemBackups directory there though, there seems to be no indication that the backup is done (it just prints up a filename in the menu); I wasn't sure if it had finished so I pressed 'x' from that menu after waiting a bit, and it quit back to main menu. Wondering if it failed to write to the SD card. I'll try to the Docs folder next time, I should have enough space for it. Do you know if Backupmenu mounts the SD card writeable itself or should it be already? As I mentioned mine doesn't normally get mounted rw, so wondering if it failed to write the backup there for this reason.

jgbreezer 2012-10-12 13:29

Re: Some packages need reinstall after every reboot, usb socket broken
 
Er, yeah; having tried to back up again to the internal eMMC flash (and needing to press the button twice on the menu to make it do it), it goes to a separate screen with progress report; so I dont think it even started before


All times are GMT. The time now is 06:25.

vBulletin® Version 3.8.8