Author Topic: Fixed Chkhinge For Sl-cxx00 Xfce  (Read 2341 times)

chrisluu

  • Newbie
  • *
  • Posts: 24
    • View Profile
Fixed Chkhinge For Sl-cxx00 Xfce
« on: January 05, 2006, 12:14:47 am »
I attached the source and binary for a "fixed" chkhinge program. When I tried to use the original one with XFCE4, it would flip the screen the wrong way (because the "normal" viewpoint for the landscape devices is "xrandr -o right") so I just cooked up a quick C file that would flip the screen the correct way. I usually use my device at brightness 1 as well, so I made it turn off the LCD (brightness 0) when the case is closed and turn on the LCD (brightness 1) when the case is opened. You can rename the binary as chkhinge.xfce and bind the rotate key to it (in xbindkeys it is c:110) and it works great, at least for me.

In addition, I've been having some problems with the micro-drive. I don't know if a suspend script is screwed up or something, but at least once a day, the micro-drive stops working and things don't behave correctly. For instance "top" gives a "bus error" as well as "chvt." If I do cardctl status the micro-drive says something like [READY] [BAT DEAD] [BAT LOW]. I haven't found out how to fix the problem unless I simply restart the machine. Has anyone experienced this?

Thanks!

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Fixed Chkhinge For Sl-cxx00 Xfce
« Reply #1 on: January 05, 2006, 01:42:23 am »
Couldn't you achieve this by tweaking the scripts in /etc/sysconfig/clamshell ?
SLC-860 cacko / senao wifi

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
Fixed Chkhinge For Sl-cxx00 Xfce
« Reply #2 on: January 05, 2006, 02:10:19 am »
Quote
I attached the source and binary for a "fixed" chkhinge program.

Thanks, I'm going to give this a try.

Quote
In addition, I've been having some problems with the micro-drive. I don't know if a suspend script is screwed up or something, but at least once a day, the micro-drive stops working and things don't behave correctly. For instance "top" gives a "bus error" as well as "chvt." If I do cardctl status the micro-drive says something like [READY] [BAT DEAD] [BAT LOW]. I haven't found out how to fix the problem unless I simply restart the machine. Has anyone experienced this?

With vanilla rc12 I originally had a similar problem - the microdrive would just conk out, the HDD led would flash for a few minutes, dmesg shows a bunch of errors. The fix (I think I found it on this forum somewhere) is pretty simple. Edit /etc/apm/scripts.d/cardctl and replace the original:
Code: [Select]
cardctl eject and
Code: [Select]
cardctl insert with
Code: [Select]
cardctl eject 0 and
Code: [Select]
cardctl insert 0
This fix means that when suspending, instead of ejecting all CF cards it only ejects the external (card 0), and keeps the microdrive (card 1) in place.
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

chrisluu

  • Newbie
  • *
  • Posts: 24
    • View Profile
Fixed Chkhinge For Sl-cxx00 Xfce
« Reply #3 on: January 05, 2006, 02:52:25 am »
Quote
Couldn't you achieve this by tweaking the scripts in /etc/sysconfig/clamshell ?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=109592\"][{POST_SNAPBACK}][/a][/div]
Yep. Didn't know of that folder. I edited it and it's working with the original chkhinge file. For those interested, just edit any of the scripts (they all link to the same place) and replace "xrandr -o normal" with "xrandr -o right" and replace "xrandr -o left" with "xrandr -o normal"

Finding and editing the source was good experience for me too, finding out how the device checks the case state.

Quote
This fix means that when suspending, instead of ejecting all CF cards it only ejects the external (card 0), and keeps the microdrive (card 1) in place.
Unfortunately I had already edited that file to keep the microdrive in place. Any other suggestions? I think I also edited a file in /etc/apm.d that specifically ejected a Network card too (and the Bluetooth one) to only eject card 0.