You are not logged in.

#1 2012-10-15 09:10:52

qinohe
Member
From: A Dutch location..)
Registered: 2012-06-20
Posts: 649

[Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

Hi, this morning I started upgrading linux 3.5.6-1 to 3.6.2-1
Reboot the machine and started to notice fan speeding and hot air!
No log entries and everything looks fine, bumblebee-systemd and dkms-bbswitch look started!
This is not the first time it happened, check this thread

Reinstalled dkms-bbswitch  && bumblebee-systemd, and now all is running fine again ;-)
Next time it happens I will not solve it this way, but search deeper for problems! (I needed the machine)

Anyone else running into this minor problem? (again)

Last edited by qinohe (2012-10-18 17:48:23)


-I can give you a ladder, but you need to climb it yourself-

Offline

#2 2012-10-15 11:23:38

weirddan455
Member
Registered: 2012-04-15
Posts: 192

Re: [Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

Same thing happened to me but with catalyst-dkms.  I had installed catalyst 12.9 and xorg 1.13 previously and all was working fine.  I just now upgraded the kernel, rebooted and couldn't get in X.  I had to reinstall catalyst-dkms to get it to work (I actually removed catalyst-dkms, catalyst-utils, and lib32-catalyst-utils before reinstalling but probably wasn't neceisary).  Since I was using the offical package out of [community] I thought it would recompile itself with the kernel upgrade but apperently not.

Offline

#3 2012-10-15 12:03:29

qinohe
Member
From: A Dutch location..)
Registered: 2012-06-20
Posts: 649

Re: [Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

Hi weirddan455,

Well this issue you're having is definitely different from the one I had.
You couldn't login to X, I never had any problems with that.
I have a 2nd video card (nvidia) which is supposed to be switched off by dkms-bbswitch and it didn't. (now it does:)


-I can give you a ladder, but you need to climb it yourself-

Offline

#4 2012-10-15 21:24:51

weirddan455
Member
Registered: 2012-04-15
Posts: 192

Re: [Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

My point is that both of our modules use dkms, which I thought was supposed to recompile on kernel upgrade but for both of us we had to reinstall manually.  I would just like to know how to make it work automatically on kernel upgrade.

Offline

#5 2012-10-16 00:43:52

qinohe
Member
From: A Dutch location..)
Registered: 2012-06-20
Posts: 649

Re: [Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

Didn't think of that one when I saw your post!
Maybe that dkms part could be true for both of us, but I have NO reasonable knowledge about this!
Like to know, am I supposed to reinstall this one on a kernel upgrade always?
Not a big thing, I would still call it a minor problem;)


-I can give you a ladder, but you need to climb it yourself-

Offline

#6 2012-10-16 10:05:12

Lekensteyn
Member
From: Netherlands
Registered: 2012-06-19
Posts: 179
Website

Re: [Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

You do not need to reinstall the packages, just run dkms autoinstall as root.

Offline

#7 2012-10-16 13:03:37

qinohe
Member
From: A Dutch location..)
Registered: 2012-06-20
Posts: 649

Re: [Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

Lekensteyn wrote:

You do not need to reinstall the packages, just run dkms autoinstall as root.

Hi Lekensteyn, thanks for your answer!
So after a kernel upgrade I run dkms autoinstall.
Is this method also working when using AUR packages?, because in this case I use dkms-bbswitch which is from AUR!


-I can give you a ladder, but you need to climb it yourself-

Offline

#8 2012-10-16 14:09:06

Supplantr
Member
From: a state of sunshine
Registered: 2011-12-12
Posts: 149
Website

Re: [Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

qinohe wrote:

Is this method also working when using AUR packages?, because in this case I use dkms-bbswitch which is from AUR!

Yes, I use dkms-bbswitch from the AUR in conjunction with dkms and you must install the bbswitch module to each new kernel, i.e. if you update the -ARCH kernel and, for example, install the -ck kernel, you must add bbswitch to both if you want it to function when using that kernel.
Run dkms status to determine which kernels have bbswitch installed. You can also check the directory /usr/lib/modules/<kernel>/kernel/drivers/acpi (where <kernel> is the name of your kernel) for bbswitch.ko to ensure it's installed.


I use linux and I dont understand nothing in this post.

Offline

#9 2012-10-16 15:51:00

qinohe
Member
From: A Dutch location..)
Registered: 2012-06-20
Posts: 649

Re: [Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

Thank you for this useful post!
Now I now the right way to solve this, and I'm very happy with that big_smile
I have only one kernel installed right now, but this is a nice reminder.
Did read the parts of dkms man, and found a lot of useful info

Found something about Using dkms to manage the modules for VMware

Maybe very noob but I created this files, actually just a rewrite!
Will this work?
dkms.conf;

PACKAGE_NAME="dkms-bbswitch"
PACKAGE_VERSION="9"

MAKE[0]="make all"
CLEAN="make clean"

BUILT_MODULE_NAME[0]="bbswitch"
BUILT_MODULE_LOCATION[0]="modules"


DEST_MODULE_LOCATION[0]="/extra/bbswitch"

AUTOINSTALL="yes"
EOF

makefile

Makefile
KERNEL := $(KERNELRELEASE)
HEADERS := /usr/src/linux-$(KERNEL)/include
GCC := $(shell bbswitch --console --get-gcc)
DEST := /lib/modules/$(KERNEL)/bbswitch

TARGETS := bbswitch

LOCAL_MODULES := $(addsuffix .ko, $(TARGETS))

all: $(LOCAL_MODULES)
        mkdir -p modules/
        mv *.ko modules/
        rm -rf $(DEST)
        depmod

%.ko:
        bbswitch --console --build-mod -k $(KERNEL) $* $(GCC) $(HEADERS) bbswitch/
        cp -f $(DEST)/$*.ko .

clean:
        rm -rf modules/
EOF

Then register modules with

dkms -m dkms-bbswitch -v 9 -k `uname -r` add

Then build it

# dkms -m dkms-bbswitch -v 9 -k `uname -r` build

Install it;

dkms -m dkms-bbswitch -v 9 -k `uname -r` install

-I can give you a ladder, but you need to climb it yourself-

Offline

#10 2012-10-16 16:42:36

Supplantr
Member
From: a state of sunshine
Registered: 2011-12-12
Posts: 149
Website

Re: [Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

@qinohe, I'm not sure you need to do all of that, to be honest. All I've done is dkms add bbswitch/0.4.2 to register the module with the dkms tree, then dkms install bbswitch/0.4.2 -k <kernel> to install it to the desired kernel.


I use linux and I dont understand nothing in this post.

Offline

#11 2012-10-16 17:06:07

qinohe
Member
From: A Dutch location..)
Registered: 2012-06-20
Posts: 649

Re: [Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

Thanks Supplantr,

Yeah, that is very much easier:)
I know it is solved, and I will use your method Supplantr, but I will leave thread open for a few ours longer just incase someone has a answer on post 9.
Maybe someone could shed a light on this one, should I go with the way Supplantr advices, or do I take that road the wiki advices here,thanks.


-I can give you a ladder, but you need to climb it yourself-

Offline

#12 2012-10-16 21:27:28

Lekensteyn
Member
From: Netherlands
Registered: 2012-06-19
Posts: 179
Website

Re: [Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

qinohe wrote:

Will this work?
dkms.conf;

PACKAGE_NAME="dkms-bbswitch"
PACKAGE_VERSION="9"

I have not released bbswitch 9 (in fact, the latest version atm is 0.4.2). Setting PACKAGE_VERSION=9 is not meaningful to the world.

MAKE[0]="make all"

When you just use "make", it will run the first target which could be "all".

GCC := $(shell bbswitch --console --get-gcc)

Will not work. There is no "bbswitch" command, so the shell command "bbswitch --console --get-gcc" will fail.

all: $(LOCAL_MODULES)
        mkdir -p modules/
        mv *.ko modules/
        rm -rf $(DEST)
        depmod

This is a horrible Makefile. The mkdir and mv commands might be reasonable, but removing the current module in "all" is very questionable. Especially because DKMS takes care of that, just like the depmod command.

bbswitch --console --build-mod -k $(KERNEL) $* $(GCC) $(HEADERS) bbswitch/

Won't work, there is no "bbswitch" command.

"dkms install" is enough, you do not need "dkms add" and "dkms remove" if you put the source in /usr/src/bbswitch-PACKAGE_VERSION.

Have you tried the DKMS instructions on https://github.com/Bumblebee-Project/bbswitch? What is wrong with the current dkms-bbswitch package?

Last edited by Lekensteyn (2012-10-16 21:28:33)

Offline

#13 2012-10-17 10:00:40

qinohe
Member
From: A Dutch location..)
Registered: 2012-06-20
Posts: 649

Re: [Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

Lekensteyn, dkms-bbswitch works just fine!
The only issue was; reinstall dkms-bbswitch after a kernel upgrade.

I found that wiki page about VMware, I quote:

The Dynamic Kernel Module Support (DKMS) can be used to manage Workstation modules and to void from re-running vmware-modconfig each time the kernel changes. The following example uses a custom Makefile to compile and install the modules through vmware-modconfig. Afterwards they are removed from the current kernel tree.

I rewrote the files they are talking about. (that's why there was a 9 as version, I forgot to swap with 0.42;)
It was my first attempt ever making a makefile (I cannot program nor script, in-fact I would like to learn)
Didn,t read the github page after I created the files, there are a lot of differences!

Lekenstyen wrote:

This is a horrible Makefile. The mkdir and mv commands might be reasonable, but removing the current module in "all" is very questionable. Especially because DKMS takes care of that, just like the depmod command.

Thanks for walking trough the files I made, and judging them tongue
My understanding of DKMS has grown a bit, and thats oke!


-I can give you a ladder, but you need to climb it yourself-

Offline

#14 2012-10-18 11:02:48

Lekensteyn
Member
From: Netherlands
Registered: 2012-06-19
Posts: 179
Website

Re: [Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

You can let DKMS build packages on booting a new kernel by systemctl enable dkms.service. For the old rc.conf, simply add dkms to DAEMONS.

Offline

#15 2012-10-18 12:17:36

qinohe
Member
From: A Dutch location..)
Registered: 2012-06-20
Posts: 649

Re: [Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

So Lekensteyn, thanks for all your input on this 'mather', and I did enable the service to systemd, life can be easy!

But, I am only running bbswitch which is using DKMS, my question: run by hand or let the service do its job?
A well I leave it for now and try it, that won't hurt;)

Maybe the wiki should be updated too, I have no account, and never edited a wiki before.
And before I would post I would first share the details here, but its not going to happen right now, it has to wait for the weekend;)


-I can give you a ladder, but you need to climb it yourself-

Offline

#16 2012-10-18 15:36:33

Lekensteyn
Member
From: Netherlands
Registered: 2012-06-19
Posts: 179
Website

Re: [Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

Offline

#17 2012-10-18 17:57:01

qinohe
Member
From: A Dutch location..)
Registered: 2012-06-20
Posts: 649

Re: [Solved] Upgrading kernel breaks dkms-bbswitch 2nd time

That looks very nice, clear and to the point, I like it thanks;)


-I can give you a ladder, but you need to climb it yourself-

Offline

Board footer

Powered by FluxBB