Build error when installing bbswitch-dkms on Ubuntu 14.04.3

Bug #1532538 reported by flojten
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bbswitch (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I have an Nvidia Optimus graphic card installed and have the Nvidia driver installed and working for my Intel card, but I cannot switch to the Nvidia card. This is because bbswitch-dkms will not build during install via apt-get or from source.

My system

 * Ubuntu 14.04.3 LTS
 * NVIDIA Corporation GF119M [GeForce GT 520M]
 * linux-image-3.19.0-42-generic
 * linux-headers-3.19.0-42-generic
 * linux-image-extra-3.19.0-42-generic
 * dkms: 2.2.0.3
 * gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
 * bbswitch-dkms (0.7-2ubuntu1)

When trying to install bbswitch-dkms the following error occurs:

Unpacking bbswitch-dkms (0.7-2ubuntu1) over (0.7-2ubuntu1) ...
Setting up bbswitch-dkms (0.7-2ubuntu1) ...
Loading new bbswitch-0.7 DKMS files...
Building only for 3.19.0-42-generic
Building initial module for 3.19.0-42-generic
Error! Bad return status for module build on kernel: 3.19.0-42-generic (x86_64)
Consult /var/lib/dkms/bbswitch/0.7/build/make.log for more information.

The content of make.log is:

DKMS make.log for bbswitch-0.7 for kernel 3.19.0-42-generic (x86_64)
lör 9 jan 2016 15:37:02 CET
make -C /lib/modules/3.19.0-42-generic/build M="$(pwd)" modules
make[1]: Entering directory `/usr/src/linux-headers-3.19.0-42-generic'
arch/x86/Makefile:114: stack-protector enabled but compiler support broken
  CC [M] /var/lib/dkms/bbswitch/0.7/build/bbswitch.o
/var/lib/dkms/bbswitch/0.7/build/bbswitch.c: In function ‘is_card_disabled’:
/var/lib/dkms/bbswitch/0.7/build/bbswitch.c:236:1: internal compiler error: Bus error
 }
 ^

It seems this is the main problem:

make[1]: Entering directory `/usr/src/linux-headers-3.19.0-42-generic'
arch/x86/Makefile:114: stack-protector enabled but compiler support broken

The following log entries appear in syslog during installation and building bbswitch-dkms:

kernel: [ 235.068506] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
kernel: [ 235.071273] ata1.00: irq_stat 0x40000001
kernel: [ 235.074011] ata1.00: failed command: READ DMA
kernel: [ 235.076740] ata1.00: cmd c8/00:08:a8:95:07/00:00:00:00:00/e0 tag 27 dma 4096 in
kernel: [ 235.076740] res 51/40:00:a8:95:07/00:00:00:00:00/00 Emask 0x9 (media error)
kernel: [ 235.082207] ata1.00: status: { DRDY ERR }
kernel: [ 235.084957] ata1.00: error: { UNC }
kernel: [ 235.119639] ata1.00: configured for UDMA/133
kernel: [ 235.119667] sd 0:0:0:0: [sda] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
kernel: [ 235.119674] sd 0:0:0:0: [sda] Sense Key : Medium Error [current] [descriptor]
kernel: [ 235.119680] sd 0:0:0:0: [sda] Add. Sense: Unrecovered read error - auto reallocate failed
kernel: [ 235.119684] sd 0:0:0:0: [sda] CDB:
kernel: [ 235.119687] Read(10): 28 00 00 07 95 a8 00 00 08 00
kernel: [ 235.119704] blk_update_request: I/O error, dev sda, sector 497064
kernel: [ 235.122090] ata1: EH complete

I have installed kernel-headers so all building packages should be installed.

Has anyone encountered this before or know of any solutions?

Thank you!

Revision history for this message
Peter Wu (lekensteyn) wrote :

Your disk seems broken. Have you checked the disk health?

    smartctl -a /dev/sda

Changed in bbswitch (Ubuntu):
status: New → Invalid
Revision history for this message
flojten (fderenius) wrote :
Download full text (10.0 KiB)

I have run chkdisk as can be seen in https://answers.launchpad.net/ubuntu/+source/bbswitch/+question/280808.

There are some errors from smartctl, but I can't really tell if they are the cause of the kernel module problem.

Output from smartctl -a /dev/sda:

smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.19.0-43-generic] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Seagate Momentus 7200.5
Device Model: ST9750420AS
Serial Number: 5WS2N0W6
LU WWN Device Id: 5 000c50 04447820c
Firmware Version: 0002SDM1
User Capacity: 750 156 374 016 bytes [750 GB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 2.6, 3.0 Gb/s
Local Time is: Thu Jan 21 19:31:36 2016 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
     was never started.
     Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
     without error or no self-test has ever
     been run.
Total time to complete Offline
data collection: ( 0) seconds.
Offline data collection
capabilities: (0x73) SMART execute Offline immediate.
     Auto Offline data collection on/off support.
     Suspend Offline collection upon new
     command.
     No Offline surface scan supported.
     Self-test supported.
     Conveyance Self-test supported.
     Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
     power-saving mode.
     Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
     General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 149) minutes.
Conveyance self-test routine
recommended polling time: ( 3) minutes.
SCT capabilities: (0x103f) SCT Status supported.
     SCT Error Recovery Control supported.
     SCT Feature Control supported.
     SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate 0x000f 094 092 006 Pre-fail Always - 173609489
  3 Spin_Up_Time 0x0003 097 097 085 Pre-fail Always - 0
  4 Start_Stop_Count 0x0032 093 093 020 Old_age Always - 7711
  5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
  7 Seek_Error_Rate 0x000f 076 060 030 Pre-fail Always - 42050651
  9 Power_On_Hours 0x0032 084 084 000 Old_age Always - 14...

Revision history for this message
flojten (fderenius) wrote :

Still having problem and do not think it's a disk error problem. Would be grateful for analysis of smartctl output, to confirm if it is a disk problem.

Changed in bbswitch (Ubuntu):
status: Invalid → Incomplete
Revision history for this message
flojten (fderenius) wrote :
Changed in bbswitch (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.