# Drivers for a Toshiba Portege m200 and other ideas...

## anjames

Having recently installed gentoo on my new m200, I have some comments and questions regarding a couple of hardware and driver issues.

Firstly, I'll have to present a brief history of the great help I've found so far for anyone else who might be interested in using linux on one of these:

http://tuxmobil.org/tablet_unix.html has a number of people's experiences with linux on laptops documented, which I used for guidance.

http://groundstate.ca/tabletsoft lists a number of programs useful for tablet pc's, some of which I've tried out.

http://gentoo-wiki.com/HOWTO_Xorg_and_Fonts just makes reading so much more pleasant.

OK, so here we go:

Does anyone know about a driver for the accelerometers?  I'm interested in hooking a script up to said devices to make my monitor layout switch around when I push a button depending on how it's oriented, sort of like it did when shipped from toshiba. It would also be cool to be able to grab a time series off of the accelerometer for using in the car... ie, skidpad/quarter mile sorts of quantities.... I don't know how accurate they are, but it would be cool.

Accelerometer threads:

https://forums.gentoo.org/viewtopic-p-3402700.html#3402700

https://forums.gentoo.org/viewtopic-t-471619-highlight-accelerometer.html

I'm also curious if anyone has gotten anything else going with the monitor rotation feature.

From http://tuxmobil.org/toshiba_portege_m200_tablet_linux.html

 *Quote:*   

> The driver nv from x.org does not support rotation on-the-fly, so nvidia is used which has the option "RandRRotation" set to "true" in the Device section of /etc/X11/xorg.conf.
> 
> 

 

I haven't personally verified this, but as soon as I get the nvidia driver working I will, and the next iteration toward convenience is making the clockwise rotation automagically occur when the screen is turned around into portrait mode. I would think that this state should be reflected in an acpi flag or something, but haven't been able to find anything in the acpi or toshiba directories under proc. Perhaps these things haven't been added to the toshiba driver yet.

https://forums.gentoo.org/viewtopic-t-145097-highlight-portege+m200+suspend.html mentions a kdrive xserver which apparently supports this already.

More on my NVIDIA driver error:

```
localhost ~ # modprobe nvidia

FATAL: Error inserting nvidia (/lib/modules/2.6.16-gentoo-r9/video/nvidia.ko): Unknown symbol in module, or unknown parameter (see dmesg)

localhost ~ # dmesg | tail

nvidia: module license 'NVIDIA' taints kernel.

nvidia: Unknown symbol remap_page_range

nvidia: Unknown symbol pci_find_class
```

I fixed this error by adding

```
localhost linux # cat /etc/portage/package.keywords 

media-video/nvidia-glx ~*

media-video/nvidia-kernel ~*
```

Threads mentioning this error (among others):

https://forums.gentoo.org/viewtopic-t-462339-highlight-nvidia+remappagerange.html

https://forums.gentoo.org/viewtopic-t-459576-highlight-nvidia+remappagerange.html

I'm also waiting on a fix for the "can't find any access points" error for the Atheros card in this machine, apparently a problem with how the madwifi-ng driver gets along with wpa_supplicant.

I partially fixed this error, caused by a typo in /etc/conf.d/net:

```
#wpa_supplicant_eth0="-Dmadwifi"

wpa_supplicant_ath0="-Dmadwifi"
```

Then I got only some error regarding my WEP key being too long, which I fixed by removing the quotes around my key in wpa_supplicant.conf.

Threads mentioning this error:

https://forums.gentoo.org/viewtopic-p-3402785.html#3402785

https://forums.gentoo.org/viewtopic-t-362925-highlight-madwifing+wpasupplicant.htm

This fixed the WEP key error and undefined driver error, but left me with a NEW error (yay):

```
localhost linux # /etc/init.d/net.ath0 start

 * Starting ath0

  *   Starting wpa_supplicant on ath0 ...

  ENGINE: ctrl cmd_string failed: LOAD (null) [error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library]

  SSL: Failed to initialize TLS context.

  Failed to initialize EAPOL state machines.                                        [ !! ]
```

This one was easily fixed by commenting out the three openssl modules I had in wpa_supplicant.conf. WOOHOO!

Threads mentioning this error:

https://forums.gentoo.org/viewtopic-t-458055-highlight-initialize+eapol+state+machines.html

Others report the suspend-to-ram feature to work on the m200, and I have had it do so. But recently have broken something so that the machine shuts down for some reason after resuming from this state.

Threads mentioning suspend to ram on the m200:

https://forums.gentoo.org/viewtopic-t-145097-highlight-portege+m200+suspend.html

The wacom driver seems to work partially, but is still a bit buggy. I am having problems with it being activated even when not in contact with the screen. The regular pen pointer works fine (haven't configured pressure sensitivity yet), but when I press the pen side button while hovering the pen in detectable range over the screen, it is treated as a button press event. This is contrary to the desired effect of having the side button pressed only cause an event when the tip is pressed to the screen. The eraser has a similar problem, where just hovering it over the screen causes it to erase text written into any of the writing programs I've used. I'm sure that these are probably not too impossible to fix, and the guys behind the wacom driver have done a great job so far.

Chris Debenham's m200 howto http://www.adebenham.com/laptop/toshiba_m200.html (includes Xorg.conf with wacom configuration...)

[EDIT] Using the ~x86 version (0.7.2) of linuxwacom solved these problems. Still working on pressure sensitivity though.

Of the three I've tried I like Xournal or Gournal the most, with Jarnal bringing up the tail (blast that not-free Java dependency!). It would be nice if when editing PDF's an SVG layer were inserted over the top, so that the original PDF was preserved underneath as non-rasterized text; the current method rasterizes the pdf and overlays an SVG layer on top. It work's pretty well for now though.

Project webpages:

http://www.dklevine.com/general/software/tc1000/jarnal.htm

http://www.adebenham.com/gournal/

http://math.mit.edu/%7Eauroux/software/xournal/

That's all for now. I'll be working on more in short order, so keep posted.

----------

## sternklang

There's now an ebuild for xournal 0.3.1 in the Break My Gentoo overlay, if you're interested.

----------

## anjames

I'll have a pass at it next time I boot gentoo. Thanks for the tip.

----------

## barral

 *Quote:*   

> I'm also curious if anyone has gotten anything else going with the monitor rotation feature.
> 
> From http://tuxmobil.org/toshiba_portege_m200_tablet_linux.html
> 
> Quote:
> ...

 

The nv driver supports 

```
Option        "Rotate"    "RandR"
```

 which you can put into the Driver section of the xorg.conf file. However,  this disables acceleration, and I couldn't get the pen behaving according to the rotation. If you want to try and play with it anyway, you need to  emerge xrandr in order to perform rotation. The manul page of xrandr tells you how to use it.

----------

## anjames

It's been a while, but here's some progress anyway. I sent an email to Toshiba's linux helper-outers requesting info for the DSDT regarding howto 'turn on' ACPI events for screen rotation. I think it would be a pretty simple patch to the acpi module. I also asked about the borked DPMS and if it had been moved into the ACPI controls. As always, you'll hear from me when there's news.

----------

## hackerError

I have a tecra m4 and haven't had too much time to play with it.  I did, however find something in proc, and being at work without it I can't tell you where exactly it is, but it was a file that simply had a 1 or a zero in it, and the file cnahged from 1 to 0 depending on if the lid was flipped or not.  This may be the simplest way to do screen flipping checking, though as I said I can't for the life of me remember where it was.

----------

## anjames

Ooh, when you get a chance have a gander and let me know what file exactly you're talking about. I haven't yet found an analog for the portege m200

----------

