Page 27 of 65 FirstFirst ... 17252627282937 ... LastLast
Results 261 to 270 of 646

Thread: How to Rotate the Screen for a TX2000 Tablet PC

  1. #261
    Join Date
    Nov 2008
    Beans
    9,635
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to Rotate the Screen for a TX2000 Tablet PC

    Hi Red_Lion, MisteR2, Ayuthia, gali98, and everyone,

    Aren't these at least some of our Bezel Buttons? Starting at line 79 in the unpatched hp-wmi.c:
    Code:
    static struct key_entry hp_wmi_keymap[] = {
    	{KE_SW, 0x01, SW_DOCK},
    	{KE_KEY, 0x02, KEY_BRIGHTNESSUP},
    	{KE_KEY, 0x03, KEY_BRIGHTNESSDOWN},
    	{KE_KEY, 0x20e6, KEY_PROG1},
    	{KE_KEY, 0x2142, KEY_MEDIA},
    	{KE_KEY, 0x231b, KEY_HELP},
    	{KE_END, 0}
    Clearly this is the swivel hinge:
    Code:
    	{KE_SW, 0x01, SW_DOCK},
    Which with the patch adds 'tablet' to the switch (SW).

    Are these the Brightness buttons on the keyboard?:
    Code:
    	{KE_KEY, 0x02, KEY_BRIGHTNESSUP},
    	{KE_KEY, 0x03, KEY_BRIGHTNESSDOWN},
    Edit: Doesn't seem likely since the keyboard Brightness keys function without the hp-wmi module installed. So what are they?

    So is this the non-functioning Rotate button?:
    Code:
    	{KE_KEY, 0x20e6, KEY_PROG1},
    This seems to be the "Q" (Media) button:
    Code:
    	{KE_KEY, 0x2142, KEY_MEDIA},
    Although The keycode for the "Q" button is 201 in xev in Intrepid. Or I suppose it could be the DVD button.

    This may be the Mobility Center button:
    Code:
    	{KE_KEY, 0x231b, KEY_HELP},
    Which is the other non-functioning button.

    Any thoughts? There isn't an exact one to one correspondence. But it seems quite a coincidence that there is the swivel hinge accompanied by 4 buttons in the hp-wmi keymap.
    Last edited by Favux; August 15th, 2009 at 08:40 PM.

  2. #262
    Join Date
    Apr 2007
    Location
    Mount Horeb, WI
    Beans
    4,312
    Distro
    Kubuntu Development Release

    Re: How to Rotate the Screen for a TX2000 Tablet PC

    Quote Originally Posted by Favux View Post
    Hi Red_Lion, MisteR2, Ayuthia, gali98, and everyone,

    Aren't these at least some of our Bezel Buttons? Starting at line 79 in the unpatched hp-wmi.c:
    Code:
    static struct key_entry hp_wmi_keymap[] = {
    	{KE_SW, 0x01, SW_DOCK},
    	{KE_KEY, 0x02, KEY_BRIGHTNESSUP},
    	{KE_KEY, 0x03, KEY_BRIGHTNESSDOWN},
    	{KE_KEY, 0x20e6, KEY_PROG1},
    	{KE_KEY, 0x2142, KEY_MEDIA},
    	{KE_KEY, 0x231b, KEY_HELP},
    	{KE_END, 0}
    Clearly this is the swivel hinge:
    Code:
    	{KE_SW, 0x01, SW_DOCK},
    Which with the patch adds 'tablet' to the switch (SW).

    Are these the Brightness buttons on the keyboard?:
    Code:
    	{KE_KEY, 0x02, KEY_BRIGHTNESSUP},
    	{KE_KEY, 0x03, KEY_BRIGHTNESSDOWN},
    Edit: Doesn't seem likely since the keyboard Brightness keys function without the hp-wmi module installed. So what are they?

    So is this the non-functioning Rotate button?:
    Code:
    	{KE_KEY, 0x20e6, KEY_PROG1},
    This seems to be the "Q" (Media) button:
    Code:
    	{KE_KEY, 0x2142, KEY_MEDIA},
    Although The keycode for the "Q" button is 201 in xev in Intrepid. Or I suppose it could be the DVD button.

    This may be the Mobility Center button:
    Code:
    	{KE_KEY, 0x231b, KEY_HELP},
    Which is the other non-functioning button.

    Any thoughts? There isn't an exact one to one correspondence. But it seems quite a coincidence that there is the swivel hinge accompanied by 4 buttons in the hp-wmi keymap.
    I don't have an exact answer for you, but the codes there do correspond to buttons. However, they are not responding at this time (they should have appeared in the same events as the swivel /dev/input/eventX). So something is preventing it from appearing or else we do not have the correct code to register the button.

    For my media button (the funky m-shaped button), it is being picked up by the keyboard instead of hp-wmi. My guess is that the Q-button is responding in the same manner. So my current thought is that the other buttons are most likely needing to be mapped to the keyboard source (drivers/input/keyboard/atkbd.c) somehow. I am not for sure if we are going to be able to find it in hp-wmi or not.
    Last edited by Ayuthia; August 16th, 2009 at 06:13 PM.

  3. #263
    Join Date
    Nov 2008
    Beans
    9,635
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to Rotate the Screen for a TX2000 Tablet PC

    Hi Ayuthia,

    Thanks. Good thoughts.

    By the way to get the changes to work in tx2_rotation I had to use:
    Code:
    # detect what version of hp_wmi used and return file desk.
    def prepage_stfile():
    	global tablet_state, normal_state
    	if os.path.exists(state_hp_wmi_patched):
    		stfile=open(state_hp_wmi_patched, "r")
    		print "Use patched hp_wmi event file"
    		tablet_state="1\n"
    		normal_state="0\n"
    	elif os.path.exists(state_hp_wmi):
    		stfile=open(state_hp_wmi, "r")
    		print "Use native hp_wmi event file"
    		tablet_state="4\n"
    		normal_state="0\n"
    	else:
    		stfile=False
    		print "hp_wmi event file not found..."
    	return stfile
    Does that break it for you? I confess I jumped the gun and made a version 0.2-2 with the above and spelling and About changes.

  4. #264
    Join Date
    Apr 2007
    Location
    Mount Horeb, WI
    Beans
    4,312
    Distro
    Kubuntu Development Release

    Re: How to Rotate the Screen for a TX2000 Tablet PC

    Quote Originally Posted by Favux View Post
    Hi Ayuthia,

    Thanks. Good thoughts.

    By the way to get the changes to work in tx2_rotation I had to use:
    Code:
    # detect what version of hp_wmi used and return file desk.
    def prepage_stfile():
    	global tablet_state, normal_state
    	if os.path.exists(state_hp_wmi_patched):
    		stfile=open(state_hp_wmi_patched, "r")
    		print "Use patched hp_wmi event file"
    		tablet_state="1\n"
    		normal_state="0\n"
    	elif os.path.exists(state_hp_wmi):
    		stfile=open(state_hp_wmi, "r")
    		print "Use native hp_wmi event file"
    		tablet_state="4\n"
    		normal_state="0\n"
    	else:
    		stfile=False
    		print "hp_wmi event file not found..."
    	return stfile
    Does that break it for you? I confess I jumped the gun and made a version 0.2-2 with the above and spelling and About changes.
    Sorry for getting back so late. I was working on building a playground set. For some reason, the code is no longer working in Gentoo (the original source either) and I am currently in Kubuntu and it is not working consistently. Occasionally it will hang badly enough that I have to restart the desktop manager.

    So to answer your question, the changes that you made still work. However, there is something else in the code that is not responding as well. The only change that I have made is to change my boot parameters to have acpi_osi="Linux". The event code is still there and is responding.

  5. #265
    Join Date
    Nov 2008
    Beans
    9,635
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to Rotate the Screen for a TX2000 Tablet PC

    Hi Red_Lion, Ayuthia, and everyone,

    Hope the playground set goes over big. Don't like the sound of the code not working well anymore. Hard to believe it's the kernel line. No python updates? I'll attach what I have, not that it will do any good. But at least it now works theoretically for the patched and unpatched hp-wmi.

    Red_Lion,
    I hope you don't mind. I took the liberty of "making" a version 0.2-2 with the changes we talked about. I think the redo/undo icon pair is the best we (I) can do with what we have.

    Edit: Added a few more corrections.
    Attached Files Attached Files
    Last edited by Favux; August 18th, 2009 at 07:37 AM.

  6. #266
    Join Date
    Apr 2007
    Location
    Mount Horeb, WI
    Beans
    4,312
    Distro
    Kubuntu Development Release

    Re: How to Rotate the Screen for a TX2000 Tablet PC

    Quote Originally Posted by Favux View Post
    Hi Red_Lion, Ayuthia, and everyone,

    Hope the playground set goes over big. Don't like the sound of the code not working well anymore. Hard to believe it's the kernel line. No python updates? I'll attach what I have, not that it will do any good. But at least it now works theoretically for the patched and unpatched hp-wmi.

    Red_Lion,
    I hope you don't mind. I took the liberty of "making" a version 0.2-2 with the changes we talked about. I think the redo/undo icon pair is the best we (I) can do with what we have.
    I just tested it without the kernel parameters and the rotation is now responding. However, I flipped the screen a few times in a row and then kdm froze. I had to restart the desktop.

    The other thing that I notice is that if you place the mouse on the system tray icon, it always shows Loading...

  7. #267
    Join Date
    Nov 2008
    Beans
    9,635
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to Rotate the Screen for a TX2000 Tablet PC

    Hi Ayuthia,

    OK, so maybe a problem using the gtk tray setup for qt/KDE? I wonder if something like the GTK-Qt Theme Engine (here: http://code.google.com/p/gtk-qt-engine/ ) would help any? Probably too complicated?

    Edit: Well it's in Synaptic. I should have looked there first.
    Last edited by Favux; August 17th, 2009 at 05:00 AM.

  8. #268
    Join Date
    Apr 2007
    Location
    Mount Horeb, WI
    Beans
    4,312
    Distro
    Kubuntu Development Release

    Re: How to Rotate the Screen for a TX2000 Tablet PC

    Quote Originally Posted by Favux View Post
    Hi Ayuthia,

    OK, so maybe a problem using the gtk tray setup for qt/KDE? I wonder if something like the GTK-Qt Theme Engine (here: http://code.google.com/p/gtk-qt-engine/ ) would help any? Probably too complicated?

    Edit: Well it's in Synaptic. I should have looked there first.
    I just tested with Ubuntu also and it is doing the same thing. I am not for sure about what is happening,

  9. #269
    Join Date
    Nov 2008
    Beans
    9,635
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to Rotate the Screen for a TX2000 Tablet PC

    Can't duplicate it. Working great for me. I'll look at the tar and see if I corrupted something. In Advanced is the "eraser" line blank for you? I have entries in all 4 of the Run & Exec before and after lines.

  10. #270
    Join Date
    Apr 2007
    Location
    Mount Horeb, WI
    Beans
    4,312
    Distro
    Kubuntu Development Release

    Re: How to Rotate the Screen for a TX2000 Tablet PC

    Quote Originally Posted by Favux View Post
    Can't duplicate it. Working great for me. I'll look at the tar and see if I corrupted something. In Advanced is the "eraser" line blank for you? I have entries in all 4 of the Run & Exec before and after lines.
    It is not blank. It is still showing eraser.

    Oddly enough, the application seems to be running happily in Gentoo today. Maybe I had some code running yesterday that was conflicting with it. I have another version of a rotation script that is running with a daemon that checks for changes in the events. The down side to it is that it requires two programs to run--one to check the event and report it (since reading /dev events require sudo privileges, I placed it in /etc/init.d) and the other one to read the reported event. At some point, I am going to add a GUI to it so that I can watch the events being reported and be able to catch and deal with any new events that are not rotation related.

    The short answer is that my code might have been fighting with your rotation script or else I was not waiting long enough for the system to adjust to the screen changes before changing it again.

Page 27 of 65 FirstFirst ... 17252627282937 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •