Re: ACPI Lenovo X121e (Model 3045-79G, i3, HD3000) Suspend and LCD Brightness

2013-07-08 Thread Matthias Petermann


Hello Kevin,

Zitat von Kevin Oberman rkober...@gmail.com:

Can't help with suspend/resume, but I can point you to the brightness
solution.

This is probably the same issue that impacts most recent Lenovo laptops. If
so, there is a fix in the thread titled Fixing X220 Video The Right Way
on this (acpi@) mailing list with the patch by jhb on Feb. 28, but be usre
to a followup message on using the fix posted on June 14. It' a tricky
issue with getting a string with quoted characters parsed correctly.

There have been a number of discussions on ThinkPad suspend/resume, but I
have not seen a reliable fix. (I can't resume mine at this time, though it
suspends fine :-)


Thanks for your reply. I found the thread you recommended to me and  
followed up with it.

Looks like I cannot apply the same procedure unchanged to the X121e.

It would be interesting to know if the suspend / brightness issues are  
specific to the Thinkpads with integrated Intel HD graphics or if also  
the NVidia models are affected.


Kind regards,
Matthias


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: ACPI Lenovo X121e (Model 3045-79G, i3, HD3000) Suspend and LCD Brightness

2013-07-08 Thread Matthias Petermann

Hello Kevin,

Zitat von Kevin Oberman rkober...@gmail.com:

Can't help with suspend/resume, but I can point you to the brightness
solution.

This is probably the same issue that impacts most recent Lenovo laptops. If
so, there is a fix in the thread titled Fixing X220 Video The Right Way
on this (acpi@) mailing list with the patch by jhb on Feb. 28, but be usre
to a followup message on using the fix posted on June 14. It' a tricky
issue with getting a string with quoted characters parsed correctly.

There have been a number of discussions on ThinkPad suspend/resume, but I
have not seen a reliable fix. (I can't resume mine at this time, though it
suspends fine :-)


Thanks for your reply. I found the thread you recommended to me and  
followed up with it.

Looks like I cannot apply the same procedure unchanged to the X121e.

It would be interesting to know if the suspend / brightness issues are  
specific to the Thinkpads with integrated Intel HD graphics or if also  
the NVidia models are affected.


Kind regards,
Matthias



___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


ACPI Lenovo X121e (Model 3045-79G, i3, HD3000) Suspend and LCD Brightness

2013-07-06 Thread Matthias Petermann

Hello,

on a Lenovo X121e (Model 3045-79G, i3, HD3000) I try FreeBSD since 9.1. 
Wifi, LAN, Audio, USB peripherials and Video (with KMS patch) just 
working fine. Anyway, there are some open items:


* LCD brightness control doesn't work
* Suspend to RAM (S3) doesn't restore video after resume

That's why I upgraded my system to 10.0-CURRENT and looked in more 
detail at it:


  root@thinkpad:/usr/home/mpeterma # uname -a
  FreeBSD thinkpad.local 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r252853: 
Sat Jul  6 02:01:48 CEST 2013 
root@thinkpad.local:/usr/obj/usr/src/sys/GENERIC  amd64


# LCD Brightness

First, on LCD brightness: The X121e is expected to increase/decrease LCD 
brightness by Fn+F9/Fn+F8.  This is not working right now. So I tried 
the following:


## Attempts

### acpi_video / sysctl hw.acpi.video.lcd0.brightness

This is what is working on most of the other laptops I tried it.

  root@thinkpad:/usr/home/mpeterma # kldload acpi_video
  acpi_video0: ACPI video extension on vgapci0
  root@thinkpad:/usr/home/mpeterma # sysctl -a |grep bright
  hw.acpi.video.lcd0.brightness: 35
  root@thinkpad:/usr/home/mpeterma # sysctl 
hw.acpi.video.lcd0.brightness=100

  hw.acpi.video.lcd0.brightness: 35 - 100

Result: LCD brightness doesn't change after sysctl call, Fn+F9/Fn+F8 not 
working.


### acpi_ibm / sysctl dev.acpi_ibm.0.lcd_brightness

This is what worked on some older Thinkpads.

  root@thinkpad:/usr/home/mpeterma # kldload acpi_ibm
  acpi_ibm0: IBM ThinkPad ACPI Extras on acpi0
  root@thinkpad:/usr/home/mpeterma # sysctl -a | grep bright
  hw.acpi.video.lcd0.brightness: 90
  dev.acpi_ibm.0.lcd_brightness: 7
  root@thinkpad:/usr/home/mpeterma #
  root@thinkpad:/usr/home/mpeterma # sysctl dev.acpi_ibm.0.lcd_brightness=1
  dev.acpi_ibm.0.lcd_brightness: 7 - 1

Result: LCD brightness doesn't change after sysctl, Fn+F9/Fn+F8 still 
not working.


### Activate sysctl dev.acpi_ibm.0.events

  root@thinkpad:/usr/home/mpeterma # sysctl -a | grep 
dev.acpi_ibm.0.availmask

  dev.acpi_ibm.0.availmask: 67733756
  root@thinkpad:/usr/home/mpeterma # sysctl dev.acpi_ibm.0.events=1
  dev.acpi_ibm.0.events: 0 - 1
  root@thinkpad:/usr/home/mpeterma # sysctl 
dev.acpi_ibm.0.handlerevents='0x03 0x04 0x10 0x11'


Result: Fn+F9/Fn+F8 still not working.

### Direct ACPI calls with acpi_call

   root@thinkpad:/usr/home/mpeterma # cd /usr/ports/sysutils/acpi_call/
   root@thinkpad:/usr/ports/sysutils/acpi_call # make install clean
   root@thinkpad:/usr/ports/sysutils/acpi_call # kldload acpi_call

   root@thinkpad:/usr/ports/sysutils/acpi_call # acpi_call -p '\VBRU'
   root@thinkpad:/usr/ports/sysutils/acpi_call # acpi_call -p '\VBRD'

Result: on each acpi_call, \VBRU increases and \VBRD decreases LCD 
brightness by one step.

Fn+F9/Fn+F8 still not working.

## Summary

Direct ACPI calls are sufficient as workaround. I would like to support 
a real solution. What are the next steps to find out what is wrong here? 
I think a solution for this problem will help not just X121e users but 
any user of more recent thinkpads. I saw similiar postings for X230 and 
X220.


# Suspend to RAM

The following observations I made without the i915 KMS module loaded (in 
console mode).


## Attempts

### Supported Sleep states as reported by sysctl

  root@thinkpad:/usr/home/mpeterma # sysctl -a |grep supported
  hw.acpi.supported_sleep_state: S3 S4 S5

### S3, hw.acpi.reset_video=0

  root@thinkpad:/usr/home/mpeterma # sysctl hw.acpi.reset_video=0
   hw.acpi.reset_video: 0 - 0
  root@thinkpad:/usr/home/mpeterma # acpiconf -s 3

Result: System suspends, no video after resume, black screen

### S3, hw.acpi.reset_video=1

  root@thinkpad:/usr/home/mpeterma # sysctl hw.acpi.reset_video=1
  hw.acpi.reset_video: 0 - 1
  root@thinkpad:/usr/home/mpeterma # acpiconf -s 3

Result: system reboots immediately

## Adding more debug output

In ACPI Debugging guide it is recommended to recompile the ACPI module 
with additional debug mode.

Anyway, when I try so, I get a warning:

  root@thinkpad:/home/mpeterma # cd /sys/modules/acpi/acpi
  root@thinkpad:/sys/modules/acpi/acpi # make clean
  make: /usr/src/sys/modules/acpi/acpi/Makefile line 4: The ACPI 
module is deprecated, set FORCE_BUILD to force it

  root@thinkpad:/sys/modules/acpi/acpi #

Is this still the way to go, or doesn't the guide reflect the state of 
FreeBSD 10?


# Detail information to X121e

I uploaded the following details regarding the X121e:

* dmesg
* ACPI ASL
* Sysctl ACPI keys

to: 
*https://d2ux.org/owncloud/public.php?service=filest=7022f90cea5e48da7fa65806c0d66091*



Any help is welcome. Please let me know when I can provide more details 
/ testing.


Kind regards,
Matthias

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: ACPI Lenovo X121e (Model 3045-79G, i3, HD3000) Suspend and LCD Brightness

2013-07-06 Thread Kevin Oberman
On Sat, Jul 6, 2013 at 11:59 AM, Matthias Petermann matth...@d2ux.netwrote:

 Hello,

 on a Lenovo X121e (Model 3045-79G, i3, HD3000) I try FreeBSD since 9.1.
 Wifi, LAN, Audio, USB peripherials and Video (with KMS patch) just working
 fine. Anyway, there are some open items:

 * LCD brightness control doesn't work
 * Suspend to RAM (S3) doesn't restore video after resume

 That's why I upgraded my system to 10.0-CURRENT and looked in more detail
 at it:

   root@thinkpad:/usr/home/**mpeterma # uname -a
   FreeBSD thinkpad.local 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r252853: Sat
 Jul  6 02:01:48 CEST 2013 root@thinkpad.local:/usr/obj/**usr/src/sys/GENERIC
  amd64

 # LCD Brightness

 First, on LCD brightness: The X121e is expected to increase/decrease LCD
 brightness by Fn+F9/Fn+F8.  This is not working right now. So I tried the
 following:

 ## Attempts

 ### acpi_video / sysctl hw.acpi.video.lcd0.brightness

 This is what is working on most of the other laptops I tried it.

   root@thinkpad:/usr/home/**mpeterma # kldload acpi_video
   acpi_video0: ACPI video extension on vgapci0
   root@thinkpad:/usr/home/**mpeterma # sysctl -a |grep bright
   hw.acpi.video.lcd0.brightness: 35
   root@thinkpad:/usr/home/**mpeterma # sysctl
 hw.acpi.video.lcd0.brightness=**100
   hw.acpi.video.lcd0.brightness: 35 - 100

 Result: LCD brightness doesn't change after sysctl call, Fn+F9/Fn+F8 not
 working.

 ### acpi_ibm / sysctl dev.acpi_ibm.0.lcd_brightness

 This is what worked on some older Thinkpads.

   root@thinkpad:/usr/home/**mpeterma # kldload acpi_ibm
   acpi_ibm0: IBM ThinkPad ACPI Extras on acpi0
   root@thinkpad:/usr/home/**mpeterma # sysctl -a | grep bright
   hw.acpi.video.lcd0.brightness: 90
   dev.acpi_ibm.0.lcd_brightness: 7
   root@thinkpad:/usr/home/**mpeterma #
   root@thinkpad:/usr/home/**mpeterma # sysctl
 dev.acpi_ibm.0.lcd_brightness=**1
   dev.acpi_ibm.0.lcd_brightness: 7 - 1

 Result: LCD brightness doesn't change after sysctl, Fn+F9/Fn+F8 still not
 working.

 ### Activate sysctl dev.acpi_ibm.0.events

   root@thinkpad:/usr/home/**mpeterma # sysctl -a | grep
 dev.acpi_ibm.0.availmask
   dev.acpi_ibm.0.availmask: 67733756
   root@thinkpad:/usr/home/**mpeterma # sysctl dev.acpi_ibm.0.events=1
   dev.acpi_ibm.0.events: 0 - 1
   root@thinkpad:/usr/home/**mpeterma # sysctl
 dev.acpi_ibm.0.handlerevents='**0x03 0x04 0x10 0x11'

 Result: Fn+F9/Fn+F8 still not working.

 ### Direct ACPI calls with acpi_call

root@thinkpad:/usr/home/**mpeterma # cd /usr/ports/sysutils/acpi_call/
root@thinkpad:/usr/ports/**sysutils/acpi_call # make install clean
root@thinkpad:/usr/ports/**sysutils/acpi_call # kldload acpi_call

root@thinkpad:/usr/ports/**sysutils/acpi_call # acpi_call -p '\VBRU'
root@thinkpad:/usr/ports/**sysutils/acpi_call # acpi_call -p '\VBRD'

 Result: on each acpi_call, \VBRU increases and \VBRD decreases LCD
 brightness by one step.
 Fn+F9/Fn+F8 still not working.

 ## Summary

 Direct ACPI calls are sufficient as workaround. I would like to support a
 real solution. What are the next steps to find out what is wrong here? I
 think a solution for this problem will help not just X121e users but any
 user of more recent thinkpads. I saw similiar postings for X230 and X220.

 # Suspend to RAM

 The following observations I made without the i915 KMS module loaded (in
 console mode).

 ## Attempts

 ### Supported Sleep states as reported by sysctl

   root@thinkpad:/usr/home/**mpeterma # sysctl -a |grep supported
   hw.acpi.supported_sleep_state: S3 S4 S5

 ### S3, hw.acpi.reset_video=0

   root@thinkpad:/usr/home/**mpeterma # sysctl hw.acpi.reset_video=0
hw.acpi.reset_video: 0 - 0
   root@thinkpad:/usr/home/**mpeterma # acpiconf -s 3

 Result: System suspends, no video after resume, black screen

 ### S3, hw.acpi.reset_video=1

   root@thinkpad:/usr/home/**mpeterma # sysctl hw.acpi.reset_video=1
   hw.acpi.reset_video: 0 - 1
   root@thinkpad:/usr/home/**mpeterma # acpiconf -s 3

 Result: system reboots immediately

 ## Adding more debug output

 In ACPI Debugging guide it is recommended to recompile the ACPI module
 with additional debug mode.
 Anyway, when I try so, I get a warning:

   root@thinkpad:/home/mpeterma # cd /sys/modules/acpi/acpi
   root@thinkpad:/sys/modules/**acpi/acpi # make clean
   make: /usr/src/sys/modules/acpi/**acpi/Makefile line 4: The ACPI
 module is deprecated, set FORCE_BUILD to force it
   root@thinkpad:/sys/modules/**acpi/acpi #

 Is this still the way to go, or doesn't the guide reflect the state of
 FreeBSD 10?

 # Detail information to X121e

 I uploaded the following details regarding the X121e:

 * dmesg
 * ACPI ASL
 * Sysctl ACPI keys

 to: *https://d2ux.org/owncloud/**public.php?service=filest=**
 7022f90cea5e48da7fa65806c0d660**91*https://d2ux.org/owncloud/public.php?service=filest=7022f90cea5e48da7fa65806c0d66091*


 Any help is welcome. Please let me know when I can provide more details /
 testing.

 Kind regards,
 Matthias


Can't help with