Author Topic: Debian on Gemini - Usage  (Read 201018 times)

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
    • View Profile
Debian on Gemini - Usage
« Reply #75 on: June 26, 2018, 10:18:23 am »
I'm really glad to hear you have fixed the problem, and that the rndis IP range has now been narrowed, so that other users won't have the same issues as you. I agree, the community here is really great, thanks to all of you for all the support and help you're providing

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

psionlover

  • Newbie
  • *
  • Posts: 34
    • View Profile
Debian on Gemini - Usage
« Reply #76 on: June 27, 2018, 10:06:01 am »
I have my new geminiPDA for a few days now and have been doing a lot of fiddling to get gembian to be usable for me. I am really glad with the device, it would be so nice to have a proper linux device with me everywhere I go. As far as I see now I am quite sure I can configure gembian so that it will suit my daily needs for the near future. But the only thing that I am worried about is the power management. I did not really deep dive into it, but before I do I will ask you if this is useful or that power management is still a Gembianism.

What did I do so far:
- In installed dual boot conform the flashing guide
- I checked the manual on DebianTP. But as far as I see everything there is already part of the standard image.
- I did a lot of fiddling and probably broke one or more things without noticing,realizing.

What do I notice:
- If I do a shutdown via the menu the device inmediately hangs and I have to shutdown by using the Esc key. If I do a shutdown via the terminal sometimes it shutdowns fine, sometimes it hangs also.
- If I do a hybernate via the menu the device does not react in any way.
- if I do a suspend the screen is locked but I am unsure wetter it really suspends. At least the leds stay burning and I am still able to ssh from outside. how can I know/check if the device properly suspends ?
- Last night the battery was still half full. I left it in suspend mode and found the battery nearly drained after 10 hours. This means that using the device in silent (suspend) mode the battery is drained in one day. This won't work for me if I want to use the device for daily use. I want a mobile device to get unhooked, not to join the zombie army chasing after an electric socket

My question is should I deep dive in power management and will I find a solution to get the gembian power-safe ? Or is there still something fundamental that prevents proper power management on the gembian ?

One other question is about Conman. If I turn off bluetooth every time I do a reboot bluetooth is back. How can I get bluetooth definitely turned off ?
« Last Edit: June 27, 2018, 10:25:43 am by psionlover »

Adam Boardman

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Debian on Gemini - Usage
« Reply #77 on: June 27, 2018, 10:51:41 am »
Shutdown issues:- https://www.oesf.org/forum/index.php?showto...st&p=287687
(once we've got text console we can see what is blocking and so then fix it?)

Suspend:- We are using repowerd (branched from UBPorts) to sleep, it can probably be much improved, I find 1-3% drop in 8 hours with wifi off (so I expect many days of sleeping). I hope we can improve the effeiciency of 'wifi on' sleeping, as currently if you ssh in and view the logs (journalctl) then its very noisy for no good reason that I can see. This is why I put the LED's in to indicate that you'll not get a good sleep.

I'm glad that a few people are interested in this, DonOregano on irc just now is proposing suspend/unsuspend of web browsers as they seem to block a good sleep also. So please do investigate & suggest fixes.

For me a laptop style suspend is of no use as I want it to monitor for calls. I guess WiFi only folks might like that, but it would probably require tinkering in the kernel and adding a swap file or some such for suspend to disk to work.

Bluetooth:- I think if you set the cmst settings the right way (retain state? or similar), I think it can be made to work sensibly. We should probably change the default.

psionlover

  • Newbie
  • *
  • Posts: 34
    • View Profile
Debian on Gemini - Usage
« Reply #78 on: June 27, 2018, 11:04:34 am »
Thanks for replying Adam. I understand poor power management is not a Gemianism but needs more fiddling by myself  So I will dive into it and let you know. First thing to find out: how to let suspend know 'turning wifi off' is part of my meaning of 'suspend'.

Adam Boardman

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Debian on Gemini - Usage
« Reply #79 on: June 27, 2018, 11:23:01 am »
You can just add some more commands in repowerd, this diff will help you find the right bit of code, you might change it to run custom scripts that you can then tinker with more easily than having to recompile it all the time with each change.

psionlover

  • Newbie
  • *
  • Posts: 34
    • View Profile
Debian on Gemini - Usage
« Reply #80 on: June 27, 2018, 12:22:22 pm »
Quote from: Adam Boardman
You can just add some more commands in repowerd, this diff will help you find the right bit of code, you might change it to run custom scripts that you can then tinker with more easily than having to recompile it all the time with each change.
I am searching like a madman, but where can I find those config files for repowerd ?

Adam Boardman

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Debian on Gemini - Usage
« Reply #81 on: June 27, 2018, 12:56:26 pm »
Sorry there are no config files, I gave you a link in my last post, you'll have to recompile the source (after changing it to run a script in addition to the current xrandr stuff).

psionlover

  • Newbie
  • *
  • Posts: 34
    • View Profile
Debian on Gemini - Usage
« Reply #82 on: June 27, 2018, 01:17:22 pm »
Okay thanks. I am not into recompiling distro's yet, so better leave this for the moment.

Adam Boardman

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Debian on Gemini - Usage
« Reply #83 on: June 28, 2018, 04:37:30 am »
Was only suggesting recompiling one component. But in case you've not found it the fn+areoplane button is mapped to offline mode, and I just use that before I close the device to turn off the connectivity stuff, and again when I open it to turn it back on, not as nice as your suggested automatic way but better than having to fiddle about finding the right app etc. There is also a lid watcher in lxqt settings, but it seemed to cause problems as I recall.

psionlover

  • Newbie
  • *
  • Posts: 34
    • View Profile
Debian on Gemini - Usage
« Reply #84 on: June 28, 2018, 08:13:45 am »
Quote from: Adam Boardman
But in case you've not found it the fn+areoplane button is mapped to offline mode, and I just use that before I close the device to turn off the connectivity stuff
Thanks, that indeed works better for the moment. My device was last night roughly on 50% battery power and I left it in suspend and flight mode. After 10 hours there was 32% power left, so it drained 18%. That is much better then with wifi on (50% drain during the night), but not even close to the 2-3% drain you experienced, so I probably still miss something.

I lowered my short term goals. I only will use the device as an offline pda with wifi/bluetooth off. Theoretically I will still have power if I can't or forget to connect the device to an electric socket for a few days. I  will mostly power the device if I am next to my pc by connecting the usb cable. I want to achieve that while connected to the pc 1. device and pc can be connected 2. device has internet access. I did not yet try to get device and pc connected by usb. At least if I do connect the usb cable there is no connection out of the box. But I will start fiddling around and will find a way to get it working.
« Last Edit: June 28, 2018, 03:12:07 pm by psionlover »

psionlover

  • Newbie
  • *
  • Posts: 34
    • View Profile
Debian on Gemini - Usage
« Reply #85 on: June 28, 2018, 03:13:18 pm »
It took me a while, but now my device is via usb connected to my local network and the internet. the only thing I miss is that I don't know how to append the 'route' to rndis0. I tried setting 'add route default gw 10.15.19.1' to /etc/rc.local, but that did not work. I also red somewhere that I should make an /etc/systemd/network/rndis0.network
Code: [Select]
[Match]
Name=rndis0

[Address]
Address=10.15.19.82
Peer=10.15.19.0/24

[Network]
Gateway=10.15.19.1
But that did not help either.

I also don't see a way to configure the usbnet interface on cronnman

Anyone an idea ?

[Update]
I found out that if I rename the file to '10-static-rndis0.network' helps. If I restart the device sometimes the above settings are rewarded and I have connection with pc and internet. But on other reboots the settings are not rewarded.

[Update2]
The settings above does not seem to help much. The only thing that works is put 'route add default gw ...' to /etc/rc.local' and prepend it with a 'sleep 5'. This doesn't look like the proper way to me, but at least it works ... for now.
« Last Edit: June 28, 2018, 06:00:07 pm by psionlover »

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Debian on Gemini - Usage
« Reply #86 on: August 13, 2018, 07:59:05 am »
I thoight I would share this as it might save others some time.

When I connect my G to my linux desktop (ubuntu 16.04) I was trying to work out where the IP address for the USB netework on the G was being set, it's always 10.15.19.82

I discovered it's a hard-wired value in this file: /usr/bin/usb-tethering as variable "LOCAL_IP". The netmask is embedded as 255.255.255.0 further into the script.

This file comes from package hybris-usb

It would be nice if the package/tool was improved to pick up parameters from, say, /etc/hybris-network or something.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.