LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-04-2010, 06:54 PM   #1
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Rep: Reputation: 234Reputation: 234Reputation: 234
ThinkPad X60s using i915 kernel module: screen blanking during boot procedures


[EDIT]
To read about the solution jump directly to the post #12.
[/EDIT]

I just bought a new machine – ThinkPad X60s – and installed on it Slackware 13.1 with generic SMP kernel 2.6.33.4. My X60s uses Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller.

# lspci | grep -i graphics
Code:
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
When I power my new machine on it starts to display boot messages, then blanks the screen for a while and finally displays consecutive boot messages. It isn’t big problem for me. But when I power my machine on and close the lid, it blanks the screen completely. The only way to unblank it is to reboot the machine and keep the lid opened during the boot procedures. After a few tests I established the critical moment. The screen will remain blank if I close the lid near the moment when it blanks for a while.

I use VGA 791 mode (1024x768x32k). When I switched it to VGA normal mode I stated the system runs in VGA normal mode, then blanks for a while and finally switches VGA mode to 1024x768. As I said the critical moment is when it blanks for a while.

That behavior of the system surprises me. I installed and configured Slackware 13.1 on my ThinkPad T60 and then cloned it on ThinkPad X60s. So both these machines use the same kernel and system in virtually the same configuration. In spite of that T60 in VGA normal mode passes all boot procedures using that mode whereas X60s switches from VGA normal mode to 1024x768 mode causing described problem.

Below is an excerpt from /var/log/messages produced when the lid was closed and the screen blanked completely. First vertical line marks the moment when the screen blanks and second one the moment when it shines anew (I established these moments making a video of the opened screen and watching it frame by frame).

