monitor output hotkey Fn-F8 does not work on Darter

Reported by cowbean on 2007-05-22
12
Affects Status Importance Assigned to Milestone
System76
Low
Unassigned
System76 Driver
Low
Unassigned

Bug Description

This is on my Darter running Feisty, which was upgraded via the officially supported "Updater" method from Edgy.

Fn-F8 only works before Ubuntu starts up. After that, the video output mode is locked to LCD + CRT. I believe this prevents X from detecting that the connected monitor can go beyond 1280x800 resolution. To enable that resolution, I need to hit Fn-F8 a couple of times before the Ubuntu splash screen comes up at boot-time, so that only the external monitor connected via VGA is lit. Then, X seems able to render at the appropriate resolution.

Carl Richell (carlrichell) wrote :

FN+F8 output hotkey currently only works during BIOS post. While booting, once you see the Intel logo, press FN+F8 to switch to the external monitor or s-video output.

We need to work on this bug - FN+F8 should switch output from within Ubuntu.

Changed in system76:
importance: Undecided → Low
status: Unconfirmed → Confirmed
sherrardb (sburton-launchpad) wrote :

i don't know if this helps, but i think i have narrowed this down to the asus_acpi module. steps to reproduce:

1) boot up in recovery mode
2) confirm that Fn+F8 works for display switching
3) modprobe asus_acpi
4) confirm that Fn+F8 does not work

this module caught my attention because it was one of the ones that was newly loaded between the recovery mode boot and running /etc/acpid start. i haven't necessarily rules out all of the other modules, but there is a very short list of realistic culprits.

the strangest thing to me is that unloading that module, and any others that were loaded because of it, does not return the system to its previous state where Fn+F8 works again. my best guess is that loading this module triggers a change in kacpid, the kernel daemon, but that it this change is not reverted by unloading the module.

Thomas Aaron (tom-system76) wrote :

Here is a work-around until we can create a permanent solution.

Download the attached script (video-switch.sh) to your Desktop, make it executable, and click it and select "Run" when you want to switch displays.
Each time you run the script, it will rotate between LCD --> LCD & Monitor --> Monitor.

---OR---

1. You can map a function key to activate it using xbindkeys, just like here: https://bugs.launchpad.net/system76/+bug/114677

2. You can create a application launcher on your upper panel to run the script, just like here: https://bugs.launchpad.net/system76/+bug/105626

Happy Switching,
Tom

Thomas Aaron (tom-system76) wrote :

OK, I believe I've got the REAL fix. It appears the vga module is not getting loaded.

To correct the problem:

sudo gedit /etc/default/acpid

Make the 'modules' line look like this:
MODULES="all vga"

Let's make sure this doesn't foul up anything else...

Best,
Tom

sherrardb (sburton-launchpad) wrote :

i tried responding to these directly to the email, but that doesn't seem to have worked. that was fortuitous because now i find that i can't reproduce the conditions that i was describing. but just in case the messages were just delayed, i'll mention what i was seeing, and now can't figure out how to reproduce.

1) i discovered that from within X, you could repeatedly insert zero into /etc/default/acpid and the display would cycle through the expected sequence. i don't know if this stopped working because of the various changes that i have been making to my xorg.conf. after trying to send the initial message, i also discovered that you do seem to need the 1,2,3 values if you are doing the switching purely from a virtual terminal. but again, i haven't yet been able to reproduce this condition.

2) during my experimentation with xorg.conf, at some point Fn+F8 was working within X. i never actually installed the script or setup xbindkeys, so it was working natively somehow. but once i loaded the asus_acpi module, the hotkey quit working....

hold it. a little lightbulb went off while composing this message. i was trying to figure out how i could have possibly gotten into X without the asus_acpi module loading, therefore allowing the hotkey to work. well here it is. the other "lost" email response was that the configuration mentioned above
MODULES="all vga"
does not work on my machine because there is no vga module in
/lib/modules/*/kernel/drivers/acpi
or
/lib/modules/*/kernel/ubuntu/acpi
which is where /etc/init.d/acpid looks for available modules. if there was one there, then the default
MODULES="all"
would have loaded it automatically. the other side effect of this misconfiguration is that it doesn't load *any* of the acpi drivers, including, guess what, asus_acpi, which i have proven, at least to myself, is the culprit in all of this. to confirm this you can put some debugging in /etc/init.d/acpid or set VERBOSE=yes in /etc/default/rcS and look at the difference in the output when you restart acpid. so TA, i'm guessing that you did exactly what i did: set the value of MODULES="all vga", and rebooted to confirm that the change was persistant, then just like me you would have seen that the hotkeys actually do work. but it's not because of a magical vga module, but because the misconfiguration causes asus_acpi not to be loaded. can you confirm whether the asus_acpi module is loaded when the hotkey is working for you, and if not, load asus_acpi and see if the hotkey stops working?

at some point i started looking into whether a newer version of asus_acpi worked better. i think feisty is currently on 0.30 and there are 0.32, 0.40 and 0.41 available. but alas i was never able to get them compiled and working. maybe this is just enought information to get somebody else on the right path to the solution.

sherrardb (sburton-launchpad) wrote :

i did finally compile the latest version of the asus acpi kernel module, and that still didn't help. i did however look around on the net and i stumbled across a more streamlined solution and a little better script. based on instructions found elsewhere, i created /etc/acpi/events/asus-display-switch, containing
# /etc/acpid/events/asus-display-switch
# This is called when the user presses the display switch button (Fn-F8).
# The actual hotkey code tells the state of the switch: (LCD, CRT, Both).

event=hotkey ATKD 0000006[123]
action=/etc/acpi/asus-display-switch.sh '%e'

then i created /etc/acpi/asus-display-switch.sh, containing
#!/bin/sh
echo $1 | sed -re 's/^hotkey ATKD 0+6([1-3]) [0-9a-f]+$/\1/' > /proc/acpi/asus/disp

then i restarted acpid

for those who are interested in the details, each time you press Fn+F8, the system fires off the events 00000061 00000062 00000063 in order. that event is passed to the script where sed strips it down to the last digit and echos that into /proc/acpi/asus/disp.

enjoy

sherrardb (sburton-launchpad) wrote :

and the script

perce (ghiggini) wrote :

Both Tom's and Sherradb's solutions worked for me, I'm very happy :)

Just one remark about Sherradb's one: don't forget
sudo chmod a+x /etc/erwise acpi/asus-display-switch.sh
otherwise it won't work.
Also, after he first cycle the behaviour becomes more irregular, but not at a problematic extent: it sometimes displays both when it should display only one

Thomas Aaron (tom-system76) wrote :

Sherrardb,

Excellent work. We are incorporating your fix into the System 76 driver.
How did you figure out the keycode for Fn-F8?

Best,
Tom

Thomas Aaron (tom-system76) wrote :

Just some clarification for anyone who needs it:

1. Below are two attached files: asus-display-switch --and-- asus-display-switch.sh
2. Dowload both to your desktop.
3. Enter the following commands in a terminal, one at a time:
sudo cp ~/Desktop/asus-display-switch /etc/acpi/events
sudo cp ~/Desktop/asus-display-switch.sh /etc/acpi
sudo chmod a+x /etc/acpi/asus-display-switch.sh
4. Reboot
5. Shazaam!

Thomas Aaron (tom-system76) wrote :
Thomas Aaron (tom-system76) wrote :
Changed in system76:
status: Confirmed → Fix Committed
Changed in system76-driver:
importance: Undecided → Low
status: Unconfirmed → Confirmed
sherrardb (sburton-launchpad) wrote :

most of the info was in the forum where i found it, but you can get any of it by looking in the acpid log

tail -f /var/log/acpid

then keystroke away. it took me a little while to realize that the keycode rotated every time. then i realized what the regular expression match [123] after the 6 was for.

glad i could help

Changed in system76-driver:
status: Confirmed → Fix Committed
Changed in system76-driver:
status: Fix Committed → Fix Released
Changed in system76:
status: Fix Committed → Fix Released
Marco Fonseca (marco-fonseca) wrote :

Hi all,

First of all, thanks a lot for all your work. It means a lot particularly to all of us newbies.

I have an Asus G1S laptop, running Gutsy Gibbon (final + updates) with kernel 2.6.22 and desktop effects enabled. I've also tried to update the acpi driver using the latest version of acpi4asus from cvs, but I haven't been able to compile the driver at all. So, the machine is running with version 0.30 of this driver and not with version 0.41. Running dmesg outputs a line saying "Asus Laptop ACPI Extras version 0.30, unsupported model G1S, trying default values", etc.

After doing tons of googling around and trying a large number of possible solutions for why the fn + f8 button combination doesn't work on my machine, I found the solutions suggested above and decided to try them. These solutions brought me closer to getting something happening when I pressed the fn + f8 than anything else. Trouble is double though.

First, using the two files solution and after pressing fn + f8 key, the screen goes black (which, compared to not doing anything before, it's progress!), but after pressing the fn + f8 to return to the LCD, the screen stays black and there is no way out except by doing a hard reboot.

Second, if I don't use the files above and only change the modules line on the acpid file to read "vga all", in addition to getting the same problem of not being able to get out of a black screen, I also seem to lose some acpi functionality, particularly the battery icon and the automatic brightness adjustment of the screen when switching from ac to battery power.

At this point, then, I'm nowhere closer to actually solving this problem than I was before and so any extra bit of help would be appreciated.

Tx,

Marco

Hi, Marco.

This launchpad site is for bugs related to System 76 computers.
While we do try to share knowledge with the Ubuntu community at large,
we do not have an Asus G1S laptop to test with.

Best,
Tom

----- Original Message -----
From: "Marco Fonseca" <email address hidden>
To: <email address hidden>
Sent: Friday, November 9, 2007 9:00:54 AM (GMT-0700) America/Denver
Subject: [Bug 116107] Re: monitor output hotkey Fn-F8 does not work on Darter

Hi all,

First of all, thanks a lot for all your work. It means a lot
particularly to all of us newbies.

I have an Asus G1S laptop, running Gutsy Gibbon (final + updates) with
kernel 2.6.22 and desktop effects enabled. I've also tried to update the
acpi driver using the latest version of acpi4asus from cvs, but I
haven't been able to compile the driver at all. So, the machine is
running with version 0.30 of this driver and not with version 0.41.
Running dmesg outputs a line saying "Asus Laptop ACPI Extras version
0.30, unsupported model G1S, trying default values", etc.

After doing tons of googling around and trying a large number of
possible solutions for why the fn + f8 button combination doesn't work
on my machine, I found the solutions suggested above and decided to try
them. These solutions brought me closer to getting something happening
when I pressed the fn + f8 than anything else. Trouble is double though.

First, using the two files solution and after pressing fn + f8 key, the
screen goes black (which, compared to not doing anything before, it's
progress!), but after pressing the fn + f8 to return to the LCD, the
screen stays black and there is no way out except by doing a hard
reboot.

Second, if I don't use the files above and only change the modules line
on the acpid file to read "vga all", in addition to getting the same
problem of not being able to get out of a black screen, I also seem to
lose some acpi functionality, particularly the battery icon and the
automatic brightness adjustment of the screen when switching from ac to
battery power.

At this point, then, I'm nowhere closer to actually solving this problem
than I was before and so any extra bit of help would be appreciated.

Tx,

Marco

--
monitor output hotkey Fn-F8 does not work on Darter
https://bugs.launchpad.net/bugs/116107
You received this bug notification because you are a member of System76
Bugs, which is the bug contact for System76.

Marco Fonseca (marco-fonseca) wrote :

Tom,

I literaly just realized that your support site is for System 76 machines. My apologies for that. Yet, I must add, following some of the instructions on this site for addressing the Fn+f8 key problem on your machines also seems to be doing something on my Asus G1S laptop as described in my previous message. So, although you guys are not at all addressing my concerns, your suggestions have nonetheless brought me closer to fixing this problem than any other suggestions anywhere else so far. For that, thanks.

Marco

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers