maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Alternatives (https://talk.maemo.org/forumdisplay.php?f=36)
-   -   debian jessie image for N900 (https://talk.maemo.org/showthread.php?t=93251)

sakrabojski 2014-06-04 20:16

Re: debian jessie image for N900
 
1 Attachment(s)
Hy

I have installed Xmonad on our little beast and it works suprisingly well, it is fast, stable, low on mem ...
only downside is pretty large ghc as dependency (cca 600 mb) and lack of n900 Alt_l aka Mod1 key,
so I assign it to volume key and it works well.


Is there a way to assign '$ xset dpms force off' to kb_lock?
I found workaround but doesn't involve kb_lock.

Does anyone got audio working?
I've tried alsamixer, but moc doesn't give any response. :(
Then I tried with jack, in moc you can see that song is at least playing but there is no sound.:confused:

saponga 2014-06-04 21:48

Re: debian jessie image for N900
 
What about that keyboard LEDs ?

sakrabojski 2014-06-05 11:06

Re: debian jessie image for N900
 
Quote:

What about that keyboard LEDs ?
I've managed something with keyboard leds.

Here is a simple script:

Code:

#!/bin/sh

# there are different modes: run disabled load. I use run for ON and disabled for OFF
mode="run"

# 0-255
brightness="50"

echo $mode > /sys/class/i2c-adapter/i2c-2/2-0032/engine3_mode

echo $brightness > /sys/class/i2c-adapter/i2c-2/2-0032/leds/lp5523:kb1/brightness
echo $brightness > /sys/class/i2c-adapter/i2c-2/2-0032/leds/lp5523:kb2/brightness
echo $brightness > /sys/class/i2c-adapter/i2c-2/2-0032/leds/lp5523:kb3/brightness
echo $brightness > /sys/class/i2c-adapter/i2c-2/2-0032/leds/lp5523:kb4/brightness
echo $brightness > /sys/class/i2c-adapter/i2c-2/2-0032/leds/lp5523:kb5/brightness
echo $brightness > /sys/class/i2c-adapter/i2c-2/2-0032/leds/lp5523:kb6/brightness

Create two of those (with changed values), chmod it, put in path, add a line in visudo so you don't have to write password every time and enjoy typing in dark:cool:

Probably there is some more elegant way to achieve keyboard led on/off but...

sakrabojski 2014-06-05 18:55

Re: debian jessie image for N900
 
Script for voltage, capacity and temperature
Code:

#!/bin/sh


# status
stat=$(cat /sys/class/power_supply/bq27200-0/status)

# time
if grep Charging /sys/class/power_supply/bq27200-0/status > /dev/null
        then
time=$(cat /sys/class/power_supply/bq27200-0/time_to_full_now)
        else
time=$(cat /sys/class/power_supply/bq27200-0/time_to_empty_avg)
fi


# capacity
cfd=$(cat /sys/class/power_supply/bq27200-0/charge_full)
cn=$(cat /sys/class/power_supply/bq27200-0/charge_now)

# voltage
vmd=$(cat /sys/class/power_supply/rx51-battery/voltage_max_design)
vn=$(cat /sys/class/power_supply/bq27200-0/voltage_now)

# temp
temp=$(cat /sys/class/power_supply/bq27200-0/temp)

# out
echo status: $stat
if grep Charging /sys/class/power_supply/bq27200-0/status > /dev/null
        then
echo $time | awk  '{ printf  ("time to full: %.2d:%.2d\n" , ($1/3600%24) , ($1/60%60)) }'
        else
echo $time | awk  '{ printf  ("time to empty: %.2d:%.2d\n" , ($1/3600%24) , ($1/60%60)) }'       
fi
echo $cn $cfd | awk '{ printf ("capacity: %.1f%%\n" ,  ($1/$2*100) ) }'
echo $vn $vmd | awk '{ printf ("voltage: %.1f%%\n"  ,  ($1/$2*100) ) }'
echo $temp | awk '{ print "temp: " $1/10 "°C" }'


AapoRantalainen 2014-06-06 04:53

Re: debian jessie image for N900
 
Quote:

Originally Posted by sakrabojski (Post 1428334)
I've managed something with keyboard leds.

Here is a simple script:
...

This works. But row:
Code:

echo 3 > /sys/class/i2c-adapter/i2c-2/2-0032/select_engine
gives error
Code:

lp5523x 2-0032: firmware request failed

sakrabojski 2014-06-06 06:36

Re: debian jessie image for N900
 
Thanks for pointing it out, I overlooked it.
It seems that when you set mode run in engine_mode it automatically set which engine is active in select_engine, so
Code:

echo 3 > /sys/class/i2c-adapter/i2c-2/2-0032/select_engine
is unnecessary.

I've edited batt_info and kbd_led script.
bat_info is now more verbose and kbd_led doesn't produce error.

caveman 2014-06-06 12:44

Re: debian jessie image for N900
 
Here follows how to mount maemo fs from inside debian (from http://talk.maemo.org/showpost.php?p...2&postcount=61).

Code:

apt-get install mtd-utils
modprobe ubifs
ubiattach /dev/ubi_ctrl -m 5
mount -t ubifs ubi0:rootfs /mnt
mount /dev/mmcblk0p2 /mnt/home/
mount /dev/mmcblk0p1 /mnt/home/user/MyDocs/

For a chroot shell:
Code:

for i in sys dev proc; do mount -o bind /$i /mnt/$i; done
chroot /mnt /bin/sh

When done, undo:
Code:

fuser -k -M -m /mnt/
for i in sys dev proc; do umount /mnt/$i; done
umount /mnt/home/user/MyDocs/
umount /mnt/home/
umount /mnt


caveman 2014-06-06 13:29

Re: debian jessie image for N900
 
For a proper keyboard on X, run the following:
Code:

setxkbmap -rules evdev -model nokiarx51 -option grp:ctrl_shift_toggle -layout us
Please post if you know how to properly configure this in e17.

AapoRantalainen 2014-06-06 18:04

Re: debian jessie image for N900
 
Quote:

Originally Posted by caveman (Post 1428500)
Code:

apt-get install mtd-utils
modprobe ubifs
ubiattach /dev/ubi_ctrl -m 5
mount -t ubifs ubi0:rootfs /mnt
mount /dev/mmcblk0p2 /mnt/home/
mount /dev/mmcblk0p1 /mnt/home/user/MyDocs/


I have some difference when booted to jessie from sd-card:
Code:

/dev/mmcblk0p2 on / type ext4 (rw,noatime,data=ordered)
And maemo's home is: /dev/mmcblk1p2
And maemo's vfat MyDocs is: /dev/mmcblk1p1

mouzg 2014-06-06 18:39

Re: debian jessie image for N900
 
Quote:

Originally Posted by caveman (Post 1428509)
For a proper keyboard on X, run the following:
[CODE]
setxkbmap -rules evdev -model nokiarx51 -option grp:ctrl_shift_toggle -layout us

Please post if you know how to properly configure this in e17.

First create the following file
Code:

nano /usr/share/applications/keybset.desktop
with the following
Code:

[Desktop Entry]
Name=Keybset
Comment=Sets the RX-51 keyboard layout
Exec=setxkbmap -rules evdev -model nokiarx51 -option grp:ctrl_shift_toggle -layout us
Icon=false
NoDisplay=false
Terminal=true
Type=Application
Categories=
StartupNotify=true

After that make it executable
Code:

chmod a+x /usr/share/applications/keybset.desktop
Then goto Settings panel>Extensions Tab > Modules > Settings Tab And activate Applications module.
After its activated in Settings panel,Apps tab find Startup applications and activate Keybset.Your done
The only problem is that left and right arrows dont work for me.


All times are GMT. The time now is 12:20.

vBulletin® Version 3.8.8