/var/log/messages:
Code:
.
.
.
kernel: hub 5-0:1.0: USB hub found
kernel: hub 5-0:1.0: 2 ports detected
kernel: ACPI: AC Adapter [AC] (on-line)
kernel: HDA Intel 0000:00:1b.0: PCI INT B -> GSI 17 (level, low) -> IRQ 17
kernel: iwl3945 0000:03:00.0: Tunable channels: 13 802.11bg, 23 802.11a channels
kernel: rtc_cmos 00:07: RTC can wake from S4
kernel: rtc_cmos 00:07: rtc core: registered rtc_cmos as rtc0
kernel: rtc0: alarms up to one month, y3k, 114 bytes nvram, hpet irqs
kernel: hda_intel: probe_mask set to 0x1 for device 17aa:2010
kernel: iwl3945 0000:03:00.0: Detected Intel Wireless WiFi Link 3945ABG
----------------------------------------------------------------------------------------------------
kernel: acpi device:01: registered as cooling_device2
kernel: input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input5
kernel: ACPI: Video Device [VID] (multi-head: yes  rom: no  post: no)
kernel: intel_rng: FWH not detected
kernel: Linux agpgart interface v0.103
kernel: nsc-ircc, chip->init
kernel: nsc-ircc, Found chip at base=0x164e
kernel: nsc-ircc, driver loaded (Dag Brattli)
kernel: nsc-ircc, Found chip at base=0x164e
kernel: nsc-ircc, driver loaded (Dag Brattli)
kernel: nsc-ircc 00:0a: disabled
kernel: thermal LNXTHERM:01: registered as thermal_zone0
kernel: ACPI: Thermal Zone [THM0] (54 C)
kernel: thermal LNXTHERM:02: registered as thermal_zone1
kernel: ACPI: Thermal Zone [THM1] (56 C)
kernel: ohci1394 0000:15:00.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
kernel: ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[17]  MMIO=[e4301000-e43017ff]  Max Packet=[2048]  IR/IT contexts=[4/4]
kernel: usb 5-2: new full speed USB device using uhci_hcd and address 2
kernel: sdhci: Secure Digital Host Controller Interface driver
kernel: sdhci: Copyright(c) Pierre Ossman
kernel: thinkpad_acpi: ThinkPad ACPI Extras v0.24
kernel: thinkpad_acpi: http://ibm-acpi.sf.net/
kernel: thinkpad_acpi: ThinkPad BIOS 7BETD7WW (2.18 ), EC 7BHT40WW-1.13
kernel: thinkpad_acpi: Lenovo ThinkPad X60s, model 1704A12
kernel: thinkpad_acpi: ACPI backlight control delay disabled
kernel: thinkpad_acpi: radio switch found; radios are disabled
kernel: thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness control, supported by the ACPI video driver
kernel: usb 5-2: New USB device found, idVendor=0483, idProduct=2016
kernel: thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
kernel: sdhci-pci 0000:15:00.2: SDHCI controller found [1180:0822] (rev 18)
kernel: sdhci-pci 0000:15:00.2: PCI INT C -> GSI 18 (level, low) -> IRQ 18
kernel: Registered led device: mmc0::
kernel: mmc0: SDHCI controller on PCI [0000:15:00.2] using PIO
kernel: thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is blocked
kernel: Registered led device: tpacpi::thinklight
kernel: Registered led device: tpacpi::power
kernel: Registered led device: tpacpi::standby
kernel: Registered led device: tpacpi::thinkvantage
kernel: thinkpad_acpi: Standard ACPI backlight interface available, not loading native one.
kernel: thinkpad_acpi: Console audio control enabled, mode: monitor (read only)
kernel: input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input6
kernel: usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
kernel: usb 5-2: Product: Biometric Coprocessor
kernel: usb 5-2: Manufacturer: STMicroelectronics
kernel: i801_smbus 0000:00:1f.3: PCI INT A -> GSI 23 (level, low) -> IRQ 23
kernel: agpgart-intel 0000:00:00.0: Intel 945GM Chipset
kernel: agpgart-intel 0000:00:00.0: detected 7932K stolen memory
kernel: agpgart-intel 0000:00:00.0: AGP aperture is 256M @ 0xd0000000
kernel: [drm] Initialized drm 1.1.0 20060810
kernel: yenta_cardbus 0000:15:00.0: CardBus bridge found [17aa:201c]
kernel: leds_ss4200: no LED devices found
kernel: IBM TrackPoint firmware: 0x0e, buttons: 3/3
kernel: input: TPPS/2 IBM TrackPoint as /devices/platform/i8042/serio1/input/input7
kernel: yenta_cardbus 0000:15:00.0: ISA IRQ mask 0x0cb8, PCI irq 16
kernel: cfg80211: World regulatory domain updated:
kernel:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
kernel:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
kernel:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
kernel:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
kernel:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
kernel:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
kernel: i915 0000:00:02.0: power state changed by ACPI to D0
kernel: i915 0000:00:02.0: power state changed by ACPI to D0
kernel: i915 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
kernel: yenta_cardbus 0000:15:00.0: Socket status: 30000006
kernel: [drm] set up 7M of stolen space
kernel: yenta_cardbus 0000:15:00.0: pcmcia: parent PCI bridge I/O window: 0x9000 - 0xcfff
kernel: pcmcia_socket pcmcia_socket0: cs: IO port probe 0x9000-0xcfff: clean.
kernel: yenta_cardbus 0000:15:00.0: pcmcia: parent PCI bridge Memory window: 0xe4300000 - 0xe7ffffff
kernel: yenta_cardbus 0000:15:00.0: pcmcia: parent PCI bridge Memory window: 0xe0000000 - 0xe3ffffff
kernel: [drm] initialized overlay support
kernel: pcmcia_socket pcmcia_socket0: cs: IO port probe 0xc00-0xcff: clean.
kernel: pcmcia_socket pcmcia_socket0: cs: IO port probe 0x3e0-0x4ff: excluding 0x4d0-0x4d7
kernel: pcmcia_socket pcmcia_socket0: cs: IO port probe 0x100-0x3af: clean.
kernel: pcmcia_socket pcmcia_socket0: cs: IO port probe 0xa00-0xaff: clean.
kernel: No connectors reported connected with modes
kernel: [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
kernel: Adding 1052248k swap on /dev/sda4.  Priority:-1 extents:1 across:1052248k 
kernel: fuse init (API version 7.13)
----------------------------------------------------------------------------------------------------
kernel: ppdev: user-space parallel port driver
kernel: lp: driver loaded but no devices found
kernel: powernow: This module only works with AMD K7 CPUs
kernel: cpufreq-nforce2: No nForce2 chipset.
kernel: REISERFS (device sda3): found reiserfs format "3.6" with standard journal
kernel: REISERFS (device sda3): using ordered data mode
kernel: REISERFS (device sda3): journal params: device sda3, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
kernel: REISERFS (device sda3): checking transaction log (sda3)
kernel: REISERFS (device sda3): Using r5 hash to sort names
.
.
.
Next log shows differences between /var/log/messages when the lid is closed and the screen blanks completely (the lines marked with < sign) and /var/log/messages when the lid is opened and the screen blanks for a while (the lines marked with > sign). I’m surprised how different are these two log files.

/var/log/messages.diff:
Code:
3,8c3
< kernel:  Processor Core ID: 0
< kernel: mce: CPU supports 6 MCE banks
< kernel: CPU0: Thermal monitoring enabled (TM2)
< kernel: using mwait in idle threads.
< kernel: Performance Events: no PMU driver, software events only.
< kernel: Checking 'hlt' instruction... OK.
---
> kernel: ruction... OK.
241a237,251
> kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0
> kernel: input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input2
> kernel: ACPI: AC Adapter [AC] (on-line)
> kernel: ACPI: Lid Switch [LID]
> kernel: input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input3
> kernel: ACPI: Sleep Button [SLPB]
> kernel: Non-volatile memory driver v1.3
> kernel: input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input4
> kernel: ACPI: Battery Slot [BAT0] (battery absent)
> kernel: ACPI: Power Button [PWRF]
> kernel: intel_rng: FWH not detected
> kernel: Linux agpgart interface v0.103
> kernel: agpgart-intel 0000:00:00.0: Intel 945GM Chipset
> kernel: agpgart-intel 0000:00:00.0: detected 7932K stolen memory
> kernel: agpgart-intel 0000:00:00.0: AGP aperture is 256M @ 0xd0000000
242a253,264
> kernel: rtc_cmos 00:07: RTC can wake from S4
> kernel: rtc_cmos 00:07: rtc core: registered rtc_cmos as rtc0
> kernel: rtc0: alarms up to one month, y3k, 114 bytes nvram, hpet irqs
269,275c282,289
< kernel: input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input2
< kernel: ACPI: Lid Switch [LID]
< kernel: input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input3
< kernel: ACPI: Sleep Button [SLPB]
< kernel: input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input4
< kernel: ACPI: Power Button [PWRF]
< kernel: ACPI: Battery Slot [BAT0] (battery absent)
---
> kernel: i801_smbus 0000:00:1f.3: PCI INT A -> GSI 23 (level, low) -> IRQ 23
> kernel: e1000e: Intel(R) PRO/1000 Network Driver - 1.0.2-k2
> kernel: e1000e: Copyright (c) 1999 - 2009 Intel Corporation.
> kernel: e1000e 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> kernel: thermal LNXTHERM:01: registered as thermal_zone0
> kernel: ACPI: Thermal Zone [THM0] (53 C)
> kernel: thermal LNXTHERM:02: registered as thermal_zone1
> kernel: ACPI: Thermal Zone [THM1] (53 C)
280a295
> kernel: 0000:02:00.0: eth0: (PCI Express:2.5GB/s:Width x1) 00:16:d3:b4:39:38
283d297
< kernel: Non-volatile memory driver v1.3
293,295d306
< kernel: e1000e: Intel(R) PRO/1000 Network Driver - 1.0.2-k2
< kernel: e1000e: Copyright (c) 1999 - 2009 Intel Corporation.
< kernel: e1000e 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
309,311d319
< kernel: 0000:02:00.0: eth0: (PCI Express:2.5GB/s:Width x1) 00:16:d3:b4:39:38
313d320
< kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0
336d339
< kernel: ACPI: AC Adapter [AC] (on-line)
338,341d340
< kernel: rtc_cmos 00:07: RTC can wake from S4
< kernel: rtc_cmos 00:07: rtc core: registered rtc_cmos as rtc0
< kernel: rtc0: alarms up to one month, y3k, 114 bytes nvram, hpet irqs
344a350
> kernel: ohci1394 0000:15:00.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
347,348c353,357
< kernel: intel_rng: FWH not detected
< kernel: Linux agpgart interface v0.103
---
> kernel: IBM TrackPoint firmware: 0x0e, buttons: 3/3
> kernel: usb 5-2: new full speed USB device using uhci_hcd and address 2
> kernel: ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[17]  MMIO=[e4301000-e43017ff]  Max Packet=[2048]  IR/IT contexts=[4/4]
> kernel: leds_ss4200: no LED devices found
> kernel: input: TPPS/2 IBM TrackPoint as /devices/platform/i8042/serio1/input/input6
355,361c364,367
< kernel: thermal LNXTHERM:01: registered as thermal_zone0
< kernel: ACPI: Thermal Zone [THM0] (54 C)
< kernel: thermal LNXTHERM:02: registered as thermal_zone1
< kernel: ACPI: Thermal Zone [THM1] (56 C)
< kernel: ohci1394 0000:15:00.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
< kernel: ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[17]  MMIO=[e4301000-e43017ff]  Max Packet=[2048]  IR/IT contexts=[4/4]
< kernel: usb 5-2: new full speed USB device using uhci_hcd and address 2
---
> kernel: usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> kernel: usb 5-2: Product: Biometric Coprocessor
> kernel: usb 5-2: Manufacturer: STMicroelectronics
369a380
> kernel: yenta_cardbus 0000:15:00.0: CardBus bridge found [17aa:201c]
---
> kernel: [drm] Initialized drm 1.1.0 20060810
384,396c391
< kernel: input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input6
< kernel: usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
< kernel: usb 5-2: Product: Biometric Coprocessor
< kernel: usb 5-2: Manufacturer: STMicroelectronics
< kernel: i801_smbus 0000:00:1f.3: PCI INT A -> GSI 23 (level, low) -> IRQ 23
< kernel: agpgart-intel 0000:00:00.0: Intel 945GM Chipset
< kernel: agpgart-intel 0000:00:00.0: detected 7932K stolen memory
< kernel: agpgart-intel 0000:00:00.0: AGP aperture is 256M @ 0xd0000000
< kernel: [drm] Initialized drm 1.1.0 20060810
< kernel: yenta_cardbus 0000:15:00.0: CardBus bridge found [17aa:201c]
< kernel: leds_ss4200: no LED devices found
< kernel: IBM TrackPoint firmware: 0x0e, buttons: 3/3
< kernel: input: TPPS/2 IBM TrackPoint as /devices/platform/i8042/serio1/input/input7
---
> kernel: input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input7
397a393,402
> kernel: yenta_cardbus 0000:15:00.0: Socket status: 30000006
> kernel: yenta_cardbus 0000:15:00.0: pcmcia: parent PCI bridge I/O window: 0x9000 - 0xcfff
> kernel: pcmcia_socket pcmcia_socket0: cs: IO port probe 0x9000-0xcfff: clean.
> kernel: i915 0000:00:02.0: power state changed by ACPI to D0
> kernel: i915 0000:00:02.0: power state changed by ACPI to D0
> kernel: i915 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> kernel: yenta_cardbus 0000:15:00.0: pcmcia: parent PCI bridge Memory window: 0xe4300000 - 0xe7ffffff
> kernel: [drm] set up 7M of stolen space
> kernel: yenta_cardbus 0000:15:00.0: pcmcia: parent PCI bridge Memory window: 0xe0000000 - 0xe3ffffff
> kernel: [drm] initialized overlay support
405,414d409
< kernel: i915 0000:00:02.0: power state changed by ACPI to D0
< kernel: i915 0000:00:02.0: power state changed by ACPI to D0
< kernel: i915 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
< kernel: yenta_cardbus 0000:15:00.0: Socket status: 30000006
< kernel: [drm] set up 7M of stolen space
< kernel: yenta_cardbus 0000:15:00.0: pcmcia: parent PCI bridge I/O window: 0x9000 - 0xcfff
< kernel: pcmcia_socket pcmcia_socket0: cs: IO port probe 0x9000-0xcfff: clean.
< kernel: yenta_cardbus 0000:15:00.0: pcmcia: parent PCI bridge Memory window: 0xe4300000 - 0xe7ffffff
< kernel: yenta_cardbus 0000:15:00.0: pcmcia: parent PCI bridge Memory window: 0xe0000000 - 0xe3ffffff
< kernel: [drm] initialized overlay support
419c414,415
< kernel: No connectors reported connected with modes
---
> kernel: fb0: inteldrmfb frame buffer device
> kernel: registered panic notifier
The last log shows the differences between /var/log/syslog when the lid is closed and when the lid is opened.

/var/log/syslog.diff:
Code:
29a30,32
> kernel: fb: conflicting fb hw usage inteldrmfb vs VESA VGA - removing generic driver
> kernel: Console: switching to colour dummy device 80x25
> kernel: Console: switching to colour frame buffer device 128x48
The above messages appear when the lid is opened and the screen blanks just for a while. So it seems in my situation undesirable is rather the lacking of these messages when the lid is closed than its presence when the lid is opened.

I tested most of the solutions described on the page Problem with display remaining black after resume. None of them helped in my situation. These solutions are designed for the situation when the screen remains blank after the resume in X Window. My problem is different – it concerns the console mode and the boot procedures.

I searched Internet for a few phrases taken from the above log files but I was unable to find the problem similar to mine. It seems the other Linux users keep the lid opened during the boot procedures.

So I ask you for help. Please don’t advise me to keep the lid opened during the boot procedures. I’m smart enough to invent such solution without making substantial researches and writing extensive posts. I simply like to power the machine on, close the lid and do the other things with the other machine. I wonder if it’s possible in the circumstances described above.

Every help will be appreciated.

Last edited by w1k0; 11-08-2010 at 09:13 AM.
 
Old 11-04-2010, 08:29 PM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
I think the answer lies in /usr/src/linux-2.6.33.4/drivers/gpu/drm/i915/intel_lvds.c
Quote:
/**
* Detect the LVDS connection.
*
* Since LVDS doesn't have hotlug, we use the lid as a proxy. Open means
* connected and closed means disconnected. We also send hotplug events as
* needed, using lid status notification from the input layer.
*/

...
/*
* Lid events. Note the use of 'modeset_on_lid':
* - we set it on lid close, and reset it on open
* - we use it as a "only once" bit (ie we ignore
* duplicate events where it was already properly
* set/reset)
* - the suspend/resume paths will also set it to
* zero, since they restore the mode ("lid open").
*/
Happy hacking!

Last edited by allend; 11-04-2010 at 08:34 PM.
 
1 members found this post helpful.
Old 11-05-2010, 03:45 PM   #3
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
I inspected files in /usr/src/linux/drivers/gpu/drm/i915/. I’m not sure the problem is caused by invalid lid operations. I suspect the cause of the problem lies in a nonstandard VGA or VESA maintenance. Unfortunately my skills are too low to hacking kernel files.

I switched on or off most of the options from /etc/vga/libvga.config and disabled agpgart loading in /etc/rc.d/rc.modules-2.6.33.4-smp – without result. The system switches from VGA mode enabled in /etc/lilo.conf to some other VGA mode during boot procedures and I’m unable to determine which command or program is responsible for it.
 
Old 11-05-2010, 07:34 PM   #4
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Quote:
The system switches from VGA mode enabled in /etc/lilo.conf to some other VGA mode during boot procedures and I’m unable to determine which command or program is responsible for it.
When the boot begins, the VGA mode set in lilo.conf is used. During the boot, the kernel is probing your system and the i915.ko kernel module is loaded to support your 945GM. (You can specify the screen size using the 'video=' kernel option). I think this is the critical moment that you have identified.
If the lid is open when the i915.ko module is loaded, the LVDS is initialised.
However, if you close the lid too early, then the LVDS is sensed as disconnected.

You *may* be able to achieve your desired outcome by hacking what is returned when checks are made on the system in /usr/src/linux-2.6.33.4/drivers/gpu/drm/i915/intel_lvds.c

Quote:
Unfortunately my skills are too low to hacking kernel files.
I am no better!
 
1 members found this post helpful.
Old 11-07-2010, 03:26 PM   #5
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
I inspected these two sections of /usr/src/linux/drivers/gpu/drm/i915/intel_lvds.c file once again and changed two settings.

This is the original code of the first section:

Code:
static enum drm_connector_status intel_lvds_detect(struct drm_connector *connector)
{
        struct drm_device *dev = connector->dev;
        enum drm_connector_status status = connector_status_connected;

        /* ACPI lid methods were generally unreliable in this generation, so
         * don't even bother.
         */
        if (IS_GEN2(dev))
                return connector_status_connected;

        if (!dmi_check_system(bad_lid_status) && !acpi_lid_open())
                status = connector_status_disconnected;

        return status;
}
This is the original code of the second section:

Code:
static int intel_lid_notify(struct notifier_block *nb, unsigned long val,
                            void *unused)
{
        struct drm_i915_private *dev_priv =
                container_of(nb, struct drm_i915_private, lid_notifier);
        struct drm_device *dev = dev_priv->dev;
        struct drm_connector *connector = dev_priv->int_lvds_connector;

        /*
         * check and update the status of LVDS connector after receiving
         * the LID nofication event.
         */
        if (connector)
                connector->status = connector->funcs->detect(connector);
        if (!acpi_lid_open()) {
                dev_priv->modeset_on_lid = 1;
                return NOTIFY_OK;
        }

        if (!dev_priv->modeset_on_lid)
                return NOTIFY_OK;

        dev_priv->modeset_on_lid = 0;

        mutex_lock(&dev->mode_config.mutex);
        drm_helper_resume_force_mode(dev);
        mutex_unlock(&dev->mode_config.mutex);

        return NOTIFY_OK;
}
And this are my changes:

# diff intel_lvds.c.old intel_lvds.c
Code:
668c668
<               status = connector_status_disconnected;
---
>               status = connector_status_connected;
733c733
<               dev_priv->modeset_on_lid = 1;
---
>               dev_priv->modeset_on_lid = 0;
Then I compiled the kernel. On my ThinkPad X60s it took about one hour and twenty minutes. Finally I installed new generic kernel and generated initrd file.

It seems these changes solved my problem. I can boot the system with the closed lid and when I open it the screen starts to shine. I can also close and open the lid in both console and X Window mode as well as suspend to RAM. Everything works well.

As I mentioned above my skills are too low to hacking kernel files. So I don’t know if it was necessary to switch both these lines to avoid my problem. Maybe it’d be enough to modify just one of them. I could determine it using a trial and error method but compiling the kernel two more times is too much for me.

I’m not sure if it’s a good deal to compile the kernel in order to avoid such a trivial problem. On the other hand in the past I compiled 2.6.29.6 kernel in Slackware 13.0 just to avoid ugly penguin image during boot procedures. So everything is a matter of taste.

Thank you very much, allend. You were very helpful. Let all the penguins of the world bless you.
 
Old 11-07-2010, 05:57 PM   #6
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Glad you had a successful outcome. Well done!
For future reference, it is not necessary to compile the whole kernel. You just need to recompile the i915.ko module by doing ' make M=/usr/src/linux/drivers/gpu/drm/i915/ ' and then copying the resulting module in /usr/src/linux/drivers/gpu/drm/i915/ to the appropriate directory under /lib/modules.
 
1 members found this post helpful.
Old 11-07-2010, 06:20 PM   #7
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
Thank you, allend, for one more useful hint.
 
Old 11-07-2010, 06:43 PM   #8
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
I did make clean and then make M=/usr/src/linux/drivers/gpu/drm/i915/ and make displayed messages about a few errors:

Code:
  LD      /usr/src/linux/drivers/gpu/drm/i915/built-in.o
  CC [M]  /usr/src/linux/drivers/gpu/drm/i915/i915_drv.o
In file included from include/linux/gfp.h:4,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from include/linux/device.h:23,
                 from /usr/src/linux/drivers/gpu/drm/i915/i915_drv.c:30:
include/linux/mmzone.h:18:30: error: generated/bounds.h: No such file or directory
include/linux/mmzone.h:258:5: warning: "MAX_NR_ZONES" is not defined
include/linux/mmzone.h:260:7: warning: "MAX_NR_ZONES" is not defined
include/linux/mmzone.h:262:7: warning: "MAX_NR_ZONES" is not defined
In file included from include/linux/gfp.h:4,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from include/linux/device.h:23,
                 from /usr/src/linux/drivers/gpu/drm/i915/i915_drv.c:30:
include/linux/mmzone.h:300: error: 'MAX_NR_ZONES' undeclared here (not in a function)
In file included from /usr/src/linux-2.6.33.4/arch/x86/include/asm/pci.h:4,
                 from include/linux/pci.h:1145,
                 from include/drm/drmP.h:51,
                 from /usr/src/linux/drivers/gpu/drm/i915/i915_drv.c:31:
include/linux/mm.h:454:63: warning: "NR_PAGEFLAGS" is not defined
include/linux/mm.h:502:62: warning: "NR_PAGEFLAGS" is not defined
make[1]: *** [/usr/src/linux/drivers/gpu/drm/i915/i915_drv.o] Error 1
make: *** [_module_/usr/src/linux/drivers/gpu/drm/i915] Error 2
It was wrong to use make clean command or there is something I missed running these commands?
 
Old 11-07-2010, 08:06 PM   #9
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Did you do 'make oldconfig' after 'make clean'?
You may need to regenerate some header files.
 
1 members found this post helpful.
Old 11-07-2010, 09:02 PM   #10
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
Unfortunately the sequence of commands:

make clean
make oldconfig
make M=/usr/src/linux/drivers/gpu/drm/i915

gives the same result.

I tried also the command:

make SUBDIRS=drivers/gpu/drm/i915 modules

instead of the command:

make M=/usr/src/linux/drivers/gpu/drm/i915

but the result was still the same.
 
Old 11-07-2010, 10:55 PM   #11
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Try using ' make modules_prepare '.

From my 13.1 system 'grep -l MAX_NR_ZONES /usr/src/linux/include/linux/*' shows
Quote:
/usr/src/linux/include/linux/gfp.h
/usr/src/linux/include/linux/mm.h
/usr/src/linux/include/linux/mmzone.h
and 'grep -l NR_PAGEFLAGS /usr/src/linux/include/linux/*' shows
Quote:
/usr/src/linux/include/linux/mm.h
/usr/src/linux/include/linux/page-flags.h
 
1 members found this post helpful.
Old 11-08-2010, 08:50 AM   #12
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
Summary

I encountered two problems concerning screen behavior on ThinkPad X60s using Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller with Slackware 13.1 using 2.6.33.4 generic SMP kernel.

The first problem I described above. It concerned the screen blanking completely during the boot procedures when the lid was closed. I call it here the major problem.

The second problem appeared when I opened the lid after closing it during the work in the console mode or in X Window. In such a situation the screen shined for a fraction of the second, then blanked for a consecutive fraction of the second and finally shined permanently. I call it here the minor problem.

As I wrote above I inspected /usr/src/linux/drivers/gpu/drm/i915/intel_lvds.c file and changed two lines:

Code:
668c668
<               status = connector_status_disconnected;
---
>               status = connector_status_connected;
733c733
<               dev_priv->modeset_on_lid = 1;
---
>               dev_priv->modeset_on_lid = 0;
To compile i915 module only it’s enough to run the commands:

cd /usr/src/linux
make clean
make oldconfig
make modules_prepare
make M=/usr/src/linux/drivers/gpu/drm/i915/

Because that module is a part of the original kernel it’s enough to overwrite the original /lib/modules/2.6.33.4-smp/kernel/drivers/gpu/drm/i915/i915.ko module with the new /usr/src/linux/drivers/gpu/drm/i915/i915.ko module.

I tested both mentioned above variables. Changing connector_status_disconnected to connector_status_connected solves the major problem. Changing modeset_on_lid = 1 to modeset_on_lid = 0 solves the minor problem. So changing both solves both problems.

Thank you, allend, for your kind assistance once again.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Thinkpad x60s Freezes on Bootdisk Install coyledanny Linux - Laptop and Netbook 12 12-22-2009 11:41 PM
thinkpad x60s cdrom install issue esteeven Linux - Laptop and Netbook 1 09-19-2009 03:02 AM
How enable mi wifi connection in a thinkpad x60s marcoguillen Linux - Wireless Networking 7 11-30-2006 09:50 AM
Thinkpad T42 screen blanking vikiugu Linux - Hardware 2 11-28-2006 05:02 PM
How to turn off screen blanking screen saver in run level 3? Arodef Linux - Software 1 01-04-2005 12:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration